rmi

Eclipse RCP, RMI and Bundles

删除回忆录丶 提交于 2019-12-13 02:16:13
问题 I'm trying to combine Eclipse RCP with RMI. For that purpose I created six bundles: (In parenthesis are dependencies) Core: Interfaces for client and server Server(Core): Server implementation and Registry start class ServerApp(Server): GUI client which basically just instantiates the registry starter (and starts it on Activation) Client(Core): Client implementation ClientApp(Client): GUI client Now I started the serverapp, but I got a Caused by: java.lang.ClassNotFoundException: core.rmi

Executable RMI JAR file ClassNotFoundException for Stub

别说谁变了你拦得住时间么 提交于 2019-12-13 02:09:49
问题 I have a working RMI server program, which I can compile and execute directly from the .class files. However, when I am trying to create a JAR files for each of these programs, I got a ClassNotFoundException: ChatImpl_Stub leading to a RemoteException on execution. My manifest is (plus an empty line at the end) : Main-Class: Server Class-Path: chat-RMI-common.jar Where chat-RMI-common is a JAR file containing the Chat Interface for the client. I successfully created the JAR with : jar cvmf ..

Java rmi over the internet

不羁岁月 提交于 2019-12-12 18:04:22
问题 I am developing a game in Java using RMI for all network communication. RMI allows me to call method on my server, but it is not enough for me. I also want the server to be able to spread message among connected clients. My clients look up for the server (it's interface extends Remote) and register on it. It allows the server to know who is connected. My clients also implement an interface that extends Remote. Here is some part of my code: Interfaces declaration: public interface IServer

Spring: Properly setup @ComponentScan

為{幸葍}努か 提交于 2019-12-12 10:48:33
问题 I have following set up for my Spring Application Context . @Configuration public class RmiContext { @Bean public RmiProxyFactoryBean service() { RmiProxyFactoryBean rmiProxy = new RmiProxyFactoryBean(); rmiProxy.setServiceUrl("rmi://127.0.1.1:1099/Service"); rmiProxy.setServiceInterface(Service.class); return rmiProxy; } } @Configuration public class LocalContext { @Bean public Controller Controller() { return new ControllerImpl(); } } @Configuration @Import({RmiContext.class, LocalContext

Java: Sockets or RMI?

守給你的承諾、 提交于 2019-12-12 08:41:30
问题 I need to separate our application into a light-weight gui application and a business logic application. This won't be a client/server setup as such, as the 'server' component will only have one client. The other limitation in the application is that it has only one entry/exit point. Therefore if we were to use RMI, it would only ever be on one function. All form data is already wrapped up into a string and passed through one transport area. Should I just use Java Sockets to enhance this

How to remotely shutdown a Java RMI Server

自古美人都是妖i 提交于 2019-12-12 07:59:15
问题 I have a very simple Java RMI Server that looks like the following: import java.rmi.*; import java.rmi.server.*; public class CalculatorImpl extends UnicastRemoteObject implements Calculator { private String mServerName; public CalculatorImpl(String serverName) throws RemoteException { super(); mServerName = serverName; } public int calculate(int op1, int op2) throws RemoteException { return op1 + op2; } public void exit() throws RemoteException { try{ Naming.unbind(mServerName); System.out

how to learn Java RMI quickly

帅比萌擦擦* 提交于 2019-12-12 07:58:58
问题 I have a Java application I've been working on for a year or two now. I would like to create a very simple set (with potential to add complexity later) of interfaces that I can use to control my Java app from another JVM (e.g. MATLAB). I am assuming RMI is the best way to do this, but I'm not sure, as I know next to nothing about it. What is the best way to learn RMI quickly? Let's say I want to use an interface like this: interface Application { public void setLoggingEnabled(boolean enable);

Using single RMI Registry

浪子不回头ぞ 提交于 2019-12-12 07:15:13
问题 I've been using RMI for a project I am currently working on and I want to bind from multiple hosts to a single RMI registry. However when I attempt to do so I get an error saying java.rmi.AccessException: Registry.Registry.bind disallowed; origin / 192.168.0.9 is non-local host I did so googling and it seems that RMI stops remote hosts from binding by default, what I want to know is there some way of overriding or bypassing this? If anyone any suggestions on how to get past this issue they

what is the relay in RMI? [duplicate]

最后都变了- 提交于 2019-12-12 06:55:54
问题 This question already has answers here : what is stub on the “server” and what does skeleton mean? (7 answers) Closed 2 years ago . What is the relay in RMI ? I have been googling around for the call sequences but haven't got any satisfactory results. I am unable to understand the role of a stub on both client and server machine , what does RMI registery do after i start in the server machine ? When is the main server code like the following: import java.net.*; import java.rmi.*; public class

Secure authentication of client over RMI

孤街醉人 提交于 2019-12-12 06:33:44
问题 I was thinking to authenticate users of my RMI service like this interface RemoteService extends Remote { ... } interface RemoteServiceProvider extends Remote { ... } class RemoteServiceProviderImpl implements RemoteServiceProvider { RemoteService getService(String authCode) throws RemoteException { if (check(authCode)) return (RemoteService) UnicastRemoteObject.export(theRemoteService, 0); else throw ...; } } However, that's probably not really secure. I suspect that when the the real