This subsection describes the procedure for replacing the JavaBeans resources. To replace a JavaBeans resource, stop the J2EE application and JavaBeans resource, restart the J2EE server, and then replace the JavaBeans resource. You use the server management commands to replace the JavaBeans resources.
The procedure is as follows:
- Stop the J2EE application that is using the JavaBeans resource you want to replace.
To stop the J2EE application, execute the cjstopapp command. The format and example of execution of the cjstopapp command are as follows:
- Format of execution
cjstopapp J2EE-server-name -name J2EE-application-name |
- Example of execution
- cjstopapp MyServer -name App1
- Stop the JavaBeans resource you want to replace.
To stop the JavaBeans resource, execute the cjstopjb command. The format and example of execution of the cjstopjb command are as follows:
- Format of execution
cjstopjb server-name -resname display-name-of-JavaBeans-resource |
- Example of execution
- cjstopjb MyServer -resname javabeansname
- Restart the J2EE server.
To delete a JavaBeans resource that is started once, you must restart the J2EE server. To stop the J2EE server, execute the cjstopsv command. The format and example of execution of the cjstopsv command are as follows:
- Format of execution
cjstopsv J2EE-server-name |
- Example of execution
- cjstopsv MyServer
After you stop the J2EE server, start the server once again. To start the J2EE server, execute the cjstartsv command. The format and example of execution of the cjstartsv command are as follows:
- Format of execution
cjstartsv J2EE-server-name |
- Example of execution
- cjstartsv MyServer
- Delete the JavaBeans resource you want to replace.
To delete the JavaBeans resource, execute the cjdeletejb command. The format and example of execution of the cjdeletejb command are as follows:
- Format of execution
cjdeletejb server-name -resname display-name-of-JavaBeans-resource |
- Example of execution
- cjdeletejb MyServer -resname MyJavaBeans
- Import the replaced JavaBeans resource.
To import the JavaBeans resource, execute the cjimportjb command. The format and example of execution of the cjimportjb command are as follows:
- Format of execution
cjimportjb server-name -f JAR-file-path -c path-of-the-JavaBeans-resource-property-file |
- Example of execution
- cjimportjb MyServer -f Myjavabeans.jar -c Myjavabeansprop.xml
- Start the JavaBeans resource.
To start the JavaBeans resource, execute the cjstartjb command. The format and example of execution of the cjstartjb command are as follows:
- Format of execution
cjstartjb server-name -resname display-name-of-JavaBeans-resource |
- Example of execution
- cjstartjb MyServer -resname javabeansname
- Start the J2EE application.
To start the J2EE application, execute the cjstartapp command. The format and example of execution of the cjstartapp command are as follows:
- Format of execution
cjstartapp J2EE-server-name -name J2EE-application-name |
- Example of execution
- cjstartapp MyServer -name App1