Hi,
I'm currently struggling with the famous "lazy load exception" under
spring + jpa with wicket.
The problem is, in my case, that i pull an entity from the database
using a spring-bean (@SpringBean) and JPA (hibernate). Then in the
wicket class i need to walk the entity tree a bit, based on the needs of
the user (preloading wont work, as i dont know the direction the user
wants to walk and the whole entity tree is too complex to grab it all at
once).
If I use the Entity myEntity.getMyOtherConnectedEntity I get the lazy
load exception (transaction already closed). So I tried to use the
OpenSessionInViewFilter to solve this, but it just won't work - no
reason why, as the error stays exactly the same.
Currently I ended up using this:
@PersistenceContext(type = PersistenceContextType.EXTENDED)
private EntityManager em;
However, I'm not sure if this is the way it is supposed to be?
( I read so far that this disables a big part of springs-transaction
handling support but didnt see any impacts so far)
Has anyone a different aproach/ solution for this using wicket + spring
with JPA?
Best,
Korbinan
PS: im on wicket 1.4-m3
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]