This discussion is archived
1 Reply Latest reply: Dec 20, 2012 11:34 PM by VISHNU_95 RSS

Connect to Database..?

VISHNU_95 Newbie
Currently Being Moderated
Hi All,

i want to connect to Oracle database instead of default Solid database.. I have 3 users namely, cata, catb, core in Oracle, now i need to connect to 3 of them. What changes should i need to make to connect to Database.. In ConnectionPool component there is only one username & one password actually i need to supply 3 usernames & passwords..

Please tell



Thanks in Advance,
VishnuVardhan Bovilla
  • 1. Re: Connect to Database..?
    RMishra Journeyer
    Currently Being Moderated
    i want to connect to Oracle database instead of default Solid database.. I have 3 users namely, cata, catb, core in Oracle, now i need to connect to 3 of them. What changes should i need to make to connect to Database.. In ConnectionPool component there is only one username & one password actually i need to supply 3 usernames & passwords..
    <ul>
    <li>You can create three ds files like cata-ds.xml, catb-ds.xml, core-ds.xml files
    <xa-datasource>
    <jndi-name> *CatA* </jndi-name>
    <isSameRM-override-value>false</isSameRM-override-value>
    <min-pool-size>5</min-pool-size>
    <max-pool-size>100</max-pool-size>
    <blocking-timeout-millis>5000</blocking-timeout-millis>
    <idle-timeout-minutes>15</idle-timeout-minutes>
    <transaction-isolation>TRANSACTION_READ_COMMITTED</transaction-isolation>
    <xa-datasource-class>oracle.jdbc.xa.client.OracleXADataSource</xa-datasource-class>
    <xa-datasource-propertyname="URL">jdbc:oracle:thin:@XXXXXXXX:1521:XXXXXXX</xa-datasource-property>
    <xa-datasource-property name="User">aaaaaaaaaa</xa-datasource-property>
    <xa-datasource-property name="Password">bbbbbbbbb</xa-datasource-property>
    <!-- Uncomment the following if you are using Oracle 9i
    <xa-datasource-property name="oracle.jdbc.V8Compatible">true</xa-datasource-property>
    -->
    <exception-sorter-class-name>
    org.jboss.resource.adapter.jdbc.vendor.OracleExceptionSorter
    </exception-sorter-class-name>
    </xa-datasource>
    <li>Same way for catb and core

    <li>Then you can create DirectJTDatasource and JTDataSource files for cata like:
    JTDataSourceCatA.properties:
    $class=atg.service.jdbc.WatcherDataSource
    dataSource=/atg/dynamo/service/jdbc/ *DirectJTDataSourceCatA*
    DirectJTDataSourceCatA.properties:
    $class=atg.nucleus.JNDIReference
    JNDIName=java:/ *CatA*
    <li>Same way create JTDataSourceCatB , JTDataSourceCore , DirectJTDataSourceCatB and DirectJTDataSourceCore etc and configure in difference repositories accordingly your requirement.
    </ul>

    -RMishra

    Edited by: RMishra on Dec 21, 2012 3:07 PM

Legend

  • Correct Answers - 10 points
  • Helpful Answers - 5 points