Generating JARs

In order to package the EJB, the bean classes, interfaces and the deployment descriptor are placed into a .JAR file. This process is common to all EJB components.

You can generate .JAR files from the Tasks page of the Generation dialog box ( Language > Generate Java Code ).

For example, one of the task allows you to compile .JAVA files using a compiler, to create a .JAR file including the compiled Java classes, and to complete the .JAR file with the deployment descriptor and icons.



Warning!  

You must set the values of the commands used during generation from the Variables section of the General Options dialog box in order to enable them. For example, you can set the javac.exe and jar.exe executables at this location.

For more information on how to set these variables, see "Defining environment variables" section in the Models chapter of the General Core Guide.

There is no constraint over the generation of one JAR per package. Only packages with the <<archive>> stereotype will generate a JAR when they (or one of their descendant package not stereotyped <<archive>>) contain one EJB.

The newly created archive contains the package and all of its non-stereotyped descendants. The root package (that is the model) is always considered as being stereotyped <<archive>>.

For example, if a model contains several EJB components in different sub-packages but that none of these packages is stereotyped <<archive>>, a single JAR is created encompassing all packages.




Created October 7, 2009. Send feedback on this help topic to Sybase Technical Publications: pubs@sybase.com