...
- Start the server and Launch the Administrative Console using the URL http://localhost:8080/console.
- Enter default username and password.
- Once in the welcome page. In console navigation, Under Services, Select Database Pools.
- On the next screen, Create a new database pool using Geronimo database pool wizard.
- On the next screen give the name as suggested in the figure. This will initiate the process to create a Derby Embedded XA datasource.
- 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.
- Select Deploy to deploy the connector plan.
- Once done you can see the Database Pool jdbc/userds listed in the available database pools.
Creating application client
Few more configurations
- In the EJB Project. Under META-INF, Edit openejb-jar.xml and add the following
Code Block title datasource dependency borderStyle solid <sys:dependencies> <sys:dependency> <sys:groupId>console.dbpool</sys:groupId> <sys:artifactId>jdbc%2Fuserds</sys:artifactId> </sys:dependency> </sys:dependencies>
Info title Where 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