com.j_spaces.jca
Class GSManagedConnection

java.lang.Object
  extended by com.j_spaces.jca.GSManagedConnection
All Implemented Interfaces:
LocalTransaction, ManagedConnection

public class GSManagedConnection
extends Object
implements ManagedConnection, LocalTransaction

GigaSpaces - JCA Managed Connection.


Constructor Summary
GSManagedConnection(GSManagedConnectionFactory mcf, long timeout)
           
 
Method Summary
 void addConnectionEventListener(ConnectionEventListener cel)
           
 void associateConnection(Object c)
           
 void begin()
           
 void cleanup()
           
 void commit()
           
 void destroy()
           
 Object getConnection(Subject subject, ConnectionRequestInfo cri)
           
 GSManagedConnectionFactory getGSManagedConnectionFactory()
           
 String getJavaSpaceURL()
          Returns the javaSpaceURL.
 Transaction.Created getJiniTx()
          Gets the jiniTx associated.
 LocalTransaction getLocalTransaction()
           
 PrintWriter getLogWriter()
           
 ManagedConnectionMetaData getMetaData()
           
 IJSpace getSpace()
          Gets the space proxy.
 TransactionManager getTransactionManager()
          Gets the associated transaction manager.
 Long getTransactionTimeout()
           
 XAResource getXAResource()
           
static void log(String message)
           
 void removeConnectionEventListener(ConnectionEventListener cel)
           
 void rollback()
           
 void setJiniTx(Transaction.Created jiniTx)
          Sets the jiniTx.
 void setLogWriter(PrintWriter param1)
           
 void setSpace(IJSpace space)
          Sets the space proxy.
 void setTransactionTimeout(Long txTimeout)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

GSManagedConnection

public GSManagedConnection(GSManagedConnectionFactory mcf,
                           long timeout)
                    throws ResourceException
Parameters:
mcf -
timeout -
Throws:
ResourceException
Method Detail

setTransactionTimeout

public void setTransactionTimeout(Long txTimeout)

getTransactionTimeout

public Long getTransactionTimeout()

getTransactionManager

public TransactionManager getTransactionManager()
Gets the associated transaction manager.

Returns:
the transaction manager

getLogWriter

public PrintWriter getLogWriter()
                         throws ResourceException
Specified by:
getLogWriter in interface ManagedConnection
Throws:
ResourceException

setLogWriter

public void setLogWriter(PrintWriter param1)
                  throws ResourceException
Specified by:
setLogWriter in interface ManagedConnection
Throws:
ResourceException

addConnectionEventListener

public void addConnectionEventListener(ConnectionEventListener cel)
Specified by:
addConnectionEventListener in interface ManagedConnection

removeConnectionEventListener

public void removeConnectionEventListener(ConnectionEventListener cel)
Specified by:
removeConnectionEventListener in interface ManagedConnection

associateConnection

public void associateConnection(Object c)
                         throws ResourceException
Specified by:
associateConnection in interface ManagedConnection
Throws:
ResourceException

getLocalTransaction

public LocalTransaction getLocalTransaction()
                                     throws ResourceException
Specified by:
getLocalTransaction in interface ManagedConnection
Throws:
ResourceException

getMetaData

public ManagedConnectionMetaData getMetaData()
                                      throws ResourceException
Specified by:
getMetaData in interface ManagedConnection
Throws:
ResourceException

getXAResource

public XAResource getXAResource()
                         throws ResourceException
Specified by:
getXAResource in interface ManagedConnection
Throws:
ResourceException

destroy

public void destroy()
             throws ResourceException
Specified by:
destroy in interface ManagedConnection
Throws:
ResourceException

cleanup

public void cleanup()
Specified by:
cleanup in interface ManagedConnection

getConnection

public Object getConnection(Subject subject,
                            ConnectionRequestInfo cri)
Specified by:
getConnection in interface ManagedConnection

commit

public void commit()
            throws ResourceException
Specified by:
commit in interface LocalTransaction
Throws:
ResourceException

rollback

public void rollback()
              throws ResourceException
Specified by:
rollback in interface LocalTransaction
Throws:
ResourceException

begin

public void begin()
           throws ResourceException
Specified by:
begin in interface LocalTransaction
Throws:
ResourceException

getJiniTx

public Transaction.Created getJiniTx()
Gets the jiniTx associated.

Returns:
Transaction.Created

setJiniTx

public void setJiniTx(Transaction.Created jiniTx)
Sets the jiniTx.

Parameters:
jiniTx - the jini transaction to set

getSpace

public IJSpace getSpace()
Gets the space proxy.

Returns:
JavaSpace

setSpace

public void setSpace(IJSpace space)
Sets the space proxy.

Parameters:
space - The space to set

log

public static void log(String message)
Parameters:
message -

getJavaSpaceURL

public String getJavaSpaceURL()
Returns the javaSpaceURL.

Returns:
String space url
See Also:
SpaceURL

getGSManagedConnectionFactory

public GSManagedConnectionFactory getGSManagedConnectionFactory()