Search code examples
javaconfigurationjbosswildflywildfly-8

Wildfly 8.1 - set system property without standalone.xml


To overcome the issue described here, I have a requirement to set a system property,

com.sun.jersey.server.impl.cdi.lookupExtensionInBeanManager=true

Due to environment constraints, I can not use standalone.xml or the web interface in WildFly 8.1 to do so. Is there a way to achieve this from within my EAR or WAR file?

I would imagine this would be done using jboss-deployment-structure.xml or jboss-web.xml, but can't find any references to this.

I appreciate any assistance.


Solution

  • Doing it in the EAR or WAR is already too late; according to the question/answer you link to it needs to be set at Java startup time using the -D command line flag. So it needs to go in the standalone startup script, or in a JAVA_OPTS environmental variable. Both require modifications to the server environment.