rmi

Connecting to Websphere rmi server

Hi, I'm trying to do a remote call to remote object running as part of a application installed in Websphere. The end solution will be RPG to local java cilent to call remote service that calls the webservice. This mainly so we have one set of code to call the webservice and doing the xml parsing, plus the iSeries doesn't have direct ac...

ehcache auto-discovery (via multicast) between 2 instances on the same host

Hello I run 2 tomcat instances on the same host. Each instance runs the same web application which tries to communicate some ehcache caches via RMI replication. I use the autodiscovery configuration in ehcache so I don't have to explicitly define which are the hosts and which are the caches I want to replicate. The ehcache instances do ...

running rmi client server in a different process... unbound exception

i need to write a RMI client/server application that the server is running in a different process. when i am running my code in the same process everything is working fine, but when trying to run the server code in a new Process using ProcessBuilder pb = new ProcessBuilder( "java", "-cp",...

applet-server communication, how i can do it?

hi i have an applet and i must request to a web application to get data from server that is in database,i am workin with objects and it is very useful that server response me as objects !! how an applet can communcate with server? i think web services methode, RMI and... make me happy, but wich is the best and reliable? ...

Problem when unit-testing the stop method of my RMI Server

Hi all, I have implemented a RMI Server and now I wanted to test if the method to start and stop this server are correcly implemented, using a JUnit test. Here is the (simplified) code of my RMI server: public void startServer() { try { ... registry = LocateRegistry.createRegistry(serverPort); registry.rebi...

how to return arraylist of custom object from web service?

Hi, How can i get array list of custom object from web service? I define a method that returns a list like this : ArrayList<Car> getVehicle() {...} But in client ws, I receive an ArrayList of objects... It seems I can't cast it even by copying custom class to client jar file of my applet, like serialized object... How can i do that?...

Reconnect RMI client after server restart

I have an RMI server and a desktop RMI client. When I restart the server, I get errors in the client. Is it possible to restart the RMI connection without restarting the client? [EDIT] Here is the stacktrace: java.rmi.ConnectException: Connection refused to host: xxx.xxx.xxx.xxx; nested exception is: java.net.ConnectException: Con...

java rmi exceptions

I'm writing an rmi application. Everything works perfectly fine when i put the all classes in one directory. However, when i try to split the server part and the client part, it raises java.lang.ClassNotFoundException.myclasses It seems to be the Registry can't find that class on its CLASSPATH. I'm wondering how to I solve this problem? ...

ServerException is being thrown while binding RMI service

I'm trying to build simple echo server as RMI application (step by step as it's described in Sun tutorial). All source code is shown below, it's very simple: package test; import java.rmi.Remote; import java.rmi.RemoteException; public interface EchoServer extends Remote { public String sendString (String str) throws RemoteExcept...

java rmi client exceptions

I'm writing an rmi application. Everything works perfectly fine when i put the all classes in one directory(one single package). However, when i try to split the server part and the client part, exceptions happens to the client. Server works normally. Here is part of the stack trace of after exception happens: Exception in thread "main"...

RMI: Does the client have to have all implementations or just interfaces?

Does client have to have all implementations or just interfaces? In details: let we have remote interface Foo: public interface Foo extends Remote { FooMessage getFooMessage () throws RemoteException; void setFooMessage (FooMessage fm) throws RemoteException; } Communication between client and server is happening by means of ...

RMI client in a OSGi container

I need to expose a RMI-based system in an OSGi bundle. The RMI client "bundle" is a jar which I converted into a OSGi bundle using the bnd tool (I don't have access to the sources) and at least in eclipse everything seems to be fine, but when I try to connect to the RMI server, a ClassCastException is throwed, much probably because eithe...

rmi class can not found exception

I wrote an simple project using java rmi and exported to an executable jar file. When I tries to run it, sometimes i got exceptions and sometimes it works. When I specify -Djava.rmi.server.codebase=file:serverClasses/, it seems it didn't create the jar file correctly. Here is the stacktrace: java.rmi.ServerException: RemoteException oc...

java rmi authentication & security. exportObject makes it public?

The Question: When you UnicastRemoteObject.exportObject(instance). Does that instance now become publicly available to all clients. Even if a little tricky is required to find its port. This is the situation: I have a java RMI client/server setup and I wanted to add some authentication. Allowing the client to user a user/pass combo b...

How do you add GUI to this java program?

I know only basic stuff in java. And I need to create a GUI for this type of program. It shows your credit card info. It has some other classes and makes use of the rmiregistry. This works fine in console but I need to show it in a GUI. The first thing that promps here is to enter your name (java Shopper localhost my name). Then it shows...

What is the difference between RMI and Corba?

Possible Duplicate: RMI and CORBA Differences? What is the difference between RMI and Corba? ...

java.rmi.MarshalException

whenever I try to call my ejb from a client, I get this error : java.rmi.MarshalException: Failed to communicate. Problem during marshalling/unmarshalling; nested exception is: java.io.InvalidClassException: com.afrikbrain.util.message.MessageInfo; local class incompatible: stream classdesc serialVersionUI...

Java: Expected overhead of the rmi protocol

Hi there! Within my program I'm using two RMI servers, which provide different methods, to simulate a simple network protocol between two notebooks. From my trace log I can see that the transmission time of a "packet" currently varies between 850 and 1100 ms. Are the transmission times in the expected range? Is the overhead of the RMI...

Java RMI (Server: TCP Connection Idle/Client: Unmarshalexception (EOFException))

I'm trying to implement Sun Tutorials RMI application that calculates Pi. I'm having some serious problems and I cant find the solution eventhough I've been searching the entire web and several javaskilled people. I'm hoping you can put an end to my frustrations. The crazy thing is that I can run the application from the cmd on my deskt...

JAVA RMI Client side random ports

Hi, I have a java 1.4 RMI application. By using custom socket factory, I am running my RMI server in a particular port (5050). The problem is, when the RMI client application tries to communicate to RMI server from a different machine, random ports are being opened up in the client machine (Can see through TCPView.exe). Since, firewal...