THIS IS A TEST INSTANCE. ALL YOUR CHANGES WILL BE LOST!!!!
...
Excerpt |
---|
This articles shows you how to configure a mysql datasource in Geronimo. |
There are two ways to configure a mysql datasource:
...
Creating a datasource and deploying it as a standalone JEE connector module
- Refer to See the attachment sample-mysql-xa-ds-plan-standalone.xml to create a standalone JEE Java EE connector deployment plan.
- Install the mysql jdbc driver to geronimo the Geronimo repository via by using the adminitrative adminitration console, and ensure its Module ID is the same as the one defined one in the sample plan. In this example, the Module ID of mysql JDBC driver is
mysql/mysql-connector-java/5.1.7/jar
. - Use command line to deploy itthe datasource. Here is the sample command for deploying mysql xa datasource:
where <geronimo_home> is the installation directory of Geronimo.No Format <geronimo_home>/bin/deploy.sh -u system -p manager deploy <GERONIMO_HOME>/repository/org/tranql/tranql-connector-mysql-xa/1.2/tranql-connector-mysql-xa-1.2.rar sample-mysql-xa-ds-plan-standalone.xml
- Then Now you will are able to use the datasource via with its jndi name java:comp/env/jdbc/mysqlxads.
Embedding a datasource definition in an application deployment plan
- Refer to See the attachment sample-mysql-xa-ds-plan-embeded.xml to create an application deployment plan, and replace the web module and the ejb module according to your application.
- Install the mysql jdbc driver to geronimo the Geronimo repository via by using the adminitrative adminitration console, and ensure its Module ID is the same as the one defined one in the sample plan. In this example, the Module ID of mysql JDBC driver is
mysql/mysql-connector-java/5.1.7/jar
. - Use command line or adminitrative console to deploy your application with the deployment plan. For example, use the following command line as follows:
where <geronimo_home> is the installation directory of Geronimo.No Format <geronimo_home>/bin/deploy.sh -u system -p manager deploy yourapp.ear sample-mysql-xa-ds-plan-embeded.xml
- Then Now you will are able to use the datasource via with its jndi name java:comp/env/jdbc/mysqlxads.
The transaction configuration element is something like the following:
Code Block | ||||
---|---|---|---|---|
| ||||
<connectionmanager> <xa-transaction> <transaction-caching/> </xa-transaction> ... </connectionmanager> |
...