[jboss-user] [EJB 3.0] - How Can I get Seesion bean using embedded ejb
sirajulmuneer
do-not-reply at jboss.com
Thu Oct 5 01:01:15 EDT 2006
Hi all,
I am trying to lookup my seesion bean using context.lookup
Code is like this
EJB3StandaloneBootstrap.boot(null);
Context ctx=getInitalContext()
ctx.lookup("ConsumerProfileSession")
static InitialContext getInitialContext() throws Exception
{
Hashtable props = getInitialContextProperties();
return new InitialContext(props);
}
private static Hashtable getInitialContextProperties()
{
Hashtable props = new Hashtable();
props.put("java.naming.factory.initial", "org.jnp.interfaces.LocalOnlyContextFactory");
props.put("java.naming.factory.url.pkgs", "org.jboss.naming:org.jnp.interfaces");
return props;
}
Error is cant bind
Is it need any more additional information to be add about Session bean in xml files?
Please help me
Thanks
Muneer
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3976215#3976215
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3976215
More information about the jboss-user
mailing list