EntityManager not useable in PostConstruct callback of StatelessSessionBean.
----------------------------------------------------------------------------
Key: EJBTHREE-101
URL: http://jira.jboss.com/jira/browse/EJBTHREE-101
Project: EJB 3.0
Type: Bug
Versions: Preview 4
Environment: JBoss-4.0.1sp1, EJB3-Preview4, Windows 2000.
Reporter: Shagoon
When trying to use the entity manager for a query in a PostConstruct callback
in a StatelessSessionBean, execution fails with:
Caused by: java.lang.RuntimeException: EntityManager must be access within a
transaction
at
org.jboss.ejb3.entity.HibernateSessionFactory.getSession(HibernateSessionFactory.java:105)
at
org.jboss.ejb3.entity.EntityManagerImpl.getSession(EntityManagerImpl.java:146)
at
org.jboss.ejb3.entity.EntityManagerImpl.createQuery(EntityManagerImpl.java:39)
at some.package.postConstructCallback(SomeDAOBean.java:99)
... 26 more
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://jira.jboss.com/jira/secure/Administrators.jspa
-
If you want more information on JIRA, or have a bug to report see:
http://www.atlassian.com/software/jira
-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click
_______________________________________________
JBoss-Development mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jboss-development