Problems using RMI between linux and windows.

I have problems using RMI between linux and windows.
This is my scenario:
- Server running on linux pc
- Clients running on linux and windows PCs
When a linux client disconnect, first time that server try to call a method of this client, a rmi.ConnectException is generated so server can catch it, mark the client as disconnected and won't communicate with it anymore.
When a windows client (tested on XP and Vista) disconnect, no exceptions are generated (I tryed to catch all the rmi exception), so server cannot know that client is disconnected and hangs trying to communicate with the windows client.
Any ideas?
Thanks in advance.
cambieri

Thanks for your reply.
Yes, we are implementing a sort of callback using Publisher (remote Observable) and Subscribers (remote Observer). The pattern and relative code is very well described at this link: http://www2.sys-con.com/ITSG/virtualcd/java/archives/0210/schwell/index.html (look at the notifySubscribers(Object pub, Object code) function).
Everything works great, the only problem is this: when a Publisher that reside on a Linux server try to notify something to a "dead" Subscriber that reside on a Windows PC it does't receive the usual ConnectException and so tends to hang.
As a workaround we have solved now starting a new Thread for each update (notification), so only that Thread is blocked (until the timeout i guess) and not the entire "notifySubscribers" function (that contact all the Subscribers).
Beside this, using the Thread seem to give us better performance.
Is that missed ConnectException a bug? Or we are just making some mistake?
We are using java 6 and when both client and server are Linux or Windows the ConnectException always happen and we don't have any problem.
I hope that now this information are enough.
Thanks again and greetings.
O.C.

Similar Messages

  • Connect as sysdba between Linux and Windows without using password

    hello
    Hello
    I need to connect as sysdba between Linux and Windows without using password for the sys user
    Sqlplus /@string_connection
    Plz help me

    Duplicate post:
    Connect as sysdba between Windows and Linux
    Actually you have been given the answer in your above thread. You need to read the Oracle documentation. Search password file at tahiti.oracle.com
    regards

  • Different stringWidth between Linux and Windows

    When I use Ms Windows Arial Font in my Java Program running on Linux
    I found out the rendering result of the Font is different with same program running on Windows
    The Arial Font in Linux become wider, and this cause problem because i used absoule position.
    I am using Java 1.3.1, How can solve this problem??

    The Arial under Linux and Windows are not the same. Firts, they may be different font files, second, both systems uses different rendering engines to draw them. Also, some systems, as mine, won't have Arial font at all - substitute font will be used then. So, I would expect, you will have similar problems with any other font, any other operating system or even in some specific locales which uses reversed (right-to-left) line ordering. You will also be not able to do internationalization properly.
    Simply your application is not portable and written with breaking may portability rules. I hope, you are not doing it for money. The layout managers is the only existing aswer to your problem. The closest to absolute is a SpringLayout introduced in 1.4.x.
    The absolute location problem is not a bad thing in Java only - it can screw C, VisualC and CBuilder applications. Take some of them and tweek your system settings - use large fonts for buttons, tiny fonts for menu, change whatever OS provides you to be able to change in L&F and look what will happen with some of those applications. I would be really happy to have layout managers in CBuilder.
    regards,
    Tomasz Sztejka.

  • Applet font problem between linux and windows

    I just want to share my experience in several project i've taken part.
    In some projects, where all are developed under linux environment (suse 9.2),
    we use jasper report for report generation and use the web applet for our clients to print.
    They print ok in linux env, with the netscape 7.1, courier 10 font and jvm 1.4.2_06b version.
    But when accessed from windows env, with the same browser and the same jvm version, the applet and the print out are different from those of lin env. The headers and footers are missing. When the we edit/lower the header and footer size at the jasper report file, then they appears @ the window env.
    So strange that the font handling between win and lin differ (still my assumption). I'vent been able to solve this problem totally since the client must stick with one OS else the print out will be different.
    Quite dissatisfied, coz i really think i could code once the report and run it anywhere in the applet and behaves in the same way.
    Could anybody help ? T-T
    Regards,
    Albert Gan

    hi!
    this is my first post and i would like to ask if how did you create the web applet printing. im totally new to java and i dont know where to start.
    i hope that you can guide me or give me some instructions. thanks in advance =)

  • Oracle weirdness between Linux and Windows........Any ideas??

    Hi,
    I'm connecting to the same database which is on a linux server.....
    This is the weirdness I'm getting...
    ---Connecting via SQLDeveloper in Linux (ubuntu), I'm running the following:
    desc message_instance_attr
    Name                           Null     Type                                                                                                                                                                                         
    INSTANCE_NO                    NOT NULL NUMBER(10)                                                                                                                                                                                   
    A_NAME                              NOT NULL VARCHAR2(32 CHAR)                                                                                                                                                                            
    A_VALUE                            VARCHAR2(1024 CHAR)                                                                                                                                                                          
    OWNER                              NOT NULL VARCHAR2(3 CHAR)                                                                                                                                                                             
    LAST_UPDATED_DATE       DATE                                                                                                                                                                                         
    UPDATE_COUNT                NOT NULL NUMBER(8)                                                                                                                                                                                    
    6 rows selected----Connecting via SQL plus to the same database in Windows:
    SQL> desc message_instance_attr
    Name                                      Null?    Type
    INSTANCE_NO                               NOT NULL NUMBER(10)
    A_NAME                                        NOT NULL VARCHAR2(128)
    A_VALUE                                      VARCHAR2(4000)
    OWNER                                        NOT NULL VARCHAR2(12)
    LAST_UPDATED_DATE                 DATE
    UPDATE_COUNT                          NOT NULL NUMBER(8).
    Why is the Datatype limit different between the two even thoughI'm connected to the same database? for example why is A_VALUE on Linux VarChar2 (1024) and in Windows VarChar2 (4000)
    Thanks!

    Check this link -
    http://download.oracle.com/docs/cd/B10501_01/server.920/a90842/ch13.htm
    DESC is not standard SQL. It is SQL*Plus specific.
    Many tools may allow desc commands to describe the table structure - but not sure whether they act the same way.
    Why don't you use DESC from SQL*Plus from both windows & linux and let us know the output?
    Regards.
    Satyaki De.

  • Differing behavior loading external swfs between Linux and Windows

    I have a swf that loads several different swfs that implement the same basic class, some of these external
    swfs also import different resources from library swfs, such as font, video, and graphic assets.
    This seems to work perfectly well on both windows and Linux with using the font and graphic assets in
    the flash player (debug v 10r32), everything works as I'd expect.  I am added everything into the main swf's
    appdomain when using the loader (with loadercontext, etc).
    When I am loading the video asset class in the external swfs, it works fine on both systems for the first swf
    loaded that uses the video class.  On windows, whenever the second swf using the video library loads up, it
    gives a #1065 Reference error pointing to one of the variables used in the video asset swf.  It runs fine on Linux.
    I've tried playing around with the different AppDomain settings to no avail.  I am stumped as to why it would
    function perfectly well in Linux, but fail on Windows.  Any pointers as to where to look next?
    Thanks for any and all help,
    RP.

    In this case, it appears to be differing versions of the flexsdk that was being used to compile the application.
    Windows was using the default tarball from the adobe site,
    Linux was using a more up to date version from svn.
    I updated the svn snapshot, recompiled, set the Windows box to use it, and the error messages have disappeared.
    I can still crash the flashplayer doing other things, but it's more or less working exactly as expected now.
    RP.

  • Useing file between mac and windows

    I am new to Flash. My question is this, if I make
    presentation in Flash on a Mac, can I save the file and then use
    the same file on a Windows laptop for a presentation? I have Flash
    on my laptop (Windows) but my boss is having me make the
    presentations on the company Mac.
    Thank you

    Thank you. I did not know that there was soooo much to learn,
    even though "they" say it is simple to use.

  • Can I use icloud between Mac and Windows devices??

    I have over 140 gb of music on my windows desktop pc and will be purchasing an ipad soon.  I also have a windows laptop which i'd like to share my itunes library with. My current ipod is a 160 gb classic.  I have no problems updating that as long as the laptop/pc/ipad are synced.   If  I purchase the unlimited icloud storage will I be able to push the music to an Ipad or Iphone??  I'm eventually going to switch my next desktop to a Mac, but the incompatibility of the music collection I've collected over the years is my main deterrent.

    No, at the present time Airdrop is not supported on iOS devices.
    See here for compatible machines
    http://support.apple.com/kb/HT4783

  • Problems using homeshare between PC and Apple TV

    I have recently got an Apple TV 3rd gen. I'm trying to share my iTunes library from my Windows 7 Laptop with it. I've followed the guide and signed in with the same Apple ID on each device and clicked the share option, however th Apple TV still wont detect my laptop.
    There is no firewall blocking it and I've rebooted the laptop and Apple TV, any ideas on what I may be doing wrong please?
    Thank you in advance.

    @barlow1984,
    Are they both on WiFi connection or is one of them on wired ethernet? There are some users including me who are unable to connect Apple TV3 to iTunes Library on PC using mixed network connection mode. You may want to check/follow this thread too https://discussions.apple.com/message/19917583#19917583
    Message was edited by: LinuxFan

  • 1 hd with 2 file formats for use between mac and windows?

    Think this is the right forum...
    I want to instal a program onto an external hard drive for use on both mac and windows. The program supports both mac and windows.
    My plan is to get an external hd and partition it in half. One half i will format mac os extended and the other i will format ntfs. I'll instal the mac version on the mac partition and the windows version on the ntfs partition.
    This should work i'm thinking, yes? I.e. when i plug it into windows it'll run the windows installation no problem and when i plug it into the mac it'll run the mac installation no problem?
    Thanks.

    An easier solution might be to just connect the drive to a Windows PC and format it as FAT32. Both Windows (98 and higher) as well as Mac allow full read/write access to FAT32 formatted drives. No need to download any drivers, etc. It just works.
    Yes, this solution is not perfect, but none are. The free NTFS drivers for Mac are not most efficient drivers for speed/performance, the HFS+ drivers for Windows are not cheap, and have their own performance issues, and FAT32 has the limit of file sizes over 2GB (or is it 4GB now?) not supported. No one solution is perfect, but for the many one is better than the others, but it all depends upon their circumstances which is "better".

  • How to set owner-only access file permissions both on Linux and Windows

    Hi everybody.
    I have the following problem. I need to store some private user information in file system. So I need to set owner-only access permissions for some directory in user home. I did not find API for doing this. As I understand this is platform specific thing. Could anybody tell me how can I do this both on Linux and Windows?
    Thank you in advance.

    More ideas just came back to me (of something I did before)
    Each OS requires a different control.
    For Windows you will need to set the .policy file for each user (a pain if you have more than a dozen of clients) granting access (R or RW) to files/directories.
    Then you have to write some native code (access via JNI) to access/modify your authorization.
    A more professional solution that I used was J-Integra (other similar tool exist).
    Basically it is a bridge between Java and COM. It magically give you access to the COM API from Java (and vice versa).
    In my case it was to read/write/modify Winword documents transfered between PC and server.
    From memory you have to run the com2java.exe to build the bridge (classes in Java language) between the 2 families. Compile those classes and you have a "driver" for the COM (Microsoft Objects).
    Here I must confess my ignorance on Microsoft.
    Those COM objets must give you some easy/integrated access to the API for LDAP or Microsoft Active Directory Service (for centralize control with more complex setup).

  • Reset() of ObjectOutputStream diff in Linux and Windows

    From the previous post and my test, it is better to call ObjectOutputStream oos.reset() to clean up buffer.
    But I notice that it works all fine in Linux, but if the remote site is a Windows machine, if you call oos.reset(), the remote site will throw socket.reset Exception and close the socket, which is not good at all.
    So I have to disable oos.reset() call to avoid remote java socket in Windows close, but I get OutOfTheMemory error after running a while, I suspect it is caused by not calling reset() and clean up buffer. So what should I do to avoid this problem?
    Thanks

    It sounds like you are running different versions or a buggy of the JDK.
    What versions are you using?
    This works fine with 1.4.2_05 (between Solaris and Windows)

  • How to link Linux and Windows?

    hi,
    i would like to build an application which can link both linux and windows together so that the linux's users can communicate with windows's users without problem. But i don't know which java's technologies used to do this job. Java CORBA? Java RMI? or others? Can you help me?
    thanks a lot.
    from
    mercy

    if i want to build a messaging or chat program like ICQ, java.net package can be used so that ICQ Linux's users can send messages to ICQ windows's users?

  • Running jar in Linux and Windows

    Hi
    I created a jar file in Linux and it is running fine under Linux.
    But when I tried to run the same jar under windows,I got the following error
    Exception in thread "main" java.lang.NoClassDefFoundError:
    Is there any difference between running jar files in Linux and Windows?

    Hi
    I have a jar(say program.jar) containing a program which uses some libraries(again some jar files).The manifest file is written to look for the library jar files in the current directory.
    Main-Class: package_name.program_name
    Class-Path: fits.jar image.jar util.jar myutil.jar
    But while running the jar file in WINDOWS (java -jar program.jar <parameter list>)
    the following error occurs:
    Exception in thread "main" java.lang.NoClassDefFoundError:
    nom/tam/fits/Data"
    the class Data is present in the fits.jar jarfile.
    The same jar(run in the same manner)does not give any problems in Linux

  • Oracle DB sessions on Linux and Windows

    Actually I am confused the way session memory is allocated on 32 bit windows and linux OS.
    Windows is a thread based architecture where all user sessions are treated as threads of oracle.exe process. The addressable space is 4GB and oracle.exe can use up to 3GB in case you use /3GB switch in boot.ini file. It means that combined size of SGA ,PGA and other memory structures can not be more than 3GB. When a session gets connected with a database a PGA is allocated. It means that memory required by database sessions also comes from the 3GB limit. If your memory usage goes beyond 3GB you wont be able to connect new sessions with database or you would require to reduce the size of one of your SGA components.
    Linux is a process based architecture where each user session is treated as a separate process and has its own addressable space. Even on 32bit linux the addressable space is 4GB i.e. 2GB for process and 2GB for kernel. It means we need to accommodate our SGA and PGA in the 2GB limit (there are ways to increase the size of SGA but let assume we are doing nothing to raise the 2GB limit).
    As PGA is allocated for every session when it connects with database.
    My question is how PGA memory is allocated against a database session on linux.
    To further clarify my question I am stating the results of an experiment that I did on linux and windows.
    On windows I set the total size of SGA to 1730M and PGA aggregate target to 1024M. I was able to able to startup the database instance without any issue. Then I started connecting sessions with the database and even ran a query doing a heavy sort in one of the sessions but after connecting 10 sessions with DB I started getting ORA-12500 TNS Listener failed to start a dedicated server process error on windows.
    Then I did the same experiment on Red Hat Linux. SGA size was 1633MB and where as PGA aggregate target was only 10MB. I was unable to start instance when I set the SGA size more than 1633MB.
    With that setting I was able to connect more than 200 sessions with database inspite of running query doing heavy sort in 4 sessions without getting ORA-12500 error. I was even able to connect more than 400 sessions with database after setting PGA aggregate target to 1GB on Linux.
    Now my confusion is why linux was able to handle more DB sessions. I know it’s a process base model and each session is a separate process and has its own addressable space but as PGA is allocated against every session and PGA memory comes from 2GB limit then why PGA memory did not exhaust on linux. Is PGA allocated differently on linux as compared to windows?

    Perhaps the problem is easier to understand if you leave PGA_AGGREGATE_TARGET out of this issue completely.
    The out of memory problem you had, has nothing to do with PGA_AGGREGATE_TARGET setting directly. The difference in number of processes comes from architectural differences in how Oracle uses memory in windows vs unix.
    On windows the SGA + ALL PGAs must fit into one 4GB address space (in practice even smaller as youve noticed). This is because there's only one process, oracle.exe. One process = one address space.
    On Unix, you have many processes and every process can use portion of their own address space for PGA.
    So, on windows (32bit) you run out of address space for the single oracle.exe process. On unix you dont hit this limit just because the number of processes grows (but if some process wants to use a lot of PGA memory, then they eventually run out of address space (talking about 32bit again))
    On unix you probably ran into another limit - amount of total usable virtual memory (RAM+swap) available in your system
    Tanel Poder
    http://blog.tanelpoder.com

Maybe you are looking for