Announcement Announcement Module
Collapse
No announcement yet.
spring Datasource using TNSNAME Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • spring Datasource using TNSNAME

    we are using spring jdbc to connect to Databases, we are using org.apache.commons.dbcp.BasicDataSource object to inject datasource in to spring jdbc template .

    this approach works fine if i am using SID based URLs in case of oracle DB . we have a got request from one of our Customer to allow TNSNAME based connection string . after searching through i found that oracle datasource object allows to set the tnsnames as below

    OracleDataSource ods = new OracleDataSource();
    ods.setTNSEntryName("MyTNSAlias");


    the datasource implemenation we are using does not provide us with this api .

    can some one point me to document on implementing the datasource where i can support TNSName based connection and also keep our existing SID based implemenations to be intact .
Working...
X