tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Kenevel" <kene...@hotmail.com>
Subject Re: Read-Only Context with Tomcat + Hibernate
Date Wed, 15 Feb 2006 13:46:06 GMT
Abraham Fdez wrote:
> I'm making a Web application with Apache + Tomcat + Mod_Jk +
> Hibernate + Postgresql. I need that hibernate binds factory to JNDI
> but when I do that it gives me and error that context is read-only.

>From memory Tomcat has a JNDI context that is read-only, but which can
accept values bound to it in the configuration files. So you can set up a
data-source in the conf/Catalina/localhost/yourcontext.xml file and bind
this to a JNDI name. This is then available to be read (only).

There will be docs on this but it looks something like this:

<Context path="/yourpath" docbase="/var/www/webapp/" ... >
    <Resource name="jdbc/datasourceJndiName" auth="Container" ... />
</Context>

Incidentally, Spring is a superb way of integrating a Java webapp and
Hibernate

Mike

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


Mime
View raw message