How can I get a plain old DAO to function with the @PersistenceContext WITHOUT 
turning the DAO into a bean of any kind?(since a DAO should obviously not be an 
EJB)


This code fails when it is put to work as it is, but it works if I turn it into 
a stateless Session.


  | public class MyDAO
  | {
  |     @PersistenceContext
  |     protected EntityManager manager; 
  |     
  |     createEntity(String someAttribute)     
  |     {
  |         Entity myEntity = new Entity();
  |         em.persist(myEntity);
  |     }
  | }
  | 

So basically.... how can this be turned into a functioning POJO DAO?

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

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


-------------------------------------------------------
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

Reply via email to