Versions Compared

Key

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

...

Panel

Anchor
context.mxl example
context.mxl example

Example of a context which contains multiple Resource Definitions

Note

In the example below, both Resouce Definitions are identical except for the name.

Code Block
<Context antiResourceLocking="true" crossContext="true" useHttpOnly="false">

    <WatchedResource>WEB-INF/web.xml</WatchedResource>

    <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="mydbusername"
        password="mydbpassword"
        maxActive="20"
        maxIdle="10"
        maxWait="-1"
        removeAbandoned="true"
        removeAbandonedTimeout="30"
        logAbandoned="true" />

    <Resource name="jdbc/ssb"
        auth="Container"
        type="javax.sql.DataSource"
        driverClassName="oracle.jdbc.OracleDriver"
        url="jdbc:oracle:thin:@//earth-vault-2.mit.edu:1523/sundev2"
        username="mydbusername"
        password="mydbpassword"
        maxActive="20"
        maxIdle="10"
        maxWait="-1"
        removeAbandoned="true"
       removeAbandonedTimeout="30"
        logAbandoned="true" />

    <ResourceLink global="jdbc/MitsisDS" name="jdbc/MitsisDS" type="javax.sql.DataSource"/>
    <ResourceLink global="jdbc/ssb" name="jdbc/ssb" type="javax.sql.DataSource"/>

</context>