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:
java.io.Serializable, javax.resource.spi.ManagedConnectionFactory, javax.resource.spi.ResourceAdapterAssociation

public class ActiveMQManagedConnectionFactory
extends ActiveMQConnectionSupport
implements javax.resource.spi.ManagedConnectionFactory, javax.resource.spi.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
 java.lang.Object createConnectionFactory()
          This is used when not running in an app server.
 java.lang.Object createConnectionFactory(javax.resource.spi.ConnectionManager manager)
           
 javax.resource.spi.ManagedConnection createManagedConnection(javax.security.auth.Subject subject, javax.resource.spi.ConnectionRequestInfo connectionRequestInfo)
           
 boolean equals(java.lang.Object object)
           
 java.io.PrintWriter getLogWriter()
           
 javax.resource.spi.ResourceAdapter getResourceAdapter()
           
 int hashCode()
           
 javax.resource.spi.ManagedConnection matchManagedConnections(java.util.Set connections, javax.security.auth.Subject subject, javax.resource.spi.ConnectionRequestInfo connectionRequestInfo)
           
 void setLogWriter(java.io.PrintWriter aLogWriter)
           
 void setResourceAdapter(javax.resource.spi.ResourceAdapter adapter)
           
 
Methods inherited from class org.apache.activemq.ra.ActiveMQConnectionSupport
createConnectionFactory, defaultValue, emptyToNull, getClientid, getDurableTopicPrefetch, getInfo, getInitialRedeliveryDelay, getInputStreamPrefetch, getMaximumRedeliveries, getMaximumRedeliveryDelay, getPassword, getQueueBrowserPrefetch, getQueuePrefetch, getRedeliveryBackOffMultiplier, getRedeliveryUseExponentialBackOff, getServerUrl, getTopicPrefetch, getUseInboundSession, getUserName, isUseInboundSessionEnabled, makeConnection, makeConnection, notEqual, setAllPrefetchValues, setClientid, setDurableTopicPrefetch, setInfo, setInitialRedeliveryDelay, setInputStreamPrefetch, setMaximumRedeliveries, setMaximumRedeliveryDelay, 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(javax.resource.spi.ResourceAdapter adapter)
                        throws javax.resource.ResourceException
Specified by:
setResourceAdapter in interface javax.resource.spi.ResourceAdapterAssociation
Throws:
javax.resource.ResourceException
See Also:
ResourceAdapterAssociation.setResourceAdapter(javax.resource.spi.ResourceAdapter)

getResourceAdapter

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

equals

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

hashCode

public int hashCode()
Specified by:
hashCode in interface javax.resource.spi.ManagedConnectionFactory
Overrides:
hashCode in class java.lang.Object
See Also:
Object.hashCode()

createConnectionFactory

public java.lang.Object createConnectionFactory(javax.resource.spi.ConnectionManager manager)
                                         throws javax.resource.ResourceException
Specified by:
createConnectionFactory in interface javax.resource.spi.ManagedConnectionFactory
Throws:
javax.resource.ResourceException
See Also:
ManagedConnectionFactory.createConnectionFactory(javax.resource.spi.ConnectionManager)

createConnectionFactory

public java.lang.Object createConnectionFactory()
                                         throws javax.resource.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 javax.resource.spi.ManagedConnectionFactory
Throws:
javax.resource.ResourceException
See Also:
ManagedConnectionFactory.createConnectionFactory()

createManagedConnection

public javax.resource.spi.ManagedConnection createManagedConnection(javax.security.auth.Subject subject,
                                                                    javax.resource.spi.ConnectionRequestInfo connectionRequestInfo)
                                                             throws javax.resource.ResourceException
Specified by:
createManagedConnection in interface javax.resource.spi.ManagedConnectionFactory
Throws:
javax.resource.ResourceException
See Also:
ManagedConnectionFactory.createManagedConnection(javax.security.auth.Subject, javax.resource.spi.ConnectionRequestInfo)

matchManagedConnections

public javax.resource.spi.ManagedConnection matchManagedConnections(java.util.Set connections,
                                                                    javax.security.auth.Subject subject,
                                                                    javax.resource.spi.ConnectionRequestInfo connectionRequestInfo)
                                                             throws javax.resource.ResourceException
Specified by:
matchManagedConnections in interface javax.resource.spi.ManagedConnectionFactory
Throws:
javax.resource.ResourceException
See Also:
ManagedConnectionFactory.matchManagedConnections(java.util.Set, javax.security.auth.Subject, javax.resource.spi.ConnectionRequestInfo)

setLogWriter

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

getLogWriter

public java.io.PrintWriter getLogWriter()
                                 throws javax.resource.ResourceException
Specified by:
getLogWriter in interface javax.resource.spi.ManagedConnectionFactory
Throws:
javax.resource.ResourceException
See Also:
ManagedConnectionFactory.getLogWriter()


Copyright © 2005-2015. All Rights Reserved.