The Source for Java Technology Collaboration

Home » java.net Forums » GlassFish » GlassFish

Thread: Is it possible to use Glassfish as COSNaming service

Welcome, Guest Help
Login Login
Guest Settings Guest Settings
This question is not answered. Helpful answers available: 2. Correct answers available: 1.

Reply to this Thread Reply to this Thread Search Forum Search Forum Back to Thread List Back to Thread List

Permlink Replies: 3 - Last Post: Aug 19, 2007 11:02 PM by: krippa
krippa

Posts: 32
Is it possible to use Glassfish as COSNaming service
Posted: Aug 14, 2007 12:32 AM
 
  Click to reply to this thread Reply

Hi

I am trying to bind a Remote RMI-IIOP stub in a naming service. Doing so by creating the default InitialContext doesn't seem to work. I read something in a thread saying that it is "because you are supposed to use the COSNaming service with IIOP". Isn't the default configuration in glassfish a cosnaming service (the one in jndi.properties)? Can I configure glassfish to provide one? How? Or do I have to bind my stubs with the naming service provided by orbd (<JDK_HOME>/bin/orbd.exe)?

Thanks
Kristofer

cowwoc

Posts: 1,055
Re: Is it possible to use Glassfish as COSNaming service
Posted: Aug 14, 2007 8:37 PM   in response to: krippa
 
  Click to reply to this thread Reply

This is very reminicant of an old thread I posted a few months ago. I don't remember all the details and I have since moved on but to my recollection the answer from the Glassfish team was that Glassfish's IIOP stack is not COSNaming based (whatever that means) and as such it was impossible to use the built-in RMI support from the JDK against a Glassfish application.

In other words, unless you bundle some 7MB jar file that comes with Glassfish, you will not be able to communicate with the server.

Now, I could be completely wrong (again, it's been a while and I'm no expert) so if anyone knows better please let us know :)

Gili

kcavanaugh

Posts: 26
Re: Is it possible to use Glassfish as COSNaming service
Posted: Aug 17, 2007 8:15 PM   in response to: krippa
 
  Click to reply to this thread Reply

If you are using the default service provider in the JDK, it does not know where
the app server is listening for requests (and thus the address of the GlassFish
root naming context). A partial solution is to create an ORB instance
with ORBInitialHost and ORBInitialPort set to point to the GlassFish instance,
and then pass that ORB instance to JNDI through a property (the name of which
I cannot remember at the moment). But this will only allow very simply IIOP
communications with the app server. If you want security (CSIv2) or
IIOP failover and load balancing, you must use the appserver jar file to get
those capabilities. You still need to set the host and port in that case as well.

krippa

Posts: 32
Re: Is it possible to use Glassfish as COSNaming service
Posted: Aug 19, 2007 11:02 PM   in response to: kcavanaugh
 
  Click to reply to this thread Reply

What do you mean it does not know where the app server is listening for requests? What type? Because it does at least know (config from appserver jar) where JNDI is set up because I can connect and get resources from there.

It seems that the solution you describe would start the orbd naming service and then keep a reference to it in JNDI, am I right? I suppose that this in turn means that I always have to start orbd because this is a COS Naming service as opposed to the Java EE naming service started up with glassfish, correct?

In short, I will assume this means that I have to start orb if I need a COS Naming service because the Java EE naming service started with glassfish does not provide this functionality.




 XML java.net RSS