  | Mailing List | | Home | | Forum Home | | JBoss - Java Application Server | | Tomcat - JSP/Servlet container | | Struts - A MVC web framework | | iText - An open source PDF Java Library | | JDOM - JDOM XML Parser | | J2EE - A mailing list for Java(tm) 2 Platform, Enterprise Edition | | J2EE Pattern - An interest list for Sun Java Center J2EE Pattern Catalog | | JSP - A mailing list about Java Server Pages specification and reference | | Servlet - A mailing list for discussion about Sun Microsystem's Java Servlet API Technology | |
Struts & Hibernate
|
|
|
  | | | Tomcat and long startup time (hibernate) | Tomcat and long startup time (hibernate) 2006-11-21 - By Mike Quilleash
Back Hi there, I am working on a new J2EE web project for which I intend to use JSF 1.2 with facelets and hibernate 3 running inside Tomcat 6. Everything is working fine but I have a developing issue I would like to try and work around. I am building a global hibernate session factory, which is stored in a static singleton, in a ServletContextListener so it is available when the JSF application starts. In the development process I'm constantly editing the JSF Java code and display pages and redeploying the web app. Each time I do this the hibernate layer has to reinitialise which takes about 30-40 seconds. My question is, is there anyway in Tomcat of moving/configuring the hibernate intialisation (and more generally any heavy initialisation code) so that I can redeploy the JSF application quickly without reinitialising hibernate? Something along the lines of having Tomcat doing the heavy initialisation once but separate from the JSF application so I can redeploy the JSF without incurring the hibernate startup each time? I thought about a different deployed application with the hibernate logic but I'm not sure how to do this and I'm also not sure about classloading issues; can the JSF app "see" the hibernate static if it is loaded in different webapp/context. I develop/debug on IDEA6 using it's Tomcat plugin. Appreciate any help or suggestions. I'm new to Tomcat so I apologise if any of the terminology is wrong. I am happy to provide more detail clarifications if required. Thanks in advance. Mike.
This e-mail is bound by the terms and conditions described at http://www .subexazure.com/mail-disclaimer.html
|
|
 |