Please see the difference
http://javaevangelist.blogspot.com/2006/10/persistence-unit-or-persistence.html
On Wed, Oct 21, 2009 at 4:45 AM, homer
<wittemar@...> wrote:
Can nobody help? :(
Today I tried to directly use an EntityManager in my SessionBean, so I added the following attributes:
Code:
@PersistenceUnit(unitName = "JavaEE-Test-ejbPU")
private EntityManagerFactory emf;
@PersistenceContext(unitName = "JavaEE-Test-ejbPU")
private EntityManager em;
But also, both are null. How can this happen? Is it possible that glassfish can't find my PersisenceInit? And why?
--
John Yeary
--
http://javaevangelist.blogspot.com"Far better it is to dare mighty things, to win glorious triumphs, even though checkered by failure, than to take rank with those poor spirits who neither enjoy much nor suffer much, because they live in the grey twilight that knows not victory nor defeat."
-- Theodore Roosevelt