no injection of @Resource TimerService within Entity EJB
--------------------------------------------------------
Key: EJBTHREE-726
URL:
http://jira.jboss.com/jira/browse/EJBTHREE-726
Project: EJB 3.0
Issue Type: Feature Request
Components: EJB3 Extensions
Affects Versions: EJB 3.0 RC9 - FD
Environment: JBoss AS 4.0.4GA (via web installer),
EJB 3.0 RC9,
JDK 1.5.0_6,
Windows XP Pro 2002 w/SP2
Reporter: James
I'm working with 4.0.4GA and EJB3 RC9 on Java 1.5.0_06 (WinXP). Have created an entity
bean with the container's timer service injected. When I reference the timer service,
it is null. Under the same conditions, I am successful at injecting the timer service into
both a MDB and a stateless session bean. No errors or warnings in compile or deployment
with verbose output, only the NullPointerException when attempting to use the timer
service.
Here is what I am doing (simplified):
@Entity
public class MyEntity implements Serializable
{
@Resource
private TimerService timerService;
...
public createMyTimer()
{
try
{
if((timerService.getTimers()).isEmpty() == false)
{
...
The call to getTimers() throws the NullPointerException. I'm starting with a feature
request, not sure this is a bug just yet.
--
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
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira