Package org.apache.activemq.ra
Class ActiveMQManagedConnectionFactory
- java.lang.Object
-
- org.apache.activemq.ra.ActiveMQConnectionSupport
-
- org.apache.activemq.ra.ActiveMQManagedConnectionFactory
-
- All Implemented Interfaces:
Serializable
,ManagedConnectionFactory
,ResourceAdapterAssociation
public class ActiveMQManagedConnectionFactory extends ActiveMQConnectionSupport implements ManagedConnectionFactory, ResourceAdapterAssociation
- Version:
- $Revisio n$ TODO: Must override equals and hashCode (JCA spec 16.4)
- See Also:
- Serialized Form
-
-
Field Summary
-
Fields inherited from class org.apache.activemq.ra.ActiveMQConnectionSupport
log
-
-
Constructor Summary
Constructors Constructor Description ActiveMQManagedConnectionFactory()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Object
createConnectionFactory()
This is used when not running in an app server.Object
createConnectionFactory(ConnectionManager manager)
ManagedConnection
createManagedConnection(Subject subject, ConnectionRequestInfo connectionRequestInfo)
boolean
equals(Object object)
PrintWriter
getLogWriter()
ResourceAdapter
getResourceAdapter()
int
hashCode()
ManagedConnection
matchManagedConnections(Set connections, Subject subject, ConnectionRequestInfo connectionRequestInfo)
void
setLogWriter(PrintWriter aLogWriter)
void
setResourceAdapter(ResourceAdapter adapter)
-
Methods inherited from class org.apache.activemq.ra.ActiveMQConnectionSupport
createConnectionFactory, defaultValue, emptyToNull, getClientid, getDurableTopicPrefetch, getInfo, getInitialRedeliveryDelay, getInputStreamPrefetch, getKeyStore, getKeyStoreKeyPassword, getKeyStorePassword, getMaximumRedeliveries, getMaximumRedeliveryDelay, getOptimizeDurableTopicPrefetch, getPassword, getQueueBrowserPrefetch, getQueuePrefetch, getRedeliveryBackOffMultiplier, getRedeliveryUseExponentialBackOff, getServerUrl, getTopicPrefetch, getTrustStore, getTrustStorePassword, getUseInboundSession, getUserName, getUseSessionArgs, isUseInboundSessionEnabled, isUseSessionArgs, makeConnection, makeConnection, notEqual, setAllPrefetchValues, setClientid, setDurableTopicPrefetch, setInfo, setInitialRedeliveryDelay, setKeyStore, setKeyStoreKeyPassword, setKeyStorePassword, setMaximumRedeliveries, setMaximumRedeliveryDelay, setOptimizeDurableTopicPrefetch, setPassword, setQueueBrowserPrefetch, setQueuePrefetch, setRedeliveryBackOffMultiplier, setRedeliveryUseExponentialBackOff, setServerUrl, setTopicPrefetch, setTrustStore, setTrustStorePassword, setUseInboundSession, setUserName, setUseSessionArgs
-
-
-
-
Method Detail
-
setResourceAdapter
public void setResourceAdapter(ResourceAdapter adapter) throws ResourceException
- Specified by:
setResourceAdapter
in interfaceResourceAdapterAssociation
- Throws:
ResourceException
- See Also:
ResourceAdapterAssociation.setResourceAdapter(javax.resource.spi.ResourceAdapter)
-
getResourceAdapter
public ResourceAdapter getResourceAdapter()
- Specified by:
getResourceAdapter
in interfaceResourceAdapterAssociation
- See Also:
ResourceAdapterAssociation.getResourceAdapter()
-
equals
public boolean equals(Object object)
- Specified by:
equals
in interfaceManagedConnectionFactory
- Overrides:
equals
in classObject
- See Also:
Object.equals(java.lang.Object)
-
hashCode
public int hashCode()
- Specified by:
hashCode
in interfaceManagedConnectionFactory
- Overrides:
hashCode
in classObject
- See Also:
Object.hashCode()
-
createConnectionFactory
public Object createConnectionFactory(ConnectionManager manager) throws ResourceException
- Specified by:
createConnectionFactory
in interfaceManagedConnectionFactory
- Throws:
ResourceException
- See Also:
ManagedConnectionFactory.createConnectionFactory(javax.resource.spi.ConnectionManager)
-
createConnectionFactory
public Object createConnectionFactory() throws ResourceException
This is used when not running in an app server. For now we are creating a ConnectionFactory that has our SimpleConnectionManager implementation but it may be a better idea to not support this. The JMS api will have many quirks the user may not expect when running through the resource adapter.- Specified by:
createConnectionFactory
in interfaceManagedConnectionFactory
- Throws:
ResourceException
- See Also:
ManagedConnectionFactory.createConnectionFactory()
-
createManagedConnection
public ManagedConnection createManagedConnection(Subject subject, ConnectionRequestInfo connectionRequestInfo) throws ResourceException
- Specified by:
createManagedConnection
in interfaceManagedConnectionFactory
- Throws:
ResourceException
- See Also:
ManagedConnectionFactory.createManagedConnection(javax.security.auth.Subject, javax.resource.spi.ConnectionRequestInfo)
-
matchManagedConnections
public ManagedConnection matchManagedConnections(Set connections, Subject subject, ConnectionRequestInfo connectionRequestInfo) throws ResourceException
-
setLogWriter
public void setLogWriter(PrintWriter aLogWriter) throws ResourceException
- Specified by:
setLogWriter
in interfaceManagedConnectionFactory
- Throws:
ResourceException
- See Also:
ManagedConnectionFactory.setLogWriter(java.io.PrintWriter)
-
getLogWriter
public PrintWriter getLogWriter() throws ResourceException
- Specified by:
getLogWriter
in interfaceManagedConnectionFactory
- Throws:
ResourceException
- See Also:
ManagedConnectionFactory.getLogWriter()
-
-