Enterprise beans back up and recovery - best practices

The following items should be considered for backup when using enterprise beans.

Database data

Enterprise beans often use a database for back-end persistence. Container-managed entity beans always use a database for back-end persistence. This data should be backed up the same as any of your business data.

The collection for container-managed entity beans persistence is determined by either the schema name specified during deployment, or the schema specified on the data source associated with the enterprise bean. Any persistent store used by session and bean-managed beans is defined by the bean implementation. For database tables, you can choose to save the entire collection or an individual table as shown with the following commands, respectively:
SAVLIB LIB(EJB) DEV(*SAVF) SAVF(WSALIB/WSASAVF)
SAVOBJ OBJ(MYBEANTBL) LIB(EJB) DEV(*SAVF) OBJTYPE(*FILE) SAVF(WSALIB/WSASAVF)

It might be possible to save database objects while WebSphere Application Server is active, if the save operation can obtain a snapshot of the data store. You might have to shut down if a snapshot cannot be obtained. This would occur if there are requests that obtain locks or have open transactions against the database being saved.

EJB source code, class files, and deployed code

When you deploy enterprise beans, a WebSphere Application Server-specific implementation of the enterprise beans is generated. You should save these deployed Java(TM) Archive (JAR) files to avoid redeploying, and to preserve any binding information that was specified during the application installation. The JAR files, application code and configuration (such as bindings) are located by default in the profile_root/installedApps directory. By saving this directory, you save your installed applications, including HTML, servlets, JavaServer Pages(TM) (JSP(TM)) files, and enterprise beans. Normally, each application is located in a separate subdirectory, so you can choose to save all applications or a subset.

Note: The commands below have been wrapped for display purposes. Enter each as a single command.
This command saves all installed applications:
SAV DEV('/QSYS.lib/wsalib.lib/wsasavf.file')
 OBJ(('/profile_root/installedApps'))
This command saves the sampleApp application only:
SAV DEV('/QSYS.lib/wsalib.lib/wsasavf.file')
 OBJ(('/profile_root/installedApps/cellName/sampleApp.ear'))

If you have located utility or general purpose classes in other directories, such as /profile_root/lib/app or /profile_root/lib/ext, be sure to include those locations in your backup plan as well.

Administrative configuration

For more information, see Introduction: Administrative configuration data.




Related concepts
Introduction: Administrative configuration data
Reference topic Reference topic    

Terms and conditions for information centers | Feedback

Last updatedLast updated: Aug 30, 2013 6:03:36 PM CDT
http://www14.software.ibm.com/webapp/wsbroker/redirect?version=pix&product=was-base-iseries&topic=tejb_snrejb_is
File name: tejb_snrejb_is.html