Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

org.apache.ojb.otm.transaction
Class LocalTransactionFactory  view LocalTransactionFactory download LocalTransactionFactory.java

java.lang.Object
  extended byorg.apache.ojb.otm.transaction.LocalTransactionFactory
All Implemented Interfaces:
TransactionFactory

public class LocalTransactionFactory
extends java.lang.Object
implements TransactionFactory

Factory for local transactions. Each OTMConnection is associated with exactly one transaction.


Nested Class Summary
private static class LocalTransactionFactory.LocalConnection
          Represents a local connection.
 
Field Summary
private  java.util.HashMap _transactionMap
           
 
Constructor Summary
LocalTransactionFactory()
           
 
Method Summary
 org.apache.ojb.otm.OTMConnection acquireConnection(org.apache.ojb.broker.PBKey pbKey)
          Acquire new connection.
 org.apache.ojb.otm.core.Transaction getTransactionForConnection(org.apache.ojb.otm.OTMConnection connection)
          Get the current Transaction.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

_transactionMap

private java.util.HashMap _transactionMap
Constructor Detail

LocalTransactionFactory

public LocalTransactionFactory()
Method Detail

getTransactionForConnection

public org.apache.ojb.otm.core.Transaction getTransactionForConnection(org.apache.ojb.otm.OTMConnection connection)
Description copied from interface: TransactionFactory
Get the current Transaction.

Specified by:
getTransactionForConnection in interface TransactionFactory

acquireConnection

public org.apache.ojb.otm.OTMConnection acquireConnection(org.apache.ojb.broker.PBKey pbKey)
Description copied from interface: TransactionFactory
Acquire new connection. Creates a new connection. Depending on the implementation of the factory the connection could be associated to an existing transaction, or not.

Specified by:
acquireConnection in interface TransactionFactory