Home > Documentation > Developing > Tutorials > Getting familiar with the development environment > Getting familiar with Geronimo Eclipse Plugin (GEP) > Using datasource pool wizard in GEP |
This article shows you how to create a datasource pool in GEP during development. The datasource pool wizard is a handy feature to speed up your development by creating a datasouce connector without any manual coding. Information of the connector you create using this wizard is embedded in the deployment plan of the application as an <ext-module>
element.
Note that this wizard has the following 2 limitations:
To use the datasource pool wizard in GEP:
geronimo-application.xml
file under the /META-INF
directory of your application to open it in the Geronimo Deployment Plan Editor. The following figure shows the General tab of the editor:
org.apache.geronimo.configs/system-database//car
.
Now you have created a new datasource pool. You can click the Source tab to review the deployment plan of the connector. The following figure shows a sample deployment plan with a new datasource connector embedded:
<?xml version="1.0" encoding="UTF-8"?><app:application application-name="TestEAR" xmlns:app="http://geronimo.apache.org/xml/ns/j2ee/application-2.0" xmlns:client="http://geronimo.apache.org/xml/ns/j2ee/application-client-2.0" xmlns:conn="http://geronimo.apache.org/xml/ns/j2ee/connector-1.2" xmlns:dep="http://geronimo.apache.org/xml/ns/deployment-1.2" xmlns:ejb="http://openejb.apache.org/xml/ns/openejb-jar-2.2" xmlns:log="http://geronimo.apache.org/xml/ns/loginconfig-2.0" xmlns:name="http://geronimo.apache.org/xml/ns/naming-1.2" xmlns:pers="http://java.sun.com/xml/ns/persistence" xmlns:pkgen="http://openejb.apache.org/xml/ns/pkgen-2.1" xmlns:sec="http://geronimo.apache.org/xml/ns/security-2.0" xmlns:web="http://geronimo.apache.org/xml/ns/j2ee/web-2.0.1"> <dep:environment> <dep:moduleId> <dep:groupId>default</dep:groupId> <dep:artifactId>TestEAR</dep:artifactId> <dep:version>1.0</dep:version> <dep:type>car</dep:type> </dep:moduleId> <dep:dependencies> <dep:dependency> <dep:groupId>org.apache.geronimo.configs</dep:groupId> <dep:artifactId>system-database</dep:artifactId> <dep:type>car</dep:type> </dep:dependency> <dep:dependency> <dep:groupId>org.apache.geronimo.framework</dep:groupId> <dep:artifactId>j2ee-security</dep:artifactId> <dep:type>car</dep:type> </dep:dependency> </dep:dependencies> </dep:environment> <app:ext-module> <app:connector>TestDataSource</app:connector> <app:external-path> <dep:groupId>org.tranql</dep:groupId> <dep:artifactId>tranql-connector-derby-embed-xa</dep:artifactId> <dep:type>rar</dep:type> </app:external-path> <conn:connector> <conn:resourceadapter> <conn:outbound-resourceadapter> <conn:connection-definition> <conn:connectionfactory-interface>javax.sql.DataSource</conn:connectionfactory-interface> <conn:connectiondefinition-instance> <conn:name>jdbc/TestDataSource</conn:name> <conn:config-property-setting name="Password">manager</conn:config-property-setting> <conn:config-property-setting name="LoginTimeout">5000</conn:config-property-setting> <conn:config-property-setting name="DatabaseName">TestDataBase</conn:config-property-setting> <conn:config-property-setting name="CreateDatabase">true</conn:config-property-setting> <conn:config-property-setting name="UserName">system</conn:config-property-setting> <conn:connectionmanager> <conn:xa-transaction> <conn:transaction-caching/> </conn:xa-transaction> <conn:single-pool> <conn:max-size>10</conn:max-size> <conn:min-size>0</conn:min-size> <conn:blocking-timeout-milliseconds>5000</conn:blocking-timeout-milliseconds> <conn:idle-timeout-minutes>30</conn:idle-timeout-minutes> <conn:match-one/> </conn:single-pool> </conn:connectionmanager> </conn:connectiondefinition-instance> </conn:connection-definition> </conn:outbound-resourceadapter> </conn:resourceadapter> </conn:connector> </app:ext-module> </app:application>
Bookmark this on Delicious Digg this | Privacy Policy - Copyright © 2003-2011, The Apache Software Foundation, Licensed under ASL 2.0. |