7 Replies Latest reply on Feb 23, 2012 1:34 PM by Brandon Atkinson

    Mapping global JNDI names to ENC in jboss-as-7.1.0.Final

    Brandon Atkinson Newbie

      I'm new to javaee6 and jboss 7, so please, be gentle if my ignorance shows.

       

      I'm trying to port an application from jboss 4.0.5 to jboss 7, and I can't seem to find any way to map a global JNDI name to a component environment name.

      In jboss 4, I'd use jboss.xml and jboss-web.xml:

       

      (jboss.xml)

      <jboss>
           <enterprise-beans> 
      ...
                <session>
                     <ejb-name>SomeUsefulBean</ejb-name>
                     <jndi-name>ejb/SomeUsefulBean</jndi-name>
           
                     <resource-ref>
                          <res-ref-name>jdbc/MyLocalDataSource</res-ref-name>
                          <jndi-name>java:/MyGlobalDataSource</jndi-name>
                     </resource-ref>
                </session>
      ...
           </enterprise-beans>
      </jboss>
      

       

      (jboss-web.xml)

       

      <jboss-web>
      ...
           <resource-ref>
                <res-ref-name>jdbc/MyLocalDataSource</res-ref-name>
                <jndi-name>java:/MyGlobalDataSource</jndi-name>
           </resource-ref>
      ...
      </jboss-web>