Re: [Resin-interest] Using Hibernate as EntityManager in Resin 4

2009-03-31 Thread Scott Hernandez
Let me try this again from the beginning... I want to have services (that start with the application, and runs the length of the application lifetime) so I define a POJO with a @Service and a method with a @PostConstruct. Everything is going well so far. I define a persistenceunit in

Re: [Resin-interest] Using Hibernate as EntityManager in Resin 4

2009-03-31 Thread Scott Hernandez
Let me try this again from the beginning... I want to have services (that start with the application, and runs the length of the application lifetime) so I define a POJO with a @Service and a method with a @PostConstruct. Everything is going well so far. I define a persistenceunit in

Re: [Resin-interest] Using Hibernate as EntityManager in Resin 4

2009-03-31 Thread Scott Ferguson
On Mar 31, 2009, at 12:51 PM, Scott Hernandez wrote: Let me try this again from the beginning... I want to have services (that start with the application, and runs the length of the application lifetime) so I define a POJO with a @Service and a method with a @PostConstruct. Everything is

Re: [Resin-interest] Using Hibernate as EntityManager in Resin 4

2009-03-31 Thread Scott Hernandez
Yeah, I tracked it down the the start method of EnvironmentClassLoader. When walking through the EnvironmentListener[] list the webbeans (and @ApplicationScope @Service) are init'd before the EJB system. The EntityManagerFactory exists in the AmberContainer but it is still in the _pendingFactory

Re: [Resin-interest] Using Hibernate as EntityManager in Resin 4

2009-03-30 Thread Scott Hernandez
Well, I have configured a test app to use hibernate and I have a few problems (and a bit of success): I was able to get the same code working from a servlet, but when trying to get data I get an exception when running from a @Service (in the @PostConstruct method): [21:26:06.430] {main}

[Resin-interest] Using Hibernate as EntityManager in Resin 4

2009-03-25 Thread Scott Hernandez
I'd like to replace Amber with Hibernate. We are migrating an app from JBoss (Hibernate EntityManager) and there are lots of Hibernate annotations used for validation, and to hint for database optimizations. In the first pass getting things going we would like to just drop in (as best as we can)

Re: [Resin-interest] Using Hibernate as EntityManager in Resin 4

2009-03-25 Thread Scott Hernandez
It is always the moment after you send the email that you find the answer: http://wiki.caucho.com/Hibernate I will try that method. Are there any additional issues I should worry about? Sorry for the spam, Scott On Wed, Mar 25, 2009 at 1:47 PM, Scott Hernandez scotthernan...@hotmail.com wrote:

Re: [Resin-interest] Using Hibernate as EntityManager in Resin 4

2009-03-25 Thread Scott Ferguson
On Mar 25, 2009, at 1:51 PM, Scott Hernandez wrote: It is always the moment after you send the email that you find the answer: http://wiki.caucho.com/Hibernate I will try that method. Are there any additional issues I should worry about? Well, we haven't gotten to the compatibility

Re: [Resin-interest] Using Hibernate as EntityManager in Resin 4

2009-03-25 Thread Scott Hernandez
No problem, I should have something to report in a few hours. Also, is there a way to annotate the persistence units (for EntityManager injection) like there was for the JMS stuff? Since the persistence stuff is in persistence.xml, will it too become a bean config driven system? for example, let