thx. for the realy quick answer. So if i inject a EJB they share the same lifecycle and persistence context. Matching this with the Context-Idea your MyBean represents a Context who knows about all other DAO StatefullBeans (your AnotherStatefulBean) like (UserDAO, GroupDAO, ... a lot more) which are automatically generated when the Context is created. I think this is a little bit inefficient.
Interesting would be the other side. When i want to have a GroupDAO from Factory by getGroupDAO(int contexttype), the factory looksup if the right Context exists (or create it) and then get a GroupDAO Stateful SB and tell it the context. To synchronize i have to call perhaps factory.flush(int contexttype) or factory.getContext(int contexttype).flush(). I also thought about Implementing the Context like a wrapper of ExtendedEntityManager and give it over to the dao. Regards Peter View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3945705#3945705 Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3945705 ------------------------------------------------------- Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 _______________________________________________ JBoss-user mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/jboss-user
