aspose file tools*
The moose likes JBoss/WildFly and the fly likes Lookup to EJB on JBOSS Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Products » JBoss/WildFly
Bookmark "Lookup to EJB on JBOSS " Watch "Lookup to EJB on JBOSS " New topic
Author

Lookup to EJB on JBOSS

Gopi Nathan
Greenhorn

Joined: Mar 16, 2003
Posts: 1
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 ..


Thx & Regards<br />Gops..
Murad Iqbal
Ranch Hand

Joined: Dec 09, 2003
Posts: 90
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

Joined: May 29, 2003
Posts: 1258
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 Stodard<br />SCJP, SCJD, SCWCD, SCBCD, SCDJWS, ICAD, ICSD, ICED
Nathaniel Stoddard
Ranch Hand

Joined: May 29, 2003
Posts: 1258
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

Joined: Nov 01, 2002
Posts: 363
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 ]

No more rhymes! I mean it!<br /> <br />Does anybody want a peanut?
Ran Pleasant
Ranch Hand

Joined: Jan 16, 2003
Posts: 75
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,


Ran
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Lookup to EJB on JBOSS