Is
there a way that I can pass a reference of the object to the remote server,
register is “locally” on the server and still maintain the reference to the
remote object and not a local object representation of the remote
object?
-----Original
Message-----
From: John
McDonald [mailto:[EMAIL PROTECTED]]
Sent: Thursday, August 31, 2000 2:07
PM
To: 'jBoss'
Subject: RE: [jBoss-User] perplexing
problem
I
really appreciate your reply Marc. One note is that on the DreamBean site, the
JNP(java naming provider), which I think was written by Rickard, claims that
one can bind objects remotely. This is exactly what I need. Rickard..are you
out there. The link is: http://www.dreambean.com/jnp.html. It’s at the bottom
of the page. I haven’t specifically tried using his naming provider because I
assumed that it is was bundled with Jboss.
If
anyone has tried binding objects remotely, please let me know of your success.
In the mean time, I’ll open a bug report.
Thanks.
-jdm
-----Original
Message-----
From: marc
fleury [mailto:[EMAIL PROTECTED]]
Sent: Thursday, August 31, 2000 2:07
PM
To: jBoss
Subject: RE: [jBoss-User] perplexing
problem
that is
interesting I guess we never tried to get the naming service on a separate
machine, but we should do that as we move to production quality and offer
redundant naming services....
interesting, please
open a bug with this and we will try to see whether it is real. Any
information you can dig is useful john, thanks
marc
-----Original
Message-----
From:
[EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]]On
Behalf Of John McDonald
Sent: Thursday, August 31, 2000 1:26
PM
To:
'[EMAIL PROTECTED]'
Subject: [jBoss-User] perplexing
problem
I’m
trying to bind an object using jndi. It works great on my local machine, but
when I move the application to another machine and attempt to bind “over the
network” I get an NPE in NamingContext. I have to be missing something. Can
some please help me out with this. It’s driving me _crazy_.
This
is the Exception, and the Code is below.
I
looked at the source for NamingContext and line 251, and 222 are nothing.
<exception>
java.lang.NullPointerException:
at
org.jnp.interfaces.NamingContext.bind(NamingContext.java:251)
at
org.jnp.interfaces.NamingContext.bind(NamingContext.java:222)
at
javax.naming.InitialContext.bind(InitialContext.java:303)
at
com.tradingproduce.TestMemberRegistration.bindObject(TestMemberRegistration.java:84)
at
com.tradingproduce.TestMemberRegistration.<init>(TestMemberRegistration.java:23)
at
com.tradingproduce.TestMemberRegistration.main(TestMemberRegistration.java:27)
</exception>
Server
is the class which implements extends UnicastRemoteObject and implements the
remote interface(this is rmi specific, do I still have to do this for jndi?)
Jboss is running on 63.199.148.48 and naming is started on port 2101.
<code>
public
void bindObject(){
try{
if(System.getSecurityManager() ==
null){
System.setSecurityManager(new
RMISecurityManager());
}
ObjectSignatureFactory osf = new
ObjectSignatureFactory();
ObjectSignature signature =
osf.getObjectSignature(this);
System.setProperty("java.naming.factory.initial",
"org.jnp.interfaces.NamingContextFactory");
System.setProperty("java.naming.provider.url",
"63.199.148.48:2101");
Server
server = new Server();
//bind
that baby!
new
InitialContext().bind("/applet/" + signature.getSignature(),
server);
System.out.println("Server bound and
running..");
}catch(Exception
e){e.printStackTrace();}
}
</code>
What
am I missing here?
-jdm