Deployer's Guide
Target audience
The target audience for this guide is the deployer. The deployer is
responsible for the deployment of Enterprise Beans and their containers in the
EJB server.
Deployment process description
The deployment process consists of:
- Customizing the deployment descriptor of the bean in order to adapt it to the specific operational environment.
- Generating the container classes.
Now, with JOnAS 2 deployment descriptors are written in XML, the deployer must use its favorite XML editor for editing it and
GenIC tool (provided with the JOnAS distribution) for the container classes generation process.
In the next future a graphical
tool will be provided in order to make this process easier.
Example:
Suppose that we want to customize the deployment of the AccountImpl
bean in the JOnAS sample examples/src/eb.
The customization wanted will be to change the name of the database table used for the persistence
of the AccountImpl.
The current directory is $JONAS_ROOT/examples/src/eb.
- Edit jonas-ejb-jar.xml and modify the value of the
<jdbc-table-name> element included in the <jdbc-mapping> element
corresponding to AccountImpl entity.
The GenIC generation tool can be run :
explicitely via the command:
GenIC -d ../../classes ejb-jar.xml
or via :
make
Running the EJB Server:
Make sure that a registry is running with the correct port
number defined by the java.naming.provider.url property in the
jndi.properties file.
Make sure the property jonas.beans.descriptors is set to ejb-jar.xml
in the jonas.properties file.
EJBServer
Another Example:
Suppose that we want to customize the deployment of a bean that is provided in an ejb-jar file
name eb.jar
- All files from ejb-jar file must be extracted:
jar xvf eb.jar
- Edit the META-INF/jonas-ejb-jar.xml in the same way as in the previous example
- Run GenIC generation tool (classes extracted from the eb.jar
must be seen via the CLASSPATH environment variable).