Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.



File Location: <JBoss EAP 7.x Installed folder>\standalone\configuration\standalone.xml


For CTModelHouse, the data sources within this .xml file should be within the <subsystem> element that defines the data sources and the drivers within it.
Note: If you are deploying the ctmodelhouse.war for the first time through JBoss EAP 7.x, the standalone.xml file will not contain the <subsystem> element corresponding to this .war file to define its data sources. Hence, the coding provided in the following snippet has to replace the existing <subsystem> element that is pointed to the default data source. Then, in the future deployments, the coding is only to be validated for correct configuration.



Anchor
page9
page9




Configure the <subsystem> element to define the data sources within the standalone.xml file as follows:
Note: The <user-name> and <password> elements highlighted in the snippet should match with the database username and password provided for CTModelHouse while executing the DB scripts.


<subsystem xmlns="urn:jboss:domain:datasources:1.2">

<datasources>

<datasource jta="true" jndi-
name="java:/jboss/datasources/ModelHouseCT" pool-name="ModelHouseCT" enabled="true" use-ccm="true">

<connection-
url>jdbc:oracle:thin:@localhost:1521:xe</connection-url>

<driver-class>oracle.jdbc.OracleDriver</driver-class>

<driver>OracleJDBCDriver</driver>

<pool>

<min-pool-size>10</min-pool-size>

<max-pool-size>20</max-pool-size>

</pool>

<security>

<user-name>CT_MODEL</user-name>

<password>CT_MODEL</password>

</security>

<validation>

<validate-on-match>false</validate-on-match>

<background-validation>false</background-validation>
</validation>

<timeout>

<set-tx-query-timeout>false</set-tx-query-
timeout>

<blocking-timeout-millis>0</blocking-timeout-
millis>

<idle-timeout-minutes>0</idle-timeout-minutes>

<query-timeout>0</query-timeout>

<use-try-lock>0</use-try-lock>

<allocation-retry>0</allocation-retry>

<allocation-retry-wait-millis>0</allocation-
retry-wait-millis>

</timeout>

<statement>

<share-prepared-statements>false</share-prepared-
statements>

</statement>

</datasource>

<datasource jta="true" jndi-
name="java:/jboss/datasources/ModelHouse" pool-name="ModelHouse"
enabled="true" use-ccm="true">

<connection-

url>jdbc:oracle:thin:@localhost:1521:xe</connection-url>
<driver-class>oracle.jdbc.OracleDriver</driver-class> <driver>OracleJDBCDriver</driver>




Anchor
page10
page10


<pool>
<min-pool-size>10</min-pool-size>

<max-pool-size>20</max-pool-size>

</pool>

<security>

<user-name>CT_MODEL</user-name>

<password>CT_MODEL</password>

</security>

<validation>

<validate-on-match>false</validate-on-match>

<background-validation>false</background-validation>

</validation>

<timeout>

<set-tx-query-timeout>false</set-tx-query-
timeout>

<blocking-timeout-millis>0</blocking-timeout-
millis>

<idle-timeout-minutes>0</idle-timeout-minutes>

<query-timeout>0</query-timeout>

<use-try-lock>0</use-try-lock>

<allocation-retry>0</allocation-retry>

<allocation-retry-wait-millis>0</allocation-
retry-wait-millis>

</timeout>

<statement>

<share-prepared-statements>false</share-prepared-
statements>

</statement>

</datasource>

<drivers>

<driver name="OracleJDBCDriver" module="oracle.jdbc">
<datasource-
class>oracle.jdbc.driver.OracleDriver</datasource-class>

</driver>

<driver name="h2" module="com.h2database.h2">

<xa-datasource-class>org.h2.jdbcx.JdbcDataSource</xa-
datasource-class>

</driver>

</drivers>

</datasources>
</subsystem>



















Anchor
page11
page11