title: jndi pattern and seam 2.3 ear
body: <p>I'm trying to migrate my seam 2.2 application to seam 2.3.</p>
  
  <p>I'm using an ear packaged application that consists of several modules.</p>
  
  <p>When I try to load a page I get the following error: </p>
  
  <pre><code>Caused by: javax.naming.NameNotFoundException: AdmissionDAOImpl -- service jboss.naming.context.java.app.Cosara.AdmissionDAOImpl
  at org.jboss.as.naming.ServiceBasedNamingStore.lookup(ServiceBasedNamingStore.java:97)
  at org.jboss.as.naming.NamingContext.lookup(NamingContext.java:178)
  at org.jboss.as.naming.InitialContext.lookup(InitialContext.java:123)
  at org.jboss.as.naming.NamingContext.lookup(NamingContext.java:214)
  at javax.naming.InitialContext.lookup(InitialContext.java:392) [rt.jar:1.6.0_37]
  at org.jboss.seam.Component.instantiateSessionBean(Component.java:1407) [jboss-seam.jar:2.3.0.Final]
  at org.jboss.seam.Component.instantiate(Component.java:1370) [jboss-seam.jar:2.3.0.Final]
  at org.jboss.seam.Component.newInstance(Component.java:2186) [jboss-seam.jar:2.3.0.Final]
  ... 63 more
  </code></pre>
  
  <p>My Jboss AS 7.1.1 server gives me the following jndi patterns to locate the AdmissionDAOImpl.</p>
  
  <pre><code>java:global/Cosara/Cosara2IntDAO/AdmissionDAOImpl!be.ugent.cosara2.dao.AdmissionDAO
  java:app/Cosara2IntDAO/AdmissionDAOImpl!be.ugent.cosara2.dao.AdmissionDAO
  java:module/AdmissionDAOImpl!be.ugent.cosara2.dao.AdmissionDAO
  java:global/Cosara/Cosara2IntDAO/AdmissionDAOImpl
  java:app/Cosara2IntDAO/AdmissionDAOImpl
  java:module/AdmissionDAOImpl
  </code></pre>
  
  <p>What JNDI pattern should I use with seam to locate the EJB? Here I've used </p>
  
  <pre><code>java:app/#{ejbName}
  </code></pre>
  
  <p>Also tried</p>
  
  <pre><code>java:app/Cosara.jar/#{ejbName}
  </code></pre>
  
  <p>Is there something to replace Cosara.jar in the pattern above to make it more generic?</p>