org.ow2.jonas.generators.genic
Class GenIC

java.lang.Object
  extended by org.ow2.jonas.generators.genic.GenIC

public class GenIC
extends Object

This class allows to generate:

of all the Enterprise Java Beans defined in the given Deployment Descriptor.

Author:
Helene Joanin : Initial developer, Christophe Ney (Lutris Technologies) : Fix to handle arguments containing white spaces., Guillaume Riviere : Fix the addClassesInJar() method (on David, the Stub/Skel classes names are different)., Dean Jennings : Remove System Exit (called now from server), Sami Lehtinen : use of java.util.jar api instead of jar command

Field Summary
static org.objectweb.util.monolog.api.Logger logger
          Logger.
 
Constructor Summary
GenIC(DeploymentDesc ejbJarDesc, GenICParameters gp)
          GenIC Constructor: generates the container classes sources of each beans.
 
Method Summary
 void addClassesInJar()
          Add the generated classes in the given ejb-jar file.
 void clean()
          Clean the intermediate generated files.
 void compilClasses(String classpath, ClassLoader loader)
          Compiles the java sources generated by the constructor I.e.
protected  String convertName(String name)
          Convert a name from any format in Jar filename format.
static void main(String[] args)
          GenIC allows to generate the container classes for JOnAS for the given Enterprise Java Beans.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

logger

public static org.objectweb.util.monolog.api.Logger logger
Logger.

Constructor Detail

GenIC

public GenIC(DeploymentDesc ejbJarDesc,
             GenICParameters gp)
      throws GenICException
GenIC Constructor: generates the container classes sources of each beans.

Parameters:
ejbJarDesc - deployment descriptors of the beans
gp - GenIC parameters
Throws:
GenICException - In error case
Method Detail

main

public static void main(String[] args)
GenIC allows to generate the container classes for JOnAS for the given Enterprise Java Beans.

Usage: java org.ow2.jonas.generators.genic.GenIC -help
to print this help message

or java org.ow2.jonas.generators.genic.GenIC <Options><Input_File>
to generate the container classes for the given EJBs.

Options include:

Input_File file name of the standard deployment descriptor (.xml ended), or file name of the EJB-jar (.jar ended).

Parameters:
args - arguments for GenIC

compilClasses

public void compilClasses(String classpath,
                          ClassLoader loader)
                   throws GenICException
Compiles the java sources generated by the constructor I.e. :

Parameters:
classpath - classpath value
loader - ClassLoader used for compilation of interposition classes
Throws:
GenICException - In error case

addClassesInJar

public void addClassesInJar()
                     throws GenICException
Add the generated classes in the given ejb-jar file.

Throws:
GenICException - if the classes cannot be added in the jar file

convertName

protected String convertName(String name)
Convert a name from any format in Jar filename format.

Parameters:
name - filename to be converted
Returns:
converted filename

clean

public void clean()
Clean the intermediate generated files.



Copyright © 2010 OW2 Consortium. All Rights Reserved.