Re: [Resin-interest] Bug when using thirdparty persistence layer with @PersistenceUnit

2008-03-06 Thread Scott Ferguson

On Mar 6, 2008, at 6:27 AM, wesley wrote:

> Hi Scott,
>
> I've expierenced a wired problen using @PersistenceUnit.

Thanks.  I've filed it as http://bugs.caucho.com/view.php?id=2498.   
That's an odd bug.  I assume it's some kind of lazy-init issue.

-- Scott

>
>
> ===Not functional!
> @Component
> public class PersistenceStrategy {
>
> // @PersistenceContext(unitName = "myunit")
> // EntityManager em;
>
> @PersistenceUnit(unitName = "myunit")
> EntityManagerFactory emf;
>
> ... // using emf, resin said
> // com.mycompany.PersistenceStrategy.emf:  
> @PersistenceUnit(unitName='myunit')
> // is an unknown persistence unit.
> // No matching JPA persistence-units have been deployed
>
> }
> 
>
>
> =OK=
> @Component
> public class PersistenceStrategy {
>
> @PersistenceContext(unitName = "myunit")
> EntityManager em;
>
> @PersistenceUnit(unitName = "myunit")
> EntityManagerFactory emf;
>
> ... // using emf, just leaving em unused
> }
> 
>
> I'm use Hibernate 3.2 as my persistence layer, with 3.1.s080304  
> snapshot.
> Other configurations were normal and simple, as 
> http://wiki.caucho.com/Hibernate 
>  recommended.
>
> Regards
>
> - Wesley
>
>
> ___
> resin-interest mailing list
> resin-interest@caucho.com
> http://maillist.caucho.com/mailman/listinfo/resin-interest



___
resin-interest mailing list
resin-interest@caucho.com
http://maillist.caucho.com/mailman/listinfo/resin-interest


Re: [Resin-interest] Bug when using thirdparty persistence layer with @PersistenceUnit

2008-03-06 Thread Daniel Lopez
Hi,

You will probably need to specify which version of Resin 3.1.X you are  
using, as things have changed greatly during the last versions.

This week I've been playing with JPA and using different providers  
inside Resin, and I had to resort to 3.1.5 (I jumped from 3.1.2).  
However, I'm using PERSISTENCE_LOCAL (We manage the  
EntityManager/Factory ourselves) so I'm not sure how the IoC works.

Good luck!
D.


S'està citant wesley <[EMAIL PROTECTED]>:

> Hi Scott,
>
> I've expierenced a wired problen using @PersistenceUnit.
>
> ===Not functional!
> @Component
> public class PersistenceStrategy {
>
> // @PersistenceContext(unitName = "myunit")
> // EntityManager em;
>
> @PersistenceUnit(unitName = "myunit")
> EntityManagerFactory emf;
>
> ... // using emf, resin said
> // com.mycompany.PersistenceStrategy.emf: @PersistenceUnit(unitName='myunit')
> // is an unknown persistence unit.
> // No matching JPA persistence-units have been deployed
>
> }
> 
>
>
> =OK=
> @Component
> public class PersistenceStrategy {
>
> @PersistenceContext(unitName = "myunit")
> EntityManager em;
>
> @PersistenceUnit(unitName = "myunit")
> EntityManagerFactory emf;
>
> ... // using emf, just leaving em unused
> }
> 
>
> I'm use Hibernate 3.2 as my persistence layer, with 3.1.s080304 snapshot.
> Other configurations were normal and simple, as
> http://wiki.caucho.com/Hibernate recommended.
>
> Regards
>
> - Wesley









___
resin-interest mailing list
resin-interest@caucho.com
http://maillist.caucho.com/mailman/listinfo/resin-interest