Resin 4.0.1 doesn't seem to work with Hibernate anymore.  When
Hibernate is configured as the JPA provider, attempts to inject an
EntityManager produce this:

[09-08-04 15:54:16.283] {http--8080-5} FINES [InjectManage]
bind(EntityManager,[...@javax.enterprise.inject.current()]) -> none
[09-08-04 15:54:16.285] {http--8080-5} WARNI [ErrorPageMan]
javax.enterprise.inject.UnsatisfiedResolutionException: Can't find a
bean for 'interface javax.persistence.EntityManager' because no beans
implementing that class have been registered with the injection

However there are no error messages on startup; it appears that
Hibernate initializes normally.

There is a test case here:

If you comment out
"<provider>org.hibernate.ejb.HibernatePersistence</provider>" in
persistence.xml, the injection works.  If you leave it, you can't
inject.  If you use @PersistenceContext instead of @Current, it
complains that the persistence unit cannot be found.

Any ideas or workarounds?


resin-interest mailing list

Reply via email to