This week's book giveaway is in the Other Languages forum.
We're giving away four copies of Functional Reactive Programming and have Stephen Blackheath and Anthony Jones on-line!
See this thread for details.
Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Lookup to EJB on JBOSS

 
Gopi Nathan
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am tring to lookup a EJB in Jboss but, the lookup call is returning null. i am having deployable jar , which is done(ejbc) through weblogic.ejbc tool. What may be the problem? pls help ..
 
Murad Iqbal
Ranch Hand
Posts: 90
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Kindly inform if you got the solution to this problem as it has took a lot of my time and i am still stucked solving it.
 
Nathaniel Stoddard
Ranch Hand
Posts: 1258
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You're going to need to give more information than this. For one thing, lookup should throw an exception if a name isn't found, instead of merely returning null. (If I remember correctly.) I'd start by trouble-shooting and make sure it's being bound to the correct JNDI name, etc.
 
Nathaniel Stoddard
Ranch Hand
Posts: 1258
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You're going to need to give more information than this. For one thing, lookup should throw an exception if a name isn't found, instead of merely returning null. (If I remember correctly.) I'd start by trouble-shooting and make sure it's being bound to the correct JNDI name, etc.
 
Scott Duncan
Ranch Hand
Posts: 365
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Properties props = new Properties();
props.put(Context.INITIAL_CONTEXT_FACTORY,
"org.jnp.interfaces.NamingContextFactory");
props.put(Context.PROVIDER_URL, "localhost:1099");

Context ctx;
try {
ctx = new InitialContext(props);
HomeObj home = (HomeObj)ctx.lookup(jndi-name);

......
......
......

lookup should throw an exception if a name isn't found, instead of merely returning null. (If I remember correctly.)


Yes. You are correct.
[ July 17, 2004: Message edited by: William Duncan ]
 
Ran Pleasant
Ranch Hand
Posts: 76
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What was the solution to this problem?

I am having a similar problem calling a JBoss EJB from a WebLogic EJB. I am able to get a valid Naming context on JBoss and I can see that the EJB is listed in the context. I can access the EJB from a standalone application but when I call it from my WebLogic EJB I get a NamingException who's message is null.

Thanks,
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic