"Il y a peu de choses qui me soient impossibles..."
SCJP 1.4 - SCJP 6 - SCWCD 5 - OCEEJBD 6 - OCEJPAD 6
How To Ask Questions How To Answer Questions
Rob Spoor wrote:Until you've made sure it's not a network issue, don't even look at your code. So the first question is, can you open a telnet session to the RMI registry on the machine? Does telnet DFL0015 1099 work?
"Il y a peu de choses qui me soient impossibles..."
"Il y a peu de choses qui me soient impossibles..."
"Il y a peu de choses qui me soient impossibles..."
Tony Docherty wrote:Hi Stevens,
I used RMI a long time ago so the recommended way of doing things may well have changed (or maybe I never did it correctly in the first place) but as far as I remember I never had to set the java.rmi.server.hostname property.
I've looked back through some old code and the way I wrote it involved using LocateRegistry.createRegistry() rather than the InitialContext class and then using bind()/unbind()/rebind() on the returned Registry object to register/unregister objects. The name specified when binding an object through Registry was in the format of:
rmi://[host][:port][/[object]]
and if the host was omitted localhost was used instead and if port was omitted 1099 was used. I don't if this applies to the InitialContext bind() method as well and even if it does I'm not sure it actually helps you as you would still need to specify the host name but it may explain what is happening.
"Il y a peu de choses qui me soient impossibles..."
Now, in that old code of yours , would you happen to have a fragment or line that shows how to register a server object when the rmiregistry process is running on a machine other than the server's own platform?
(Weren't you away for a bit? Nice to have you back.)
"Il y a peu de choses qui me soient impossibles..."
Stevens Miller wrote:Hey, do we have a place here at coderanch to post "how to" or "white paper" documents? Every time I figure out how to do a new thing in Java, I tend to write one. It would be great to share them with others who do the same thing.
Paul Clapham wrote:
Stevens Miller wrote:Hey, do we have a place here at coderanch to post "how to" or "white paper" documents? Every time I figure out how to do a new thing in Java, I tend to write one. It would be great to share them with others who do the same thing.
Have a look at our (fairly) new Blog Around the Campfile forum.
"Il y a peu de choses qui me soient impossibles..."
Campbell Ritchie wrote:North Yorkshire, about 2 miles from the nearest salt water. We had about 45°F at 2.30pm, too, but our 2.30pm is different from your 2.30pm
"Il y a peu de choses qui me soient impossibles..."
Stevens Miller wrote:Do we (or might we) have a place for stuff like that?
Paul Clapham wrote:
Stevens Miller wrote:Do we (or might we) have a place for stuff like that?
There's our Java FAQ (you should have a link for it at the top of the page you're looking at now). It's a wiki so anybody can edit it. However it seems to me that how to configure RMI is more of an IAQ than an FAQ.
"Il y a peu de choses qui me soient impossibles..."
Tony Docherty wrote:
Now, in that old code of yours , would you happen to have a fragment or line that shows how to register a server object when the rmiregistry process is running on a machine other than the server's own platform?
It is/was as simple as:
"Il y a peu de choses qui me soient impossibles..."
Hey, just where are you guys? I know Winston is in exotic Belgium, and I think Tony is somewhere in England, but I'm not really sure.
Tony: That snippet you've posted has me in a spin. It appears that InitialContext and Naming both have bind methods, but neither is an "is-a" of the other. Further, my reading on remotely registering a server object with rmiregistry is telling me you can't do it (or, at least, you could not do it as of 2008; a lot about RMI seems to have changed since then, including the elimination of rmic from the process).
Tony Docherty wrote:
Hey, just where are you guys? I know Winston is in exotic Belgium, and I think Tony is somewhere in England, but I'm not really sure.
Unlike lucky old Campbell I'm just about as far from the sea as it's possible to get in England - a small town near to Birmingham.
Tony: That snippet you've posted has me in a spin. It appears that InitialContext and Naming both have bind methods, but neither is an "is-a" of the other. Further, my reading on remotely registering a server object with rmiregistry is telling me you can't do it (or, at least, you could not do it as of 2008; a lot about RMI seems to have changed since then, including the elimination of rmic from the process).
As I said earlier it is old code and I thought I had setup the registry on a remote machine in the test environment but either my memory is playing tricks on me or we weren't using the standard rmi registry. Here's an article showing how it possibly can be done by writing your own rmi registry implementation. http://www.drdobbs.com/jvm/a-remote-java-rmi-registry/212001090?pgno=1
"Il y a peu de choses qui me soient impossibles..."
Still looks like a nice place to visit.
Isn't it amazing that people in Europe save their money to visit the United States, while Americans save our money so we can visit Europe? Lesson in that, somwhere.
Tony Docherty wrote: It seems that it is human nature to want to be somewhere else and look more like someone else.
"Il y a peu de choses qui me soient impossibles..."
I can read small print by daylight at 10.30pm in June. Of course, it cuts both ways; it is pitch‑black by 4.00pm in December.Stevens Miller wrote: . . . Also awesome was seeing light in the sky at 10:30pm.
"Il y a peu de choses qui me soient impossibles..."
Stevens Miller wrote:Well, perhaps the way to look at it is that some of the discussion here addresses Qs that are not Java FAQs, but they are RMI FAQs. That list of FAQs looks like the ideal place for some of the more editorially acceptable HowTo files I've got to share. How does one add a new FAQ file?
Ulf Dittmer wrote:Since we don't have an RMI or networking FAQ, maybe https://coderanch.com/how-to/java/JavaIoFaq would be a good place to put such a link.
"Il y a peu de choses qui me soient impossibles..."
Ulf Dittmer wrote:I think it's fine to just put it up there. Wikis are perpetual works in progress anyway, so change is normal. You could also post a notice in the Ranch Office forum to let people know that it's there.
"Il y a peu de choses qui me soient impossibles..."
Getting married means "We're in love, so let's tell the police!" - and invite this tiny ad to the wedding:
Clean our rivers and oceans from home
https://www.kickstarter.com/projects/paulwheaton/willow-feeders
|