aspose file tools*
The moose likes Distributed Java and the fly likes RMI version problem Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Distributed Java
Bookmark "RMI version problem" Watch "RMI version problem" New topic
Author

RMI version problem

Martin Vanyavchich
Ranch Hand

Joined: Sep 16, 2008
Posts: 241
Hi,

I have a problem . In order to verify clients access to my application I have to use an RMI. The application server I'm running my app on has JVM 1.4 but the RMI is written in at least v5.0, it uses collection framework with abstract implementations ( List<String> and other features not avaliable in Java 1.4 ).

Is there an easy workaround to this problem or is there a trivial solution?
Should I write a web service to work as a fascade for the RMI?

Any help will be greately appreciated!

Thanks in advance, Martin.


SCJP 6, OCMJD 6, OCPJWSD 6
I no good English.
Martijn Verburg
author
Bartender

Joined: Jun 24, 2003
Posts: 3274
    
    5

Hi Martin and welcome to Javaranch!

Originally posted by Martin Ivancic:
Hi,

I have a problem . In order to verify clients access to my application I have to use an RMI. The application server I'm running my app on has JVM 1.4 but the RMI is written in at least v5.0, it uses collection framework with abstract implementations ( List<String> and other features not avaliable in Java 1.4 ).

Is there an easy workaround to this problem or is there a trivial solution?
Should I write a web service to work as a facade for the RMI?

Any help will be greatly appreciated!

Thanks in advance, Martin.


Just to clarify, your app is running on an app server that's limited to JDK 1.4 but the RMI code that the client wants to connect to your app with is JDK 1.5?

Do you have control over the code of the 'client'?


Cheers, Martijn - Blog,
Twitter, PCGen, Ikasan, My The Well-Grounded Java Developer book!,
My start-up.
Martin Vanyavchich
Ranch Hand

Joined: Sep 16, 2008
Posts: 241
Thanks for your response Martijn.


Yes, our app server is limited to JDK 1.4 (Oracle AS 10.1.3.) and RMI is written in JDK 1.5 (minor version 49.0). We could probably install another JDK enviroment on app sever if that would help.

I have control over the code of the client part. I'm suppose to write the client part . The technical documentation provided by developers of the RMI is very poorly written.

Because some methods use objects such as ArrayList<T> as parmeters or return values I doubt that JDK 1.4 can be used for the client part. Or am I wrong?

Regards, Martin.
Nitesh Kant
Bartender

Joined: Feb 25, 2007
Posts: 1638

I have not used it but it seems retrotranslator is one such library that can help you out.

Do let know if it happens to cure your pain
[ September 16, 2008: Message edited by: Nitesh Kant ]

apigee, a better way to API!
Martijn Verburg
author
Bartender

Joined: Jun 24, 2003
Posts: 3274
    
    5

Hi Martin,

Which RMI libraries are you trying to use? You should be able to use a JDK 1.4 compliant version of RMI, see Here for details. You can then install/use a JDK 1.4 on the client side and avoid compatibility problems

Hope that helps!
Mr. C Lamont Gilbert
Ranch Hand

Joined: Oct 05, 2001
Posts: 1170

Originally posted by Martin Ivancic:
Thanks for your response Martijn.


Yes, our app server is limited to JDK 1.4 (Oracle AS 10.1.3.) and RMI is written in JDK 1.5 (minor version 49.0). We could probably install another JDK enviroment on app sever if that would help.

I have control over the code of the client part. I'm suppose to write the client part . The technical documentation provided by developers of the RMI is very poorly written.

Because some methods use objects such as ArrayList<T> as parmeters or return values I doubt that JDK 1.4 can be used for the client part. Or am I wrong?

Regards, Martin.



Martin, the problem will not be Generics. Generics does not modify the class file itself. Furthermore, your problem will only be with serialization, not remote invocation. If you are only manipulating exported objects there is no concern. If your objects pass parameters which are not exported objects, then those will be serialized.


For serialized objects, the server will basically send the whole object and description across RMI, so that should be OK as well. The problem will be when the server uses a class that is not included in its library of classes it can send across the RMI. The client will choke if it can't fine the file and it cant download it across RMI. It will match the classes with their SerialVersionUID or whatever.
Mr. C Lamont Gilbert
Ranch Hand

Joined: Oct 05, 2001
Posts: 1170

after further consideration I don't think it will matter. If your app is running in 1.4 then it will likely only export objects 1.4 compatable. It can't export objects 1.5 compatable.

Should be a non-issue.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: RMI version problem