users@glassfish.java.net

GlassFish v3, EJB 3.1 and Standalone Client

From: <glassfish_at_javadesktop.org>
Date: Sat, 12 Dec 2009 03:15:38 PST

hi team.
I'm very glad releasing javaee 6.
I download netbeans 6.8 with GlassFish v3 and try to write simple ejb 3.1 application.
ejb module deployed successfully without any problem, after this I've created new simple java application and try to call ejb 3.1 session bean.
but no success.
can anybody show me sample code how to call ejb 3.1 from standalone client ??

I was working with ejb 3.0 and jboss. I had not any problem from standalone client.
ejb 3.0 standalone client for jboss:
{code}
Properties env = new Properties();
env.setProperty("java.naming.factory.initial", "org.jnp.interfaces.NamingContextFactory");
env.setProperty("java.naming.provider.url", "localhost:1099");
env.setProperty("java.naming.factory.url.pkgs", "org.jboss.naming");
InitialContext ctx = new InitialContext(env);
SomeSessionInt sBean = (SomeSessionInt)ctx.lookup("SomeSessionBean/remote");
{code}


can anybody tell me which client jars are required for client application and what is the environment properties should i set ?

PS.
Also i tried to make enterprise application with ejb and web module into netbeans. but there wasn't any problem to inject ejb session bean from jsf managed bean. problem is how to lookup ejb from standalone client.


any ideas will be appreciated.


_______________________________
Regards,
Paata Lominadze.
[Message sent by forum member 'paata' ]

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