org.apache.jackrabbit.jca
Class JCAManagedConnectionFactory

java.lang.Object
  extended by org.apache.jackrabbit.jca.JCAManagedConnectionFactory
All Implemented Interfaces:
Serializable, javax.resource.spi.ManagedConnectionFactory

public final class JCAManagedConnectionFactory
extends Object
implements javax.resource.spi.ManagedConnectionFactory

Implements the JCA ManagedConnectionFactory contract.

See Also:
Serialized Form

Constructor Summary
JCAManagedConnectionFactory()
           
 
Method Summary
 Object createConnectionFactory()
          Creates a Connection Factory instance.
 Object createConnectionFactory(javax.resource.spi.ConnectionManager cm)
          Creates a Connection Factory instance.
 javax.resource.spi.ManagedConnection createManagedConnection(Subject subject, javax.resource.spi.ConnectionRequestInfo cri)
          

Creates a new physical connection to the underlying EIS resource manager.

 boolean equals(Object o)
          Return true if equals.
protected  void finalize()
          Shutdown the repository.
 Boolean getBindSessionToTransaction()
           
 String getConfigFile()
          Return the repository configuration file.
 String getHomeDir()
          Return the repository home directory.
 PrintWriter getLogWriter()
          Get the log writer.
 Repository getRepository()
          Return the repository, automatically creating it if needed.
 String getRepositoryURI()
          Return the repository URI.
 int hashCode()
          Return the hash code.
 void log(String message)
          Log a message.
 void log(String message, Throwable exception)
          Log a message.
 javax.resource.spi.ManagedConnection matchManagedConnections(Set set, Subject subject, javax.resource.spi.ConnectionRequestInfo cri)
          Returns a matched connection from the candidate set of connections.
 void setBindSessionToTransaction(Boolean bindSessionToTransaction)
           
 void setConfigFile(String conf)
          Set the repository configuration file.
 void setHomeDir(String home)
          Set the repository home directory.
 void setLogWriter(PrintWriter logWriter)
          Set the log writer.
 void setRepositoryURI(String uri)
          Set the repository URI.
 
Methods inherited from class java.lang.Object
clone, getClass, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JCAManagedConnectionFactory

public JCAManagedConnectionFactory()
Method Detail

getRepositoryURI

public String getRepositoryURI()
Return the repository URI.


setRepositoryURI

public void setRepositoryURI(String uri)
Set the repository URI.


getHomeDir

public String getHomeDir()
Return the repository home directory.


setHomeDir

public void setHomeDir(String home)
Set the repository home directory.


getConfigFile

public String getConfigFile()
Return the repository configuration file.


setConfigFile

public void setConfigFile(String conf)
Set the repository configuration file.


getLogWriter

public PrintWriter getLogWriter()
Get the log writer.

Specified by:
getLogWriter in interface javax.resource.spi.ManagedConnectionFactory

setLogWriter

public void setLogWriter(PrintWriter logWriter)
                  throws javax.resource.ResourceException
Set the log writer.

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

createConnectionFactory

public Object createConnectionFactory()
                               throws javax.resource.ResourceException
Creates a Connection Factory instance.

Specified by:
createConnectionFactory in interface javax.resource.spi.ManagedConnectionFactory
Throws:
javax.resource.ResourceException

createConnectionFactory

public Object createConnectionFactory(javax.resource.spi.ConnectionManager cm)
                               throws javax.resource.ResourceException
Creates a Connection Factory instance.

Specified by:
createConnectionFactory in interface javax.resource.spi.ManagedConnectionFactory
Throws:
javax.resource.ResourceException

createManagedConnection

public javax.resource.spi.ManagedConnection createManagedConnection(Subject subject,
                                                                    javax.resource.spi.ConnectionRequestInfo cri)
                                                             throws javax.resource.ResourceException

Creates a new physical connection to the underlying EIS resource manager.

WebSphere 5.1.1 will try to recover an XA resource on startup, regardless whether it was committed or rolled back. On this occasion, cri will be null. In order to be interoperable, we return an anonymous connection, whose XA resource is recoverable-only.

Specified by:
createManagedConnection in interface javax.resource.spi.ManagedConnectionFactory
Throws:
javax.resource.ResourceException

matchManagedConnections

public javax.resource.spi.ManagedConnection matchManagedConnections(Set set,
                                                                    Subject subject,
                                                                    javax.resource.spi.ConnectionRequestInfo cri)
                                                             throws javax.resource.ResourceException
Returns a matched connection from the candidate set of connections.

Specified by:
matchManagedConnections in interface javax.resource.spi.ManagedConnectionFactory
Throws:
javax.resource.ResourceException

getRepository

public Repository getRepository()
                         throws RepositoryException
Return the repository, automatically creating it if needed.

Throws:
RepositoryException

log

public void log(String message)
Log a message.


log

public void log(String message,
                Throwable exception)
Log a message.


hashCode

public int hashCode()
Return the hash code.

Specified by:
hashCode in interface javax.resource.spi.ManagedConnectionFactory
Overrides:
hashCode in class Object

equals

public boolean equals(Object o)
Return true if equals.

Specified by:
equals in interface javax.resource.spi.ManagedConnectionFactory
Overrides:
equals in class Object

finalize

protected void finalize()
Shutdown the repository.

Overrides:
finalize in class Object

getBindSessionToTransaction

public Boolean getBindSessionToTransaction()

setBindSessionToTransaction

public void setBindSessionToTransaction(Boolean bindSessionToTransaction)


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