org.apache.jackrabbit.jca
Class AnonymousConnection

java.lang.Object
  extended by org.apache.jackrabbit.jca.AnonymousConnection
All Implemented Interfaces:
javax.resource.spi.ManagedConnection, XAResource

public class AnonymousConnection
extends Object
implements javax.resource.spi.ManagedConnection, XAResource

Implements a ManagedConnection for an anonymous user, where no ConnectionRequestInfo has been specified.

See Also:
JCAManagedConnectionFactory.createManagedConnection(javax.security.auth.Subject, javax.resource.spi.ConnectionRequestInfo)

Field Summary
 
Fields inherited from interface javax.transaction.xa.XAResource
TMENDRSCAN, TMFAIL, TMJOIN, TMNOFLAGS, TMONEPHASE, TMRESUME, TMSTARTRSCAN, TMSUCCESS, TMSUSPEND, XA_OK, XA_RDONLY
 
Constructor Summary
AnonymousConnection()
           
 
Method Summary
 void addConnectionEventListener(javax.resource.spi.ConnectionEventListener listener)
          
 void associateConnection(Object o)
           
 void cleanup()
          
 void commit(Xid xid, boolean arg1)
           
 void destroy()
          
 void end(Xid xid, int flags)
           
 void forget(Xid xid)
           
 Object getConnection(Subject subject, javax.resource.spi.ConnectionRequestInfo cri)
           
 javax.resource.spi.LocalTransaction getLocalTransaction()
           
 PrintWriter getLogWriter()
          
 javax.resource.spi.ManagedConnectionMetaData getMetaData()
           
 int getTransactionTimeout()
          
 XAResource getXAResource()
          
 boolean isSameRM(XAResource xares)
          
 int prepare(Xid xid)
           
 Xid[] recover(int flags)
          
 void removeConnectionEventListener(javax.resource.spi.ConnectionEventListener listener)
          
 void rollback(Xid xid)
           
 void setLogWriter(PrintWriter logWriter)
          
 boolean setTransactionTimeout(int timeout)
          
 void start(Xid xid, int flags)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AnonymousConnection

public AnonymousConnection()
Method Detail

getXAResource

public XAResource getXAResource()
                         throws javax.resource.ResourceException

Specified by:
getXAResource in interface javax.resource.spi.ManagedConnection
Throws:
javax.resource.ResourceException

cleanup

public void cleanup()
             throws javax.resource.ResourceException

Specified by:
cleanup in interface javax.resource.spi.ManagedConnection
Throws:
javax.resource.ResourceException

destroy

public void destroy()
             throws javax.resource.ResourceException

Specified by:
destroy in interface javax.resource.spi.ManagedConnection
Throws:
javax.resource.ResourceException

setLogWriter

public void setLogWriter(PrintWriter logWriter)
                  throws javax.resource.ResourceException

Specified by:
setLogWriter in interface javax.resource.spi.ManagedConnection
Throws:
javax.resource.ResourceException

getLogWriter

public PrintWriter getLogWriter()
                         throws javax.resource.ResourceException

Specified by:
getLogWriter in interface javax.resource.spi.ManagedConnection
Throws:
javax.resource.ResourceException

addConnectionEventListener

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

Specified by:
addConnectionEventListener in interface javax.resource.spi.ManagedConnection

removeConnectionEventListener

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

Specified by:
removeConnectionEventListener in interface javax.resource.spi.ManagedConnection

getConnection

public Object getConnection(Subject subject,
                            javax.resource.spi.ConnectionRequestInfo cri)
                     throws javax.resource.ResourceException
Specified by:
getConnection in interface javax.resource.spi.ManagedConnection
Throws:
javax.resource.ResourceException

associateConnection

public void associateConnection(Object o)
                         throws javax.resource.ResourceException
Specified by:
associateConnection in interface javax.resource.spi.ManagedConnection
Throws:
javax.resource.ResourceException

getLocalTransaction

public javax.resource.spi.LocalTransaction getLocalTransaction()
                                                        throws javax.resource.ResourceException
Specified by:
getLocalTransaction in interface javax.resource.spi.ManagedConnection
Throws:
javax.resource.ResourceException

getMetaData

public javax.resource.spi.ManagedConnectionMetaData getMetaData()
                                                         throws javax.resource.ResourceException
Specified by:
getMetaData in interface javax.resource.spi.ManagedConnection
Throws:
javax.resource.ResourceException

recover

public Xid[] recover(int flags)
              throws XAException

Specified by:
recover in interface XAResource
Throws:
XAException

getTransactionTimeout

public int getTransactionTimeout()
                          throws XAException

Specified by:
getTransactionTimeout in interface XAResource
Throws:
XAException

setTransactionTimeout

public boolean setTransactionTimeout(int timeout)
                              throws XAException

Specified by:
setTransactionTimeout in interface XAResource
Throws:
XAException

isSameRM

public boolean isSameRM(XAResource xares)
                 throws XAException

Specified by:
isSameRM in interface XAResource
Throws:
XAException

start

public void start(Xid xid,
                  int flags)
           throws XAException
Specified by:
start in interface XAResource
Throws:
XAException

end

public void end(Xid xid,
                int flags)
         throws XAException
Specified by:
end in interface XAResource
Throws:
XAException

forget

public void forget(Xid xid)
            throws XAException
Specified by:
forget in interface XAResource
Throws:
XAException

prepare

public int prepare(Xid xid)
            throws XAException
Specified by:
prepare in interface XAResource
Throws:
XAException

commit

public void commit(Xid xid,
                   boolean arg1)
            throws XAException
Specified by:
commit in interface XAResource
Throws:
XAException

rollback

public void rollback(Xid xid)
              throws XAException
Specified by:
rollback in interface XAResource
Throws:
XAException


Copyright © 2004-2010 The Apache Software Foundation. All Rights Reserved.