-
1. Re: Why JBoss enforces java:/ java:boss/ naming and how to override it in the jboss-ejb3.xml?
mpashworth Jan 20, 2012 7:50 AM (in response to mpashworth)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