This works for me ...

web.xml :
    <resource-ref>
        <description>
            Resource reference to a factory for java.sql.Connection
            instances that may be used for talking to a particular
            database that is configured in the server.xml file.
        </description>
        <res-ref-name>
            jdbc/SessionDB
        </res-ref-name>
        <res-type>
            javax.sql.DataSource
        </res-type>
        <res-auth>
            Container
        </res-auth>
    </resource-ref>

context.xml :
<snip>
  <Resource name="jdbc/SessionDB" auth="Container"
            type="javax.sql.DataSource"/>
  <ResourceParams name="jdbc/SessionDB">
      <parameter>
        <name>factory</name>
        <value>org.apache.commons.dbcp.BasicDataSourceFactory</value>
      </parameter>

    <parameter>
      <name>username</name>
      <value>tripleplay</value>
    </parameter>
    <parameter>
      <name>password</name>
      <value></value>
    </parameter>
    <parameter>
      <name>driverClassName</name>
      <value>com.mysql.jdbc.Driver</value>
    </parameter>
    <parameter>
      <name>url</name>
      <value>jdbc:mysql://vodmgr:3306/tripleplay</value>
    </parameter>
    <parameter>
      <name>maxActive</name>
      <value>20</value>
    </parameter>
    <parameter>
      <name>maxIdle</name>
      <value>20</value>
    </parameter>
      <parameter>
        <name>maxWait</name>
        <value>5000</value>
      </parameter>
  </ResourceParams>
</snip>

Garrett Dangerfield wrote:
I tried this and it's not working.

It's saying:
Name jdbc not found in this context

In my web.xml, I put in:

 <env-entry>
   <env-entry-name>jdbc/DataWarehouse</env-entry-name>
   <env-entry-value>jdbc/DataWarehouse</env-entry-value>
   <env-entry-type>javax.sql.DataSource</env-entry-type>
 </env-entry>

In my server.xml, I have:

<Resource auth="Container" name="jdbc/DataWarehouse" scope="Shareable"
type="javax.sql.DataSource"/>

Am I missing something?

Thanks
Garrett Dangerfield.

Shapira, Yoav wrote:

Howdy,



- put the equivalent of ResourceEnvRef into the web.xml inside the web

app


See the <env-entry> element in the Servlet Specification, v2.3,
SRC.13.1.

Yoav Shapira



This e-mail, including any attachments, is a confidential business communication, and may contain information that is confidential, proprietary and/or privileged. This e-mail is intended only for the individual(s) to whom it is addressed, and may not be saved, copied, printed, disclosed or used by anyone else. If you are not the(an) intended recipient, please immediately delete this e-mail from your computer system and notify the sender. Thank you.


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to