0 Replies Latest reply on Sep 27, 2010 1:31 PM by Chun Shin

    jndi lookup retrieves ejb from a different project

    Chun Shin Newbie

      Hi,


      I have 2 different seam projects such as




      project-a.ear has
       - stateful session bean, MyStatefulBeanA
       - stateless session bean, MyStatelessBeanA
      
      project-b.ear has
       - stateful session bean, MyStatefulBeanB
       - stateless session bean, MyStatelessBeanB





      From the jboss log, I could see when the project-b.ear is deployed somehow the Seam detects beans from the project-a.ear along with the components from the project-b like




      12:03:29,109 INFO  [Component] Component: myStatefulBeanA, scope: CONVERSATION, type: STATEFUL_SESSION_BEAN, class: com.test.beans.MyStatefulBeanA, JNDI: myproject-b/MyStatefulBeanA/local
      12:03:29,109 INFO  [Component] Component: myStatelessBeanA, scope: STATELESS, type: STATELESS_SESSION_BEAN, class: com.test.beans.MyStatelessBeanA, JNDI: myproject-b/MyStatelessBeanA/local
      12:03:29,109 INFO  [Component] Component: myStatefulBeanB, scope: CONVERSATION, type: STATEFUL_SESSION_BEAN, class: com.test.other.beans.MyStatefulBeanB, JNDI: myproject-b/MyStatefulBeanB/local
      12:03:29,109 INFO  [Component] Component: myStatelessBeanB, scope: STATELESS, type: STATELESS_SESSION_BEAN, class: com.test.other.beans.MyStatelessBeanB, JNDI: myproject-b/MyStatelessBeanB/local



      the components.xml for project-b has like this




          <core:init
              jndi-pattern="project-b/#{ejbName}/local" debug="true" />





      First of all, I'm not sure why the Seam retrieves ejbs from a different project.
      Second of all, I'd like to know if there is any way to force Seam to only detect custom components as well as seam built-in. Is there way to do lookup only a certain package?