• 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
  • Tim Cooke
  • paul wheaton
  • Liutauras Vilda
  • Ron McLeod
Sheriffs:
  • Jeanne Boyarsky
  • Devaka Cooray
  • Paul Clapham
Saloon Keepers:
  • Scott Selikoff
  • Tim Holloway
  • Piet Souris
  • Mikalai Zaikin
  • Frits Walraven
Bartenders:
  • Stephan van Hulst
  • Carey Brown

WebSphere 5.1 EJB lookup in Network Deployment

 
Greenhorn
Posts: 16
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I am currently having a problem with looking up for EJBs deployed in my WebSphere network deployment environment. To lookup for the EJBs, I am using direct JNDI (i.e. without going thru EJB references).

I understand that in the network deployment we have to provide the prefix 'cell/clusters/<myclustername>/ejb/MyEJB'. Rather than having this prefix, is there are better way?

To solve this, a properties file can be introduced or there is a WebSphere API that can obtain the current Cell name. However, by having the properties file, every server would have to have a different properties file. This would not be a good practice and gives more work to the deployment team. And using the WebSphere API, the code cannot be reused in a standalone application (not in a J2EE container).

Any advice would be helpful. Thanks!
 
Ranch Hand
Posts: 4982
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator


a properties file can be introduced or there is a WebSphere API that can obtain the current Cell name.


Currently, up to WSAD 5.1.1, it does not support a properties file based JNDI configuration. Your idea sounds reasonable, however, the JNDI names are expected to be changed rarely, just like DNS names, thus, this concept is not introduced yet.

As I am still waiting for the copy for WSAD 5.2, I am not sure whether this concept will be introduced, or maybe in WSAD 6.0.

Nick
 
Paul Wong
Greenhorn
Posts: 16
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Just found another way around this which proved to work. Instead of having the PROVIDER_URL set to "iiop://localhost:2809", I have set it to "iiop://localhost:2809/cell/clusters/MyClusterName". After trying this out on WSAD's Universal Test Client, it seems to work.

Thanks
 
Nicholas Cheung
Ranch Hand
Posts: 4982
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator


Instead of having the PROVIDER_URL set to "iiop://localhost:2809", I have set it to "iiop://localhost:2809/cell/clusters/MyClusterName".


This works because you have explicitly change the binding from "iiop://localhost:2809" to "iiop://localhost:2809/cell/clusters/MyClusterName". However, this seems fixed the URL. If you later wanna add one more access path, you still cannot avoid to code the prefix there.

Seems that you are now moving the prefix hardcoding from JNDI to provider url.

Nick
 
Politics n. Poly "many" + ticks "blood sucking insects". Tiny ad:
Gift giving made easy with the permaculture playing cards
https://coderanch.com/t/777758/Gift-giving-easy-permaculture-playing
reply
    Bookmark Topic Watch Topic
  • New Topic