Joined: Thu Feb 24, 2005 10:50 pm Posts: 7
|
Hi,
I'm currently working on a batch/job processing application using JPA (Hibernate) and EJBs and I was wondering if there was existing patterns to manage transaction demarcation and lazy initialization exception problem... Currently all of my DAO are stateless EJBs and it works great until you need to access a lazy collection...
I've implemented the Command pattern as suggested in Java Persistence With Hibernate (Chapter 16) but I don't think the other devs in my team will like this approach (having to write a new command class each time you need to initialize a lazy collection)...
All Hibernate documentation seems to be about developing web application and there seems to be a lack of how-to for other type of application...
Like I can't use the OpenSessionInView pattern in the kind of application we develop here...
Any ideas or recommendations would be much appreciated!
Thanks
Christian
|
|