org.objectweb.joram.client.connector.ManagedConnectionImpl Class Reference

Collaboration diagram for org.objectweb.joram.client.connector.ManagedConnectionImpl:

Collaboration graph
[legend]
List of all members.

Public Member Functions

Object getConnection (javax.security.auth.Subject subject, ConnectionRequestInfo cxRequestInfo) throws ResourceException
void associateConnection (Object connection) throws ResourceException
void addConnectionEventListener (ConnectionEventListener listener)
void removeConnectionEventListener (ConnectionEventListener listener)
XAResource getXAResource () throws ResourceException
javax.resource.spi.LocalTransaction getLocalTransaction () throws ResourceException
ManagedConnectionMetaData getMetaData () throws ResourceException
void setLogWriter (PrintWriter out) throws ResourceException
PrintWriter getLogWriter () throws ResourceException
synchronized void cleanup () throws ResourceException
synchronized void destroy () throws ResourceException
int hashCode ()
boolean equals (Object o)
synchronized void onException (JMSException exc)
synchronized void begin () throws ResourceException
synchronized void commit () throws ResourceException
synchronized void rollback () throws ResourceException

Package Functions

 ManagedConnectionImpl (JoramAdapter ra, XAConnection cnx, String hostName, int serverPort, String userName)
boolean matches (String hostName, int serverPort, String userName, String mode)
boolean isValid ()
void closeHandle (OutboundConnection handle)

Package Attributes

String hostName
int serverPort
String mode
String userName
Session session = null

Detailed Description

A ManagedConnectionImpl instance wraps a physical connection to an underlying JORAM server, and provides "handles" for handling this physical connection.

Definition at line 54 of file ManagedConnectionImpl.java.


Constructor & Destructor Documentation

org.objectweb.joram.client.connector.ManagedConnectionImpl.ManagedConnectionImpl ( JoramAdapter  ra,
XAConnection  cnx,
String  hostName,
int  serverPort,
String  userName 
) [package]

Creates a ManagedConnectionImpl instance wrapping a physical connection to the underlying JORAM server.

Parameters:
ra Central adapter authority.
cnx Physical connection to the JORAM server.
hostName JORAM server host name.
serverPort JORAM server port number.
userName User identification.

Definition at line 104 of file ManagedConnectionImpl.java.

References org.objectweb.joram.client.connector.JoramAdapter.addProducer(), org.objectweb.joram.client.connector.ManagedConnectionImpl.hashCode(), org.objectweb.joram.client.connector.JoramAdapter.hostName, and org.objectweb.joram.client.connector.ManagedConnectionImpl.mode.

Here is the call graph for this function:


Member Function Documentation

Object org.objectweb.joram.client.connector.ManagedConnectionImpl.getConnection ( javax.security.auth.Subject  subject,
ConnectionRequestInfo  cxRequestInfo 
) throws ResourceException

Returns a new OutboundConnection instance for handling the physical connection.

Exceptions:
CommException If the wrapped physical connection is lost.

Definition at line 151 of file ManagedConnectionImpl.java.

References org.objectweb.joram.client.connector.ManagedConnectionImpl.isValid().

Referenced by org.objectweb.joram.client.connector.ManagedConnectionImpl.getXAResource().

Here is the call graph for this function:

void org.objectweb.joram.client.connector.ManagedConnectionImpl.associateConnection ( Object  connection  )  throws ResourceException

Dissociates a given connection handle and associates it to this managed connection.

Exceptions:
CommException If the wrapped physical connection is lost.
ResourceException If the provided handle is invalid.

Definition at line 190 of file ManagedConnectionImpl.java.

References org.objectweb.joram.client.connector.ManagedConnectionImpl.isValid(), org.objectweb.joram.client.connector.OutboundConnection.managedCx, and org.objectweb.joram.client.connector.OutboundConnection.xac.

Here is the call graph for this function:

void org.objectweb.joram.client.connector.ManagedConnectionImpl.addConnectionEventListener ( ConnectionEventListener  listener  ) 

Adds a connection event listener.

Definition at line 216 of file ManagedConnectionImpl.java.

void org.objectweb.joram.client.connector.ManagedConnectionImpl.removeConnectionEventListener ( ConnectionEventListener  listener  ) 

Removes a connection event listener.

Definition at line 222 of file ManagedConnectionImpl.java.

XAResource org.objectweb.joram.client.connector.ManagedConnectionImpl.getXAResource (  )  throws ResourceException

Provides a XAResource instance for managing distributed transactions.

Exceptions:
CommException If the physical connection is lost.
IllegalStateException If the managed connection is involved in a local transaction.
ResourceAdapterInternalException If the XA resource can't be retrieved.

Definition at line 239 of file ManagedConnectionImpl.java.

References org.objectweb.joram.client.connector.OutboundConnection.cnxEquals(), org.objectweb.joram.client.connector.ManagedConnectionImpl.getConnection(), org.objectweb.joram.client.connector.ManagedConnectionImpl.isValid(), org.objectweb.joram.client.connector.OutboundSession.sess, org.objectweb.joram.client.connector.ManagedConnectionImpl.session, org.objectweb.joram.client.connector.OutboundConnection.sessions, and org.objectweb.joram.client.connector.OutboundConnection.xac.

Here is the call graph for this function:

javax.resource.spi.LocalTransaction org.objectweb.joram.client.connector.ManagedConnectionImpl.getLocalTransaction (  )  throws ResourceException

Returns this managed connection instance as a LocalTransaction instance for managing local transactions.

Exceptions:
CommException If the physical connection is lost.
IllegalStateException If the managed connection is involved in a distributed transaction.
LocalTransactionException If the LocalTransaction resource can't be created.

Definition at line 363 of file ManagedConnectionImpl.java.

References org.objectweb.joram.client.connector.ManagedConnectionImpl.isValid(), and org.objectweb.joram.client.connector.ManagedConnectionImpl.session.

Here is the call graph for this function:

ManagedConnectionMetaData org.objectweb.joram.client.connector.ManagedConnectionImpl.getMetaData (  )  throws ResourceException

Returns the metadata information for the underlying JORAM server.

Exceptions:
ResourceException Never thrown.

Definition at line 403 of file ManagedConnectionImpl.java.

References org.objectweb.joram.client.connector.ManagedConnectionImpl.userName.

void org.objectweb.joram.client.connector.ManagedConnectionImpl.setLogWriter ( PrintWriter  out  )  throws ResourceException

Sets the log writer for this ManagedConnectionImpl instance.

Exceptions:
ResourceException Never thrown.

Definition at line 417 of file ManagedConnectionImpl.java.

Referenced by org.objectweb.joram.client.connector.ManagedTopicConnectionFactoryImpl.matchManagedConnections(), org.objectweb.joram.client.connector.ManagedQueueConnectionFactoryImpl.matchManagedConnections(), and org.objectweb.joram.client.connector.ManagedConnectionFactoryImpl.matchManagedConnections().

PrintWriter org.objectweb.joram.client.connector.ManagedConnectionImpl.getLogWriter (  )  throws ResourceException

Gets the log writer for this ManagedConnectionImpl instance.

Exceptions:
ResourceException Never thrown.

Definition at line 428 of file ManagedConnectionImpl.java.

synchronized void org.objectweb.joram.client.connector.ManagedConnectionImpl.cleanup (  )  throws ResourceException

Invalidates the created handles and prepares the physical connection to be put back into a connection pool.

Exceptions:
ResourceException Never thrown.

Definition at line 439 of file ManagedConnectionImpl.java.

References org.objectweb.joram.client.connector.OutboundConnection.cleanup(), and org.objectweb.joram.client.connector.ManagedConnectionImpl.session.

Referenced by org.objectweb.joram.client.connector.ManagedConnectionImpl.destroy().

Here is the call graph for this function:

synchronized void org.objectweb.joram.client.connector.ManagedConnectionImpl.destroy (  )  throws ResourceException

Destroys the physical connection to the underlying JORAM server.

Exceptions:
ResourceException Never thrown.

Definition at line 457 of file ManagedConnectionImpl.java.

References org.objectweb.joram.client.connector.ManagedConnectionImpl.cleanup(), and org.objectweb.joram.client.connector.JoramAdapter.removeProducer().

Here is the call graph for this function:

int org.objectweb.joram.client.connector.ManagedConnectionImpl.hashCode (  ) 

Returns a code based on the JORAM server and user identification parameters.

Definition at line 478 of file ManagedConnectionImpl.java.

References org.objectweb.joram.client.connector.ManagedConnectionImpl.hostName, org.objectweb.joram.client.connector.ManagedConnectionImpl.mode, org.objectweb.joram.client.connector.ManagedConnectionImpl.serverPort, and org.objectweb.joram.client.connector.ManagedConnectionImpl.userName.

Referenced by org.objectweb.joram.client.connector.ManagedConnectionImpl.ManagedConnectionImpl().

boolean org.objectweb.joram.client.connector.ManagedConnectionImpl.equals ( Object  o  ) 

Compares ManagedConnectionImpl instances according to their server and user identification parameters.

Definition at line 488 of file ManagedConnectionImpl.java.

References org.objectweb.joram.client.connector.ManagedConnectionImpl.cnx, org.objectweb.joram.client.connector.ManagedConnectionImpl.hostName, org.objectweb.joram.client.connector.ManagedConnectionImpl.mode, org.objectweb.joram.client.connector.ManagedConnectionImpl.serverPort, and org.objectweb.joram.client.connector.ManagedConnectionImpl.userName.

synchronized void org.objectweb.joram.client.connector.ManagedConnectionImpl.onException ( JMSException  exc  ) 

Notifies that the wrapped physical connection has been lost.

Definition at line 508 of file ManagedConnectionImpl.java.

References org.objectweb.joram.client.connector.ManagedConnectionImpl.isValid().

Here is the call graph for this function:

synchronized void org.objectweb.joram.client.connector.ManagedConnectionImpl.begin (  )  throws ResourceException

Notifies that the local transaction is beginning.

Exceptions:
CommException If the wrapped physical connection is lost.
LocalTransactionException If a local transaction has already begun.
 

Definition at line 544 of file ManagedConnectionImpl.java.

References org.objectweb.joram.client.connector.ManagedConnectionImpl.isValid().

Here is the call graph for this function:

synchronized void org.objectweb.joram.client.connector.ManagedConnectionImpl.commit (  )  throws ResourceException

Commits the local transaction.

Exceptions:
CommException If the wrapped physical connection is lost.
LocalTransactionException If the local transaction has not begun, or if the commit fails.

Definition at line 577 of file ManagedConnectionImpl.java.

References org.objectweb.joram.client.connector.ManagedConnectionImpl.isValid(), and org.objectweb.joram.client.connector.ManagedConnectionImpl.session.

Here is the call graph for this function:

synchronized void org.objectweb.joram.client.connector.ManagedConnectionImpl.rollback (  )  throws ResourceException

Rollsback the local transaction.

Exceptions:
CommException If the wrapped physical connection is lost.
LocalTransactionException If the local transaction has not begun, or if the rollback fails.

Definition at line 617 of file ManagedConnectionImpl.java.

References org.objectweb.joram.client.connector.ManagedConnectionImpl.isValid(), and org.objectweb.joram.client.connector.ManagedConnectionImpl.session.

Here is the call graph for this function:

boolean org.objectweb.joram.client.connector.ManagedConnectionImpl.matches ( String  hostName,
int  serverPort,
String  userName,
String  mode 
) [package]

Returns true if this managed connection matches given parameters.

Definition at line 654 of file ManagedConnectionImpl.java.

Referenced by org.objectweb.joram.client.connector.ManagedTopicConnectionFactoryImpl.matchManagedConnections(), org.objectweb.joram.client.connector.ManagedQueueConnectionFactoryImpl.matchManagedConnections(), and org.objectweb.joram.client.connector.ManagedConnectionFactoryImpl.matchManagedConnections().

boolean org.objectweb.joram.client.connector.ManagedConnectionImpl.isValid (  )  [package]

Returns false if the wrapped physical connection has been lost or destroyed, true if it is still valid.

Definition at line 668 of file ManagedConnectionImpl.java.

Referenced by org.objectweb.joram.client.connector.ManagedConnectionImpl.associateConnection(), org.objectweb.joram.client.connector.ManagedConnectionImpl.begin(), org.objectweb.joram.client.connector.ManagedConnectionImpl.commit(), org.objectweb.joram.client.connector.ManagedConnectionImpl.getConnection(), org.objectweb.joram.client.connector.ManagedConnectionFactoryImpl.getInvalidConnections(), org.objectweb.joram.client.connector.ManagedConnectionImpl.getLocalTransaction(), org.objectweb.joram.client.connector.ManagedConnectionImpl.getXAResource(), org.objectweb.joram.client.connector.ManagedConnectionImpl.onException(), and org.objectweb.joram.client.connector.ManagedConnectionImpl.rollback().

void org.objectweb.joram.client.connector.ManagedConnectionImpl.closeHandle ( OutboundConnection  handle  )  [package]

Notifies of the closing of one of the connection handles.

Definition at line 674 of file ManagedConnectionImpl.java.

Referenced by org.objectweb.joram.client.connector.OutboundConnection.close().


Member Data Documentation

String org.objectweb.joram.client.connector.ManagedConnectionImpl.hostName [package]

Underlying JORAM server host name.

Definition at line 81 of file ManagedConnectionImpl.java.

Referenced by org.objectweb.joram.client.connector.ManagedConnectionImpl.equals(), and org.objectweb.joram.client.connector.ManagedConnectionImpl.hashCode().

int org.objectweb.joram.client.connector.ManagedConnectionImpl.serverPort [package]

Underlying JORAM server port number.

Definition at line 83 of file ManagedConnectionImpl.java.

Referenced by org.objectweb.joram.client.connector.ManagedConnectionImpl.equals(), and org.objectweb.joram.client.connector.ManagedConnectionImpl.hashCode().

String org.objectweb.joram.client.connector.ManagedConnectionImpl.mode [package]

Messaging mode (PTP or PubSub or Unified).

Definition at line 85 of file ManagedConnectionImpl.java.

Referenced by org.objectweb.joram.client.connector.ManagedConnectionImpl.equals(), org.objectweb.joram.client.connector.ManagedConnectionImpl.hashCode(), and org.objectweb.joram.client.connector.ManagedConnectionImpl.ManagedConnectionImpl().

String org.objectweb.joram.client.connector.ManagedConnectionImpl.userName [package]

User identification.

Definition at line 87 of file ManagedConnectionImpl.java.

Referenced by org.objectweb.joram.client.connector.ManagedConnectionImpl.equals(), org.objectweb.joram.client.connector.ManagedConnectionImpl.getMetaData(), and org.objectweb.joram.client.connector.ManagedConnectionImpl.hashCode().

Session org.objectweb.joram.client.connector.ManagedConnectionImpl.session = null [package]

Unique session for the use of managed components, involved in local or distributed transactions.

Definition at line 92 of file ManagedConnectionImpl.java.

Referenced by org.objectweb.joram.client.connector.ManagedConnectionImpl.cleanup(), org.objectweb.joram.client.connector.ManagedConnectionImpl.commit(), org.objectweb.joram.client.connector.OutboundQueueConnection.createQueueSession(), org.objectweb.joram.client.connector.OutboundConnection.createSession(), org.objectweb.joram.client.connector.OutboundTopicConnection.createTopicSession(), org.objectweb.joram.client.connector.ManagedConnectionImpl.getLocalTransaction(), org.objectweb.joram.client.connector.ManagedConnectionImpl.getXAResource(), and org.objectweb.joram.client.connector.ManagedConnectionImpl.rollback().


The documentation for this class was generated from the following file:
Generated on Tue Sep 16 16:17:32 2008 for joram by  doxygen 1.5.0