...
- ejb-name - identifies the EJB that these settings apply to; this should match the ejb-name for the EJB in ejb-jar.xml
- jndi-name - the Home interface for the EJB is registered in JNDI at the address specified here; this global JNDI name is used by application clients to connect to this EJB (while it can be used by other server-side components, EJB references are the recommended approach); it is only meaningful if the EJB has a (remote) Home interface.
- local-jndi-name - the LocalHome interface for the EJB is registered in JNDI at the address specified here; this global JNDI name can be used by other server-side components that want to use this EJB, though the recommended approach is to define and use a local EJB reference instead; it is only meaningful if the EJB has a LocalHome interface.
- tssGroup - this is a set of elements that contains CORBA security settings, for EJBs exposed as CORBA objects; it is not necessary if the EJB will not be accessed via CORBA.
- openejb-jndiEnvironmentRefsGroup - a set of elements that handle resolving references declared by the current Session bean (including EJB references, Resource references, and Web Service references).
Set the JNDI properties
Edit the jndi.properties file located in in the <session_home>/jndi directory as shown in the following example:
No Format | ||||
---|---|---|---|---|
| ||||
#################################################################### ### JBoss Settings #################################################################### #java.naming.factory.initial=org.jnp.interfaces.NamingContextFactory #java.naming.factory.url.pkgs=org.jboss.naming:org.jnp.interfaces #java.naming.provider.url=localhost #################################################################### ### Geronimo Settings #################################################################### java.naming.factory.initial=org.openejb.client.RemoteInitialContextFactory java.naming.provider.url=localhost:4201 java.naming.security.principal=username java.naming.security.credentials=passwd |
Build the Seesion Bean application by typing maven from the <session_home> directory. This will create the session-ejb-SNAPSHOT.jar file in the <session_home>/target directory.
Modify the WAR files
Open the web.xml file located in the <session_home>/src/webapp/WEB-INF directory and comment out the following taglib element:
...
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
- this is used for Apache Geronimo.
Build the sample application
Build the migrated Session Bean sample application by running the following command from the <session_home> directory:
maven ejb war
This command will create the session-ejb-SNAPSHOT.jar and session-ejb.war files in the <session_home>/target directory.
Deploy the migrated application
In order to deploy the application make sure the Geronimo server is up and running. From a command line change directory to <session_home> and type the following command:
maven geronimo:deploy
Once the application is deployed and started you can verify its status by typing the following command from the <geronimo_home>/bin directory:
...
Look for the SessionBeanDemo entry and SessionWebApp entries.
To test the migrated Session Bean application run the following commands from the <session_home> directory:
...