org.jboss.messaging.ra
Class JBMManagedConnectionFactory

java.lang.Object
  extended by org.jboss.messaging.ra.JBMManagedConnectionFactory
All Implemented Interfaces:
java.io.Serializable, javax.resource.spi.ManagedConnectionFactory, javax.resource.spi.ResourceAdapterAssociation

public class JBMManagedConnectionFactory
extends java.lang.Object
implements javax.resource.spi.ManagedConnectionFactory, javax.resource.spi.ResourceAdapterAssociation

JBM ManagedConectionFactory

Version:
$Revision: $
Author:
Adrian Brock, Jesper Pedersen.
See Also:
Serialized Form

Constructor Summary
JBMManagedConnectionFactory()
          Constructor
 
Method Summary
 java.lang.Object createConnectionFactory()
          Creates a Connection Factory instance
 java.lang.Object createConnectionFactory(javax.resource.spi.ConnectionManager cxManager)
          Creates a Connection Factory instance
 javax.resource.spi.ManagedConnection createManagedConnection(javax.security.auth.Subject subject, javax.resource.spi.ConnectionRequestInfo cxRequestInfo)
          Creates a new physical connection to the underlying EIS resource manager.
 boolean equals(java.lang.Object obj)
          Indicates whether some other object is "equal to" this one.
 java.lang.String getConnectionParameters()
           
 java.lang.String getConnectorClassName()
           
protected  JBossConnectionFactory getJBossConnectionFactory()
          Get the JBoss connection factory
 java.io.PrintWriter getLogWriter()
          Get the log writer -- NOT SUPPORTED
 javax.jms.ConnectionMetaData getMetaData()
          Get the connection metadata
protected  JBMMCFProperties getProperties()
          Get the managed connection factory properties
 javax.resource.spi.ResourceAdapter getResourceAdapter()
          Get the resource adapter
 java.lang.String getSessionDefaultType()
          Get the default session type
 java.lang.Integer getUseTryLock()
          Get the useTryLock.
 int hashCode()
          Return the hash code for the object
 javax.resource.spi.ManagedConnection matchManagedConnections(java.util.Set connectionSet, javax.security.auth.Subject subject, javax.resource.spi.ConnectionRequestInfo cxRequestInfo)
          Returns a matched connection from the candidate set of connections.
 void setConnectionParameters(java.lang.String configuration)
           
 void setConnectorClassName(java.lang.String value)
           
 void setLogWriter(java.io.PrintWriter out)
          Set the log writer -- NOT SUPPORTED
 void setResourceAdapter(javax.resource.spi.ResourceAdapter ra)
          Set the resource adapter
 void setSessionDefaultType(java.lang.String type)
          Set the default session type
 void setUseTryLock(java.lang.Integer useTryLock)
          Set the useTryLock.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JBMManagedConnectionFactory

public JBMManagedConnectionFactory()
Constructor

Method Detail

createConnectionFactory

public java.lang.Object createConnectionFactory()
                                         throws javax.resource.ResourceException
Creates a Connection Factory instance

Specified by:
createConnectionFactory in interface javax.resource.spi.ManagedConnectionFactory
Returns:
javax.resource.cci.ConnectionFactory instance
Throws:
javax.resource.ResourceException - Thrown if a connection factory cant be created

createConnectionFactory

public java.lang.Object createConnectionFactory(javax.resource.spi.ConnectionManager cxManager)
                                         throws javax.resource.ResourceException
Creates a Connection Factory instance

Specified by:
createConnectionFactory in interface javax.resource.spi.ManagedConnectionFactory
Parameters:
cxManager - The connection manager
Returns:
javax.resource.cci.ConnectionFactory instance
Throws:
javax.resource.ResourceException - Thrown if a connection factory cant be created

createManagedConnection

public javax.resource.spi.ManagedConnection createManagedConnection(javax.security.auth.Subject subject,
                                                                    javax.resource.spi.ConnectionRequestInfo cxRequestInfo)
                                                             throws javax.resource.ResourceException
Creates a new physical connection to the underlying EIS resource manager.

Specified by:
createManagedConnection in interface javax.resource.spi.ManagedConnectionFactory
Parameters:
subject - Caller's security information
cxRequestInfo - Additional resource adapter specific connection request information
Returns:
The managed connection
Throws:
javax.resource.ResourceException - Thrown if a managed connection cant be created

matchManagedConnections

public javax.resource.spi.ManagedConnection matchManagedConnections(java.util.Set connectionSet,
                                                                    javax.security.auth.Subject subject,
                                                                    javax.resource.spi.ConnectionRequestInfo cxRequestInfo)
                                                             throws javax.resource.ResourceException
Returns a matched connection from the candidate set of connections.

Specified by:
matchManagedConnections in interface javax.resource.spi.ManagedConnectionFactory
Parameters:
connectionSet - The candidate connection set
subject - Caller's security information
cxRequestInfo - Additional resource adapter specific connection request information
Returns:
The managed connection
Throws:
javax.resource.ResourceException - Thrown if no managed connection cant be found

setLogWriter

public void setLogWriter(java.io.PrintWriter out)
                  throws javax.resource.ResourceException
Set the log writer -- NOT SUPPORTED

Specified by:
setLogWriter in interface javax.resource.spi.ManagedConnectionFactory
Parameters:
out - The writer
Throws:
javax.resource.ResourceException - Thrown if the writer cant be set

getLogWriter

public java.io.PrintWriter getLogWriter()
                                 throws javax.resource.ResourceException
Get the log writer -- NOT SUPPORTED

Specified by:
getLogWriter in interface javax.resource.spi.ManagedConnectionFactory
Returns:
The writer
Throws:
javax.resource.ResourceException - Thrown if the writer cant be retrieved

getResourceAdapter

public javax.resource.spi.ResourceAdapter getResourceAdapter()
Get the resource adapter

Specified by:
getResourceAdapter in interface javax.resource.spi.ResourceAdapterAssociation
Returns:
The resource adapter

setResourceAdapter

public void setResourceAdapter(javax.resource.spi.ResourceAdapter ra)
                        throws javax.resource.ResourceException
Set the resource adapter

Specified by:
setResourceAdapter in interface javax.resource.spi.ResourceAdapterAssociation
Parameters:
ra - The resource adapter
Throws:
javax.resource.ResourceException - Thrown if incorrect resource adapter

equals

public boolean equals(java.lang.Object obj)
Indicates whether some other object is "equal to" this one.

Specified by:
equals in interface javax.resource.spi.ManagedConnectionFactory
Overrides:
equals in class java.lang.Object
Parameters:
obj - Object with which to compare
Returns:
True if this object is the same as the obj argument; false otherwise.

hashCode

public int hashCode()
Return the hash code for the object

Specified by:
hashCode in interface javax.resource.spi.ManagedConnectionFactory
Overrides:
hashCode in class java.lang.Object
Returns:
The hash code

getSessionDefaultType

public java.lang.String getSessionDefaultType()
Get the default session type

Returns:
The value

setSessionDefaultType

public void setSessionDefaultType(java.lang.String type)
Set the default session type

Parameters:
type - either javax.jms.Topic or javax.jms.Queue

getConnectionParameters

public java.lang.String getConnectionParameters()
Returns:
the connectionParameters

setConnectionParameters

public void setConnectionParameters(java.lang.String configuration)

getConnectorClassName

public java.lang.String getConnectorClassName()
Returns:
the transportType

setConnectorClassName

public void setConnectorClassName(java.lang.String value)

getUseTryLock

public java.lang.Integer getUseTryLock()
Get the useTryLock.

Returns:
the useTryLock.

setUseTryLock

public void setUseTryLock(java.lang.Integer useTryLock)
Set the useTryLock.

Parameters:
useTryLock - the useTryLock.

getMetaData

public javax.jms.ConnectionMetaData getMetaData()
Get the connection metadata

Returns:
The metadata

getJBossConnectionFactory

protected JBossConnectionFactory getJBossConnectionFactory()
                                                    throws javax.resource.ResourceException
Get the JBoss connection factory

Returns:
The factory
Throws:
javax.resource.ResourceException

getProperties

protected JBMMCFProperties getProperties()
Get the managed connection factory properties

Returns:
The properties


Copyright © 2006 JBoss Inc. All Rights Reserved.