0 Replies Latest reply on Apr 9, 2013 10:44 AM by carlo sciandrone

    Jboss 5.1 define a global jndi variable

    carlo sciandrone Newbie

      Hi everybody , I would like to define inside Jboss 5.1  a global jndi variable.

      I looked on the docs and I've found this : http://docs.jboss.org/jbossweb/2.1.x/config/globalresources.html

      Sorry but I don't understand where do I have to put the portion of xml code.

      I tried inside both [CATALINA_HOME]\server\default\deploy\jbossweb.sar\server.xml and [CATALINA_HOME]\server\default\deploy\jbossweb.sar\context.xml.

      In both cases I have an error during the start up of the AS.


      If I put the file inside server.xml the error is :

      GlobalNamingResources not found as a child of Server in unordered_sequence: Listener* Service* attributes

      If I try inside context.xml the error is:

      GlobalNamingResources cannot appear in this position. Expected content of Context is unordered_sequence: Listener* Parameters* Valve* SessionCookie? Loader? Manager? Realm? attributes? InstanceListener* Resources?


      I also tried creating a brand new xml file named myFile-service.xml and putting it inside the deploy directory but the file is ignored (I have no errors but if I try the jndi lookup I have the "comp not bound" error).


      Does anyone know how to do it correctly please?


      Thanks a lot