Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Panel

Converting an OC4J appilication to a Tomcat 7 application

  1. decorators.xml
  2. applicationContext-config.xml - id="mitsisDataSource"
  3. web.xml - add
    Code Block
    
    <resource-ref>
        <description>Oracle Datasource</description>
        <res-ref-name>jdbc/ssb</res-ref-name>
        <res-type>javax.sql.DataSource</res-type>
        <res-auth>Container</res-auth>
    </resource-ref>
    
  4. pom.xml - replace
    Code Block
    
            <dependency>
                <groupId>oracle</groupId>
                <artifactId>ojdbc</artifactId>
                <version>1.4</version>
                <scope>test</scope>
            </dependency>
    
    with
    Code Block
    
            <dependency>
                <groupId>com.oracle</groupId>
                <artifactId>ojdbc14</artifactId>
                <version>10.2.0.5</version>
                <scope>test</scope>
            </dependency>
    
  5. search both Project Jar Dependencies and Project Test Jar Dependencies on ojdbc-1.4.jar and exclude the dependency
  6. CATALINA_HOME - Add resource definition
    Code Block
    
    <Resource name="jdbc/MitsisDs"
       auth="Container"
       type="javax.sql.DataSource"
       driverClassName="oracle.jdbc.OracleDriver"
       url="jdbc:oracle:thin:@//earth-vault-2.mit.edu:1523/sundev2"
       username="XXXXXXXX"
       password="YYYYYYYY"
       maxActive="20"
       maxIdle="10"
       maxWait="-1"
       removeAbandoned="true"
       removeAbandonedTimeout="30"
       logAbandoned="true" />
    
    <ResourceLink global="jdbc/MitsisDS" name="jdbc/MitsisDS" type="javax.sql.DataSource"/>