aspose file tools*
The moose likes Websphere and the fly likes WebSphere 5.1 EJB lookup in Network Deployment Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of JavaScript Promises Essentials this week in the JavaScript forum!
JavaRanch » Java Forums » Products » Websphere
Bookmark "WebSphere 5.1 EJB lookup in Network Deployment" Watch "WebSphere 5.1 EJB lookup in Network Deployment" New topic
Author

WebSphere 5.1 EJB lookup in Network Deployment

Paul Wong
Greenhorn

Joined: Aug 14, 2002
Posts: 16
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!


SCJP, SCJD , SCBCD, SCMAD, SCDJWS, SCEA
Nicholas Cheung
Ranch Hand

Joined: Nov 07, 2003
Posts: 4982

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


SCJP 1.2, OCP 9i DBA, SCWCD 1.3, SCJP 1.4 (SAI), SCJD 1.4, SCWCD 1.4 (Beta), ICED (IBM 287, IBM 484, IBM 486), SCMAD 1.0 (Beta), SCBCD 1.3, ICSD (IBM 288), ICDBA (IBM 700, IBM 701), SCDJWS, ICSD (IBM 348), OCP 10g DBA (Beta), SCJP 5.0 (Beta), SCJA 1.0 (Beta), MCP(70-270), SCBCD 5.0 (Beta), SCJP 6.0, SCEA for JEE5 (in progress)
Paul Wong
Greenhorn

Joined: Aug 14, 2002
Posts: 16
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

Joined: Nov 07, 2003
Posts: 4982

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
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: WebSphere 5.1 EJB lookup in Network Deployment