• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Rob Spoor
  • Tim Cooke
  • Junilu Lacar
Sheriffs:
  • Henry Wong
  • Liutauras Vilda
  • Jeanne Boyarsky
Saloon Keepers:
  • Jesse Silverman
  • Tim Holloway
  • Stephan van Hulst
  • Tim Moores
  • Carey Brown
Bartenders:
  • Al Hobbs
  • Mikalai Zaikin
  • Piet Souris

Obtaining a Local Ref in WebSphere 5.0

 
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,
I am using WebSphere studio 5.0 to develop some EJBs. In particular I have an entity bean that I'd like to access from a session bean using the entity beans local interface andI've been having a few problems.
I've been looking around for how to get a local ref and from what I can work out I need to use a string in the following format
java:comp/env/[jndi Bean name]
to look up the bean from the JNDI context. I have specified the ejb-local-ref in my deployment descriptor as follows:
<ejb-local-ref id="EJBLocalRef_1043116534977">
<ejb-ref-name>WeatherStation</ejb-ref-name>
<ejb-ref-type>Entity</ejb-ref-type>
<local-home>com.blah.weather.ejb.WeatherStationLocalHome</local-home>
<local>com.blah.weather.ejb.WeatherStationLocal</local>
<ejb-link>WeatherStation</ejb-link>
</ejb-local-ref>
When I deploy and try and get a reference the lookup fails and on further inspection (via a session bean that lists the bindings for a particular string) there is nothing bound under the java:comp/env at all. I figure that this can't be correct and I must be doing something stupid!
Can anyone give me some pointers on how to get a local ref in websphere 5.0? thanks in advance
regards
Boyd
 
The government thinks you are too stupid to make your own lightbulb choices. But this tiny ad thinks you are smart:
Thread Boost feature
https://coderanch.com/t/674455/Thread-Boost-feature
reply
    Bookmark Topic Watch Topic
  • New Topic