Openshift WildFly custom system properties and datasource definitions do not survive an app restart

StackOverflow https://stackoverflow.com/questions/23425730

  •  14-07-2023
  •  | 
  •  

문제

My application needs EclipseLink, thus after I created my WildFly cart I ssh to the account and do:

jboss-cli.sh -c --controller=$OPENSHIFT_WILDFLY_IP:$OPENSHIFT_WILDFLY_MANAGEMENT_HTTP_PORT
/system-property=eclipselink.archive.factory:add(value=org.jipijapa.eclipselink.JBossArchiveFactoryImpl)

the system property is defined fine. However it is lost after

ctl_app restart

It is the same for a newly defined datasource.

It looks like Openshift resets everything and deploys the cart from scratch. Any opinions why?

도움이 되었습니까?

해결책

The recommended way to make configuration changes is to update the standalone.xml configuration file that exists inside your OpenShift application .openshift/config directory. Every OpenShift application has .openshift directory that contains configuration files that you can update. Everytime you push the source code OpenShift takes your standalone.xml file and apply it. So when you restart the application your changes are overridden. Refer to documentation https://community.jboss.org/wiki/JBossAS7SystemProperties to learn how to add system properties to standalone.xml

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top