com.caucho.sql
Class ManagedFactoryImpl

java.lang.Object
  extended by com.caucho.sql.ManagedFactoryImpl
All Implemented Interfaces:
java.io.Serializable, ManagedConnectionFactory, ValidatingManagedConnectionFactory

public class ManagedFactoryImpl
extends java.lang.Object
implements ManagedConnectionFactory, ValidatingManagedConnectionFactory

The managed factory implementation.

See Also:
Serialized Form

Field Summary
protected static java.util.logging.Logger log
           
 
Method Summary
 java.lang.Object createConnectionFactory()
          Creates the data source the user sees.
 java.lang.Object createConnectionFactory(ConnectionManager connManager)
          Creates the data source the user sees.
 ManagedConnection createManagedConnection(javax.security.auth.Subject subject, ConnectionRequestInfo requestInfo)
          Creates the underlying managed connection.
 DBPoolImpl getDBPool()
          Returns the DB pool.
 java.util.Set getInvalidConnections(java.util.Set connSet)
          Returns any invalid connections.
 java.io.PrintWriter getLogWriter()
          Gets the log writer for the ManagedConnectionFactory.
 ResourceAdapter getResourceAdapter()
           
 java.lang.String getURL()
          Returns the primary URL
 ManagedConnection matchManagedConnections(java.util.Set connSet, javax.security.auth.Subject subject, ConnectionRequestInfo requestInfo)
          Creates the underlying managed connection.
 void setLogWriter(java.io.PrintWriter out)
          Sets the log writer for the ManagedConnectionFactory.
 void setResourceAdapter(ResourceAdapter adapter)
           
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface javax.resource.spi.ManagedConnectionFactory
equals, hashCode
 

Field Detail

log

protected static final java.util.logging.Logger log
Method Detail

getDBPool

public DBPoolImpl getDBPool()
Returns the DB pool.


getURL

public java.lang.String getURL()
Returns the primary URL


createConnectionFactory

public java.lang.Object createConnectionFactory(ConnectionManager connManager)
                                         throws ResourceException
Creates the data source the user sees.

Specified by:
createConnectionFactory in interface ManagedConnectionFactory
Throws:
ResourceException

createConnectionFactory

public java.lang.Object createConnectionFactory()
                                         throws ResourceException
Creates the data source the user sees. Not needed in this case, since ManagedFactoryImpl is only allowed in Resin.

Specified by:
createConnectionFactory in interface ManagedConnectionFactory
Throws:
ResourceException

createManagedConnection

public ManagedConnection createManagedConnection(javax.security.auth.Subject subject,
                                                 ConnectionRequestInfo requestInfo)
                                          throws ResourceException
Creates the underlying managed connection.

Specified by:
createManagedConnection in interface ManagedConnectionFactory
Throws:
ResourceException

matchManagedConnections

public ManagedConnection matchManagedConnections(java.util.Set connSet,
                                                 javax.security.auth.Subject subject,
                                                 ConnectionRequestInfo requestInfo)
                                          throws ResourceException
Creates the underlying managed connection.

Specified by:
matchManagedConnections in interface ManagedConnectionFactory
Throws:
ResourceException

getInvalidConnections

public java.util.Set getInvalidConnections(java.util.Set connSet)
                                    throws ResourceException
Returns any invalid connections.

Specified by:
getInvalidConnections in interface ValidatingManagedConnectionFactory
Throws:
ResourceException

setLogWriter

public void setLogWriter(java.io.PrintWriter out)
                  throws ResourceException
Description copied from interface: ManagedConnectionFactory
Sets the log writer for the ManagedConnectionFactory.

Specified by:
setLogWriter in interface ManagedConnectionFactory
Throws:
ResourceException

getLogWriter

public java.io.PrintWriter getLogWriter()
                                 throws ResourceException
Description copied from interface: ManagedConnectionFactory
Gets the log writer for the ManagedConnectionFactory.

Specified by:
getLogWriter in interface ManagedConnectionFactory
Throws:
ResourceException

getResourceAdapter

public ResourceAdapter getResourceAdapter()

setResourceAdapter

public void setResourceAdapter(ResourceAdapter adapter)

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object