JBoss Datasources
Before the contelligent install can be finalized you have to ensure that jboss can access your database specific jdbc driver. Unless you want to use HSQL (Hypersonic) you have to copy your drivers jar-file to the /path/to/jboss/lib/ directory. After your jdbc driver is available go on and deploy your datasource as described below.
Deployment of JBoss Datasources is as trivial as deploying enterprise applications or any other jboss application or service in JBoss. In order to deploy a datasource binding you have to copy an your individual *-ds.xml (the datasource descriptor) to the jboss deploy directory.
# cp /path/to/contelligent-ds.xml \
/path/to/jboss/server/default/deploy/
Below are some ready to use templates. You have to change the %variable% variables to suite your needs.
Templates that are currently included in this tutorial:
HypersonicSQL (contelligent-ds.xml) - no modification needed
<?xml version="1.0" encoding="UTF-8"?>
<datasources>
<local-tx-datasource>
<jndi-name>contelligentDB</jndi-name>
<connection-url>
jdbc:hsqldb:${jboss.server.data.dir}/hypersonic/contelligentDB
</connection-url>
<driver-class>org.hsqldb.jdbcDriver</driver-class>
<user-name>sa</user-name>
<password></password>
<min-pool-size>5</min-pool-size>
<max-pool-size>20</max-pool-size>
<idle-timeout-minutes>0</idle-timeout-minutes>
</local-tx-datasource>
<local-tx-datasource>
<jndi-name>contelligentDBnoTx</jndi-name>
<connection-url>
jdbc:hsqldb:${jboss.server.data.dir}/hypersonic/contelligentDB
</connection-url>
<driver-class>org.hsqldb.jdbcDriver</driver-class>
<user-name>sa</user-name>
<password></password>
<min-pool-size>5</min-pool-size>
<max-pool-size>20</max-pool-size>
<idle-timeout-minutes>0</idle-timeout-minutes>
</local-tx-datasource>
</datasources>
Oracle (contelligent-ds.xml) - modification needed
<?xml version="1.0" encoding="UTF-8"?>
<datasources>
<local-tx-datasource>
<jndi-name>contelligentDB</jndi-name>
<connection-url>
jdbc:oracle:thin:@%db_host%:%db_port%:%db_sid%
</connection-url>
<driver-class>oracle.jdbc.driver.OracleDriver</driver-class>
<user-name>%db_user%</user-name>
<password>%db_pass%</password>
</local-tx-datasource>
<no-tx-datasource>
<jndi-name>contelligentDBnoTx</jndi-name>
<connection-url>
jdbc:oracle:thin:@%db_host%:%db_port%:%db_sid%
</connection-url>
<driver-class>
oracle.jdbc.driver.OracleDriver
</driver-class>
<user-name>%db_user%</user-name>
<password>%db_pass%</password>
</no-tx-datasource>
</datasources>
Sybase (contelligent-ds.xml) - modification needed
<?xml version="1.0" encoding="UTF-8"?>
<datasources>
<local-tx-datasource>
<jndi-name>contelligentDB</jndi-name>
<connection-url>jdbc:sybase:Tds:%db_host%:%db_port%</connection-url>
<driver-class>com.sybase.jdbc2.jdbc.SybDriver</driver-class>
<user-name>%db_user%</user-name>
<password>%db_pass%</password>
<min-pool-size>3</min-pool-size>
<max-pool-size>15</max-pool-size>
<idle-timeout-minutes>240</idle-timeout-minutes>
<track-statements>false</track-statements>
</local-tx-datasource>
<no-tx-datasource>
<jndi-name>contelligentDBnoTx</jndi-name>
<connection-url>jdbc:sybase:Tds:%db_host%:%db_port%</connection-url>
<driver-class>com.sybase.jdbc2.jdbc.SybDriver</driver-class>
<user-name>%db_user%</user-name>
<password>%db_pass%</password>
<min-pool-size>3</min-pool-size>
<max-pool-size>15</max-pool-size>
<idle-timeout-minutes>240</idle-timeout-minutes>
<track-statements>false</track-statements>
</no-tx-datasource>
</datasources>
Microsoft SQL Server (contelligent-ds.xml) - modification needed
<?xml version="1.0" encoding="UTF-8"?>
<datasources>
<local-tx-datasource>
<jndi-name>contelligentDB</jndi-name>
<connection-url>
jdbc:microsoft:sqlserver://%db_host%:%db_port%;Wsid=contelligent
</connection-url>
<driver-class>
com.microsoft.jdbc.sqlserver.SQLServerDriver
</driver-class>
<user-name>%db_user%</user-name>
<password>%db_pass%</password>
<min-pool-size>3</min-pool-size>
<max-pool-size>15</max-pool-size>
<idle-timeout-minutes>240</idle-timeout-minutes>
<track-statements>false</track-statements>
</local-tx-datasource>
<no-tx-datasource>
<jndi-name>contelligentDBnoTx</jndi-name>
<connection-url>
jdbc:microsoft:sqlserver://%db_host%:%db_port%;Wsid=contelligent
</connection-url>
<driver-class>
com.microsoft.jdbc.sqlserver.SQLServerDriver
</driver-class>
<user-name>%db_user%</user-name>
<password>%db_pass%</password>
<min-pool-size>3</min-pool-size>
<max-pool-size>15</max-pool-size>
<idle-timeout-minutes>240</idle-timeout-minutes>
<track-statements>false</track-statements>
</no-tx-datasource>
</datasources>
Postgresql (contelligent-ds.xml) - modification needed
<?xml version="1.0" encoding="UTF-8"?>
<datasources>
<local-tx-datasource>
<jndi-name>contelligentDB</jndi-name>
<connection-url>jdbc:postgresql://%db_host%/%db_name%</connection-url>
<driver-class>org.postgresql.Driver</driver-class>
<user-name>%db_user%</user-name>
<password>%db_host%</password>
</local-tx-datasource>
<local-tx-datasource>
<jndi-name>contelligentDBnoTx</jndi-name>
<connection-url>jdbc:postgresql://%db_host%/%db_name%</connection-url>
<driver-class>org.postgresql.Driver</driver-class>
<user-name>%db_user%</user-name>
<password>%db_pass%</password>
</local-tx-datasource>
</datasources>




