Wildfly - monetplus/IDport GitHub Wiki
Variable | Description | Example |
---|---|---|
${WILDFLY_HOME} | Directory with WildFly server installation | /opt/wildfly |
${SERVER_MODE} | Mode in which the server is running |
standalone | domain
|
You can change configuration in file ${WILDFLY_HOME}/${SERVER_MODE}/configuration/${SERVER_MODE}.xml
.
You have to define directories for loading configuration and saving application logs.
<system-properties>
<property name="mep.log.dir" value="/srv/log/idport/applications"/>
<property name="mep.conf.dir" value="/srv/app/idport/configuration"/>
</system-properties>
The server has to server following datasources with JNDI names:
- java:jboss/datasources/IDPORT_AMEPAUDIT
- java:jboss/datasources/IDPORT_AMEPCASE
- java:jboss/datasources/MEP_AMEPCONFIGAPPDS
Definition of new datasource in section
<datasources>
:
<datasource jndi-name="java:jboss/datasources/IDPORT_AMEPCASE" pool-name="idport_amepcase_pool" enabled="true">
<connection-url>jdbc:oracle:thin:@localhost:1521:XE</connection-url>
<driver-class>oracle.jdbc.OracleDriver</driver-class>
<driver>oracle</driver>
<security>
<user-name>IDPORT_AMEP_CASE</user-name>
<password>PASSWORD</password>
</security>
<validation>
<valid-connection-checker class-name="org.jboss.jca.adapters.jdbc.extensions.oracle.OracleValidConnectionChecker"/>
<background-validation>true</background-validation>
<stale-connection-checker class-name="org.jboss.jca.adapters.jdbc.extensions.oracle.OracleStaleConnectionChecker"/>
<exception-sorter class-name="org.jboss.jca.adapters.jdbc.extensions.oracle.OracleExceptionSorter"/>
</validation>
</datasource>
Obtaining driver:
- Download Oracle JDBC driver: ojdbc6.jar,
- create directory
${WILDFLY_HOME}/modules/com/oracle/main
, - copy downloaded driver
ojdbc6.jar
to directory from previous step, - create
module.xml
with following content in the same directory:<module xmlns="urn:jboss:module:1.1" name="com.oracle"> <resources> <resource-root path="ojdbc6.jar"/> </resources> <dependencies> <module name="javax.api"/> <module name="javax.transaction.api"/> </dependencies> </module>
Oracle driver has to be registrated in file ${SERVER_MODE}.xml
in section <drivers>
:
<driver name="oracle" module="com.oracle">
<xa-datasource-class>oracle.jdbc.OracleDriver</xa-datasource-class>
</driver>