You will want to use the Hibernate Session Per Request Pattern. You should be able to read about this pattern at the hibernate web site:
http://www.hibernate.org/42.html Basically you assign a Hibernate Session to the thread local of your request with a filter, use that session your entire request and then close that session in the same filter at the end of your request. Just make sure your filters are mapped to all the correct urls. Best of Luck. ________________________________> Subject: axis2, hibernate and tomcat> Date: Thu, 8 Nov 2007 15:53:34 -0600> From: [EMAIL PROTECTED]> To: [email protected]>> First I’d like to note that I am very new to Java web development.> I’m writing a simple web service that will read data from one database and insert a subset into another.> I am using axis2 1.3, tomcat 5.5 and hibernate 3.> I was able to get a POJO to read data from a database in the console, and I was able to deploy the POJO in axis2 as a web service.> However, the methods that are using hibernate session don’t work.> Does anyone know how I can hook hibernate to my web service?> Thanks> J _________________________________________________________________ Boo! Scare away worms, viruses and so much more! Try Windows Live OneCare! http://onecare.live.com/standard/en-us/purchase/trial.aspx?s_cid=wl_hotmailnews
