How do I get my RMI Proxy to work

Hi there
I have created a nice RMI callback server and client - that works fine.
The server and client has to be able to run on seperate LAN's - LAN A and LAN B. The server is on LAN A and the client is on LAN B - furthermore I have a PC with connected to both LAN A and B on two different network adapters.
In order to make the server and client communicate - I have made a RMI proxy that implements both the server and client interface. Normally you specify that the RMI server should use LAN A or B by specifying the java.rmi.server.hostname property.
The problem is that the proxy only works on the LAN matching the specified java.rmi.server.hostname property. It seems the client also depends on the java.rmi.server.hostname property - probably because I use a callback implementation
Any suggestions to how I solve this ?

A url in Bug# 4880793 led me to a solution proposed by Peter Jones - JavaSoft East.
Well for some reason the java.rmi.server.hostname affects how all sockets are created by the RMI factories.
In order to control which adapter to use manually you will have to your create your own socket factories:
import java.io.*;
import java.net.*;
import java.rmi.server.*;
import javax.net.*;
public class MyClientSocketFactory implements RMIClientSocketFactory, Serializable {
private final String aCorrectHost;
public MyClientSocketFactory(String host) {
aCorrectHost = host;
public Socket createSocket(String host, int port) throws IOException {
return new Socket(aCorrectHost, port);
public boolean equals(Object obj) {
if (obj instanceof MyClientSocketFactory) {
MyClientSocketFactory other = (MyClientSocketFactory) obj;
return aCorrectHost == other.aCorrectHost;
return false;
public int hashCode() {
return aCorrectHost.hashCode();
import java.io.*;
import java.net.*;
import java.rmi.server.*;
public class MyServerSocketFactory implements RMIServerSocketFactory, Serializable {
public ServerSocket createServerSocket(int port) throws IOException {
return new ServerSocket(port);
public boolean equals(Object obj) {
if (obj instanceof MyServerSocketFactory) {
return true;
return false;
public int hashCode() {
return "MyServerSocketFactory".hashCode();
I have not got the time to be more specific - so I hope this will be help enough.
Kind regards
hjembaek

Similar Messages

  • I have a macbook pro version 10.7.5 and my mailbox will not open at all and comes up with a quit message even though it is not open. how can i get into my account. it works on my iPhone an i have internet and all other functions working on my computer

    I have a macbook pro version 10.7.5 and my mailbox will not open at all and comes up with a quit message even though it is not open. how can i get into my account. it works on my iPhone and i have internet and all other functions working on my computer

    Launch the Console application in any of the following ways:
    ☞ Enter the first few letters of its name into a Spotlight search. Select it in the results (it should be at the top.)
    ☞ In the Finder, select Go ▹ Utilities from the menu bar, or press the key combination shift-command-U. The application is in the folder that opens.
    ☞ Open LaunchPad. Click Utilities, then Console in the icon grid.
    Step 1
    Make sure the title of the Console window is All Messages. If it isn't, select All Messages from the SYSTEM LOG QUERIES menu on the left. If you don't see that menu, select
    View ▹ Show Log List
    from the menu bar.
    Enter the name of the crashed application or process in the Filter text field. Select the messages from the time of the last crash, if any. Copy them to the Clipboard by pressing the key combination command-C. Paste into a reply to this message by pressing command-V.
    When posting a log extract, be selective. In most cases, a few dozen lines are more than enough.
    Please do not indiscriminately dump thousands of lines from the log into this discussion.
    Important: Some private information, such as your name, may appear in the log. Anonymize before posting.
    Step 2
    In the Console window, look under User Diagnostic Reports (not "Diagnostic and Usage Messages") for crash reports related to the crashed process. The report name starts with the name of the process, and ends with ".crash". Select the most recent report and post the entire contents—the text, not a screenshot. I know the report is long. Please post all of it anyway.
    In the interest of privacy, I suggest that, before posting, you edit out the “Anonymous UUID,” a long string of letters, numbers, and dashes in the header of the report, if it’s present (it may not be.)
    Please don’t post other kinds of diagnostic report—they're very long and rarely helpful.

  • I am trying to use an education program that needs Java applets to install and use and it will not use Safari. When I download IE from the web it will not install. How can I get a browser that will work on my MacAir for travel use of this program?

    I am trying to use and education program that needs Java applets and it will not run on Safari. IE will not install from the web. How do I get a browser that will work to install so I can use this program when I travel.

    Try using FireFox. IE will only run on a Mac if you run Windows on the Mac.
    Windows on Intel Macs
    There are presently several alternatives for running Windows on Intel Macs.
    Install the Apple Boot Camp software.  Purchase Windows 7 or Windows 8.  Follow instructions in the Boot Camp documentation on installation of Boot Camp, creating Driver CD, and installing Windows.  Boot Camp enables you to boot the computer into OS X or Windows.
    Parallels Desktop for Mac and Windows XP, Vista Business, Vista Ultimate, or Windows 7.  Parallels is software virtualization that enables running Windows concurrently with OS X.
    VM Fusion and Windows XP, Vista Business, Vista Ultimate, or Windows 7.  VM Fusion is software virtualization that enables running Windows concurrently with OS X.
    CrossOver which enables running many Windows applications without having to install Windows.  The Windows applications can run concurrently with OS X.
    VirtualBox is a new Open Source freeware virtual machine such as VM Fusion and Parallels that was developed by Solaris.  It is not as fully developed for the Mac as Parallels and VM Fusion.
    Note that Parallels and VM Fusion can also run other operating systems such as Linux, Unix, OS/2, Solaris, etc.  There are performance differences between dual-boot systems and virtualization.  The latter tend to be a little slower (not much) and do not provide the video performance of the dual-boot system. See MacTech.com's Virtualization Benchmarking for comparisons of Boot Camp, Parallels, and VM Fusion. A more recent comparison of Parallels, VM Fusion, and Virtual Box is found at Virtualization Benchmarks- Parallels 10 vs. Fusion 7 vs. VirtualBox. Boot Camp is only available with Leopard and later. Except for Crossover and a couple of similar alternatives like DarWine you must have a valid installer disc for Windows.
    You must also have an internal optical drive for installing Windows. Windows cannot be installed from an external optical drive.

  • How do I get my iTunes store to work? I have updated my iTunes to the latest version but every time I go to open it, it is just a blank white screen. No writing or anything. Help!?

    How do I get my iTunes store to work? I have updated my iTunes to the latest version but every time I go to open it, it is just a blank white screen. No writing or anything. Help!?

    Oh, and it is on a macbook pro

  • How can I get my web cam to work in Adobe Connect ?

    This is actually an end user's question that I am having trouble answering to...
    We use Adobe Connect to give online language classes, the end user is one of the students.
    I cannot find the right Support answer to give him.
    Problem:
    My camera does not work when I connect to Adobe's rooms but camera works fine with other software.
    Even though I suspected my old camera was working fine, yesterday I went ahead and bought a new camera. 
    I thought perhaps my webcam software may have been a problem, so I bought a different type camera with different software. 
    Even after removing all the old software, same result:  
    I surmised the problem might be caused by my firewall and security software, so once I tried changing the permissions for Adobe, and my Webcam, but that didn’t work.   
    Another time, I restarted my computer right before class and then turned off my firewall completely so there would be no interference but to no avail. I’m totally perplexed.  
    Isn’t there anyone else experiencing a similar problem?   Has anyone else found a solution? 
    I run Windows Vista with McAfee Internet Security Software.  I always reboot the computer before class and open no other programs other than Google Chrome. 
    I now have a brand new Microsoft LifeCam Cinema Camera with LifeCam 3.5 Webcam Software. 
    I test my camera before going online.  It always works fine.   Then I shut down the camera program and login into class.   
    When I “connect webcam” in the room, the light on my camera comes on (suggesting that it is ON), but only a black image is transmitted to the room.

    Check to see if you have Google Voice installed. If so, remove it and see
    if your problem vanishes. If not Google Voice, check to see if you have
    any other communications software which interacts with your cam and
    disable it. This was the problem I had with a similar problem on a Mac.
    MosesJOI <[email protected]>
    10/13/11 12:08 PM
    Please respond to
    [email protected]
    To
    jsb152 <[email protected]>
    cc
    Subject
    How can I get my web cam to work in Adobe Connect ?
    Re: How can I get my web cam to work in Adobe Connect ?
    created by MosesJOI in General Discussion - View the full discussion
    Thanks a lot Heyward for the swift reply !
    I sent the advice out to the end user, but unfortunately this wasn't the
    solution.
    His reply is below :-
    The default resolution of my new camera is already set at 640x360, but I
    went ahead and tried several lower resolutions (e.g. 424x240; 320x240; and
    160x120) but none worked in the room - camera still showed up as black
    blank screen.  Also, as far as I can tell, I don’t have the option of
    adjusting the frame rate.
    I started playing around with my Internet Security Settings to see if they
    might be playing a role. So far, all to no avail.
    Hmm...quite a tricky one - webcams always are - maybe if he can find a way
    to adjust the frame rate (?).
    He's going to fiddle about with the settings a bit more and see if
    something does the trick.
    If anyone has had a similar problem and found an ingenious solution,
    please jot on a note on this thread.
    Replies to this message go to everyone subscribed to this thread, not
    directly to the person who posted the message. To post a reply, either
    reply to this email or visit the message page: [
    http://forums.adobe.com/message/3969561#3969561]
    To unsubscribe from this thread, please visit the message page at [
    http://forums.adobe.com/message/3969561#3969561]. In the Actions box on
    the right, click the Stop Email Notifications link.
    Start a new discussion in General Discussion by email or at Adobe Forums
    For more information about maintaining your forum email notifications
    please go to http://forums.adobe.com/message/2936746#2936746.

  • How can I get iCloud to accept my working Apple ID and password

    My Apple ID and password works for iTunes and App Store.  I'm trying to set up iCloud on my iPhone and iPad but i keep getting an error message that reads unsupported ID.  Apple ID must be in the form of email address (@me.com).  I don't have a MobileMe account. How can I get iCloud to accept my working Apple ID and password?

    I've also reset my password to my Apple ID. I still get the Unsupported ID and password.

  • I presently use iCloud and run a laptop PC plus an iPad2 and an iPhone 4.  I plan to travel and want to take my netbook, rather than the laptop PC for travelling.  How do I get my apple tools to work mwith a new, temporary PC?

    I presently use iCloud and run a laptop PC plus an iPad2 and an iPhone 4.  I plan to travel and want to take my netbook, rather than the laptop PC for travelling.  How do I get my apple tools to work mwith a new, temporary PC?

    ayorico15 wrote:
    It's not the pictures I'm worried about. I can get them off my phone without iTunes. 
    You can export ONLY Camera Roll photos and videos.
    ayorico15 wrote:
    All my apps were downloaded from my new apple ID. Not his.
    Sign in to iTunes Store (on desktop itunes) with your ID. Plug your iphone to itunes, right click on it and choose transfer purchases.Right click again and choose backup. Then you can sync with iTunes.
    ayorico15 wrote:
    It's not the pictures I'm worried about.  It's all my saved conversations
    Your conversations will not deleted if you sync with your iTunes.
    What is the problem with iCloud? iCloud has nothing to do with iTunes syncing.

  • How do I get the RSS feeds to work in iWeb'08 when published to FTP server?

    There are so many unresolved questions because I have published to an FTP server (Netfirms). HOWEVER, my next task at hand is to resolve the issue of a non-working RSS feed and download capabilities.
    The published website is www.vibrationalvoyages.com.
    When using Cyberduck to upload to Netfirms, I have to call the file name vibrationalvoyages.com because Netfirms organizes my files under a main folder called www (I also purchased the .org and .net extensions along with the singular spelling of the title, have forwarded those url's to the .com extension, which means I have different website names under Netfirm's main folder www, all pointing to www.vibrationalvoyages.com).
    I have to drop the www. in front of vibrationalvoyages.com when publishing to a folder on my computer so, when Cyberduck uploads the files into the main www folder, they are read correctly and published as www.vibrationalvoyages.com. In Cyberduck, the ftp address to upload is vibrationalvoyage.netfirms.com
    Before uploading, I use iTweak to insert the Statcounter tracking codes. Then, I use Rage to optimize the site to cut down on the weight (lots of photos). Then, finally, I get to upload which takes about an hour and a half.
    SO, HOW DO I GET THE RSS FEEDS TO WORK AS WELL AS THE OPTION TO DOWNLOAD AN MP3 RECORDED MEDITATIONS? I eventually also want to include the download option of podcasts.
    Please help! I am doing the best I can to stay in love with Mac but he is turning out to be a pot load of work and the love affair is wearing a little thin.
    I haven't even asked about why iWeb still calls some pages 'The family picnic" or why it switches the url addresses to the individual pages. Probably because in the early stages, I copied an entry rather than just do a new one... but I'll worry about that later. I want to get this 'fixed' first and then I'll address the issue, following Roddy's advice to another writer about installing a flash player, for easy download of the MP3 meditations and for when I record the lessons as podcasts. Until I get this RSS issue resolved, however, podcast downloads are out of the question!

    Thank you for checking, Tom,
    I'm confused. What do YOU get when you push the feed button? And why is it working on yours and not either of my machines?
    Today, my Mac (w/Safari 4) gets the same error message: Safari can’t open the page Safari can’t open the page “feed:http://vibrationalvoyages/vibrationalvoyages.com/DivineLight_Vibrations_Principles_andApplications/rss.xml”. The error is: “The feed could not be loaded because the content is not in a known feed format.”
    My little ASUS (with a Linux operating system) gets a screen that says "The requested URL was not found". The URL on that page is http://vibrationalvoyages./vibrationalvoyages.com/DivineLight_Vibrations_Principles_andApplications/rss.xml
    On both error messages, the URL I was checking was:
    http://www.vibrationalvoyages.com/DivineLight_Vibrations_Principles_and_Applications/Divine_Light_Vibrations_Principles_ andApplications.html
    The last URL was, of course, the URL generated by iWeb.
    So, my question still is:
    HOW CAN I GET MY FEEDS TO WORK PROPERLY? If the problem is there shouldn't be an http:// after feed: then, how do I get iWeb to set it up properly?
    Any ideas?
    GG

  • How do I get my Australian ipad to work in Sth Korea?

    How do I get my Australian ipad to work in Sth Korea? I'm in Jinju - went to the Apple desk at the Galleria, but they said I had to go to SK Telecom. I went to a small branch near my apt, and they said to go to a grocery store. I think I lost something in the translation.... I miss using my ipad - what do I need to ask for to get it working again (simm card? network provider? idk?), and who do I need to ask?! Hope you can help!

    How do I get my Australian ipad to work in Sth Korea? I'm in Jinju - went to the Apple desk at the Galleria, but they said I had to go to SK Telecom. I went to a small branch near my apt, and they said to go to a grocery store. I think I lost something in the translation.... I miss using my ipad - what do I need to ask for to get it working again (simm card? network provider? idk?), and who do I need to ask?! Hope you can help!

  • How can I get my excel spreadsheet to work in numbers

    How can I get this budget sheet to work in numbers when it's from excel.

    I couldn't get the picture of the whole thing it wouldn't load but you see where it say like 700.00 then below that it say 175.00 well that part works telling me what I need to know but when it get to where it says the 850 it stops working? it won't sum it out or something I'm not great with excel and this was sent to me by a first and it's our budget plan and I really need to be able to use it

  • How can I get my iPhone 5s to work in my 2015 outback

    How can I get my iPhone 5s to work in my 2015 outback?

    I Tried that and I can get calls out and in but no messaging.
    AWindow opens and says this feature is not supported  on this device
    my iPhone 4 worked fine   is it my iOS?

  • I just upgraded from my 2008 MacBook to a new Macbook Pro. How do I get my time capsule to work on my new MacBook? I did data migration, but the time capsule did not pick it up. Any ideas?

    I just upgraded from my 2008 MacBook to a new Macbook Pro. How do I get my time capsule to work on my new MacBook? I did data migration, but the time capsule did not pick it up. Any ideas?

    If you migrated all the info from time machine to your new MBP. The TM will usually ask to connect to the old backups.. sorry I am not sure is this what you want to do.. Personally I think you start a fresh backup.
    BTW Time Capsule does not do anything.. it is a dumb hard disk in a box.. it is TM that does everything.
    Look at B5 and B6 here about connecting to your backup.
    http://pondini.org/TM/Troubleshooting.html

  • How can you get the apple tv to work in a hotel where to get on the wifi you have to still go to a website first and put in your room

    How can you get the apple tv to work in a hotel where to get on the wifi you have to still go to a website first and put in your room?

    Welcome to the Apple Community.
    Unfortunately the Apple TV doesn't have a web browser so you can't do that.

  • How do I get the new iPod to work with iTunes

    I recently purchased a new iPod--I think it's the "Shuffle," whichever one retails for $150. When I plugged it into my iMac, it said I needed to install iTunes 10 to run it. When I checked for updates, it said that iTunes 9.xyz (whatever came after the 9) was the latest version.
    How do I get this new iPod to work. As you can tell, I am not much of a gadget junkie, and I'm a bit of a technology incompetent, which is why I purchased the Mac to begin with. I have an iMac, have no idea what operating system I am using--whatever came with it when I purchased it in November, 2008.
    TIA!

    Okay, I just looked and I do have 10.411. How do I upgrade to get the new iPod to work, and how much does the new operating system cost?

  • How do I get all my fonts to work. I upgraded the OS and the old fonts don't seem to work.

    How do I get all my fonts to work. I upgraded the OS and the old fonts don't seem to work.

    If the fonts are installed on the OS they should be there already. If they were only available to CS5 they are probably in the fonts folder in the Adobe section of the Common files (location will be OS dependent), or they may be in ID's own fonts folder.

Maybe you are looking for

  • Front Row with Extended Desktop

    Im interested in purchasing a new Macbook and using it along side my plasma. Is it possible to run Front Row from the macbook using its screen for the interface and displaying the content on the plasma via the extended desktop?

  • Dvd image error

    am trying to create an image and then burn a dvd i made on the MAC from a minidv tape. When i try to verify the image i get a message" unable to verify & 'has no checksum info to verify" & when a blank DVD is put in to burn, an error message: unable

  • ORA-12008 in MV refresh with no other errors

    I have a scheduler job that refreshes multiple MV's. When one fails, it only shows ORA-12012: error on auto execute of job 1258189 ORA-12008: error in materialized view refresh path No other errors show up either in the alert log or the resulting tra

  • Dynamic user creation

    hi all, i need to dynamicaaly create a username in incremental order on every click of the jsp.how do i do that

  • Auto-sync with iSync (feature request)

    I have my phone with me all the time when I'm sitting down at my computer and for a while I was using e2sync with Entourage (which is a terrible program btw), and I often have thought about how nice it would be if iSync could be set to try to auto-sy