org.ow2.jasmine.adapter.jmx.pool.outbound
Class JMXConnectionFactoryImpl

java.lang.Object
  extended by org.ow2.jasmine.adapter.jmx.pool.outbound.JMXConnectionFactoryImpl
All Implemented Interfaces:
java.io.Serializable, javax.naming.Referenceable, javax.resource.cci.ConnectionFactory, org.ow2.jasmine.adapter.jmx.pool.api.IJMXConnectionFactory

public class JMXConnectionFactoryImpl
extends java.lang.Object
implements org.ow2.jasmine.adapter.jmx.pool.api.IJMXConnectionFactory

Connection Factory. this is the object returned when getting the reference close to the JNDI server name

Author:
Guillaume Renault
See Also:
Serialized Form

Constructor Summary
JMXConnectionFactoryImpl(ManagedConnectionFactoryImpl mcf, javax.resource.spi.ConnectionManager cm)
          Create an instance of the factory.
 
Method Summary
 javax.resource.cci.Connection getConnection()
          Gets a new connection using the connection manager.
 javax.resource.cci.Connection getConnection(javax.resource.cci.ConnectionSpec spec)
          Gets a new connection using the connection manager.
 javax.resource.cci.ResourceAdapterMetaData getMetaData()
          Not implemented.
 javax.resource.cci.RecordFactory getRecordFactory()
          Not implemented.
 javax.naming.Reference getReference()
          Get the reference.
 void setReference(javax.naming.Reference ref)
          Set the reference of the factory.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JMXConnectionFactoryImpl

public JMXConnectionFactoryImpl(ManagedConnectionFactoryImpl mcf,
                                javax.resource.spi.ConnectionManager cm)
Create an instance of the factory.

Parameters:
mcf - the manager of the factory.
cm - the connection manager for the factory.
Method Detail

setReference

public void setReference(javax.naming.Reference ref)
Set the reference of the factory. Automatically called by the RA.

Parameters:
ref - reference to set.

getReference

public javax.naming.Reference getReference()
                                    throws javax.naming.NamingException
Get the reference.

Specified by:
getReference in interface javax.naming.Referenceable
Returns:
the reference of the factory.
Throws:
javax.naming.NamingException - if the return value is null.

getConnection

public javax.resource.cci.Connection getConnection()
                                            throws javax.resource.ResourceException
Gets a new connection using the connection manager.

Specified by:
getConnection in interface javax.resource.cci.ConnectionFactory
Returns:
a connection.
Throws:
javax.resource.ResourceException - generic exception if operation fails due to an error condition.

getConnection

public javax.resource.cci.Connection getConnection(javax.resource.cci.ConnectionSpec spec)
                                            throws javax.resource.ResourceException
Gets a new connection using the connection manager.

Specified by:
getConnection in interface javax.resource.cci.ConnectionFactory
Specified by:
getConnection in interface org.ow2.jasmine.adapter.jmx.pool.api.IJMXConnectionFactory
Parameters:
spec - the specifications of the connection to get.
Returns:
a connection.
Throws:
javax.resource.ResourceException - generic exception if operation fails due to an error condition.

getMetaData

public javax.resource.cci.ResourceAdapterMetaData getMetaData()
                                                       throws javax.resource.ResourceException
Not implemented.

Specified by:
getMetaData in interface javax.resource.cci.ConnectionFactory
Returns:
null as not implemented.
Throws:
javax.resource.ResourceException - generic exception if operation fails due to an error condition.

getRecordFactory

public javax.resource.cci.RecordFactory getRecordFactory()
                                                  throws javax.resource.ResourceException
Not implemented.

Specified by:
getRecordFactory in interface javax.resource.cci.ConnectionFactory
Returns:
null as not implemented.
Throws:
javax.resource.ResourceException - generic exception if operation fails due to an error condition.


Copyright © 2008 OW2 Consortium. All Rights Reserved.