org.objectweb.jorm.lib
Class MapperJCA

java.lang.Object
  extended byorg.objectweb.jorm.lib.Mapper
      extended byorg.objectweb.jorm.lib.MapperJCA
All Implemented Interfaces:
Loggable, PMapper, PMappingCallback, PMappingStructuresManager
Direct Known Subclasses:
MapperJCA_JDBC

public class MapperJCA
extends Mapper

This mapper supports JCA CCI connection management.

Author:
P. Dechamboux

Field Summary
 
Fields inherited from class org.objectweb.jorm.lib.Mapper
logger, loggerFactory
 
Fields inherited from interface org.objectweb.jorm.api.PMapper
JORMPROPFILE, PBINDINGAPPENDER, PCLASSMAPPINGAPPENDER
 
Constructor Summary
MapperJCA()
           
MapperJCA(JormConfigurator jc)
           
 
Method Summary
 void closeConnection(java.lang.Object conn)
          Closes the given connection which has been allocated previously using getConnection.
 java.lang.Object getConnection()
          Allocates a connection for accessing the underlying DS.
 java.lang.Object getConnection(java.lang.Object ctxt)
          Allocates a connection for accessing the underlying DS knowing additional context information.
 java.lang.Object getConnection(java.lang.Object connectionContext, java.lang.Object user)
          Allocates a connection for accessing the underlying DS knowing additional context information.
 java.lang.Object getConnectionFactory()
          Returns the connection factory associated to this mapper.
 void setConnectionFactory(java.lang.Object cf)
          Assigns a connection factory to this mapper.
 
Methods inherited from class org.objectweb.jorm.lib.Mapper
addDependency, addMapperEventListener, classDefined, clean, clear, cn2mn, createGenClassMapping, declareClass, equals, getJormConfigurator, getLogger, getLoggerFactory, getMappedClasses, getMapperName, getMetaInfoManager, getPMapCluster, getPMapClusters, getPMappingStructuresManager, getPrefetchCache, getPTypeSpace, hashCode, lookup, map, map, map, removeMapperEventListener, scheduleEvent, setDTDLocations, setJormConfigurator, setLogger, setLoggerFactory, setMapperName, setPathsToPdFiles, setPMapper, setPrefetchCache, start, stop, unmap
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MapperJCA

public MapperJCA()
          throws PException

MapperJCA

public MapperJCA(JormConfigurator jc)
Method Detail

closeConnection

public void closeConnection(java.lang.Object conn)
                     throws PException
Closes the given connection which has been allocated previously using getConnection.

Parameters:
conn - The concerned connection.
Throws:
PException

getConnection

public java.lang.Object getConnection()
                               throws PException
Allocates a connection for accessing the underlying DS.

Throws:
PException

getConnection

public java.lang.Object getConnection(java.lang.Object ctxt)
                               throws PException
Allocates a connection for accessing the underlying DS knowing additional context information.

Parameters:
ctxt - Context information used to allocate the connection.
Throws:
PException

getConnection

public java.lang.Object getConnection(java.lang.Object connectionContext,
                                      java.lang.Object user)
                               throws PException
Description copied from interface: PMapper
Allocates a connection for accessing the underlying DS knowing additional context information.

Parameters:
connectionContext - Context information used to allocate the connection.
user - is the identifier of the connection user (working set or transaction id).
Throws:
PException

setConnectionFactory

public void setConnectionFactory(java.lang.Object cf)
                          throws PException
Assigns a connection factory to this mapper.

Throws:
PExceptionProtocol - It is raised if a connection factory has already been assigned.
PException

getConnectionFactory

public java.lang.Object getConnectionFactory()
Returns the connection factory associated to this mapper.