Hi Chris,

On Apr 27, 2016 11:59 AM, "Christopher Schultz" <
ch...@christopherschultz.net> wrote:
>
> -----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


Yes the context.xm is in META-INF


>
> > 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:"?


Same response as before even with  java:/comp/env/jdbc/ADS.

I took the same aar to tomcat 7.0.68  on windows and everything works as
expected. The same aar in  tomcat 8.0.28 on UNIX works fine. It is strange
that only windows 8.0.28,8.0.30,8.0.33 and 9.0.0.M4 have this issue. I have
not tried the 8.5.x yet.


Thank you again for your support in helping with this issue.

 Thanks,

Bhanu Lakkala



>
> - -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