Hi In hivemind you don't need (shouldnt) use singletons anymore since they are hindering the unit testing. Since you are using plain configuration (hivemind + tapestry) you actually don't need to do anything at all :) (almost) you just need to use hivemind + Tapestry + one of the hibernate integration module such as honeycomb or tapernate.
I can't say anything about tapernate because we are using honeycomb. If you need a session in your page you simply create an abstract getter public abstract Session getSession() and declare that it should be populated with the hibernate session from honeycomb (you can check exmaples in the sample application you can easily generate with honeycomb archetype and maven). If you need more examples i can post some code fragments here. Renat P.S. Honeycomb author is actively participating in this mail list so I think he would be glad to answer your questions On 12/07/07, Norman Franke <[EMAIL PROTECTED]> wrote:
I've been integrating Tapestry 4.0.x into my existing web application based on JSP and servlets. It's all been going quite well so far. I've been using Hibernate for database access in Tapestry, but was using JDBC in the old servlet code. (Since it was developed pre- hibernate.) Anyway, I want to start using Hibernate (via HiveMind) in my servlet code. The question is, how do I get a reference to it? I can do this via: RegistryInfrastructure reg = (RegistryInfrastructure) ServiceSerializationHelper.getServiceSerializationSupport(); And then call getService(MyDesiredDAO.class, null). That seems to work. When Tomcat starts up, Tapestry doesn't initialize and getService throws exception stating that HiveMind has not been configured. The question is, how can I force HiveMind to initialize or initialize it myself and not mess up Tapestry? Norman Franke
-- Best regards, Renat Zubairov --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]