Versions Compared

Key

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

...

Note

In the geronimo server, users can deploy datasources (database connection pools) on databases from various vendors like DB2, Oracle, MySQL, MS-SQLServer etc,. When creating a datasource, users have to specify the datasource name in the deployment plan. The name given to the datasource is to be provided in the jta-data-source and non-jta-data-source elements. The below XML fragment illustrates the usage.

Code Block
XML
XML
borderStylesolid
<persistence-unit name="Account" transaction-type="JTA">
  <description>ContainerManagedJPA</description>
  <provider>org.apache.openjpa.persistence.PersistenceProviderImpl</provider>
  <jta-data-source>AccountDB2DataSource</jta-data-source>
  ...
  ...
</persistence-unit>

The non-jta-datasource must be a datasource that has no transaction support. It can be deployed on the geronimo server by using the <no-transaction/> element instead of <local-transaction/> or <xa-transaction> in the connector plan as illustrated below.

Code Block
XML
XML
borderStylesolid

<connector xmlns="http://geronimo.apache.org/xml/ns/j2ee/connector-1.2">
...
...
 <resourceadapter>
 ...
 ...
  <connectionmanager>
   <local-transaction/>
    *<no-transaction/>*
     <max-size>10</max-size>
     <min-size>0</min-size>
     <match-one/>
    </single-pool>
  </connectionmanager>
 ...
 ...
 </resourceadapter>
...
...
</connector>

<mapping-file>

An object/relational mapping XML file contains mapping information for the classes listed in it. The mapping files can be provided as follows.

...