users@glassfish.java.net

local singleton lookup

From: <forums_at_java.net>
Date: Fri, 13 May 2011 06:11:47 -0500 (CDT)

Using glassfish 31 I successfully deployed a singlton ejb using 

@Singleton
@Local(TestInterface.class)

annotations. In glassfish web console it is possible to see the singleton
deployed under its class name. Now it fails to lookup it from servlet from
the same application using

        InitialContext ctx = new InitialContext();
        ctx.lookup("java:comp/env/TestBeanClassName");
or any name I could imagin from found examples. What am I doing wrong? Many
thanks in advance.

PS: No problem using @Remote (name mappedName), but how to use @Local from
servlet?


--
[Message sent by forum member 'alex2001']
View Post: http://forums.java.net/node/801802