rmi

Is it possible to use RMI bidirectional between two classes?

Hi there! I want to share some information between two classes (A and B), which are running in different java programs. Instead of writing a whole communication protocol I want to use the java build-in rmi classes for that purpose. Currently class B is able to run a method which belongs to class A remotely. Is it somehow possible to use...

java RMI connection to server

I have a very simple rmi client / server application. I don't use the "rmiregistry" application though, I use this to create the server: server = new RemoteServer(); registry = LocateRegistry.createRegistry(PORT); registry.bind("RemoteServer", server); The client part is: registry = LocateRegistry.getRegistry(IPADDRESS, PORT); remote...

Change Default RMI Port (Java)

How can I change the default RMI port (1099). It could be as JVM parameter or via coding, it doesn´t matter. Thanks. ...

rmi over ssl/tls, any way to securely identify the caller?

hi everyone, is there any way to securely get the method invoker while running the called method (server-side)? i know there's a client string reachable through the server properties, but isn't it too "weak"? any way to get e.g. the client certificate owner? please give me a couple of hints, WILL RTFD right afterwards ;) thanks in ad...

rmi (over ssl): TWO tcp connections?

running a simple example with a minimal server that * has both rmiregistry functionality and a fixed listen port, both correctly in listen * which has a "blocking" (long-sleeping) method - this has been done to actually see what kind of connection is opening with netstat a minimal client * (client only, no callbacks) that connects (a...

How can I check if RMI is connected/can be connected?

I am want to have controlled if my rmiport is available and I can have my connection or if it is busy, not available or wathever. I know if it cannot connect it is shown an exception message, but I would like to have it under control, so if it cannot connect I want to show a message like "Connection Failed" and stop the process. (I am wo...

using rmic in netbeans

I have written rmi server code in netbeans 6.5. how can i use rmic in netbeans 6.5 so that i can create server_stub class? ...

Passing properties to a Spring context

I'm using Spring to handle RMI calls to some remote server. It is straightforward to construct an application context and obtain the bean for remote invocations from within the client: ApplicationContext context = new ApplicationContext("classpath:context.xml"); MyService myService = (MyService ) context.getBean( "myService " ); Howe...

closing rmi registry

Using RMI to pass String object from WebAppA to WebAppB.WebAppB is the RMIServer whereas WebAppA is RMIClient.I have added ContextListener in WebAppB, so that the rmi service starts right away when the context is initialized in tomcat.And in the contextDestroyed method of tomcat I am trying to close/shut down rmi using the following stat...

How do I tunnel RMI using Tomcat

Hi, I'd like to setup RMI to pass through port 80 on a java servlet.. (To pass through the firewall) I have a Tomcat server and i'm looking for the module that will catch the RMI http request and pass it to the RMI layer on the server machine. I've read that RMI automatically handles this on it's side. Is there a step-by-step guide to ...

Access Java RMI from .NET

Hi, I have a existing java based system which uses RMI. I do not have access to change this system. I want to be able to call the RMI api methods directly from .NET. What is the best way to accomplish this? Free or lowish cost preferred if its a third party component. Thanks ...

How do I have to configure a RMI environment so that I'm able to use it in a "real" network?

Hi there! Because I didn't want to implement a communication protocol for my client-server based application, I implemented a RMI client and a RMI server on both sides for the information exchange between the two components. If I try to use my application by starting the two components on the same machine, everything is working fine. ...

How to implement the Observer pattern with Java RMI?

I have a client that starts a long running process on the server. At regular intervals, I'd like to show the user what's happening in the background. The most simple approach is to poll the server but I'm wondering if there wasn't a way to implement the Observer pattern for this. Unfortunately, I'm using RMI to talk to the server and I f...

Remote JMX invocation failed with ClassNotFoundException: ... (no security manager: RMI class loader disabled

I try to invoke the method of MBean from web application from Tomcat. Target MBean is running under JBoss 4.2.3. Both Tomcat and JBoss applications use the same version of jar with the same class, but on invoking I see the following exception: Caused by: java.lang.ClassNotFoundException: ...thisClass... (no security manager: RMI class l...

Java RMI:display server logs on client

Hello, currently i am working on an rmi example which does the following. 1> RMI client starts a server. 2> Display logs from the server Side on the client console. I was able to achieve the first task(Point 1). now i am facing a big problem in redirecting a server logs to the client console. for displaying of logs in the clie...

Creating an RMI Proxy

I want to share information between Class A (Server) and class B (Client) over RMI, but to avoid firewall issues, I want to add a Class C (proxy) to forward requests from client to server, or from server to client. My first idea was to create a registry on the server and the proxy, and clients can lookup and call methods on the proxy, w...

Apache rewrite with implicit redirection.

Hi, I've been trying to do this for some time unsuccesfully. I'll say in advance that this is probably a newbie question so apologies but I do need some assistance with this. I am trying to redirect requests to cgi-bin/java-rmi.cgi to a servlet on tomcat (from apache). I've managed to redirect to the servlet successfully but I have no...

Using Java RMI, when exactly is the serialized object transmitted over the network ?

I am using RMI to implement some distributed algorithm, and since we're transmitting quite big objects, I'd like some precisions about when RMI transmits serialized objects over the network. Suppose I have a Remote classe with the following method. class MyServer extends Remote { public synchronized void foo (Bar bar) { ......

An RMIPRoxyFactoryBean factory in Spring?

I'm currently using a Spring RmiProxyFactoryBean to access remote services. Since requirements have changed, I need to specify at runtime a different host - there can be many of them - , but the remoteServiceInterface and the non-host components of the remoteServiceUrl remain the same. Conceptually speaking, I'd see a bean definition si...

race condition in RMI java - 2 client 1 server

hi all, i have two clients in two different processes that communicate through RMI with the server. my question is: what happends if both clients invoking the server's stub at the same time? thanks for you time, me ...