[jboss-user] [JBoss Seam] - Re: Persistence context propagation.

mangri3000 do-not-reply at jboss.com
Wed Aug 1 11:12:25 EDT 2007


I try to explain a little more.

Our system has two interfaces, a web-ui and a messaging based interface to another system.

Messaging requests come this way:
MessageController (MDB) -> Core (SLSB and Entities) -> DAOs (SLSBs) -> Hibernate

UI requests go the other way:
Web-UI -> Application (Seam components) -> Core -> DAOs -> Hibernate

DAOs use entity managers injected by "@PersistenceContext". I cannot use @In because otherwise the messaging scenario wouldn't work.

For messaging requests I need a transaction-scoped PC which I get for free by the default EJB PC propagation.

For the Web-Client requests I need a conversation-scoped PC. I thougth I could simply attach a SMPC or BMPC to every transaction (EntityManager.joinTransaction) in the application-layer and do not have to change the layers below.

Maybe there is not such a simple solution.



View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4069692#4069692

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4069692



More information about the jboss-user mailing list