rmi

How to improve the performance of Client-Server Architecture Application?

浪子不回头ぞ 提交于 2019-12-04 16:04:27
We have a product built on the Client-Server architecture. Some details about the technology stack used. Client - Java Swing Server - RMI Java Database - Oracle The clients are located at different parts of the world but the java server & the oracle database are located on the same machine in Sweden. Because of this there is a lot of network latency. The clients located at distant locations have terrible performance. The application is used for processing files with the size over 50MB. Each operation in general requires about over 1000 Network calls. Based on your experience, how do you tackle

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

蹲街弑〆低调 提交于 2019-12-04 15:43:28
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 ? Is it still embedded in the thread in JBoss 6.1? String currentThreadName = Thread.currentThread().getName(); and then parse from there? 来源: https://stackoverflow.com/questions/10395165/how-to-get-client-ip-address-in-a-jboss-remote-ejb-call

JBoss UnknownHostException when on different network

ぃ、小莉子 提交于 2019-12-04 13:48:05
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 the client on the DEV network, both services work fine. When on the CLIENT network, only the .NET service

Java RMI : What is the role of the stub-skeleton that are generated by the rmic compiler

拈花ヽ惹草 提交于 2019-12-04 13:19:03
问题 I am currently learning Java RMI (Remote Method Invocation), and I followed the tutorial provided by Oracle on it´s website. I have a particular question however: What is the use of the stub-skeleton generated by rmic? Do I really need it? 回答1: The Stub/Skeleton hides the communication details away from the developer. The Stub is the class that implements the remote interface. It serves as a client-side placeholder for the remote object. The stub communicates with the server-side skeleton.

Is it possible to interrupt a Java RMI call?

房东的猫 提交于 2019-12-04 11:20:50
问题 We're doing some prototyping work and we're wondering if it is possible to interrupt a thread that performed an RMI call. If we call interrupt() on this thread, would it throw an InterruptedException? (or should it?) Our testing currently shows it doesn't. Just wondering how it should be. 回答1: The Interruptible RMI library provides a mechanism to interrupt RMI calls. Typically when a thread invokes an RMI method, the thread blocks until the RMI method returns. If the method call is taking too

When does RMI make TCP connections?

可紊 提交于 2019-12-04 10:36:57
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? 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 bad as that, but if you have 1000 threads performing RMI calls at the same instant there will certainly be

What is rmic in RMI?

混江龙づ霸主 提交于 2019-12-04 10:11:33
I like to know what is rmic in RMI and how does it create proxies for me.. To answer your question, rmic [ Solaris , Windows ] is the Java RMI compiler and it generates stubs, skeletons, ties for remote objects using either the JRMP or IIOP protocols. Also generates OMG IDL. Regarding the how, your question is a bit vague but the answer might be something like it complies to the JRMP protocol or IIOP protocol or CORBA IDL specification. Have look at the provided link(s) for a description of these various concepts. If this sounds like Chinese to you, you should probably look at the RMI tutorial

SPRING注解发布RMI/HTTPInvoker/Hessian/Burlap服务

老子叫甜甜 提交于 2019-12-04 08:30:30
最近做系统重构,计划将多个系统的公共部分抽取出来作为一项公共服务,为以后项目维护和横向扩展奠定基础。 常用的服务发布方式有RMI / HTTPInvoker / Hessian / Burlap,关于这几类java远程服务的性能比较和优缺点大家可参考:http://www.cnblogs.com/jifeng/archive/2011/07/20/2111183.html ,本文着重讲解怎样使用自定的注解标签,结合SPRING将服务方便的发布出去。 一、 Maven配置 <dependency> <groupId>junit</groupId> <artifactId>junit</artifactId> <version>4.7</version> <scope>test</scope> </dependency> <dependency> <groupId>org.springframework</groupId> <artifactId>spring-core</artifactId> <version>3.1.1.RELEASE</version> </dependency> <dependency> <groupId>org.springframework</groupId> <artifactId>spring-context</artifactId> <version

java RMI 源码总结(个人理解)

◇◆丶佛笑我妖孽 提交于 2019-12-04 08:03:49
明天早上详细写下两个过程: 1、初始化过程(服务器) 2、客户端调用过程(包括客户端流程、调用服务端流程、返回客户端流程) 当客户端通过RMI注册表找到一个远程接口的时候,所得到的其实是远程接口的一个动态代理对象。 当客户端调用其中的方法的时候,方法的 参数对象 会在 序列化之后 ,传输到服务器端。 服务器端接收到之后,进行 反序列化 得到参数对象。 并使用这些参数对象,在服务器端调用实际的方法。 调用的返回值Java对象经过序列化之后,再发送回客户端。 客户端再经过反序列化之后得到Java对象,返回给调用者。 这中间的序列化过程对于使用者来说是 透明的 ,由 动态代理对象自动完成 。 除了序列化之外,RMI还使用了 动态类加载技术 : 当需要进行反序列化的时候,如果该对象的类定义在当前JVM中没有找到,RMI会尝试从 远端下载所需的类文件定义 。 可以在RMI程序启动的时候,通过JVM参数java.rmi.server.codebase来 指定动态下载Java类文件的URL 。 具体执行笔记参看代码注释 https://gitee.com/jly521/rmi-server.git https://gitee.com/jly521/rmi-client.git 来源: oschina 链接: https://my.oschina.net/u/3847203/blog

what is RMI registry

浪子不回头ぞ 提交于 2019-12-04 07:46:58
问题 What is RMI registry? What does it do? 回答1: Essentially the RMI registry is a place for the server to register services it offers and a place for clients to query for those services. See Introduction to Java RMI. Excerpt: Figure 1 shows the connections made by the client when using RMI. Firstly, the client must contact an RMI registry, and request the name of the service. Developer B won't know the exact location of the RMI service, but he knows enough to contact Developer A's registry. This