Created
April 23, 2021 08:28
-
-
Save metavige/52ea75b780c6b252aad3603108c0f669 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
embed-server --server-config=standalone-ha.xml | |
batch | |
# add informix jdbc driver | |
module add --name=com.informix.jdbc --resources=/tmp/informix-jdbc.jar --dependencies=javax.api,javax.transaction.api | |
# Create driver | |
/subsystem=datasources/jdbc-driver=informix:add( \ | |
driver-module-name=com.informix.jdbc, \ | |
driver-name=informix, \ | |
driver-class-name=com.informix.jdbc.IfxDriver, \ | |
driver-xa-datasource-class-name=com.informix.jdbcx.IfxXADataSource \ | |
) | |
# Create encrypt username/password | |
/subsystem=security/security-domain=informixEncrypt:add(cache-type=default) | |
/subsystem=security/security-domain=informixEncrypt/authentication=classic:add | |
/subsystem=security/security-domain=informixEncrypt/authentication=classic/login-module=\ | |
org.picketbox.datasource.security.SecureIdentityLoginModule:add( \ | |
code="org.picketbox.datasource.security.SecureIdentityLoginModule", \ | |
flag="required", \ | |
module-options=[ \ | |
("username"=>"${env.IFXDB_USER_NAME}"),\ | |
("password"=>"${env.IFXDB_PASSWORD}") \ | |
] \ | |
) | |
# Create datasource | |
/subsystem=datasources/xa-data-source=informixXADS:add( \ | |
jndi-name="java:/jboss/datasources/MliInformixXADS", \ | |
driver-name=informix, \ | |
security-domain="informixEncrypt") | |
/subsystem=datasources/xa-data-source=informixXADS/xa-datasource-properties=IfxIFXHOST:add(value="${env.IFXDB_HOST}") | |
/subsystem=datasources/xa-data-source=informixXADS/xa-datasource-properties=PortName:add(value="${env.IFXDB_PORT}") | |
/subsystem=datasources/xa-data-source=informixXADS/xa-datasource-properties=ServerName:add(value="${env.IFXDB_SERVER_NAME}") | |
/subsystem=datasources/xa-data-source=informixXADS/xa-datasource-properties=DatabaseName:add(value="${env.IFXDB_NAME}") | |
/subsystem=datasources/xa-data-source=informixXADS/xa-datasource-properties=IfxDB_LOCALE:add(value="zh_TW.big5") | |
/subsystem=logging/logger=com.mli:add(level=DEBUG) | |
/subsystem=logging/logger=org.hibernate:add(level=INFO) | |
# Run batch and stop embedded server | |
run-batch | |
quit |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment