RMI and old implementation class

Posted on 2004-11-20
Last Modified: 2010-03-31
Suppose that I have an old class who was built for a local program. I don’t have the source code and I don’t want to make any changes on this class.
Is it possible to use this class in a RMI application, and how?
Any example or url?
Question by:thanassis
    1 Comment
    LVL 7

    Accepted Solution

    It should be possible, you would follow these steps :

    1) Implement your own RMI Server which wraps the main operations of the legacy class
    2) In the implementation of your  RMI Server, simply delegate incoming method calls to the legacy class

    Depending on the interface of the legacy class, you may have to jump through a few hoops to avoid any non-serializable parameters (in RMI, any parameter passed from client to server must be Serilizable).


    Featured Post

    How to run any project with ease

    Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
    - Combine task lists, docs, spreadsheets, and chat in one
    - View and edit from mobile/offline
    - Cut down on emails

    Join & Write a Comment

    Java contains several comparison operators (e.g., <, <=, >, >=, ==, !=) that allow you to compare primitive values. However, these operators cannot be used to compare the contents of objects. Interface Comparable is used to allow objects of a cl…
    Introduction This article is the second of three articles that explain why and how the Experts Exchange QA Team does test automation for our web site. This article covers the basic installation and configuration of the test automation tools used by…
    The viewer will learn how to implement Singleton Design Pattern in Java.
    This tutorial will introduce the viewer to VisualVM for the Java platform application. This video explains an example program and covers the Overview, Monitor, and Heap Dump tabs.

    734 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    25 Experts available now in Live!

    Get 1:1 Help Now