org.jboss.seam.persistence.hibernate
Class HibernateManagedSessionProxyHandler

java.lang.Object
  extended by org.jboss.seam.persistence.hibernate.HibernateManagedSessionProxyHandler
All Implemented Interfaces:
Serializable, InvocationHandler, Synchronization

public class HibernateManagedSessionProxyHandler
extends Object
implements InvocationHandler, Serializable, Synchronization

Proxy handler for the seam managed Hibernate session. This handler makes sure that the EntityManager is enrolled in the current transaction before passing the call through to the delegate

Author:
Stuart Douglas
See Also:
Serialized Form

Field Summary
protected  javax.enterprise.inject.spi.BeanManager manager
           
 
Constructor Summary
HibernateManagedSessionProxyHandler(org.hibernate.Session delegate, javax.enterprise.inject.spi.BeanManager beanManager, Set<Annotation> qualifiers, HibernatePersistenceProvider provider, javax.enterprise.inject.spi.BeanManager manager)
           
 
Method Summary
 void afterCompletion(int status)
           
 void beforeCompletion()
           
protected  Object handleCreateQueryWithString(Method method, Object[] args)
           
 Object invoke(Object proxy, Method method, Object[] args)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

manager

protected final javax.enterprise.inject.spi.BeanManager manager
Constructor Detail

HibernateManagedSessionProxyHandler

public HibernateManagedSessionProxyHandler(org.hibernate.Session delegate,
                                           javax.enterprise.inject.spi.BeanManager beanManager,
                                           Set<Annotation> qualifiers,
                                           HibernatePersistenceProvider provider,
                                           javax.enterprise.inject.spi.BeanManager manager)
Method Detail

invoke

public Object invoke(Object proxy,
                     Method method,
                     Object[] args)
              throws Throwable
Specified by:
invoke in interface InvocationHandler
Throws:
Throwable

handleCreateQueryWithString

protected Object handleCreateQueryWithString(Method method,
                                             Object[] args)
                                      throws Throwable
Throws:
Throwable

afterCompletion

public void afterCompletion(int status)
Specified by:
afterCompletion in interface Synchronization

beforeCompletion

public void beforeCompletion()
Specified by:
beforeCompletion in interface Synchronization


Copyright © 2011 Seam Framework. All Rights Reserved.