The deployer may customize the Enterprise Bean in order to adapt it to the specific operational environment.
The deployer can work directly with the ejb-jar file It is
supposed that the JOnAS product is correctly installed (in a directory
JONAS_ROOT), and that the PATH environment variable is correctly set.
The GenIC generation tool can
be run :
it is supposed that the ejb-jar file is named sb.jar and
that the container classes are to be generated in the working
directory:
GenIC -d . sb.jar
The container classes are generated by the GenIC tools in the
subdirectories corresponding to the packages of the Enterprise Bean's
classes.
After running GenIC tools, all the files of the ejb-jar file
are extracted.
It is typically the case that the deployer wants to adapt the bean to the local environment. The deployer may intend to read the attribute setting in the Enterprise Bean's deployment descriptor in order to modify the values of the Enterprise Bean's environment properties.
In the first version of the product there is no graphical tool to update a deployment descriptor. There are two tools, GenDD and DumpDD, the former is able to generate a serialized deployment descriptor from a textual description, the latter is able to generate a textual description in a file from a serialized deployment descriptor.
All files from the eb.jar file must be extracted:
(the current directory must be $JONAS_ROOT)
jar xvf eb.jar
To obtain the textual repesentation of the deployment descriptor:
(the current directory must be $JONAS_ROOT/examples/src/eb)
DumpDD AccountImpl.ser
The result of this command will be a file AccountImpl.txt
containing the textual representation of the deployment descriptor and
a file AccountImpl.properties containing the description of the
environment properties for the Enterprise Bean.
It is possible to change the name of the database table by editing the
db.TableName property in the AccountImpl.properties
file.
To obtain the new serialized deployment descriptor :
(the current directory must be $JONAS_ROOT/examples/src/eb)
GenDD AccountImpl.txt
The GenIC generation tool can be run :
(the current directory must be $JONAS_ROOT)
GenIC -d . examples/src/eb/AccountImpl.ser
Running the EJB Server:
Make sure that a rmiregistry is running with the correct port number defined by the java.naming.provider.url property in the jonas.properties file.
Make sure the property jonas.beans.descriptors is correctly set in the jonas.properties file.
EJBServer