5 Replies Latest reply on Apr 7, 2011 7:45 PM by Elias Ross

    AS 6 & JNDI bindings: overriding the module name

    Vincent A Newbie



      I have this bean:




      public class MyBean{






      packaged in a jar that it itself packaged in a war (mywar-1.0.0-SNAPSHOT.war).


      When I deploy this war, AS binds the bean to java:module/MyBean and java:global/myapp-1.0.0-SNAPSHOT/MyBean.

      So far so good, but I'd like to map the bean in the global scope as java:global/myapp/MyBean


      I thought that the spec-compliant way to do this was to set the application's root context.

      So, My jboss-web.xml looks like this:








      But it does not work, the bean is still bound to java:global/myapp-1.0.0-SNAPSHOT/MyBean.


      (it works on Glassfish 3.1, though)


      What is the proper way to change the module name in the java:global/<module-name>/<bean name> jndi name?