Versions Compared

Key

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

...

The same EJB jar file that was created and deployed in jboss may be deployed in Geronimo with no changes to its contents but you still need to edit the jndi properties of sample client application. Edit the jndi.properties file located in in the <bmp_home>/jndi directory as shown in the following example:

...

This plan sets org/apache/geronimo/SystemDatabase as the parent. What follows is the definition of the entity bean. The jndi-name element indicates the jndi name of the entity bean's home interface CustomerHomeRemote. This is the name that the Loan BMP sample applicationwill lookup in the jndi context. The element local-jndi-name indicates the jndi name of the local interface, which in this case happens to be a remote interface, CustomerRemote. Next, a reference to the SystemDatasource is defined giving the application access to the database.

Build the Loan BMP application by typing maven ejb from The Web Application client can be direclty deployed in Geronimo. This is because the build step packages both the JBoss jboss-web.xml and Geronimo geronimo-web.xml specific deployment plans in the war file. You can see both of these files in the <bmp_home>\src\webapp\WEB-INF directory.

The geronimo-web.xml deployment plan should look like the following example.

Code Block
xml
xml
borderStylesolid
titleGeronimo deployment plan geronimo-web.xml

<web-app xmlns="http://geronimo.apache.org/xml/ns/web"
         xmlns:naming="http://geronimo.apache.org/xml/ns/naming"
         configId="EntityDemoWebApp"
         parentId="CustomerEJB">
         
    <context-root>entity-ejb</context-root>    
     
    <ejb-ref>
        <ref-name>ejb/CustomerHome</ref-name>
        <target-name>
             geronimo.server:EJBModule=MDBDemo,J2EEApplication=null,J2EEServer=geronimo,
             j2eeType=EntityBean,name=CustomerEJB
        </target-name>
    </ejb-ref>
</web-app>

Build the Loan BMP application by typing maven ejb from the <bmp_home> directory. This directory. This will create the entity-ejb-SNAPSHOT.jar and entity-ejb.war in the <bmp_home>/target directory.

...