[JBoss-user] [EJB 3.0] - Re: InitialContext.lookup throwing NameNotFoundException wit

2006-03-16 Thread jasalido
Try appending your application / context name to the jndi lookup, such as


  | return (AppManager)ctx.lookup("appname/" + AppManager.class.getName());
  | 

I think this notation change was added in the newer EJB3 implementations...



View the original post : 
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3930759#3930759

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3930759


---
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642
___
JBoss-user mailing list
JBoss-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jboss-user


[JBoss-user] [EJB 3.0] - Re: how to connect to JBOSS server from the client ?

2006-03-16 Thread jasalido
First configure the following properties:


  | Properties props = new Properties();
  | props.put("java.naming.factory.initial", 
"org.jnp.interfaces.NamingContextFactory");
  | props.put("java.naming.factory.url.pkgs", 
"org.jboss.naming:org.jnp.interfaces");
  | props.put("java.naming.provider.url", "jnp://192.168.0.1:1099");
  | 

Then get the InitialContext, and then you can do the lookup for your beans from 
your client (Replace UserManager* class names for your own):

  | try {
  | InitialContext ctx = new InitialContext(props);
  | UserManager manager = (UserManager) 
ctx.lookup("appname/UserManagerImpl/remote");
  |   ...
  | 

Then you can use your retrieved object to work with your remote beans.

That should help you get started.

View the original post : 
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3930753#3930753

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3930753


---
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642
___
JBoss-user mailing list
JBoss-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jboss-user