users@glassfish.java.net

Re: how to auto start TimerService EJB?

From: <glassfish_at_javadesktop.org>
Date: Wed, 12 May 2010 06:34:43 PDT

Thanks a lot for your answer.
I think I'm going to use the 4) approach.
I've just developed a MBean but I've a problem during the call of the EJB.
The EJB is mapped as follows:
@Stateless(name = "TestTimer", mappedName="TestTimer")

In my MBean there's a method that has the following lines:
 InitialContext ctx = new InitialContext();
 TestTimerb = (TestTimer) ctx.lookup("TestTimer");

When I call this method through JConsole I've this error:
javax.naming.NameNotFoundException: myTestPackage.TestTimer not found

Any advice?
Thanks in advance.
[Message sent by forum member 'javanetcoll']

http://forums.java.net/jive/thread.jspa?messageID=469534