Where to define elements in JBoss

jbossjboss5.x

I try to define environment entries in JBoss 5.1 and added following to the server/default/deploy/jbossweb.sar/context.xml file:

<Environment type="java.lang.String" name="name" value="value" />

Following error occurs on startup:

2010-01-26 14:50:08,383 ERROR
[org.jboss.web.tomcat.service.deployers.JBossContextConfig]
(main) XML error parsing: context.xml
org.jboss.xb.binding.JBossXBException:
Failed to parse source: Resource
cannot appear in this position.
Expected content of Context is
unordered_sequence: attributes?
InstanceListener* Realm? Parameters*
Manager? Loader? Valve* SessionCookie?
Resources? Listener*

Where may I define environment entries in JBoss (but outside of application's EAR)?

Best Answer

This article confirms that (likely) it is not possible to configure environment entries in JBoss. Author suggests to use PropertiesService as alternative.

Property configuration in properties-service.xml works great!

Related Topic