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 / [EMAIL PROTECTED] -----Mensaje original----- De: Kenevel [mailto:[EMAIL PROTECTED] 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: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]