org.springframework.orm.jpa
Class JpaTemplate.CloseSuppressingInvocationHandler

java.lang.Object
  extended by org.springframework.orm.jpa.JpaTemplate.CloseSuppressingInvocationHandler
All Implemented Interfaces:
java.lang.reflect.InvocationHandler
Enclosing class:
JpaTemplate

private class JpaTemplate.CloseSuppressingInvocationHandler
extends java.lang.Object
implements java.lang.reflect.InvocationHandler

Invocation handler that suppresses close calls on JPA EntityManagers. Also prepares returned Query objects.

See Also:
javax.persistence.EntityManager#close()

Field Summary
private  EntityManager target
           
 
Constructor Summary
JpaTemplate.CloseSuppressingInvocationHandler(EntityManager target)
           
 
Method Summary
 java.lang.Object invoke(java.lang.Object proxy, java.lang.reflect.Method method, java.lang.Object[] args)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

target

private final EntityManager target
Constructor Detail

JpaTemplate.CloseSuppressingInvocationHandler

public JpaTemplate.CloseSuppressingInvocationHandler(EntityManager target)
Method Detail

invoke

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