Randy Schnier

Greenhorn
+ Follow
since Aug 01, 2006
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
In last 30 days
0
Forums and Threads

Recent posts by Randy Schnier

Originally posted by Harvey Chan:
I noticed that seems looking up Local Object using
WebSphere 5 is like this...

xxx.lookup("local:/ejb/xxxx")

Can anyone tell me whether this is VENDOR specific???



Not only is it vendor-specific, it's not supposed to be used at all by application code. It's an internal implementation aspect of WAS (used only by other parts of WAS itself) and may change or be eliminated at any time.

The supported, vendor-independent way to do local EJB lookups is to create an ejb-local-ref and ejb-link in the calling component, point the ejb-link at the target EJB, and look up the local home in the java:comp/env namespace at whatever name was assigned to the ejb-local-ref. If you do it this way, it will work correctly on any J2EE-compliant appserver.

Randy Schnier
IBM Websphere
Don't ever use the local: context from application code. The local: context is a hidden, internal implementation aspect of WAS and it may change or be eliminated at any time. The only supported mechanism for looking up local EJB homes in WAS is to create an ejb-local-ref and ejb-link in the calling component, point the ejb-link at the target EJB, and look up the local home in the java:comp/env namespace at whatever name was assigned to the ejb-local-ref.

Randy Schnier
IBM WebSphere

Originally posted by Jeanne Boyarsky:
Kiran,
If it works in the UTC (as it should), but not in the JNDI lookup, something is wrong with the JNDI string. Are you using the format:
"local:ejb/ejb/com/..." ?

If you don't have the "local:" part, WebSphere assumes you want the remote interface.