Joram ${version}

org.objectweb.joram.client.connector
Class ManagedTopicConnectionFactoryImpl

java.lang.Object
  extended byorg.objectweb.joram.client.connector.ManagedConnectionFactoryImpl
      extended byorg.objectweb.joram.client.connector.ManagedTopicConnectionFactoryImpl
All Implemented Interfaces:
javax.resource.spi.ManagedConnectionFactory, javax.resource.spi.ResourceAdapterAssociation, java.io.Serializable, javax.resource.spi.ValidatingManagedConnectionFactory

public class ManagedTopicConnectionFactoryImpl
extends ManagedConnectionFactoryImpl
implements javax.resource.spi.ManagedConnectionFactory, javax.resource.spi.ResourceAdapterAssociation, javax.resource.spi.ValidatingManagedConnectionFactory, java.io.Serializable

A ManagedTopicConnectionFactoryImpl instance manages PubSub outbound connectivity to a given JORAM server.

See Also:
Serialized Form

Field Summary
 
Fields inherited from class org.objectweb.joram.client.connector.ManagedConnectionFactoryImpl
cnxPendingTimer, connectingTimer, out, txPendingTimer
 
Constructor Summary
ManagedTopicConnectionFactoryImpl()
          Constructs a ManagedTopicConnectionFactoryImpl instance.
 
Method Summary
 java.lang.Object createConnectionFactory()
          Method called in the non managed case for creating an OutboundTopicConnectionFactory instance.
 java.lang.Object createConnectionFactory(javax.resource.spi.ConnectionManager cxManager)
          Method called by an application server (managed case) for creating an OutboundTopicConnectionFactory instance.
 javax.resource.spi.ManagedConnection createManagedConnection(javax.security.auth.Subject subject, javax.resource.spi.ConnectionRequestInfo cxRequest)
          Creates a new PubSub physical connection to the underlying JORAM server, and returns a ManagedConnectionImpl instance for a managed environment.
 boolean equals(java.lang.Object o)
          Compares managed factories according to their configuration.
 int hashCode()
          Returns a code depending on the managed factory configuration.
 javax.resource.spi.ManagedConnection matchManagedConnections(java.util.Set connectionSet, javax.security.auth.Subject subject, javax.resource.spi.ConnectionRequestInfo cxRequest)
          Finds a matching connection from the candidate set of connections and returns a ManagedConnectionImpl instance.
 
Methods inherited from class org.objectweb.joram.client.connector.ManagedConnectionFactoryImpl
getCnxPendingTimer, getCollocated, getConnectingTimer, getHostName, getInvalidConnections, getLogWriter, getPassword, getResourceAdapter, getServerPort, getTxPendingTimer, getUserName, setCollocated, setHostName, setLogWriter, setParameters, setPassword, setResourceAdapter, setServerPort, setUserName
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface javax.resource.spi.ManagedConnectionFactory
getLogWriter, setLogWriter
 
Methods inherited from interface javax.resource.spi.ResourceAdapterAssociation
getResourceAdapter, setResourceAdapter
 
Methods inherited from interface javax.resource.spi.ValidatingManagedConnectionFactory
getInvalidConnections
 

Constructor Detail

ManagedTopicConnectionFactoryImpl

public ManagedTopicConnectionFactoryImpl()
Constructs a ManagedTopicConnectionFactoryImpl instance.

Method Detail

createConnectionFactory

public java.lang.Object createConnectionFactory(javax.resource.spi.ConnectionManager cxManager)
                                         throws javax.resource.ResourceException
Method called by an application server (managed case) for creating an OutboundTopicConnectionFactory instance.

Specified by:
createConnectionFactory in interface javax.resource.spi.ManagedConnectionFactory
Overrides:
createConnectionFactory in class ManagedConnectionFactoryImpl
Parameters:
cxManager - Application server's connections pooling manager.
Throws:
javax.resource.ResourceException - Never thrown.

createConnectionFactory

public java.lang.Object createConnectionFactory()
                                         throws javax.resource.ResourceException
Method called in the non managed case for creating an OutboundTopicConnectionFactory instance.

Specified by:
createConnectionFactory in interface javax.resource.spi.ManagedConnectionFactory
Overrides:
createConnectionFactory in class ManagedConnectionFactoryImpl
Throws:
javax.resource.ResourceException - Never thrown.

createManagedConnection

public javax.resource.spi.ManagedConnection createManagedConnection(javax.security.auth.Subject subject,
                                                                    javax.resource.spi.ConnectionRequestInfo cxRequest)
                                                             throws javax.resource.ResourceException
Creates a new PubSub physical connection to the underlying JORAM server, and returns a ManagedConnectionImpl instance for a managed environment.

Specified by:
createManagedConnection in interface javax.resource.spi.ManagedConnectionFactory
Overrides:
createManagedConnection in class ManagedConnectionFactoryImpl
Parameters:
subject - Security data, not taken into account.
cxRequest - User identification data, may be null.
Throws:
javax.resource.spi.CommException - If the JORAM server is not reachable.
javax.resource.spi.SecurityException - If the connecting is not allowed.
javax.jms.IllegalStateException - If the central Joram adapter state is invalid.
javax.resource.ResourceException - If the provided user info is invalid, or if connecting fails for any other reason.

matchManagedConnections

public javax.resource.spi.ManagedConnection matchManagedConnections(java.util.Set connectionSet,
                                                                    javax.security.auth.Subject subject,
                                                                    javax.resource.spi.ConnectionRequestInfo cxRequest)
                                                             throws javax.resource.ResourceException
Finds a matching connection from the candidate set of connections and returns a ManagedConnectionImpl instance.

Specified by:
matchManagedConnections in interface javax.resource.spi.ManagedConnectionFactory
Overrides:
matchManagedConnections in class ManagedConnectionFactoryImpl
Parameters:
connectionSet - Set of connections to test.
subject - Security data, not taken into account.
cxRequest - User identification data, may be null.
Throws:
javax.resource.ResourceException - If the provided connection request info is invalid.

hashCode

public int hashCode()
Returns a code depending on the managed factory configuration.

Specified by:
hashCode in interface javax.resource.spi.ManagedConnectionFactory
Overrides:
hashCode in class ManagedConnectionFactoryImpl

equals

public boolean equals(java.lang.Object o)
Compares managed factories according to their configuration.

Specified by:
equals in interface javax.resource.spi.ManagedConnectionFactory
Overrides:
equals in class ManagedConnectionFactoryImpl

Joram ${version}

Copyright ? 2005 Scalagent - All rights reserved