Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

When you built the Session Bean sample application, Maven packaged the deployment descriptors for both JBoss (jboss.xml) and Geronimo (openejb-jar.xml) as they were already provided by the sample application. These files are located in the <session_home>/dd/META-INF directory.

...

  • 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).

Back to Top

Update property files

Edit the jndi.properties file located in in the <session_home>/jndi directory as shown in the following example:

No Format
borderStylesolid
titlejndi.properties

####################################################################
### 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.

Back to Top

Summary
Anchor
summary
summary

...