|
Marc, Well, here is the problem I’m having. A remote object cannot register
itself over the network(per my last email). So I tried sending this object(in a
hashmap with some other data) to a servlet. I want the servlet to be responsible
for registering the object. The problem is that when I retrieve the remote
interface for this object(context.lookup(“someobject”)) and call a method on it,
for some reason a local copy of the object is being executed instead of the
remote object. I know this is happening because I have two console windows open:
one which represents the remote object and one for the servletserver. The
method I am executing simply prints some stuff to the console. The servlet server
window is written to, not the window for the remote object. I hope I explained that correctly. Any ideas? -----Original
Message----- come again? marc -----Original
Message----- 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----- 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----- 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----- 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 |
- [jBoss-User] perplexing problem John McDonald
- RE: [jBoss-User] perplexing problem marc fleury
- Re: [jBoss-User] perplexing problem Rickard �berg
- RE: [jBoss-User] perplexing problem John McDonald
- RE: [jBoss-User] perplexing problem John McDonald
- RE: [jBoss-User] perplexing problem marc fleury
- Re: [jBoss-User] perplexing problem Rickard �berg
- RE: [jBoss-User] perplexing problem John McDonald
- RE: [jBoss-User] perplexing problem marc fleury
- RE: [jBoss-User] perplexing problem John McDonald
- RE: [jBoss-User] perplexing problem John McDonald
- Re: [jBoss-User] perplexing problem Rickard �berg
- RE: [jBoss-User] perplexing problem John McDonald
- RE: [jBoss-User] perplexing problem John McDonald
- RE: [jBoss-User] perplexing problem John McDonald
