org.jppf.jca.cci
Class JPPFConnectionFactory

java.lang.Object
  extended by org.jppf.jca.util.JPPFAccessorImpl
      extended by org.jppf.jca.cci.JPPFConnectionFactory
All Implemented Interfaces:
Serializable, Referenceable, ConnectionFactory, JPPFAccessor

public class JPPFConnectionFactory
extends JPPFAccessorImpl
implements ConnectionFactory

Implementation of the ConnectionFactory interface for the JPPF resource adapter.

Author:
Laurent Cohen
See Also:
Serialized Form

Field Summary
 
Fields inherited from class org.jppf.jca.util.JPPFAccessorImpl
jppfClient, logWriter
 
Constructor Summary
JPPFConnectionFactory()
          Default constructor.
JPPFConnectionFactory(JPPFManagedConnectionFactory factory, ConnectionManager manager)
          Initialize this connection factorywith a specified managed connection factory and connection manager..
 
Method Summary
 Connection getConnection()
          Get a connection through the application server.
 Connection getConnection(ConnectionSpec spec)
          This method does nothing.
 ResourceAdapterMetaData getMetaData()
          Get the resource adapter's metadata.
 RecordFactory getRecordFactory()
          Get a record factory.
 Reference getReference()
          Get the naming reference4 for this connection factory.
 void setReference(Reference ref)
          Set the naming reference4 for this connection factory.
 
Methods inherited from class org.jppf.jca.util.JPPFAccessorImpl
getJppfClient, getLogWriter, setJppfClient, setLogWriter
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JPPFConnectionFactory

public JPPFConnectionFactory()
Default constructor.


JPPFConnectionFactory

public JPPFConnectionFactory(JPPFManagedConnectionFactory factory,
                             ConnectionManager manager)
Initialize this connection factorywith a specified managed connection factory and connection manager..

Parameters:
factory - the managed factory to use.
manager - the connection manager to use.
Method Detail

getConnection

public Connection getConnection()
                         throws ResourceException
Get a connection through the application server.

Specified by:
getConnection in interface ConnectionFactory
Returns:
a Connection instance.
Throws:
ResourceException - if a connection could not be obtained.
See Also:
ConnectionFactory.getConnection()

getConnection

public Connection getConnection(ConnectionSpec spec)
                         throws ResourceException
This method does nothing.

Specified by:
getConnection in interface ConnectionFactory
Parameters:
spec - not used.
Returns:
nothing.
Throws:
ResourceException - this method always throws a NotSupportedException.
See Also:
ConnectionFactory.getConnection(javax.resource.cci.ConnectionSpec)

getMetaData

public ResourceAdapterMetaData getMetaData()
                                    throws ResourceException
Get the resource adapter's metadata.

Specified by:
getMetaData in interface ConnectionFactory
Returns:
a ResourceAdapterMetaData instance.
Throws:
ResourceException - if the metadata could not be obtained.
See Also:
ConnectionFactory.getMetaData()

getRecordFactory

public RecordFactory getRecordFactory()
                               throws ResourceException
Get a record factory.

Specified by:
getRecordFactory in interface ConnectionFactory
Returns:
a RecordFactory instance.
Throws:
ResourceException - if the record factory could not be obtained.
See Also:
ConnectionFactory.getRecordFactory()

setReference

public void setReference(Reference ref)
Set the naming reference4 for this connection factory.

Parameters:
ref - a Referenceable instance.
See Also:
Referenceable.setReference(javax.naming.Reference)

getReference

public Reference getReference()
                       throws NamingException
Get the naming reference4 for this connection factory.

Specified by:
getReference in interface Referenceable
Returns:
ref a Referenceable instance.
Throws:
NamingException - if the reference could not be obtained.
See Also:
Referenceable.getReference()


Copyright © 2005-2010 JPPF Team.