"[EMAIL PROTECTED]" wrote : If you have these kinds of complex requirements it is probably better to use EJB container-managed persistence contexts. | | The basic pattern is to have an SFSB driving the conversation, that owns an extended PC. If you call methods of SLSB DAOs in the same txn, the extended PC will propoagate. If you don't want the PC to propagate, call a REQUIRES_NEW method. | | Make sense?
I have missed the point how SFSB Business component owning EM can control SLSB DAO which also contains EM. Or this EM from Business SFSB should be passed to DAO SLSB? If I have SLSB DAO with not extended persitence context, I can control EM using EJB3 declarative transactions (requires, requires_new) from business logic SB. But there is the problem of LazyInitializationException. If I use SFSB DAO with container managed extended persistence context than I have 2 disadvantages comparing to Seam managed extended persistence context or application managed extended persitence context: 1) Different EM instances will be injected to different DAOs what is not good if cascades in entities are not used (some design solution can be found for this problem) 2) EM cache cleanup strategy because EM scope is session and not conversation or request. If I understand correctly container managed extended persistence context only joins active JTA but you can't control EM using transaction demarcation. e.x. perform search operation which results are not effected by changed done to entities and etc. I'm looking for some extended persistence context which scope is less than session (like conversation) managing mechanism with transaction and EM isolation support. It will be useful to reuse some container managed or Seam managed mechanism instead of implementing own application managed. View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3946197#3946197 Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3946197 ------------------------------------------------------- All the advantages of Linux Managed Hosting--Without the Cost and Risk! Fully trained technicians. The highest number of Red Hat certifications in the hosting industry. Fanatical Support. Click to learn more http://sel.as-us.falkag.net/sel?cmd=lnk&kid=107521&bid=248729&dat=121642 _______________________________________________ JBoss-user mailing list JBoss-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jboss-user