When you deploy an Enterprise JavaBeans (EJB) module, you install
that module on a server that has been configured to support deployed modules.
Procedure
- Prepare the deployment
environment.
- Update the configuration for each EJB module as needed for the
deployment environment. See the information center for the Application Server
Toolkit for more information about modifying deployment descriptors.
- Required: If a module has dependencies
on Java 5-specific extensions, such as Generics, annotations, and so on, then
you must run the ejbdeploy command-line tool separately and prior to installing
the module or application containing it. This is because the administrative
console and the wsadmin command-line tool do not allow for specifying the
ejbdeploy -complianceLevel 5.0 option.
newfeatIt is only necessary to run the ejbdeploy tool for EJB
2.1 modules containing entity beans.
Address
potential interoperability issues. There can be unexpected
results if a WebSphere stack product, or another product, that runs on a version
of Application Server that does not support EJB 3.0 attempts to remotely invoke
a method on an EJB 3.0 compliant enterprise bean on a separate server that
is running a version Application Server that supports EJB 3.0. If these products
attempt to invoke a method through the enterprise bean's EJB 3.0 remote business
interface, they might encounter exceptions that were introduced in EJB 3.0
that will be pushed back to the environment that is not EJB 3.0 compliant.
This
scenario could also be an issue for an administrator of an environment that
includes a combination of stack products that contain a mixture of EJB 3.0
compliant and non-compliant instances of Application Server.
The following
is a list of the exception classes that have been introduced in EJB 3.0:
- javax.ejb.ConcurrentAccessException
- javax.ejb.EJBAccessException
- javax.ejb.EJBTransactionRequiredException
- javax.ejb.EJBTransactionRolledbackException
- javax.ejb.NoSuchEJBException
- Ensure that Application Server is running the Feature Pack for
EJB 3.0 and is upgraded with Fix Pack 23.
- Manually copy the <app_server_root>/runtimes/ejb3exceptions.jar
file from Application Server to a directory on each of the stack products
installations, or other product installations, that you will use as the EJB
3.0 client.
- Ensure that the directory that contains the ejb3exceptions.jar
file is in the class path. One possible location for the JAR file
that would satisfy this requirement is the <app_server_root>/lib
directory on a server that is not EJB 3.0 compliant.
Avoid trouble: Just
like the EJB thin client jars, if an update becomes available, users will
need to copy the ejb3exceptions.jar file again after installing the version
of the WebSphere Application Server containing the updated version.
gotcha
- Deploy the application.
What to do next
If you specify that EJB deploy be run during application installation
and the installation fails with a NameNotFoundException message, ensure that
the input JAR or EAR file does not contain source files. Remove the source
files, or include all of the dependent classes and resource files in the class
path. If there are source files in the input JAR or EAR file, the EJB deployment
tools runs a rebuild before generating the deployment code.
If the module
deploys successfully, test and debug
the module.