jremote jbase5.2.1

com.jbase.jremote.jca
Class JRemoteManagedConnection

java.lang.Object
  extended by com.jbase.jremote.jca.JRemoteManagedConnection
All Implemented Interfaces:
javax.resource.spi.ManagedConnection

public class JRemoteManagedConnection
extends java.lang.Object
implements javax.resource.spi.ManagedConnection

The application server considers this managed connection to be the phyiscal connection to a remote jBASE instance.

Author:
aphethean

Constructor Summary
protected JRemoteManagedConnection()
          Constructor for JRemoteManagedConnection
protected JRemoteManagedConnection(JConnection connection, javax.security.auth.Subject subject)
          Constructor for JRemoteManagedConnection
 
Method Summary
 void addConnectionEventListener(javax.resource.spi.ConnectionEventListener listener)
           
 void associateConnection(java.lang.Object handle)
           
protected  void begin()
           Provided as a callback method for the LocalTransaction object.
 void cleanup()
           Put the connection into a state where it may be reused.
 void closeHandle(WrappedJConnection handle)
           
protected  void commit()
           Provided as a callback method for the LocalTransaction object.
 void destroy()
           
 JConnection getConnection()
           
 java.lang.Object getConnection(javax.security.auth.Subject subject, javax.resource.spi.ConnectionRequestInfo cxRequestInfo)
           
 javax.resource.spi.LocalTransaction getLocalTransaction()
           
protected  javax.resource.spi.ConnectionEvent getLocalTransactionCommittedEvent()
           
protected  javax.resource.spi.ConnectionEvent getLocalTransactionRolledbackEvent()
           
protected  javax.resource.spi.ConnectionEvent getLocalTransactionStartedEvent()
           
 java.io.PrintWriter getLogWriter()
           
 javax.resource.spi.ManagedConnectionMetaData getMetaData()
           
protected  javax.security.auth.Subject getSubject()
           
 TransactionManager getTransactionManager()
           
 javax.transaction.xa.XAResource getXAResource()
           
protected  boolean isAlive()
          Test physical connection is alive.
protected  boolean isInitialised()
           
protected  void notify(EventNotifier notifier, javax.resource.spi.ConnectionEvent event)
           
 void removeConnectionEventListener(javax.resource.spi.ConnectionEventListener listener)
           
protected  void rollback()
           Provided as a callback method for the LocalTransaction object.
protected  void setInitialised(boolean init)
           
 void setLogWriter(java.io.PrintWriter out)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JRemoteManagedConnection

protected JRemoteManagedConnection()
Constructor for JRemoteManagedConnection


JRemoteManagedConnection

protected JRemoteManagedConnection(JConnection connection,
                                   javax.security.auth.Subject subject)
Constructor for JRemoteManagedConnection

Method Detail

getConnection

public JConnection getConnection()

getSubject

protected javax.security.auth.Subject getSubject()

getConnection

public java.lang.Object getConnection(javax.security.auth.Subject subject,
                                      javax.resource.spi.ConnectionRequestInfo cxRequestInfo)
                               throws javax.resource.ResourceException
Specified by:
getConnection in interface javax.resource.spi.ManagedConnection
Throws:
javax.resource.ResourceException
See Also:
ManagedConnection.getConnection(Subject, ConnectionRequestInfo)

closeHandle

public void closeHandle(WrappedJConnection handle)

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()

cleanup

public void cleanup()
             throws javax.resource.ResourceException

Put the connection into a state where it may be reused. All transactions should be rolledback, all state reset, and connection specific resources released.

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

associateConnection

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

addConnectionEventListener

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

removeConnectionEventListener

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

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()

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()

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()

setLogWriter

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

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()

getTransactionManager

public TransactionManager getTransactionManager()

begin

protected void begin()
              throws javax.resource.ResourceException

Provided as a callback method for the LocalTransaction object. The LocalTransaction object should call this method when starting a transaction to allow the connection event listeners to be notified.

Throws:
javax.resource.ResourceException

commit

protected void commit()
               throws javax.resource.ResourceException

Provided as a callback method for the LocalTransaction object. The LocalTransaction object should call this method when committing a transaction to allow the connection event listeners to be notified.

Throws:
javax.resource.ResourceException

rollback

protected void rollback()
                 throws javax.resource.ResourceException

Provided as a callback method for the LocalTransaction object. The LocalTransaction object should call this method when rolling a transaction back to allow the connection event listeners to be notified.

Throws:
javax.resource.ResourceException

isAlive

protected boolean isAlive()

Test physical connection is alive.

Returns:
boolean Is connection alive

isInitialised

protected boolean isInitialised()

setInitialised

protected void setInitialised(boolean init)

notify

protected void notify(EventNotifier notifier,
                      javax.resource.spi.ConnectionEvent event)

getLocalTransactionStartedEvent

protected javax.resource.spi.ConnectionEvent getLocalTransactionStartedEvent()

getLocalTransactionCommittedEvent

protected javax.resource.spi.ConnectionEvent getLocalTransactionCommittedEvent()

getLocalTransactionRolledbackEvent

protected javax.resource.spi.ConnectionEvent getLocalTransactionRolledbackEvent()

jremote jbase5.2.1

Copyright © 2010 TEMENOS. All Rights Reserved.