[jboss-user] [JBoss Seam] - Re: Mail examples broken in CVS?

fhh do-not-reply at jboss.com
Tue Aug 21 05:52:14 EDT 2007


anonymous wrote : 
  | anonymous wrote : 
  |   | The docs states that "Most seam annotations will work inside a MDB but you musn't access the persistence context." - Why is this? Isn't that quite a severe limitation? Can anything be done to get around this?
  | IIRC this is a limitation of EJB3. You need to inject an SFSB/SLSB into the 
  |  MDB (or Seam component) and do your persistence work in them.
  | 

I haven't looked at the code but I think the reason behind it is that the entitymanager is not thread-safe. You can still inject (or do a JNDI-Lookup for) the EntityManagerFactory and use a new a new EntityManager for ervery mail processed.

(For more infomation see http://weblogs.java.net/blog/ss141213/archive/2005/12/dont_use_persis_1.html)

Regards

Felix

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

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



More information about the jboss-user mailing list