rmi

几种通讯协议的比较RMI,Httpinvoker,Hessian,Burlap,webservice

元气小坏坏 提交于 2019-12-06 04:17:03
一、综述 本文比较了RMI,Hessian,Burlap,Httpinvoker,web service等5种通讯协议的在不同的数据结构和不同数据量时的传输性能。RMI是java语言本身提供的通讯协议,稳定高效,是EJB的基础。但它只能用于JAVA程序之间的通讯。Hessian和Burlap是caucho公司提供的开源协议,基于HTTP传输,服务端不用开防火墙端口。协议的规范公开,可以用于任意语言。Httpinvoker是SpringFramework提供的远程通讯协议,只能用于JAVA程序间的通讯,且服务端和客户端必须使用SpringFramework。Web service是连接异构系统或异构语言的首选协议,它使用SOAP形式通讯,可以用于任何语言,目前的许多开发工具对其的支持也很好。 测试结果显示,几种协议的通讯效率依次为: RMI > Httpinvoker >= Hessian >> Burlap >> web service RMI不愧是JAVA的首选远程调用协议,非常高效稳定,特别是在大数据量的情况下,与其他通讯协议的差距尤为明显。HttpInvoker使用java的序列化技术传输对象,与RMI在本质上是一致的。从效率上看,两者也相差无几,HttpInvoker与RMI的传输时间基本持平。Hessian在传输少量对象时,比RMI还要快速高效

RMI and JMX Socket Factories

断了今生、忘了曾经 提交于 2019-12-06 03:29:17
I'm trying to start an embedded JMX server in my java app. I want to use the same port for the RMI Registry and for the actual RMI traffic (or JMX traffic if you like). Apparently this is possible since the RMI Registry is merely a Remote Object itself . The added difficulty is that I need to use Socket Factories because I need to bind to a specific NIC. I start off by: int registryPort = 3012; int jmxPort = 3012; // use the same port and here's my server socket factory. Pretty straight-forward stuff: public class MyRMIServerSocketFactory implements RMIServerSocketFactory { private final

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

心已入冬 提交于 2019-12-06 02:36:50
问题 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 not manage to find each other and communicate: DEBUG (RMIBootstrapCacheLoader.java:211) - cache peers: [] DEBUG (RMIBootstrapCacheLoader.java:133) - Empty list of

What could cause RMI method calls to fail intermittently?

那年仲夏 提交于 2019-12-06 02:21:38
Long story short, I have an RMI Server and Client. The Server and Client are capable of making RMI calls on each other. After the Client connects to the Server, the Server may make many hundreds of method calls in quick succession on the Client. The problem is this - towards the end of a huge batch of Server-to-Client method calls, some will fail because RMI claims it cannot establish a connection from Server-to-Client, even though hundreds of calls before it will succeed. I can't post any real code because this project is rather large (about 50k lines), but here's the full stack trace of the

Spring Distributed Transaction Involving RMI calls possible?

巧了我就是萌 提交于 2019-12-06 02:16:51
问题 Background I have Spring Client application that provisions a service to two servers using RMI. In the the client I save an entity to the database (easy) and make rmi calls to two servers with details of the entity. I am using Spring 3.0.2 on the servers and the client is a simple Spring-mvc site. Requirements My requirement is that if any of the rmi calls fail to the servers that the whole transaction rolls back, that is the entity is not saved on the client and if either rmi call was

Do we really need to create Stub in java RMI?

六月ゝ 毕业季﹏ 提交于 2019-12-06 01:19:24
问题 I am reading some RMI document and all the books say that we need to create Stub for the client in order to communicate with the server. However, I have tried to not create stub and things worked like a charm. I have put the client program on one machine and the server on another, things worked perfectly. So, what is actually the purpose of creating Stub and do we really need to create one? Thanks. 回答1: Since Java 1.5 you don't have to: This release adds support for the dynamic generation of

RMI connection refused

梦想与她 提交于 2019-12-06 00:25:29
I am trying to get a rmi connection going. I have ran into many security issues but have been unable to find a way past all this. I execute my jar file with: java -Djava.security.policy=java.security.AllPermission -jar "myjarfile" The code I have been using to create this is: public class server { public static void main(String args[])throws Exception { if (System.getSecurityManager() == null) System.setSecurityManager ( new RMISecurityManager() { public void checkConnect (String host, int port) {} public void checkConnect (String host, int port, Object context) {} }); try { sampleserverimpl

How to implement the Observer pattern with Java RMI?

早过忘川 提交于 2019-12-05 18:22:14
问题 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 fear that I have to turn my client into an RMI server for this. Is there another way that I'm missing? 回答1: http://sites.google.com/site/jamespandavan/Home

tomcat过滤器异常

浪尽此生 提交于 2019-12-05 14:45:25
Connected to server [2019-11-25 04:40:58,976] Artifact DUBBO_BG:Web exploded: Artifact is being deployed, please wait... 25-Nov-2019 16:40:59.167 警告 [RMI TCP Connection(3)-127.0.0.1] org.apache.tomcat.util.descriptor.web.WebXml.setVersion 未知版本字符串 [4.0]。将使用默认版本。 25-Nov-2019 16:40:59.295 严重 [RMI TCP Connection(3)-127.0.0.1] org.apache.catalina.core.StandardContext.startInternal 一个或多个筛选器启动失败。完整的详细信息将在相应的容器日志文件中找到 25-Nov-2019 16:40:59.295 严重 [RMI TCP Connection(3)-127.0.0.1] org.apache.catalina.core.StandardContext.startInternal Context [] startup failed due to previous errors 25-Nov-2019 16:40:59

How to enable WebDAV in Adobe AEM?

人盡茶涼 提交于 2019-12-05 13:55:30
I am trying to access Adobe AEM via WebDAV, however, I cannot get it to work. I am running the out-of-the-box crx-quickstart, so I am using port 4502 and the default workspace. I am using Windows Explorer as the WebDAV client, which I use to connect to Sharepoint without difficulty. These seem to be the only instructions for connecting to AEM via WebDAV. http://dev.day.com/docs/en/crx/current/how_to/webdav_access.html The instructions imply that you just point your WebDAV client at the following URL and you are golden. However, I cannot seem to get it to work. http://localhost:4502/crx