tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Abraham Fdez" <abraham.fernan...@fnac.es>
Subject RE: Read-Only Context with Tomcat + Hibernate
Date Thu, 16 Feb 2006 07:36:21 GMT
Yeah Kenevel,

I know this (This is what I am doing) but I want to give a name to
Hibernate's SessionFactory like "<session-factory
name="java:comp/Hibernate/blahblahblah" and in that case is where Tomcat
says me that Context is read-only. I want this because I'm doing a Tomcat
Cluster with some servers and each one must have a SessionFactory with same
name in order to use Tomcat Persistent sessions manager on a postgresql
database.

Do you know anything about naming SessionFactory object in Tomcat?

Thanks a lot,

 
Abraham Fernández Álvarez
 	 

Dpto. de Informática 
FNAC ESPAÑA S.A. 
Parque Empresarial La Finca
Pº de la Finca, bloque 11 2ª Planta
28223 Pozuelo de Alarcón (Madrid) 
( +34 91 7689211
7 +34 91 7689225 
/ abraham.fernandez@fnac.es 
 	 
 	 	
 

-----Mensaje original-----
De: Kenevel [mailto:kenevel@hotmail.com] 
Enviado el: miércoles, 15 de febrero de 2006 14:46
Para: Tomcat Users List
Asunto: Re: Read-Only Context with Tomcat + Hibernate

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


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


Mime
View raw message