de.bea.domingo.connector.impl
Class DomingoManagedConnection

java.lang.Object
  extended by de.bea.domingo.connector.impl.DomingoManagedConnection
All Implemented Interfaces:
javax.resource.spi.ManagedConnection, javax.resource.spi.ManagedConnectionMetaData

public final class DomingoManagedConnection
extends java.lang.Object
implements javax.resource.spi.ManagedConnection, javax.resource.spi.ManagedConnectionMetaData

Author:
Kurt Riede

Field Summary
protected static de.bea.domingo.i18n.Resources METADATA
          Internationalized resources.
protected static de.bea.domingo.i18n.Resources RESOURCES
          Internationalized resources.
 
Constructor Summary
DomingoManagedConnection(DomingoLogAdapter theMonitor, DomingoManagedConnectionFactory mcf, javax.resource.spi.ConnectionRequestInfo cri)
          Constructor (using only ConnectionRequestInfo).
DomingoManagedConnection(DomingoLogAdapter theMonitor, DomingoManagedConnectionFactory mcf, javax.resource.spi.security.GenericCredential gc)
          Constructor (using GenericCredentials).
DomingoManagedConnection(DomingoLogAdapter theMonitor, DomingoManagedConnectionFactory mcf, javax.resource.spi.security.PasswordCredential pc)
          Constructor (using PasswordCredential).
 
Method Summary
 void addConnection(javax.resource.cci.Connection connection)
          Adds a new connection.
 void addConnectionEventListener(javax.resource.spi.ConnectionEventListener connectionEventListener)
          
 void associateConnection(java.lang.Object connection)
          
 void cleanup()
          
 void connectionClosed(javax.resource.spi.ConnectionEvent event)
          
 void connectionErrorOccurred(javax.resource.spi.ConnectionEvent event)
          
protected  de.bea.domingo.DSession createPhysicalConnection(javax.resource.spi.ConnectionRequestInfo cri)
          Returns a physical connection (using only ConnectionRequestInfo).
protected  de.bea.domingo.DSession createPhysicalConnection(javax.resource.spi.security.GenericCredential gc)
          Returns a physical connection (using GenericCredential).
protected  de.bea.domingo.DSession createPhysicalConnection(java.lang.String username, char[] password)
          Returns a physical connection (using username and password).
 void destroy()
          
 java.lang.Object getConnection(javax.security.auth.Subject subj, javax.resource.spi.ConnectionRequestInfo cri)
          
 javax.resource.spi.ConnectionRequestInfo getConnectionRequestInfo()
          
 java.lang.String getEISProductName()
          
 java.lang.String getEISProductVersion()
          
 javax.resource.spi.LocalTransaction getLocalTransaction()
          
 java.io.PrintWriter getLogWriter()
          
 int getMaxConnections()
          
 javax.resource.spi.ManagedConnectionMetaData getMetaData()
          
 DomingoLogAdapter getMonitor()
          Returns the associated monitor.
 de.bea.domingo.DSession getSession()
          Returns the domingo session of a managed connection.
 java.lang.String getUserName()
          
 javax.transaction.xa.XAResource getXAResource()
          
 void localTransactionCommitted(javax.resource.spi.ConnectionEvent event)
          
 void localTransactionRolledback(javax.resource.spi.ConnectionEvent event)
          
 void localTransactionStarted(javax.resource.spi.ConnectionEvent event)
          
 void removeConnection(DomingoConnection connection)
          Removes a connection from the set of connections associated with this managed connection.
 void removeConnectionEventListener(javax.resource.spi.ConnectionEventListener connectionEventListener)
          
 void setLogWriter(java.io.PrintWriter writer)
          
 java.lang.String toString()
          
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

RESOURCES

protected static final de.bea.domingo.i18n.Resources RESOURCES
Internationalized resources.


METADATA

protected static final de.bea.domingo.i18n.Resources METADATA
Internationalized resources.

Constructor Detail

DomingoManagedConnection

public DomingoManagedConnection(DomingoLogAdapter theMonitor,
                                DomingoManagedConnectionFactory mcf,
                                javax.resource.spi.ConnectionRequestInfo cri)
                         throws javax.resource.ResourceException
Constructor (using only ConnectionRequestInfo).

Parameters:
theMonitor - the domingo monitor to use for monitoring
mcf - the managed connection factory that creates this connection
cri - connection request information for authentication
Throws:
javax.resource.ResourceException - if the connection cannot be created

DomingoManagedConnection

public DomingoManagedConnection(DomingoLogAdapter theMonitor,
                                DomingoManagedConnectionFactory mcf,
                                javax.resource.spi.security.PasswordCredential pc)
                         throws javax.resource.ResourceException
Constructor (using PasswordCredential).

Parameters:
theMonitor - the domingo monitor to use for monitoring
mcf - the managed connection factory that creates this connection
pc - the password credentials for authentication
Throws:
javax.resource.ResourceException - if the connection cannot be created

DomingoManagedConnection

public DomingoManagedConnection(DomingoLogAdapter theMonitor,
                                DomingoManagedConnectionFactory mcf,
                                javax.resource.spi.security.GenericCredential gc)
                         throws javax.resource.ResourceException
Constructor (using GenericCredentials).

Parameters:
theMonitor - the domingo monitor to use for monitoring
mcf - the managed connection factory that creates this connection
gc - generic credentials for authentication
Throws:
javax.resource.ResourceException - if the connection cannot be created
Method Detail

createPhysicalConnection

protected de.bea.domingo.DSession createPhysicalConnection(javax.resource.spi.ConnectionRequestInfo cri)
                                                    throws javax.resource.ResourceException
Returns a physical connection (using only ConnectionRequestInfo).

Parameters:
cri - connection request information for authentication
Returns:
physical connection to the EIS
Throws:
javax.resource.ResourceException - if the connection cannot be created

createPhysicalConnection

protected de.bea.domingo.DSession createPhysicalConnection(javax.resource.spi.security.GenericCredential gc)
                                                    throws javax.resource.ResourceException
Returns a physical connection (using GenericCredential).

Parameters:
gc - generic credentials for authentication
Returns:
physical connection to the EIS
Throws:
javax.resource.ResourceException - if the connection cannot be created

createPhysicalConnection

protected de.bea.domingo.DSession createPhysicalConnection(java.lang.String username,
                                                           char[] password)
                                                    throws javax.resource.ResourceException
Returns a physical connection (using username and password).

Parameters:
username - username for authentication
password - password for authentication
Returns:
physical connection to the EIS
Throws:
javax.resource.ResourceException - if the connection cannot be created

getSession

public de.bea.domingo.DSession getSession()
Returns the domingo session of a managed connection.

Returns:
domingo session

getMonitor

public DomingoLogAdapter getMonitor()
Returns the associated monitor.

Returns:
associated monitor

associateConnection

public void associateConnection(java.lang.Object connection)
                         throws javax.resource.ResourceException

Specified by:
associateConnection in interface javax.resource.spi.ManagedConnection
Throws:
javax.resource.ResourceException
See Also:
ManagedConnection.associateConnection(java.lang.Object)

getLocalTransaction

public javax.resource.spi.LocalTransaction getLocalTransaction()
                                                        throws javax.resource.ResourceException

Specified by:
getLocalTransaction in interface javax.resource.spi.ManagedConnection
Throws:
javax.resource.ResourceException
See Also:
ManagedConnection.getLocalTransaction()

getXAResource

public javax.transaction.xa.XAResource getXAResource()
                                              throws javax.resource.ResourceException

Specified by:
getXAResource in interface javax.resource.spi.ManagedConnection
Throws:
javax.resource.ResourceException
See Also:
ManagedConnection.getXAResource()

getMetaData

public javax.resource.spi.ManagedConnectionMetaData getMetaData()
                                                         throws javax.resource.ResourceException

Specified by:
getMetaData in interface javax.resource.spi.ManagedConnection
Throws:
javax.resource.ResourceException
See Also:
ManagedConnection.getMetaData()

getLogWriter

public java.io.PrintWriter getLogWriter()
                                 throws javax.resource.ResourceException

Specified by:
getLogWriter in interface javax.resource.spi.ManagedConnection
Throws:
javax.resource.ResourceException
See Also:
ManagedConnection.getLogWriter()

setLogWriter

public void setLogWriter(java.io.PrintWriter writer)
                  throws javax.resource.ResourceException

Specified by:
setLogWriter in interface javax.resource.spi.ManagedConnection
Throws:
javax.resource.ResourceException
See Also:
ManagedConnection.setLogWriter(java.io.PrintWriter)

toString

public java.lang.String toString()

Overrides:
toString in class java.lang.Object
See Also:
Object.toString()

getEISProductName

public java.lang.String getEISProductName()
                                   throws javax.resource.ResourceException

Specified by:
getEISProductName in interface javax.resource.spi.ManagedConnectionMetaData
Throws:
javax.resource.ResourceException
See Also:
ManagedConnectionMetaData.getEISProductName()

getEISProductVersion

public java.lang.String getEISProductVersion()
                                      throws javax.resource.ResourceException

Specified by:
getEISProductVersion in interface javax.resource.spi.ManagedConnectionMetaData
Throws:
javax.resource.ResourceException
See Also:
ManagedConnectionMetaData.getEISProductVersion()

getMaxConnections

public int getMaxConnections()
                      throws javax.resource.ResourceException

Specified by:
getMaxConnections in interface javax.resource.spi.ManagedConnectionMetaData
Throws:
javax.resource.ResourceException
See Also:
ManagedConnectionMetaData.getMaxConnections()

getConnectionRequestInfo

public javax.resource.spi.ConnectionRequestInfo getConnectionRequestInfo()

Returns:
connection request information

getUserName

public java.lang.String getUserName()
                             throws javax.resource.ResourceException

Specified by:
getUserName in interface javax.resource.spi.ManagedConnectionMetaData
Throws:
javax.resource.ResourceException
See Also:
ManagedConnectionMetaData.getUserName()

cleanup

public void cleanup()
             throws javax.resource.ResourceException

Specified by:
cleanup in interface javax.resource.spi.ManagedConnection
Throws:
javax.resource.ResourceException
See Also:
ManagedConnection.cleanup()

addConnection

public void addConnection(javax.resource.cci.Connection connection)
Adds a new connection.

Parameters:
connection - the new connection.

removeConnection

public void removeConnection(DomingoConnection connection)
Removes a connection from the set of connections associated with this managed connection.

Parameters:
connection - The connection to remove.

destroy

public void destroy()
             throws javax.resource.ResourceException

Specified by:
destroy in interface javax.resource.spi.ManagedConnection
Throws:
javax.resource.ResourceException
See Also:
ManagedConnection.destroy()

getConnection

public java.lang.Object getConnection(javax.security.auth.Subject subj,
                                      javax.resource.spi.ConnectionRequestInfo cri)
                               throws javax.resource.ResourceException

Specified by:
getConnection in interface javax.resource.spi.ManagedConnection
Throws:
javax.resource.ResourceException
See Also:
ManagedConnection.getConnection(javax.security.auth.Subject, javax.resource.spi.ConnectionRequestInfo)

addConnectionEventListener

public void addConnectionEventListener(javax.resource.spi.ConnectionEventListener connectionEventListener)

Specified by:
addConnectionEventListener in interface javax.resource.spi.ManagedConnection
See Also:
ManagedConnection.addConnectionEventListener(javax.resource.spi.ConnectionEventListener)

removeConnectionEventListener

public void removeConnectionEventListener(javax.resource.spi.ConnectionEventListener connectionEventListener)

Specified by:
removeConnectionEventListener in interface javax.resource.spi.ManagedConnection
See Also:
ManagedConnection.removeConnectionEventListener(javax.resource.spi.ConnectionEventListener)

connectionClosed

public void connectionClosed(javax.resource.spi.ConnectionEvent event)

See Also:
ConnectionEventListener.connectionClosed(javax.resource.spi.ConnectionEvent)

localTransactionStarted

public void localTransactionStarted(javax.resource.spi.ConnectionEvent event)

See Also:
ConnectionEventListener.localTransactionStarted(javax.resource.spi.ConnectionEvent)

localTransactionCommitted

public void localTransactionCommitted(javax.resource.spi.ConnectionEvent event)

See Also:
ConnectionEventListener.localTransactionCommitted(javax.resource.spi.ConnectionEvent)

localTransactionRolledback

public void localTransactionRolledback(javax.resource.spi.ConnectionEvent event)

See Also:
ConnectionEventListener.localTransactionRolledback(javax.resource.spi.ConnectionEvent)

connectionErrorOccurred

public void connectionErrorOccurred(javax.resource.spi.ConnectionEvent event)

See Also:
ConnectionEventListener.connectionErrorOccurred(javax.resource.spi.ConnectionEvent)


Domingo 1.0 Java-API