-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Bhanu,

On 4/26/16 10:51 PM, bhanu lakkala wrote:
> 1st way: context.xml: <Resource name="jdbc/ADS" auth="Container"
> 
> [snip]

This was META-INF/context.xml, not conf/context.xml, right?

I would prefer this way.

> 2nd Way: configured a global datasource and a resource link as
> shown below: in the context.xml file: <ResourceLink
> global="jdbc/ADS" name="jdbc/ADS" type="javax.sql.DataSource"/>
> 
> in the server.xml file: <GlobalNamingResources>
> 
> <Resource name="jdbc/ADS" auth="Container"
> 
> [snip]

That shouldn't be necessary.

> The spring config looks like: I have tried both the jee and the
> bean way of configuring it..with the same results. <!--
> <jee:jndi-lookup id="datasource"   jndi-name="jdbc/ADS" 
> expected-type="javax.sql.DataSource" />-->
> 
> <bean id="datasource"
> class="org.springframework.jndi.JndiObjectFactoryBean"/> <property
> name="jndiName" value="java:comp/env/jdbc/ADS" /> </bean>

I usually write the JNDI paths with a leading / after the context
name, like this:

java:/comp/env/jdbc/myDataSource

What happens if you insert a "/" after "java:"?

- -chris
-----BEGIN PGP SIGNATURE-----
Comment: GPGTools - http://gpgtools.org
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/

iEYEARECAAYFAlcg4dsACgkQ9CaO5/Lv0PAc3gCePmqvDVoCag90atl0iopGywsv
N28AoKl/kg85xNhSwFFlEsWyaxO4qWm1
=fgUz
-----END PGP SIGNATURE-----

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org

Reply via email to