6.5. GenIC

6.5.1. Synopsis

GenIC [ Options ] InputFilename

Starts the GenIC utility.

6.5.2. Description

The GenIC utility generates the container classes for JOnAS from the given Enterprise Java Beans.

The InputFileName is either the file name of an EJB-JAR file or the file name of an XML deployment descriptor of beans.

The GenIC utility does the following in the order listed:

  1. Generates the sources of the container classes for all the beans defined in the deployment descriptor.

  2. Compiles these classes via the Java compiler.

  3. Generates stubs and skeletons for those remote objects via the RMI compiler.

  4. If the InputFile is an EJB-JAR file, adds the generated classes in this EJB-JAR file.

6.5.3. Options

-d directory

Specifies the root directory of the class hierarchy.

This option can be used to specify a destination directory for the generated files.

If the -d option is not used, the package hierarchy of the target class is ignored and the generated files are placed in the current directory.

If the InputFile is an EJB-JAR file, the generated classes are added to the EJB-JAR file, unless the -noaddinjar option is set.

-invokecmd

Invoke, directly in some cases, the method of the Java class corresponding to the command.

-javac options

Specifies the java compiler name to use (javac by default).

-javacopts options

Specifies the options to pass to the java compiler.

-keepgenerated

Do not immediately delete generated files.

-noaddinjar

If the InputFile is an EJB-JAR file, do not add the generated classes to the EJB-JAR file.

-nocompil

Do not compile the generated source files via the Java and RMI compilers.

-novalidation

Remove xml validation during parsing.

-protocols

Comma-separated list of protocols (chosen from jrmp, iiop, cmi) for which stubs should be generated. Default is jrmp.

-rmiopts options

Specifies the options to pass to the rmi compiler.

-verbose

Displays additional information about command execution.

-mappernames

Comma-separated list of mapper names for which the container classes will be generated. Used for the JORM-based implementation of CMP 2.0. A mapper is used by JORM for accessing a given database. This list of mappers corresponds to the list of potential databases upon which the Entity Beans can be deployed.

6.5.4. Example

GenIC -d ../../classes sb.xml

Generates container classes of all the Enterprise JavaBeans defined in the sb.xml file. Classes are generated in the ../../classes directory adhering to the classes hierarchy.

GenIC sb.jar

Generates container classes for all the Enterprise JavaBeans defined in the sb.jar file and adds the generated classes to this EJB-JAR file.

6.5.5. Environment

If InputFile is an XML deployment descriptor, the classpath must include the paths of the directories in which the Enterprise Bean's classes can be found, as well as the path of the directory specified by the -d option.

If InputFile is an EJB-JAR file, the classpath must include the path of the directory specified by the -d option.