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

JNDI lookup across different WebSphere6 profiles, impossible?

 
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi everybody,

I am experiencing some trouble trying to complete what looked like a very simple task, but got me stuck for days :'(

The thing is:
I have one WebSphere 6 base installation, with two profiles created.
Profile1: (myHostNode01Cell/nodes/myHostNode01/servers/server1; name server port: 2809)
Profile2: (myHostNode02Cell/nodes/myHostNode02/servers/server1; name server port: 2810)

I have an EJB deployed on Profile1's server (myHostCell01/nodes/myHostNode01/servers/server1/ejb/myEjb), and when I try to look it up from Profile2's server, using the following code:



I get the following output:



It seems that I cannot instanciate an InitialContext from one profile's server to another.

I have tried corbaname and corbaloc format for the provider url. I have also tried using ejb-ref, configured bindings (CORBA), with no success.


When I run this code from another server (in another machine), it just works fine.




Do you guys know if it is posible to access to a was6 profile's server JNDI namespace from another profile?

Thanks in advance!

[ October 09, 2006: Message edited by: Jaime Garc�a ]
[ October 09, 2006: Message edited by: Jaime Garc�a ]
 
author & internet detective
Posts: 41860
908
Eclipse IDE VI Editor Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Moving to our IBM forum since it something WebSphere experts would know.
 
author and cow tipper
Posts: 5009
1
Hibernate Spring Tomcat Server
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I think the issue you're hitting on has to do with the federated namespace.

You don't need to connect to the other servers JNDI context. You can connect to the context on the local server. However, you need to be able to locate the EJB.

"In this case, you could use the architecture dependent JNDI name,

Imagine an administrative cell named �soccer� and a node in that administrative cell named �worldcup� To find an EJB named �ejb/com/pulpjava/session/Timer� that is running on an application server named germany01 on the worldcup node, the topology dependent JNDI name used to perform the lookup would look like this:

cell/nodes/worldcup/servers/germany01/ejb/com/pulpjava/session/Timer

Notice how the JNDI name includes the name of the node, the server, and the EJB. The JNDI name is dependent upon the topology of the WebSphere environment."


Of course, this assumes that the two profiles are part of the same administrative domain. They are, right?

You can read more about JNDI naming with WebSphere here:

http://www.technicalfacilitation.com/get.php?link=naming

Cheers!

-Cameron McKenzie
 
Jaime Garc�a
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Cameron,

Unfortunately, the two profiles don't belong to an administrative domain, as they are part of a WAS 6 base installation (not ND), therefore, each standalone application server is located in a different cell. Of course, if the two profiles were federated into a deployment manager cell, I would not be facing this tricky problem, but installing ND is not feasible right now.

Thanks for your answer!
 
Cameron Wallace McKenzie
author and cow tipper
Posts: 5009
1
Hibernate Spring Tomcat Server
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Sorry for making the assumption that this was all part of a common administrative domain. We know what they say about assumptions.

I'm afraid you're going to have to treat them as two totally separate name servers.

I guess you're doing that, right?

My fear might be that your'e connecting to the wrong JNDI port. Do a netstat -a and see which ports the various namespaces are running on.

After that, you might want to do a dumpnamespace, which is a WebSphere utility. You can configure it to connect to the appropriate port. Make sure the JNDI server you are connecting to ACTUALLY HAS the object you are looking for bound to it.

You've got so many different ports running JNDI here, it could definitely get confusing. But is should also be doable. I think I may try it in my local test environment.

Cheers!

-Cameron McKenzie
 
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi!
I realize that this is a longshot since the thread is quite old, but anyway. Jaimito, did you ever get to the bottom of these cross-profile EJB-calls? I'm experiencing the same problems when trying to call an EJB deployed on WAS 6.0 from web module deployed on WAS 6.1.
 
Jaime Garc�a
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Anders, I could finally solved my very particular problem by the following workaround:

Turns out that because of some weird bug in websphere, you can't issue JNDI lookups across equally named servers of profiles that belong to the same installation; a simple renaming of one of the servers was enough to get the application working (renaming provided by some useful wsadmin scripts downloaded from IBM's site). Right now I don't have the link to the bug description page, but I'll post it once I can retrieve it.

Anyway, your problem seems to be very different though. Could you post some stacktrace or code so we can help you with yours?
[ January 07, 2008: Message edited by: Jaime Garc�a ]
 
Anders Lunden
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Jaime,
Thanks for the confirmation. I got to that conclusion myself and posted my findings at IBM developerWorks. I assumed that this was a bug, but I couldn't find a bug report of it. It would be interesting to see if you find that URL.

Thanks!
 
Jaime Garc�a
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
This is the technote where they explain why it happens:

http://www-1.ibm.com/support/docview.wss?rs=180&context=SSEQTP&dc=DB520&dc=D600&dc=DB530&dc=D700&dc=DB500&dc=DB540&dc=DB510&dc=DB550&q1=%22objectName%22+not+found&uid=swg21201631&loc=en_US&cs=utf-8&lang=en

The problem is not really considered as a bug, so no fixes for this other than satisfy this undocumented uniqueness restriction.
 
I wish to win the lottery. I wish for a lovely piece of pie. And I wish for a tiny ad:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic