[jboss-user] [EJB 3.0] - Re: SFSB and the Entity Manager Extended Persistence Context

ngtdave do-not-reply at jboss.com
Thu Aug 3 12:41:13 EDT 2006


Sorry, I didn't originally have both of these.  But I've tried both with the property injection and the setEM() injection, neither worked.  I forgot to remove the setEM() from the example I posted.  Anyway, yeah, neither way works. :)


  |    @PersistenceContext(type = PersistenceContextType.EXTENDED, unitName = "persistence")
  |    public void setEM(EntityManager em) {
  |       this.em = em;
  |    }
  |    
   public Company getCompany(Integer Id) {
  |       company = em.find(Company.class, new Integer(1));
  |       return company;
  |    }
  | 

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

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



More information about the jboss-user mailing list