rmi

Java RMI Client access denied

烈酒焚心 提交于 2019-12-06 13:37:42
问题 I have a small Java RMI Server and Client program I'm writing. I have spent some time trying to figure out the error messages without success. The Client generates the following error: Trying to connect to: 127.0.0.1:3232 ERROR!!!: StockClient: main: Could not connect to the server: java.rmi.UnmarshalException: Error unmarshaling return header; nested exception is: java.rmi.UnmarshalException: Error unmarshaling return header; nested exception is: java.io.EOFException java.io.EOFException at

RMI JavaFX 2 - NotSerializableException error

旧时模样 提交于 2019-12-06 10:34:36
问题 I'm trying to send objects using Java RMI in a JavaFX 2 project, but when the following code runs it returns a NotSerializableException. My Admin class is Serializable and so is the super class. However it seems the exception is pointing towards the JavaFX SimpleIntegerProperty fields inside the Admin class. I don't know what to do from here as the class being sent via RMI is serializable. Any help much appreciated. ObservableList<Admin> data = null; try { data = FXCollections

Apache Spark and Remote Method Invocation

∥☆過路亽.° 提交于 2019-12-06 10:16:42
I am trying to understand how Apache Spark works behind the scenes. After coding a little in Spark I am pretty quite sure that it implements the RDD as RMI Remote objects , doesn't it? In this way, it can modify them inside transformation, such as map s, flatMap s, and so on. Object that are not part of an RDD are simply serialized and sent to a worker during execution. In the example below, lines and tokens will be treated as remote objects , while the string toFind will be simply serialized and copied to the workers. val lines: RDD[String] = sc.textFile("large_file.txt") val toFind = "Some

How to get client IP address in a JBoss remote EJB call?

谁说我不能喝 提交于 2019-12-06 08:04:51
问题 How to get the client IP address at the server-side when a EJB StatelessBean method is invoked through RMI/IIOP after a classical JNDI lookup ? With JBoss 6.1 I tried the method java.rmi.server.RemoteServer#getClientHost but it throws java.rmi.server.ServerNotActiveException: not in a remote call . Is there any way to get the information ? 回答1: Is it still embedded in the thread in JBoss 6.1? String currentThreadName = Thread.currentThread().getName(); and then parse from there? 来源: https:/

JBoss UnknownHostException when on different network

大憨熊 提交于 2019-12-06 07:57:44
问题 I'm having a bit of a problem with getting JBoss working across networks. As a quick overview, we have a development network (which I'll call DEV), and a client network (say.. CLIENT!). These are connected via a firewall. In the Dev network, the server is known as 192.168.100.50, on the client network it's known as 10.0.100.50. DNS in both networks resolve the relevant IP by DNS (sqlserver.dev.net). sqlserver provides 2 services, one via a .NET Web Service, the other by JBoss. When running

java rmi authentication & security. exportObject makes it public?

人走茶凉 提交于 2019-12-06 05:53:10
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 before any of the other RPC calls work. I found a simple suggestion online that looked like a good idea at first. interface LoginService implements Remote { public MainService login(String username, char[] password) throws RemoteException; } interface MainService

When does RMI make TCP connections?

醉酒当歌 提交于 2019-12-06 05:37:00
问题 I have a test program T which: Acquires a stub for a Remote object O from an RMI registry on server S In hundreds of parallel threads, invokes methods on this object O . I can see that server S has many "RMI TCP Connection" threads. I had expected there to be only one, since there is only one stub of O on T . How does this work? 回答1: RMI needs a connection per end-point per thread. It pools them at the client end, which in turn causes pooling at the server end as well, so it isn't actually as

closing rmi registry

余生长醉 提交于 2019-12-06 05:07:40
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 statements: unexportObject(remoteObj,true); LocateRegistry.getRegistry(3232).unbind("MessagePath"); //MessagePath - name of the remote reference But even after the execution of the aforeseen statements, rmi is listening for incoming requests at port 3232.I saw that

need help to run RMI Registry

只谈情不闲聊 提交于 2019-12-06 04:38:55
I'm implementing a simple RMI Server Client program in JAVA. I'm new to this actually. i have four java files. Stack.java import java.rmi.*; public interface Stack extends Remote{ public void push(int p) throws RemoteException; public int pop() throws RemoteException; } StackImp.java import java.rmi.*; import java.rmi.server.*; public class StackImp extends UnicastRemoteObject implements Stack{ private int tos, data[], size; public StackImp()throws RemoteException{ super(); } public StackImp(int s)throws RemoteException{ super(); size = s; data = new int[size]; tos=-1; } public void push(int p

RMI Server vs. RMI Registry

我只是一个虾纸丫 提交于 2019-12-06 04:23:01
On Oracle's FAQ page about Java RMI, it says: While the Java Remote Method Invocation (Java RMI) server can theoretically be on any host, it is usually the same host as that on which the registry is running, and on a different port. Even if the server is mistaken about its hostname or IP address (or has a hostname that simply isn't resolvable by clients), it will still export all of its objects using that mistaken hostname, but you will see an exception every time you try to receive one of those objects. I don't understand the difference between the RMI Server and the RMI Registry. I thought