org.jboss.ejb3.entity.hibernate
Class TransactionScopedSessionInvocationHandler

java.lang.Object
  extended by org.jboss.ejb3.entity.hibernate.TransactionScopedSessionInvocationHandler
All Implemented Interfaces:
Externalizable, Serializable, InvocationHandler

public class TransactionScopedSessionInvocationHandler
extends Object
implements InvocationHandler, Externalizable

Handle method execution delegation to an Hibernate session following the transaction scoped persistence context rules

Author:
Emmanuel Bernard
See Also:
Serialized Form

Constructor Summary
TransactionScopedSessionInvocationHandler()
           
TransactionScopedSessionInvocationHandler(org.jboss.jpa.deployment.ManagedEntityManagerFactory factory)
           
 
Method Summary
protected  org.hibernate.Session getHibernateSession()
           
protected  javax.persistence.EntityManager getSession()
           
 Object invoke(Object proxy, Method method, Object[] args)
           
 void readExternal(ObjectInput in)
           
 void writeExternal(ObjectOutput out)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TransactionScopedSessionInvocationHandler

public TransactionScopedSessionInvocationHandler(org.jboss.jpa.deployment.ManagedEntityManagerFactory factory)

TransactionScopedSessionInvocationHandler

public TransactionScopedSessionInvocationHandler()
Method Detail

getHibernateSession

protected org.hibernate.Session getHibernateSession()

getSession

protected javax.persistence.EntityManager getSession()

writeExternal

public void writeExternal(ObjectOutput out)
                   throws IOException
Specified by:
writeExternal in interface Externalizable
Throws:
IOException

readExternal

public void readExternal(ObjectInput in)
                  throws IOException,
                         ClassNotFoundException
Specified by:
readExternal in interface Externalizable
Throws:
IOException
ClassNotFoundException

invoke

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


Copyright © 2009 JBoss, a division of Red Hat, Inc.. All Rights Reserved.