Add EJB Jar files
We can change EJB Jar files on appservers without having to stop the server and start it again.
There are several changes that we can make to EJB Jar files without stopping the server and starting it again.
See Ways to update enterprise application files and determine whether hot deployment is the appropriate way for you to update the EJB Jar files. Other ways are easier and hot deployment is appropriate only for experienced users. We can use the update wizard of the admin console to make the changes without having to stop and restart the server.
The following table lists the changes that we can make to EJB Jar files by manipulating an EJB file on the server where the application is deployed. The table also states whether you use hot deployment or dynamic reloading to make the changes.
Table 1. Available changes to EJB Jar files
Change Hot deployment Dynamic reloading Change the ejb-jar.xml file of an EJB Jar file. Not applicable Yes Change the ibm-ejb-jar-ext.xmi or ibm-ejb-jar-bnd.xmi file of an EJB Jar file. Not applicable Yes Change the Table.ddl file for an EJB Jar file. Not applicable Not applicable Change the Map.mapxmi or Schema.dbxmi file for an EJB Jar file. Not applicable Yes Update the implementation class for an EJB file or a dependent class of the implementation class for an EJB file. Not applicable Yes Update the Home/Remote interface class for an EJB file. Not applicable Yes Add a new EJB file to an existing EJB Jar file. Yes Yes
- Change the ejb-jar.xml file of an EJB Jar file.
Restart the application. Automatic reloading will not detect the change. Use the admin console to restart the application. Or use the startApplication and stopApplication attributes of the AdminControl object with wsadmin.
- Change the ibm-ejb-jar-ext.xmi or ibm-ejb-jar-bnd.xmi file of an EJB Jar file.
Restart the application. Automatic reloading will not detect the change. Use the admin console to restart the application. Or use the startApplication and stopApplication attributes of the AdminControl object with wsadmin.
- Change the Table.ddl file for an EJB Jar file.
Rerun the DDL file on the user database server. Changing the Table.ddl file has no effect on the appserver and is a change to the database table schema for the EJB files.
- Change the Map.mapxmi or Schema.dbxmi file for an EJB Jar file.
- Change the Map.mapxmi or Schema.dbxmi file for an EJB Jar file.
- Regenerate the deployed code artifacts for the EJB file.
- Apply the new EJB Jar file to the server.
- Restart the application. Use the admin console to restart the application. Or use the startApplication and stopApplication attributes of the AdminControl object with wsadmin.
- Update the implementation class for an EJB file or a dependent class of the implementation class for an EJB file.
- Update the class file in the APP_ROOT/module_name.jar file.
- If automatic reloading is enabled, you do not need to take further action. Automatic reloading will detect the change.
If automatic reloading is not enabled, restart the application of which the EJB file is a member. If the updated module is used by other modules in other applications, restart those applications as well. Use the admin console to restart the application. Or use the startApplication and stopApplication attributes of the AdminControl object with wsadmin.
- Update the Home/Remote interface class for an EJB file.
- Update the interface class of the EJB file.
- Regenerate the deployed code artifacts for the EJB file.
- Apply the new EJB Jar file to the server.
- If automatic reloading is enabled, you do not need to take further action. Automatic reloading will detect the change.
If automatic reloading is not enabled, restart the application of which the EJB file is a member. Use the admin console to restart the application. Or use the startApplication and stopApplication attributes of the AdminControl object with wsadmin.
- Add a new EJB file to an existing EJB Jar file.
- Apply the new or updated Jar file to the APP_ROOT location.
- If automatic reloading is enabled, you do not need to take further action. Automatic reloading will detect the change.
If automatic reloading is not enabled, restart the application. Use the admin console to restart the application. Or use the startApplication and stopApplication attributes of the AdminControl object with wsadmin.
Related tasks
Hot deployment and dynamic reloading
Starting applications with scripting
Stopping applications with scripting