ejb@glassfish.java.net

EntityManager injection question

From: Wouter van Reeven <wouter_at_van.reeven.nl>
Date: Mon, 6 Nov 2006 17:52:44 +0100

Hi all,


Can someone please enlighten me on this question: I have created a stateless
session bean in which I inject an EntityManager instance:

@PersistenceContext EntityManager em;

When I try to access the EntityManager in the constructor of the bean, the em
instance always is NULL. When I try to access the em instance after the
constructor has completed, all goed well. Is this behaviour expected?


Thanks in advance,

Wouter van Reeven

-- 
People: "If she weighs the same as a Duck, she's made of wood!"
Sir Bedevere: "And therefore...?"