I have a project which currently runs on Tomcat 5.5.17 and needs to be deployed on JBoss AS 4.2.2.GA.
There is a simple JNDI-lookup:
Context env = (Context)new InitialContext().lookup("java:comp/env");
<?xml version="1.0" encoding="UTF-8"?> <Context reloadable="true"> <Environment name="myVar" override="false" type="java.lang.String" value="myValue"/> </Context>