rmi

RemoteException java.rmi.UnmarshalException: error unmarshalling return [duplicate]

限于喜欢 提交于 2019-11-30 08:51:56
This question already has an answer here: java.rmi.ServerException: RemoteException occurred in server thread (ClassNotFoundException) 4 answers I'm running the program here on 2 JVMs on diff physical machines. I get the error RemoteException java.rmi.UnmarshalException: error unmarshalling return; nested exception is: java.lang.ClassNotFoundException: CalculatorImpl_Stub (no security manager: RMI class loader disabled) I've even tried running it on the same machine(unchanged program) and it works but it doesnt work on diff machines. Can someone pls help me out? @beny23- Thanks but I still end

Convert a Ruby on Rails project to a JRuby on Rails project

你离开我真会死。 提交于 2019-11-30 08:32:52
问题 is there any particular way to convert a Ruby on Rails project to a JRuby on Rails project? There now is a need to get the Rails side to talk to a Java server via RMI so was wondering how to make the conversion. Thanks. 回答1: As @Karl says, it pretty much works but there are a number of caveats you should be aware of: The database adapters will be different from the ones you may be used to. They're based on JDBC. For example, the MySQL adapter install is described here You will generally

EJBCLIENT000025: No EJB receiver available for handling?

这一生的挚爱 提交于 2019-11-30 05:16:15
问题 I am trying to connect to a remote EJB on my local JBoss 7.2 from an executable Java application (local not on JBoss). But I get the following error/Exception : java.lang.IllegalStateException: EJBCLIENT000025: No EJB receiver available for handling [appName:xx-xx, moduleName:xx-xx-business-impl, distinctName:] combination for invocation context org.jboss.ejb.client.EJBClientInvocationContext@14bc02d at org.jboss.ejb.client.EJBClientContext.requireEJBReceiver(EJBClientContext.java:693) at org

AppContext is null from rmi thread with Java 7 Update 25

岁酱吖の 提交于 2019-11-30 05:04:23
问题 We recently updated to Java 7 Update 25 from Update 21 and are now experiencing a null pointer exception when SwingUtilities.isEventDispatchThread() is called from an rmi thread becuase AppContext.getAppContext() is returning null. java.lang.NullPointerException at sun.awt.SunToolkit.getSystemEventQueueImplPP(Unknown Source) at sun.awt.SunToolkit.getSystemEventQueueImplPP(Unknown Source) at sun.awt.SunToolkit.getSystemEventQueueImpl(Unknown Source) at java.awt.Toolkit.getEventQueue(Unknown

rmi vs servlets vs sockets

时光毁灭记忆、已成空白 提交于 2019-11-30 03:29:38
what is the difference between socket programming, rmi and Servlets. When to use what? The Socket APIs are the low-level (transport level) abstraction by which a Java application interacts with the network, and by extension with remote clients and services. Socket and related APIs support reliable byte stream and unreliable messaging services. They are typically used for TCP/IP and UDP/IP, though other networking protocol stacks can (at least in theory) be supported. RMI is a framework and protocol family for implementing application-level networking between Java applications. It models

is it possible to pass by reference in RMI?

。_饼干妹妹 提交于 2019-11-30 03:13:58
问题 I have read various articles about passing variables around using RMI. Some of them say that it is impossible to pass variables by references in RMI. e.g.: this one and this one While others says that it is possible. e.g.: this one, this one and this one can anyone clear this up please? :) 回答1: Important note: if pass by reference means modifying argument value inside the method and change original variable in caller, you can't. If what you want to do is passing a copy of a reference to an

Most Efficient - Performance wise - for inter JVM communication

独自空忆成欢 提交于 2019-11-30 02:25:57
I have a Java application that require communication between different process. Process could run in same JVM or different JVM, but runs on the same machine. My application need to submit "messages" to another process (same or different JVM) and forgot about it. similar to messaging queue like IBM "MQ", but simple, and only use memory, no IO to hard disk for performance gains. I'm not sure what is the best approach from Performance prescriptive. I wonder if RMI is efficient in terms of Performance, I think it require some overhead. What about TCP/IP socket using local host? any other thought?

使用VisualVM的RMI方式远程监控JVM

醉酒当歌 提交于 2019-11-30 01:19:53
VisualVM是集成了多个JDK命令工具的一个可视化工具,它主要用来监控JVM的运行情况,可以用它来查看和浏览Heap Dump、Thread Dump、内存对象实例情况、GC执行情况、CPU消耗以及类的装载情况。 jstatd是一个rmi的server应用,用于监控jvm的创建和结束,并且提供接口让监控工具可以远程连接到本机的jvm 。jstatd位于 $JAVA_HOME/bin目录下,具体使用方法如下: 1,启动RMI服务 在需要被监控的服务器上面,通过jstatd来启动RMI服务 首先,配置java安全访问,将如下的代码存为文件 jstatd.all.policy: grant codebase "file:${java.home}/../lib/tools.jar" { permission java.security.AllPermission; }; 然后在jstatd.all.policy所在目录下,通过如下的命令启动RMI服务: jstatd -J-Djava.security.policy=jstatd.all.policy -J-Djava.rmi.server.hostname=192.168.100.175 2.启动VisualVM,添加远程主机 1)选择jstatd connection 2)输入端口信息,默认为1099 3)最终效果 来源:

RMI原理及实现

限于喜欢 提交于 2019-11-29 23:41:24
#0 系列目录# 聊聊远程通信 Java远程通讯技术及原理分析 聊聊Socket、TCP/IP、HTTP、FTP及网络编程 RMI原理及实现 RPC原理及实现 轻量级分布式 RPC 框架 使用 RMI + ZooKeeper 实现远程调用框架 深入浅出SOA思想 微服务、SOA 和 API对比与分析 聊聊同步、异步、阻塞与非阻塞 聊聊Linux 五种IO模型 聊聊IO多路复用之select、poll、epoll详解 聊聊C10K问题及解决方案 #1 简介# RMI是远程方法调用的简称,像其名称暗示的那样,它能够帮助我们查找并执行远程对象的方法。通俗地说, 远程调用就象将一个class放在A机器上,然后在B机器中调用这个class的方法 。 我个人认为,尽管RMI不是唯一的企业级远程对象访问方案,但它却是最容易实现的。与能够使不同编程语言开发的CORBA不同的是,RMI是一种纯Java解决方案。 在RMI中,程序的所有部分都由Java编写 。 #2 概念# 我在前面已经提到,RMI是一种远程方法调用机制,其过程对于最终用户是透明的:在进行现场演示时,如果我不说它使用了RNI,其他人不可能知道调用的方法存储在其他机器上。当然了,二台机器上必须都安装有Java虚拟机(JVM)。 其他机器需要调用的对象必须被导出到远程注册服务器,这样才能被其他机器调用。因此,

RMI vs. Web Services. What's best for Java2Java remoting?

十年热恋 提交于 2019-11-29 19:26:02
I'm new to both Web Services and RMI and I wonder which is the better way to do remoting between different web applications, when these applications are all written in Java, that is when different programming languages don't matter (which would be the advantage of WS). While on the one hand I would guess that there's a performance overhead when using web services (does anyone have some numbers to prove that?), on the other hand it seems to me that web services are much more loosely coupled and can be used to implement a more service-oriented architecture (SOA) (which isn't possible with RMI,