How To Setup Your Datasource Inwards Jboss7.X

Below are sample configurations y'all tin role to setup postgresq, mysql information rootage inward your jboss7.x.

Where to add:
1.) If y'all added Jboss Tools plugin to eclipse, inward server sentiment expand Jboss Server->Filesets->Configuration->standalone.xml

2.) Otherwise y'all tin notice standalone.xml inward JBOSS_HOME/standalone/configuration.

<datasource jndi-name="java:jboss/datasources/ExampleDS" pool-name="ExampleDS" enabled="true" use-java-context="true">   <connection-url>jdbc:h2:mem:test;DB_CLOSE_DELAY=-1</connection-url>   <driver>h2</driver>   <security>    <user-name>sa</user-name>    <password>sa</password>   </security>  </datasource>  <datasource jta="false" jndi-name="java:jboss/datasources/DropshipDataSource" pool-name="dropshipPool" enabled="true" use-java-context="true" use-ccm="false">   <connection-url>jdbc:postgresql://localhost:5432/dropship</connection-url>   <driver-class>org.postgresql.Driver</driver-class>   <driver>postgresql</driver>   <pool>    <min-pool-size>2</min-pool-size>    <max-pool-size>20</max-pool-size>   </pool>   <security>    <user-name>user</user-name>    <password>user</password>   </security>   <validation>    <validate-on-match>false</validate-on-match>    <background-validation>false</background-validation>    <background-validation-millis>1</background-validation-millis>   </validation>   <statement>    <prepared-statement-cache-size>10</prepared-statement-cache-size>    <share-prepared-statements>false</share-prepared-statements>   </statement>  </datasource>  <datasource jta="false" jndi-name="java:jboss/datasources/MeveoAdminDatasource" pool-name="meveoDS" enabled="true" use-java-context="true" use-ccm="false">   <connection-url>jdbc:postgresql://localhost:5432/meveo</connection-url>   <driver-class>org.postgresql.Driver</driver-class>   <driver>postgresql</driver>   <pool>    <min-pool-size>2</min-pool-size>    <max-pool-size>20</max-pool-size>   </pool>   <security>    <user-name>user</user-name>    <password>user</password>   </security>   <validation>    <validate-on-match>false</validate-on-match>    <background-validation>false</background-validation>    <background-validation-millis>1</background-validation-millis>   </validation>   <statement>    <prepared-statement-cache-size>10</prepared-statement-cache-size>    <share-prepared-statements>false</share-prepared-statements>   </statement>  </datasource>  <datasource jta="false" jndi-name="java:jboss/datasources/MeveoDWHDatasource" pool-name="meveoDWHDS" enabled="true" use-java-context="true" use-ccm="false">   <connection-url>jdbc:postgresql://localhost:5432/meveodwh</connection-url>   <driver-class>org.postgresql.Driver</driver-class>   <driver>postgresql</driver>   <pool>    <min-pool-size>2</min-pool-size>    <max-pool-size>20</max-pool-size>   </pool>   <security>    <user-name>user</user-name>    <password>user</password>   </security>   <validation>    <validate-on-match>false</validate-on-match>    <background-validation>false</background-validation>    <background-validation-millis>1</background-validation-millis>   </validation>   <statement>    <prepared-statement-cache-size>10</prepared-statement-cache-size>    <share-prepared-statements>false</share-prepared-statements>   </statement>  </datasource>  <drivers>   <driver name="h2" module="com.h2database.h2">    <xa-datasource-class>org.h2.jdbcx.JdbcDataSource</xa-datasource-class>   </driver>   <driver name="com.mysql" module="com.mysql">    <xa-datasource-class>com.mysql.jdbc.jdbc2.optional.MysqlXADataSource</xa-datasource-class>   </driver>   <driver name="postgresql" module="org.postgresql">    <xa-datasource-class>org.postgresql.xa.PGXADataSource</xa-datasource-class>   </driver>  </drivers> </datasources> 
Next
Previous
Click here for Comments

0 komentar:

Please comment if there are any that need to be asked.