站内搜索: 请输入搜索关键词
当前页面: 在线文档首页 > Hibernate 2.1.8 正式版 API 英文文档

ManagedConnectionFactoryImpl (Hibernate API Documentation) - Hibernate 2.1.8 正式版 API 英文文档


net.sf.hibernate.jca
Class ManagedConnectionFactoryImpl

java.lang.Object
  extended bynet.sf.hibernate.jca.ManagedConnectionFactoryImpl
All Implemented Interfaces:
javax.resource.spi.ManagedConnectionFactory, Serializable

public class ManagedConnectionFactoryImpl
extends Object
implements javax.resource.spi.ManagedConnectionFactory, Serializable

Factory for creating Factories, connections and matching connections Does not currently support unmanaged environments

See Also:
Serialized Form

Constructor Summary
ManagedConnectionFactoryImpl()
           
 
Method Summary
 Object createConnectionFactory()
          NOT SUPPORTED
 Object createConnectionFactory(javax.resource.spi.ConnectionManager cxManager)
          Creates a Hibernate SessionFactory for the container
 javax.resource.spi.ManagedConnection createManagedConnection(javax.security.auth.Subject subject, javax.resource.spi.ConnectionRequestInfo info)
          Creates a ManagedConnection
 boolean equals(Object object)
          JCA 1.0, 5.5.3 It is required that the ManagedConnectionFactory implementation class extend the implementation of the hashCode and equals methods defined in the java.lang.Object class.
 String getDatasourceJndi()
           
 String getDialect()
           
 String getHibernateProperties()
           
 PrintWriter getLogWriter()
           
 String getMapResources()
           
 int hashCode()
          JCA 1.0, 5.5.3 It is required that the ManagedConnectionFactory implementation class extend the implementation of the hashCode and equals methods defined in the java.lang.Object class.
 javax.resource.spi.ManagedConnection matchManagedConnections(Set mcs, javax.security.auth.Subject subject, javax.resource.spi.ConnectionRequestInfo cri)
           
 void setDatasourceJndi(String datasourceJndi)
           
 void setDialect(String dialect)
           
 void setHibernateProperties(String properties)
           
 void setLogWriter(PrintWriter out)
           
 void setMapResources(String mapResources)
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ManagedConnectionFactoryImpl

public ManagedConnectionFactoryImpl()
Method Detail

createConnectionFactory

public Object createConnectionFactory(javax.resource.spi.ConnectionManager cxManager)
                               throws javax.resource.ResourceException
Creates a Hibernate SessionFactory for the container

Specified by:
createConnectionFactory in interface javax.resource.spi.ManagedConnectionFactory
Throws:
javax.resource.ResourceException - can't create Session Factory (thrown with linked exception)

createConnectionFactory

public Object createConnectionFactory()
                               throws javax.resource.ResourceException
NOT SUPPORTED

Specified by:
createConnectionFactory in interface javax.resource.spi.ManagedConnectionFactory
Throws:
javax.resource.NotSupportedException - Unmanaged environments are not currently supported
javax.resource.ResourceException

createManagedConnection

public javax.resource.spi.ManagedConnection createManagedConnection(javax.security.auth.Subject subject,
                                                                    javax.resource.spi.ConnectionRequestInfo info)
Creates a ManagedConnection

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

setLogWriter

public void setLogWriter(PrintWriter out)
                  throws javax.resource.ResourceException
Specified by:
setLogWriter in interface javax.resource.spi.ManagedConnectionFactory
Throws:
javax.resource.ResourceException

getLogWriter

public PrintWriter getLogWriter()
                         throws javax.resource.ResourceException
Specified by:
getLogWriter in interface javax.resource.spi.ManagedConnectionFactory
Throws:
javax.resource.ResourceException

matchManagedConnections

public javax.resource.spi.ManagedConnection matchManagedConnections(Set mcs,
                                                                    javax.security.auth.Subject subject,
                                                                    javax.resource.spi.ConnectionRequestInfo cri)
                                                             throws javax.resource.ResourceException
Specified by:
matchManagedConnections in interface javax.resource.spi.ManagedConnectionFactory
Throws:
javax.resource.ResourceException

hashCode

public int hashCode()
JCA 1.0, 5.5.3 It is required that the ManagedConnectionFactory implementation class extend the implementation of the hashCode and equals methods defined in the java.lang.Object class.

Specified by:
hashCode in interface javax.resource.spi.ManagedConnectionFactory
Returns:
hashcode computed according to recommendations in Effective Java.

equals

public boolean equals(Object object)
JCA 1.0, 5.5.3 It is required that the ManagedConnectionFactory implementation class extend the implementation of the hashCode and equals methods defined in the java.lang.Object class.

Specified by:
equals in interface javax.resource.spi.ManagedConnectionFactory
Returns:
if object is equals based on a complete set of configuration properties.

setDatasourceJndi

public void setDatasourceJndi(String datasourceJndi)

getDatasourceJndi

public String getDatasourceJndi()

getDialect

public String getDialect()

setDialect

public void setDialect(String dialect)

getMapResources

public String getMapResources()

setMapResources

public void setMapResources(String mapResources)

getHibernateProperties

public String getHibernateProperties()

setHibernateProperties

public void setHibernateProperties(String properties)