org.apache.activemq.ra
Class ActiveMQManagedConnectionFactory

java.lang.Object
  extended by org.apache.activemq.ra.ActiveMQConnectionSupport
      extended by 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
ActiveMQManagedConnectionFactory()
           
 
Method Summary
 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, getMaximumRedeliveries, getMaximumRedeliveryDelay, getOptimizeDurableTopicPrefetch, getPassword, getQueueBrowserPrefetch, getQueuePrefetch, getRedeliveryBackOffMultiplier, getRedeliveryUseExponentialBackOff, getServerUrl, getTopicPrefetch, getUseInboundSession, getUserName, isUseInboundSessionEnabled, makeConnection, makeConnection, notEqual, setAllPrefetchValues, setClientid, setDurableTopicPrefetch, setInfo, setInitialRedeliveryDelay, setInputStreamPrefetch, setMaximumRedeliveries, setMaximumRedeliveryDelay, setOptimizeDurableTopicPrefetch, setPassword, setQueueBrowserPrefetch, setQueuePrefetch, setRedeliveryBackOffMultiplier, setRedeliveryUseExponentialBackOff, setServerUrl, setTopicPrefetch, setUseInboundSession, setUserName
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ActiveMQManagedConnectionFactory

public ActiveMQManagedConnectionFactory()
Method Detail

setResourceAdapter

public void setResourceAdapter(ResourceAdapter adapter)
                        throws ResourceException
Specified by:
setResourceAdapter in interface ResourceAdapterAssociation
Throws:
ResourceException
See Also:
ResourceAdapterAssociation.setResourceAdapter(javax.resource.spi.ResourceAdapter)

getResourceAdapter

public ResourceAdapter getResourceAdapter()
Specified by:
getResourceAdapter in interface ResourceAdapterAssociation
See Also:
ResourceAdapterAssociation.getResourceAdapter()

equals

public boolean equals(Object object)
Specified by:
equals in interface ManagedConnectionFactory
Overrides:
equals in class Object
See Also:
Object.equals(java.lang.Object)

hashCode

public int hashCode()
Specified by:
hashCode in interface ManagedConnectionFactory
Overrides:
hashCode in class Object
See Also:
Object.hashCode()

createConnectionFactory

public Object createConnectionFactory(ConnectionManager manager)
                               throws ResourceException
Specified by:
createConnectionFactory in interface ManagedConnectionFactory
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 interface ManagedConnectionFactory
Throws:
ResourceException
See Also:
ManagedConnectionFactory.createConnectionFactory()

createManagedConnection

public ManagedConnection createManagedConnection(Subject subject,
                                                 ConnectionRequestInfo connectionRequestInfo)
                                          throws ResourceException
Specified by:
createManagedConnection in interface ManagedConnectionFactory
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
Specified by:
matchManagedConnections in interface ManagedConnectionFactory
Throws:
ResourceException
See Also:
ManagedConnectionFactory.matchManagedConnections(java.util.Set, javax.security.auth.Subject, javax.resource.spi.ConnectionRequestInfo)

setLogWriter

public void setLogWriter(PrintWriter aLogWriter)
                  throws ResourceException
Specified by:
setLogWriter in interface ManagedConnectionFactory
Throws:
ResourceException
See Also:
ManagedConnectionFactory.setLogWriter(java.io.PrintWriter)

getLogWriter

public PrintWriter getLogWriter()
                         throws ResourceException
Specified by:
getLogWriter in interface ManagedConnectionFactory
Throws:
ResourceException
See Also:
ManagedConnectionFactory.getLogWriter()


Copyright © 2005-2013 The Apache Software Foundation. All Rights Reserved.