DevPortal

How do I Create DataSources?


A DataSource must be created in the Resource Service. To create a DataSource, one has to create a Connection Factory for the database to connect. The datasource that you are creating for JMS must have the transaction-participation set to false. A sample of datasource creation is given below. It creates a DataSource with the name jms_cluster_ds and a connection factory jms_cluster_cf.

<configuration service-name="ResourceService">
 <default-connection-factory name="CloudscapeCF"/>
 <default-datasource name="demo"/>
 <datasource name="jms_cluster_ds" connection-factory="jms_cluster_cf" transaction-participation="false" transaction-isolation=""
 description="No Description">
  <pool-properties min-pool-size="5" max-pool-size="20" initial-pool-size="1" refresh-interval-seconds="" connection-request-timeout-seconds=""
  idle-timeout-seconds="" cache-size="20"/>
  <connection-initialization db-retrials="0" db-retry-interval-millis="0"/>
  <connection-validation sql="" class=""/>
  <connection-tracking enable="false"/>
 </datasource>
 <default-propertes min-pool-size="5" max-pool-size="20" initial-pool-size="1" refresh-interval-seconds="300" connection-request-timeout-seconds="10"
 idle-timeout-seconds="300" cache-size="50"/>
 <connection-factory name="jms_cluster_cf" description="No Description" classname="oracle.jdbc.driver.OracleDriver" classpath=""
 url="jdbc:oracle:thin:@db:1521:db" authorized-by="container">
  <login-parameters user="scott" password="tiger" mask-password="false"/>
  <properties>
   <property name="user" value=""/>
   <property name="password" value=""/>
  </properties>
 </connection-factory>
</configuration>


Related Topics:

© Pramati Technologies 2007 Runs on Pramati Server | Feedback | Legal