org.hibernate.jmx
Class SessionFactoryStub

java.lang.Object
  extended by org.hibernate.jmx.SessionFactoryStub
All Implemented Interfaces:
Serializable, Referenceable, SessionFactory

public class SessionFactoryStub
extends Object
implements SessionFactory

A flyweight for SessionFactory. If the MBean itself does not have classpath to the persistent classes, then a stub will be registered with JNDI and the actual SessionFactoryImpl built upon first access.

Author:
Gavin King
See Also:
Serialized Form

Method Summary
 void close()
           
 void evict(Class persistentClass)
           
 void evict(Class persistentClass, Serializable id)
           
 void evictCollection(String roleName)
           
 void evictCollection(String roleName, Serializable id)
           
 void evictEntity(String entityName)
           
 void evictEntity(String entityName, Serializable id)
           
 void evictQueries()
           
 void evictQueries(String cacheRegion)
           
 Map getAllClassMetadata()
           
 Map getAllCollectionMetadata()
           
 ClassMetadata getClassMetadata(Class persistentClass)
           
 ClassMetadata getClassMetadata(String entityName)
           
 CollectionMetadata getCollectionMetadata(String roleName)
           
 Session getCurrentSession()
           
 Set getDefinedFilterNames()
           
 FilterDefinition getFilterDefinition(String filterName)
           
 Reference getReference()
           
 Statistics getStatistics()
           
 boolean isClosed()
           
 Session openSession()
           
 Session openSession(Connection conn)
           
 Session openSession(Connection connection, Interceptor interceptor)
           
 Session openSession(Interceptor interceptor)
           
 StatelessSession openStatelessSession()
           
 StatelessSession openStatelessSession(Connection conn)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

openSession

public Session openSession(Connection connection,
                           Interceptor interceptor)
Specified by:
openSession in interface SessionFactory

openSession

public Session openSession(Interceptor interceptor)
                    throws HibernateException
Specified by:
openSession in interface SessionFactory
Throws:
HibernateException

openSession

public Session openSession()
                    throws HibernateException
Specified by:
openSession in interface SessionFactory
Throws:
HibernateException

openSession

public Session openSession(Connection conn)
Specified by:
openSession in interface SessionFactory

getCurrentSession

public Session getCurrentSession()
Specified by:
getCurrentSession in interface SessionFactory

getReference

public Reference getReference()
                       throws NamingException
Specified by:
getReference in interface Referenceable
Throws:
NamingException
See Also:
Referenceable.getReference()

getClassMetadata

public ClassMetadata getClassMetadata(Class persistentClass)
                               throws HibernateException
Specified by:
getClassMetadata in interface SessionFactory
Throws:
HibernateException

getClassMetadata

public ClassMetadata getClassMetadata(String entityName)
                               throws HibernateException
Specified by:
getClassMetadata in interface SessionFactory
Throws:
HibernateException

getCollectionMetadata

public CollectionMetadata getCollectionMetadata(String roleName)
                                         throws HibernateException
Specified by:
getCollectionMetadata in interface SessionFactory
Throws:
HibernateException

getAllClassMetadata

public Map getAllClassMetadata()
                        throws HibernateException
Specified by:
getAllClassMetadata in interface SessionFactory
Throws:
HibernateException

getAllCollectionMetadata

public Map getAllCollectionMetadata()
                             throws HibernateException
Specified by:
getAllCollectionMetadata in interface SessionFactory
Throws:
HibernateException

close

public void close()
           throws HibernateException
Specified by:
close in interface SessionFactory
Throws:
HibernateException

isClosed

public boolean isClosed()
Specified by:
isClosed in interface SessionFactory

evict

public void evict(Class persistentClass,
                  Serializable id)
           throws HibernateException
Specified by:
evict in interface SessionFactory
Throws:
HibernateException

evict

public void evict(Class persistentClass)
           throws HibernateException
Specified by:
evict in interface SessionFactory
Throws:
HibernateException

evictEntity

public void evictEntity(String entityName,
                        Serializable id)
                 throws HibernateException
Specified by:
evictEntity in interface SessionFactory
Throws:
HibernateException

evictEntity

public void evictEntity(String entityName)
                 throws HibernateException
Specified by:
evictEntity in interface SessionFactory
Throws:
HibernateException

evictCollection

public void evictCollection(String roleName,
                            Serializable id)
                     throws HibernateException
Specified by:
evictCollection in interface SessionFactory
Throws:
HibernateException

evictCollection

public void evictCollection(String roleName)
                     throws HibernateException
Specified by:
evictCollection in interface SessionFactory
Throws:
HibernateException

evictQueries

public void evictQueries()
                  throws HibernateException
Specified by:
evictQueries in interface SessionFactory
Throws:
HibernateException

evictQueries

public void evictQueries(String cacheRegion)
                  throws HibernateException
Specified by:
evictQueries in interface SessionFactory
Throws:
HibernateException

getStatistics

public Statistics getStatistics()
Specified by:
getStatistics in interface SessionFactory

openStatelessSession

public StatelessSession openStatelessSession()
Specified by:
openStatelessSession in interface SessionFactory

openStatelessSession

public StatelessSession openStatelessSession(Connection conn)
Specified by:
openStatelessSession in interface SessionFactory

getDefinedFilterNames

public Set getDefinedFilterNames()
Specified by:
getDefinedFilterNames in interface SessionFactory

getFilterDefinition

public FilterDefinition getFilterDefinition(String filterName)
                                     throws HibernateException
Specified by:
getFilterDefinition in interface SessionFactory
Throws:
HibernateException


Copyright © 2011 Hibernate.org. All Rights Reserved.