proxy « Interceptor « JPA Q&A





1. Interceptor instantiate proxying entity problem    forum.hibernate.org

Newbie Joined: Sun May 28, 2006 8:32 am Posts: 1 Hibernate version: 3.1 In the Interceptor instantiate method I am attempting to proxy my entities. Any properties whether they are simple value types or other entities throw the following exception when trying to load. Interceptor Code Code: public Object instantiate(String entityName, EntityMode entityMode, Serializable id) throws CallbackException { ...

2. An interceptor or event for proxy initialization?    forum.hibernate.org

Ok, some background info first. I'm currently implementing a set of interceptors to handle field-level audit for persistent objects. There is an interceptor for onLoad, which stores object's initial state, and interceptors for onSave, onFlushDirty, and onDelete, which compare object's new state with the initial one, and construct audit trail based on the differences. The problem I've encountered is that this ...

3. interceptor for lazy proxy initialization?    forum.hibernate.org

I am trying to intercept the initialization of a proxy before it is loaded from the database by the cglib layer. I need this notification to potentially reconnect our long session before trying to load the object data, but the proxy initialization code does its own checks and throws an: Code: org.hibernate.LazyInitializationException: could not initialize proxy - the owning Session is ...