Hibernate sessions require a transaction boundary to start and close the session, ie, call a method that does a transaction from the pojo / service class.
Please google on this, as this question is asked a lot. Beyond what Nathan mentioned, if you eagerly load your object / collections, ie, don't lazy load them, you don't need the OSIV pattern that uses thread locals. While thread locals are essential for presentaion layer programming, I've yet to see their value in web services - although I maybe be missing something. HTH, Robert On Nov 8, 2007 4:53 PM, Szarkowski, Agnes <[EMAIL PROTECTED]> wrote: > > > > > 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 --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
