Well, I apologize for the insistence but didn't get any answer that
could help me.

Lets remember: I'm trying to get a DataSource in my webapp which is
configured as a GlobalResource, as the following:

<Resource name="jdbc/global" type="javax.sql.DataSource"
auth="Container" scope="Shareable"/>
<ResourceParams name="jdbc/global">
        <parameter>
                <name>factory</name>
        
<value>org.apache.commons.dbcp.BasicDataSourceFactory</value>
        </parameter>
        <parameter>
                <name>driverClassName</name>
                <value>org.postgresql.Driver</value>
        </parameter>
        <parameter>
                <name>url</name>
                <value>jdbc:postgresql://localhost/global</value>
        </parameter>
        <parameter>
                <name>validationQuery</name>  
                <value>select 1</value>
        </parameter>
        <parameter>
                <name>username</name>
                <value>global</value>
        </parameter>
        <parameter>
                <name>password</name>
                <value>password</value>
        </parameter>
</ResourceParams>

My context is like this:

<Context docBase="S:\WebAppTests" path="/tests" reloadable="true"
privileged="false" debug="4">
        <ResourceLink name="db" global="jdbc/global"
type="javax.sql.DataSource"/>
</Context>

My webapp has the following lines:

Context ic = new InitialContext();
DataSource ds = (DataSource)ic.lookup("java:comp/env/db"); <-- here is
where the exception occurs

The DataSource is there (I saw it in Administration app), and the
ResourceLink is there too.

So what am I missing here?

iran


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

Reply via email to