jaikiran pai [http://community.jboss.org/people/jaikiran] created the discussion
"Re: Random NameNotFoundException in jboss 6.1-SNAPSHOT" To view the discussion, visit: http://community.jboss.org/message/604109#604109 -------------------------------------------------------------- > legae wrote: > > ... > I added queue depends and somehow now the findAll method can be invoked and > no excpetion is thrown. I'm not 100% sure whether it's the right solution but > for me it worked > @javax.ejb.Stateless > *public* *class* ZBean *implements* ZBeanLocal{ > > @PersistenceContext(unitName = "TestPU") > *private* EntityManager em = *null*; > > @Resource(mappedName = "java:/JmsXA") > javax.jms.ConnectionFactory connFactory; > @Resource(mappedName = "queue/TestQueue") > > @org.jboss.ejb3.annotation.Depends("org.hornetq:module=JMS,type=Queue,name=\"TestQueue\"") > javax.jms.Queue q1; > > > *public* List<ZEntity> findAll(){ > Query q = em.createNamedQuery("findAll"); > *return* (List<ZEntity>)q.getResultList(); > } > That's the correct solution. -------------------------------------------------------------- Reply to this message by going to Community [http://community.jboss.org/message/604109#604109] Start a new discussion in EJB3 at Community [http://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2029]
_______________________________________________ jboss-user mailing list [email protected] https://lists.jboss.org/mailman/listinfo/jboss-user
