1 Reply Latest reply on Nov 9, 2012 8:38 AM by erasmomarciano

    JBoss AS 5.1 Environment Variables

    javapenguin

      I have an enrironment variable in tomcat which I configured in context.xml like so:

       

      <Environment name="SMS_GATEWAY_PROPERTIES" value="${catalina.base}\conf\smsgateway.properties" type="java.lang.String"/>

       

      I then use JNDI to read this variable like so:

       

      Context ctx = new InitialContext();

      ctx = (Context) ctx.lookup("java:comp/env");

      String smsGatewayProperties = (String) ctx.lookup("SMS_GATEWAY_PROPERTIES");

       

      Where can I put a similar configuration for JBoss 5.1

       

      I tried adding it to "jboss-5.1.0.GA\server\default\deploy\jbossweb.sar\context.xml", but JBoss doesn't like it.