Versions Compared

Key

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

...

  1. Start the server and Launch the Administrative Console using the URL http://localhost:8080/console.
  2. Enter default username and password.
  3. Once in the welcome page. In console navigation, Under Services, Select Database Pools.





  4. On the next screen, Create a new database pool using Geronimo database pool wizard.





  5. On the next screen give the name as suggested in the figure. This will initiate the process to create a Derby Embedded XA datasource.





  6. Select the Driver jar and give the database name as userdbs(Remember this is the database we created in the previous step). Rest all fields can be set to default.





  7. Select Deploy to deploy the connector plan.





  8. Once done you can see the Database Pool jdbc/userds listed in the available database pools.





Creating application client

Few more configurations

  1. In the EJB Project. Under META-INF, Edit openejb-jar.xml and add the following
    Code Block
    titledatasource dependency
    borderStylesolid
    
    <sys:dependencies>
                <sys:dependency>
                    <sys:groupId>console.dbpool</sys:groupId>
                    <sys:artifactId>jdbc%2Fuserds</sys:artifactId>
                </sys:dependency>        
    </sys:dependencies>
    
    Info
    titleWhere did the above dependencies come from??

    To make the datasource visible to EJB we need to add a dependency to the EJB deployment plan that is openejb-jar.xml. The above element can be obtained automatically from Geronimo Database Pool wizard. Select usage against the database pool jdbc/userds