Java Reference
In-Depth Information
This data source also allows you to pass other properties to the InitialContext
constructor by using the prefix context. in any contained properties elements.
For example, to pass a property named someProperty , you would use this syntax:
<property name="context.someProperty" value="someValue"/>
The JTA transaction manager
The Java Transaction API ( JTA ) transaction manager allows you to use distributed
transactions with multiple databases. This means that you can commit or roll
back changes made across multiple databases as easily as you would with a single
database.
Only two properties are required to configure this transaction manager,
because the bulk of the configuration work is done in JNDI . The first property,
DBJndiContext , specifies the name of the context that contains the data source to
be used for the transaction manager. The other required property, UserTransac-
tion , provides the name of the context that contains the user transaction.
The OJB transaction manager
ObJectRelationalBridge ( OJB ) is another object/relational mapping tool to pro-
vide persistence for Java Objects using relational databases. The OJB transaction
manager is a wrapper for the transaction management interface provided by OJB .
All of the configuration for OJB transaction management is done just as it
would be done without the i BATIS DAO .
For more information on the OJB tool, and to see how to configure its
transaction manager, visit http://db.apache.org/ojb/.
NOTE
The SQLMAP transaction manager
SQLMAP is probably the most common choice of transaction manager when using
the i BATIS DAO . The SQLMAP transaction manager requires either the SqlMapCon-
figURL or the SqlMapConfigResource property to be present. It uses the same
transaction manager that the SQL Map uses for its transaction manager.
The SqlMapConfigURL property is expected to be a string that the java.net.URL
class can parse and retrieve a resource from, including the http: and file: proto-
cols. The SqlMapConfigResource property is used to refer to a resource that exists
on the current classpath.
The TOPLINK transaction manager
Oracle's TopLink product is yet another O/RM tool. The only required property
for the TOPLINK transaction manager is session.name , which is used to get the
session that will be used by this DAO context.
Search WWH ::




Custom Search