tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mark Eggers <its_toas...@yahoo.com>
Subject Re: How to configure JNDI resource
Date Mon, 13 Dec 2010 21:36:54 GMT
Chris,

Weird. I guess I've just blindly followed the standards. I'll have to give it a 
try later on today.

Thanks for the info.

/mde/

Well, how about that. I just commented out the resource-ref element in web.xml 
for a Hibernate-based application and it ran fine. I have the following line in 
my hibernate.cfg.xml file:

<property name="hibernate.connection.datasource">
  java:comp/env/jdbc/jndi-name
</property>


----- Original Message ----
From: Christopher Schultz <chris@christopherschultz.net>
To: Tomcat Users List <users@tomcat.apache.org>
Sent: Mon, December 13, 2010 12:40:16 PM
Subject: Re: How to configure JNDI resource

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

Mark,

On 12/13/2010 3:21 PM, Mark Eggers wrote:
> In order to use the resource, you'll need to tell your application about it 
> (resource-ref in web.xml), and create it (Resource in context.xml or 
> server.xml). Where you put the creation depends on your requirements.

My experience with Tomcat 5.5 and 6.0 is that when the resource is
defined in META-INF/context.xml, no <resource-ref> is necessary in
web.xml. I'm not sure if that's intentional or not.

- -chris
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAk0GhLAACgkQ9CaO5/Lv0PC3igCeP85AKX62BbcAhZUSjJiwzFJ1
CyUAnR9YlmRNZOfo8QQk4JVEbcNpHtUG
=w0dE
-----END PGP SIGNATURE-----

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


      

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


Mime
View raw message