JBoss Community

Re: Why JBoss enforces java:/ java:boss/ naming and how to override it in the jboss-ejb3.xml?

created by Mark Ashworth in JNDI and Naming - View the full discussion

I worked around this by using JNDI environment property, e.g.

 

@Resource(mappedName="java:comp/env/yellowfire/queue/notification")

private Queue notifyEventQueue;

 

 

And then in the web.xml, mapping this using the resource-ref node.

 

<resource-ref>

  <res-ref-name>yellowfire/queue/notification</res-ref-name>

  <mapped-name>java:/yellowfire/queue/notification</mapped-name>

</resource-ref>

 

This also works for the MDB activation configuration.

 

@MessageDriven(

        name = "NotificationProcessor",

        messageListenerInterface = MessageListener.class,

        mappedName = "java:comp/env/yellowfire/queue/notification",

        activationConfig = {

            @ActivationConfigProperty(propertyName = "acknowledgeMode", propertyValue = "Auto-acknowledge"),

            @ActivationConfigProperty(propertyName = "destinationType", propertyValue = "javax.jms.Queue"),

            @ActivationConfigProperty(propertyName = "destination", propertyValue = "java:comp/env/yellowfire/queue/notification"),

            @ActivationConfigProperty(propertyName = "clientID", propertyValue = "notification")

        }

)

 

 

Now all the JNDI configuration has moved from the code to the web.xml file which is more manageable but I would really like to use the jboss-ejb3.xml, glassfish-ejb-jar.xml, etc to contain the actual implementation JNDI names and the web.xml to contain a link to those files.

 

Where can I find the XSD of the jboss-ejb3.xml so that I can resolve this?

 

Regards,

Mark P Ashworth

http://mpashworth.wordpress.com

Reply to this message by going to Community

Start a new discussion in JNDI and Naming at Community