Link to home
Start Free TrialLog in
Avatar of gaurav sharma
gaurav sharma

asked on

Use JNDI to connect to DB

I have a process set up to continuously run sql scripts to the database using the idea from the link below

http://www.theserverlabs.com/blog/2009/05/18/continuous-integration-with-oracle-plsql-utplsql-and-hudson/ 

How can I replace the JDBC connection with JNDI in the pom.xml
Avatar of gaurav sharma
gaurav sharma

ASKER

I am using the below implementation of maven to execute scripts to oracle database.
This is a sql-maven plugin that connects to the database using the configuration like below.

<build>
    <plugins>
      <plugin>
        <groupId>org.codehaus.mojo</groupId>
        <artifactId>sql-maven-plugin</artifactId>
        <version>1.5</version>
        <dependencies>
            <dependency>
            <groupId>com.oracle</groupId>
            <artifactId>ojdbc5</artifactId>
            <version>11.2.0.1.0</version>
<configuration>
          <driver>oracle.jdbc.driver.OracleDriver</driver>
          <url>jdbc:oracle:thin:@server1:1234:sid</url>
        <username>testing</username>
          <password>testing</password>
          <delimiter>/</delimiter>
          <delimiterType>row</delimiterType>
          <keepFormat>true</keepFormat>
        </configuration>
            
            
      The username and password cannot be put in here when building to personal identification schemas.
      Hence a JNDI connection is being created to connect to the DB.
      How can I use the JNDI connection in the pom.xml ?
ASKER CERTIFIED SOLUTION
Avatar of mccarl
mccarl
Flag of Australia image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial