{"id":1148,"date":"2012-04-03T18:46:00","date_gmt":"2012-04-03T18:46:00","guid":{"rendered":"http:\/\/www.javacodegeeks.com\/2012\/10\/spring-remoting-support-and-developing-rmi-service.html"},"modified":"2012-10-21T23:39:48","modified_gmt":"2012-10-21T23:39:48","slug":"spring-remoting-support-and-developing","status":"publish","type":"post","link":"https:\/\/www.javacodegeeks.com\/2012\/04\/spring-remoting-support-and-developing.html","title":{"rendered":"Spring Remoting Support and Developing RMI Service"},"content":{"rendered":"<div dir=\"ltr\" style=\"text-align: left\">The development of remote-enabled services is eased by Spring remoting support. Currently, Spring supports the following remoting technologies: Remote Method Invocation (RMI), HTTP Invoker, Hessian, Burlap, JAX-RPC, JAX-WS and JMS. <\/p>\n<p><strong>Remote Method Invocation (RMI)<\/strong> : Spring supports RMI via RmiProxyFactoryBean and RmiServiceExporter. RmiServiceExporter exports any Spring-managed bean as an RMI service and registers. RmiProxyFactoryBean is a factory bean creating a proxy for an RMI service. This proxy object talks with remote RMI services on behalf of the client. <\/p>\n<p><strong>Spring\u2019s HTTP invoker : <\/strong>Spring HTTP invokers use the standard Java serialization mechanism to expose services through HTTP. Spring supports HTTP invoker infrastructure via HttpInvokerProxyFactoryBean and HttpInvokerServiceExporter. HttpInvokerServiceExporter that exports the specified service bean as HTTP invoker service endpoint, accessible via an HTTP invoker proxy. HttpInvokerProxyFactoryBean is a factory bean for HTTP invoker proxies. <\/p>\n<p><strong>Hessian :<\/strong> Hessian offers a binary HTTP-based remoting protocol. Spring supports Hessian via HessianProxyFactoryBean and the HessianServiceExporter. <\/p>\n<p><strong>Burlap : <\/strong>Burlap is Caucho\u2019s XML-based alternative to Hessian. Spring provides support classes such as BurlapProxyFactoryBean and BurlapServiceExporter. <\/p>\n<p><strong>JAX-RPC :<\/strong> Spring provides remoting support for web services via JAX-RPC (J2EE 1.4?s web service API). <\/p>\n<p><strong>JAX-WS :<\/strong> Spring provides remoting support for web services via JAX-WS (the successor of JAX-RPC, as introduced in Java EE 5 and Java 6). <\/p>\n<p><strong>JMS :<\/strong> The JMS remoting support in the Spring is provided by the JmsInvokerServiceExporter and JmsInvokerProxyFactoryBean classes. <\/p>\n<p>Let us look at Spring RMI support to develop Spring RMI Service &amp; Client. <\/p>\n<p><strong>Used Technologies : <\/strong><\/p>\n<p>JDK 1.6.0_31<br \/>\nSpring 3.1.1<br \/>\nMaven 3.0.2<\/p>\n<p><strong>STEP 1 : CREATE MAVEN PROJECT <\/strong><\/p>\n<p>A maven project is created as below. (It can be created by using Maven or IDE Plug-in). <\/p>\n<div class=\"separator\" style=\"clear: both;text-align: center\"><a href=\"http:\/\/1.bp.blogspot.com\/-0YPzhd5JsZ0\/T3sb6oQAX4I\/AAAAAAAAAEg\/QW6bBdKow8Q\/s1600\/SpringRMI2.png\"><img decoding=\"async\" border=\"0\" height=\"400\" src=\"http:\/\/1.bp.blogspot.com\/-0YPzhd5JsZ0\/T3sb6oQAX4I\/AAAAAAAAAEg\/QW6bBdKow8Q\/s400\/SpringRMI2.png\" width=\"190\" \/><\/a><\/div>\n<p><strong>STEP 2 : LIBRARIES <\/strong><\/p>\n<p>Spring dependencies are added to Maven\u2019 s pom.xml. <\/p>\n<pre class=\"brush:xml\">&lt;!-- Spring 3.1.x dependencies --&gt;\r\n&lt;properties&gt;\r\n    &lt;spring.version&gt;3.1.1.RELEASE&lt;\/spring.version&gt;\r\n&lt;\/properties&gt;\r\n \r\n&lt;dependencies&gt;\r\n            &lt;dependency&gt;\r\n        &lt;groupId&gt;org.springframework&lt;\/groupId&gt;\r\n        &lt;artifactId&gt;spring-core&lt;\/artifactId&gt;\r\n        &lt;version&gt;${spring.version}&lt;\/version&gt;\r\n    &lt;\/dependency&gt;\r\n    &lt;dependency&gt;\r\n        &lt;groupId&gt;org.springframework&lt;\/groupId&gt;\r\n        &lt;artifactId&gt;spring-context&lt;\/artifactId&gt;\r\n        &lt;version&gt;${spring.version}&lt;\/version&gt;\r\n    &lt;\/dependency&gt;\r\n&lt;dependencies&gt;\r\n<\/pre>\n<p><strong>STEP 3 : CREATE USER CLASS <\/strong><\/p>\n<p>A new User Class is created.   <\/p>\n<pre class=\"brush:java\">package com.otv.user;\r\n \r\nimport java.io.Serializable;\r\n \r\n\/**\r\n * User Bean\r\n *\r\n * @author  onlinetechvision.com\r\n * @since   24 Feb 2012\r\n * @version 1.0.0\r\n *\r\n *\/\r\npublic class User implements Serializable {\r\n \r\n    private long id;\r\n    private String name;\r\n    private String surname;\r\n \r\n    \/**\r\n     * Get User Id\r\n     *\r\n     * @return long id\r\n     *\/\r\n    public long getId() {\r\n        return id;\r\n    }\r\n \r\n    \/**\r\n     * Set User Id\r\n     *\r\n     * @param long id\r\n     *\/\r\n    public void setId(long id) {\r\n        this.id = id;\r\n    }\r\n \r\n    \/**\r\n     * Get User Name\r\n     *\r\n     * @return long id\r\n     *\/\r\n    public String getName() {\r\n        return name;\r\n    }\r\n \r\n    \/**\r\n     * Set User Name\r\n     *\r\n     * @param String name\r\n     *\/\r\n    public void setName(String name) {\r\n        this.name = name;\r\n    }\r\n \r\n    \/**\r\n     * Get User Surname\r\n     *\r\n     * @return long id\r\n     *\/\r\n    public String getSurname() {\r\n        return surname;\r\n    }\r\n \r\n    \/**\r\n     * Set User Surname\r\n     *\r\n     * @param String surname\r\n     *\/\r\n    public void setSurname(String surname) {\r\n        this.surname = surname;\r\n    }\r\n \r\n    @Override\r\n    public String toString() {\r\n        StringBuilder strBuilder = new StringBuilder();\r\n        strBuilder.append(\"Id : \").append(getId());\r\n        strBuilder.append(\", Name : \").append(getName());\r\n        strBuilder.append(\", Surname : \").append(getSurname());\r\n        return strBuilder.toString();\r\n    }\r\n}\r\n<\/pre>\n<p><strong>STEP 4 : CREATE ICacheService INTERFACE <\/strong><\/p>\n<p>ICacheService Interface representing a remote cache service interface is created. <\/p>\n<pre class=\"brush:java\">package com.otv.cache.service;\r\n \r\nimport java.util.concurrent.ConcurrentHashMap;\r\n \r\nimport com.otv.user.User;\r\n \r\n\/**\r\n * Cache Service Interface\r\n *\r\n * @author  onlinetechvision.com\r\n * @since   27 Feb 2012\r\n * @version 1.0.0\r\n *\r\n *\/\r\npublic interface ICacheService {\r\n \r\n    \/**\r\n     * Get User Map\r\n     *\r\n     * @return ConcurrentHashMap User Map\r\n     *\/\r\n    public ConcurrentHashMap&lt;long, user&gt; getUserMap();\r\n \r\n}\r\n<\/pre>\n<p><strong>STEP 5 : CREATE CacheService CLASS <\/strong><div style=\"display:inline-block; margin: 15px 0;\"> <div id=\"adngin-JavaCodeGeeks_incontent_video-0\" style=\"display:inline-block;\"><\/div> <\/div><\/p>\n<p>CacheService Class is created by implementing ISchedulerService Interface. It provides access to the remote cache\u2026  <\/p>\n<pre class=\"brush:java\">package com.otv.cache.service;\r\n \r\nimport java.util.concurrent.ConcurrentHashMap;\r\n \r\nimport com.otv.user.User;\r\n \r\n\/**\r\n * Cache Service Implementation\r\n *\r\n * @author  onlinetechvision.com\r\n * @since   6:04:49 PM\r\n * @version 1.0.0\r\n *\r\n *\/\r\npublic class CacheService implements ICacheService {\r\n \r\n    \/\/User Map is injected...\r\n    ConcurrentHashMap&lt;long, user&gt; userMap;\r\n \r\n    \/**\r\n     * Get User Map\r\n     *\r\n     * @return ConcurrentHashMap User Map\r\n     *\/\r\n    public ConcurrentHashMap&lt;long, user&gt; getUserMap() {\r\n        return userMap;\r\n    }\r\n \r\n    \/**\r\n     * Set User Map\r\n     *\r\n     * @param ConcurrentHashMap User Map\r\n     *\/\r\n    public void setUserMap(ConcurrentHashMap&lt;long, user&gt; userMap) {\r\n        this.userMap = userMap;\r\n    }\r\n \r\n}\r\n<\/pre>\n<p><strong>STEP 6 : CREATE IRMIUserService INTERFACE <\/strong><\/p>\n<p>IRMIUserService Interface representing RMI service interface is created. Also, it provides remote methods for the RMI Clients\u2026 <\/p>\n<pre class=\"brush:java\">package com.otv.rmi.server;\r\n \r\nimport java.util.List;\r\n \r\nimport com.otv.user.User;\r\n \r\n\/**\r\n * RMI User Service Interface\r\n *\r\n * @author  onlinetechvision.com\r\n * @since   24 Feb 2012\r\n * @version 1.0.0\r\n *\r\n *\/\r\npublic interface IRMIUserService {\r\n \r\n    \/**\r\n     * Add User\r\n     *\r\n     * @param  User user\r\n     * @return boolean response of the method\r\n     *\/\r\n    public boolean addUser(User user);\r\n \r\n    \/**\r\n     * Delete User\r\n     *\r\n     * @param  User user\r\n     * @return boolean response of the method\r\n     *\/\r\n    public boolean deleteUser(User user);\r\n \r\n    \/**\r\n     * Get User List\r\n     *\r\n     * @return List user list\r\n     *\/\r\n    public List&lt;User&gt; getUserList();\r\n \r\n}\r\n<\/pre>\n<p><strong>STEP 7 : CREATE RMIUserService CLASS <\/strong><\/p>\n<p>RMIUserService Class(a.k.a RMI Object) is created by implementing IRMIUserService Interface. <\/p>\n<pre class=\"brush:java\">package com.otv.rmi.server;\r\n \r\nimport java.util.ArrayList;\r\nimport java.util.List;\r\nimport org.apache.log4j.Logger;\r\n \r\nimport com.otv.cache.service.ICacheService;\r\nimport com.otv.user.User;\r\n \r\n\/**\r\n * RMI User Service Implementation\r\n *\r\n * @author  onlinetechvision.com\r\n * @since   24 Feb 2012\r\n * @version 1.0.0\r\n *\r\n *\/\r\npublic class RMIUserService implements IRMIUserService {\r\n \r\n    private static Logger logger = Logger.getLogger(RMIUserService.class);\r\n \r\n    \/\/Remote Cache Service is injected...\r\n    ICacheService cacheService;\r\n \r\n    \/**\r\n     * Add User\r\n     *\r\n     * @param  User user\r\n     * @return boolean response of the method\r\n     *\/\r\n    public boolean addUser(User user) {\r\n        getCacheService().getUserMap().put(user.getId(), user);\r\n        logger.debug(\"User has been added to cache. User : \"+getCacheService().getUserMap().get(user.getId()));\r\n        return true;\r\n    }\r\n \r\n    \/**\r\n     * Delete User\r\n     *\r\n     * @param  User user\r\n     * @return boolean response of the method\r\n     *\/\r\n    public boolean deleteUser(User user) {\r\n        getCacheService().getUserMap().put(user.getId(), user);\r\n        logger.debug(\"User has been deleted from cache. User : \"+user);\r\n        return true;\r\n    }\r\n \r\n    \/**\r\n     * Get User List\r\n     *\r\n     * @return List user list\r\n     *\/\r\n    public List&lt;User&gt; getUserList() {\r\n        List&lt;User&gt; list = new ArrayList&lt;User&gt;();\r\n        list.addAll(getCacheService().getUserMap().values());\r\n        logger.debug(\"User List : \"+list);\r\n        return list;\r\n    }\r\n \r\n    \/**\r\n     * Get RMI User Service\r\n     *\r\n     * @return IRMIUserService RMI User Service\r\n     *\/\r\n    public ICacheService getCacheService() {\r\n        return cacheService;\r\n    }\r\n \r\n    \/**\r\n     * Set RMI User Service\r\n     *\r\n     * @param IRMIUserService RMI User Service\r\n     *\/\r\n    public void setCacheService(ICacheService cacheService) {\r\n        this.cacheService = cacheService;\r\n    }\r\n}\r\n<\/pre>\n<p><strong>STEP 8 : CREATE RMIServerStarter CLASS <\/strong><\/p>\n<p>RMI Server Starter Class is created. It starts the RMI Server. <\/p>\n<pre class=\"brush:java\">package com.otv.rmi.server.starter;\r\n \r\nimport org.springframework.context.support.ClassPathXmlApplicationContext;\r\n \r\n\/**\r\n * RMI Server Starter\r\n *\r\n * @author  onlinetechvision.com\r\n * @since   27 Feb 2012\r\n * @version 1.0.0\r\n *\r\n *\/\r\npublic class RMIServerStarter {\r\n \r\n    public static void main(String[] args) {\r\n \r\n        \/\/RMI Server Application Context is started...\r\n        new ClassPathXmlApplicationContext(\"rmiServerAppContext.xml\");\r\n    }\r\n}\r\n<\/pre>\n<p><strong>STEP 9 : CREATE rmiServerAppContext.xml <\/strong><\/p>\n<p>RMI Server Application Context\u2019 s content is shown as below.  <\/p>\n<pre class=\"brush:xml\">&lt;beans xmlns=\"http:\/\/www.springframework.org\/schema\/beans\"\r\n    xmlns:xsi=\"http:\/\/www.w3.org\/2001\/XMLSchema-instance\"\r\n    xsi:schemaLocation=\"http:\/\/www.springframework.org\/schema\/beans\r\n \r\nhttp:\/\/www.springframework.org\/schema\/beans\/spring-beans-3.0.xsd\"&gt;\r\n \r\n    &lt;!-- Beans Declaration --&gt;\r\n    &lt;bean id=\"UserMap\" class=\"java.util.concurrent.ConcurrentHashMap\" \/&gt;\r\n \r\n    &lt;bean id=\"CacheService\" class=\"com.otv.cache.service.CacheService\"&gt;\r\n        &lt;property name=\"userMap\" ref=\"UserMap\"\/&gt;\r\n    &lt;\/bean&gt;   \r\n \r\n    &lt;bean id=\"RMIUserService\" class=\"com.otv.rmi.server.RMIUserService\" &gt;\r\n        &lt;property name=\"cacheService\" ref=\"CacheService\"\/&gt;\r\n    &lt;\/bean&gt;\r\n \r\n    &lt;!-- RMI Server Declaration --&gt;\r\n    &lt;bean class=\"org.springframework.remoting.rmi.RmiServiceExporter\"&gt;\r\n \r\n        &lt;!-- serviceName represents RMI Service Name --&gt;\r\n        &lt;property name=\"serviceName\" value=\"RMIUserService\"\/&gt;\r\n \r\n        &lt;!-- service represents RMI Object(RMI Service Impl) --&gt;\r\n        &lt;property name=\"service\" ref=\"RMIUserService\"\/&gt;\r\n \r\n        &lt;!-- serviceInterface represents RMI Service Interface exposed --&gt;\r\n        &lt;property name=\"serviceInterface\" value=\"com.otv.rmi.server.IRMIUserService\"\/&gt;\r\n \r\n        &lt;!-- defaults to 1099 --&gt;\r\n        &lt;property name=\"registryPort\" value=\"1099\"\/&gt;\r\n \r\n   &lt;\/bean&gt;\r\n \r\n&lt;\/beans&gt;\r\n<\/pre>\n<p><strong>STEP 10 : CREATE RMIServiceClient CLASS <\/strong><\/p>\n<p>RMIServiceClient Class is created. It calls the RMI User Service and performs user operations. <\/p>\n<pre class=\"brush:java\">package com.otv.rmi.client;\r\n \r\nimport org.apache.log4j.Logger;\r\nimport org.springframework.context.ApplicationContext;\r\nimport org.springframework.context.support.ClassPathXmlApplicationContext;\r\n \r\nimport com.otv.rmi.server.IRMIUserService;\r\nimport com.otv.rmi.server.RMIUserService;\r\nimport com.otv.user.User;\r\n \r\n\/**\r\n * RMI Service Client\r\n *\r\n * @author  onlinetechvision.com\r\n * @since   24 Feb 2012\r\n * @version 1.0.0\r\n *\r\n *\/\r\npublic class RMIServiceClient {\r\n \r\n    private static Logger logger = Logger.getLogger(RMIUserService.class);\r\n \r\n    \/**\r\n     * Main method of the RMI Service Client\r\n     *\r\n     *\/\r\n    public static void main(String[] args) {\r\n \r\n        logger.debug(\"RMI Service Client is starting...\");\r\n \r\n        \/\/RMI Client Application Context is started...\r\n        ApplicationContext context = new ClassPathXmlApplicationContext(\"rmiClientAppContext.xml\");\r\n \r\n        \/\/Remote User Service is called via RMI Client Application Context...\r\n        IRMIUserService rmiClient = (IRMIUserService) context.getBean(\"RMIUserService\");\r\n \r\n        \/\/New User is created...\r\n        User user = new User();\r\n        user.setId(1);\r\n        user.setName(\"Bruce\");\r\n        user.setSurname(\"Willis\");\r\n \r\n        \/\/The user is added to the remote cache...\r\n        rmiClient.addUser(user);\r\n \r\n        \/\/The users are gotten via remote cache...\r\n        rmiClient.getUserList();\r\n \r\n        \/\/The user is deleted from remote cache...\r\n        rmiClient.deleteUser(user);\r\n \r\n        logger.debug(\"RMI Service Client is stopped...\");\r\n    }\r\n}\r\n<\/pre>\n<p><strong>STEP 11 : CREATE rmiClientAppContext.xml <\/strong><\/p>\n<p>RMI Client Application Context\u2019 s content is shown as below. <\/p>\n<pre class=\"brush:xml\">&lt;beans xmlns=\"http:\/\/www.springframework.org\/schema\/beans\"\r\n    xmlns:xsi=\"http:\/\/www.w3.org\/2001\/XMLSchema-instance\"\r\n    xsi:schemaLocation=\"http:\/\/www.springframework.org\/schema\/beans\r\n \r\nhttp:\/\/www.springframework.org\/schema\/beans\/spring-beans-3.0.xsd\"&gt;\r\n \r\n    &lt;!-- RMI Client Declaration --&gt;\r\n    &lt;bean id=\"RMIUserService\" class=\"org.springframework.remoting.rmi.RmiProxyFactoryBean\"&gt;\r\n \r\n        &lt;!-- serviceUrl represents RMI Service Url called--&gt;\r\n        &lt;property name=\"serviceUrl\" value=\"rmi:\/\/x.x.x.x:1099\/RMIUserService\"\/&gt;\r\n \r\n        &lt;!-- serviceInterface represents RMI Service Interface called --&gt;\r\n        &lt;property name=\"serviceInterface\" value=\"com.otv.rmi.server.IRMIUserService\"\/&gt;\r\n \r\n        &lt;!-- refreshStubOnConnectFailure enforces automatic re-lookup of the stub if a\r\n                            call fails with a connect exception --&gt;\r\n        &lt;property name=\"refreshStubOnConnectFailure\" value=\"true\"\/&gt;\r\n \r\n    &lt;\/bean&gt;\r\n \r\n&lt;\/beans&gt;\r\n<\/pre>\n<p><strong>STEP 12 : RUN PROJECT <\/strong><\/p>\n<p>If RMI Service Client is started when RMI Server runs, below RMI Server output logs will be shown. Also, RMI Server and Client can be run by opening two seperate consoles via your IDE. : <\/p>\n<pre class=\"brush:bash\">....\r\n04.03.2012 14:23:15 DEBUG (RmiBasedExporter.java:59) - RMI service [com.otv.rmi.server.RMIUserService@16dadf9] is an RMI invoker\r\n04.03.2012 14:23:15 DEBUG (JdkDynamicAopProxy.java:113) - Creating JDK dynamic proxy: target source is SingletonTargetSource for target object [com.otv.rmi.server.RMIUserService@16dadf9]\r\n04.03.2012 14:23:15  INFO (RmiServiceExporter.java:276) - Binding service 'RMIUserService' to RMI registry: RegistryImpl[UnicastServerRef [liveRef: [endpoint:[192.168.1.7:1099](local),objID:[0:0:0, 0]]]]\r\n04.03.2012 14:23:15 DEBUG (AbstractAutowireCapableBeanFactory.java:458) - Finished creating instance of bean 'org.springframework.remoting.rmi.RmiServiceExporter#0'\r\n04.03.2012 14:23:15 DEBUG (AbstractApplicationContext.java:845) - Unable to locate LifecycleProcessor with name 'lifecycleProcessor': using default [org.springframework.context.support.DefaultLifecycleProcessor@3c0007]\r\n04.03.2012 14:23:15 DEBUG (AbstractBeanFactory.java:245) - Returning cached instance of singleton bean 'lifecycleProcessor'\r\n \r\n04.03.2012 14:25:43 DEBUG (RemoteInvocationTraceInterceptor.java:73) - Incoming RmiServiceExporter remote call: com.otv.rmi.server.IRMIUserService.addUser\r\n04.03.2012 14:25:43 DEBUG (RMIUserService.java:33) - User has been added to cache. User : Id : 1, Name : Bruce, Surname : Willis\r\n04.03.2012 14:25:43 DEBUG (RemoteInvocationTraceInterceptor.java:79) - Finished processing of RmiServiceExporter remote call: com.otv.rmi.server.IRMIUserService.addUser\r\n \r\n04.03.2012 14:25:43 DEBUG (RemoteInvocationTraceInterceptor.java:73) - Incoming RmiServiceExporter remote call: com.otv.rmi.server.IRMIUserService.getUserList\r\n04.03.2012 14:25:43 DEBUG (RMIUserService.java:57) - User List : [Id : 1, Name : Bruce, Surname : Willis]\r\n04.03.2012 14:25:43 DEBUG (RemoteInvocationTraceInterceptor.java:79) - Finished processing of RmiServiceExporter remote call: com.otv.rmi.server.IRMIUserService.getUserList\r\n \r\n04.03.2012 14:25:43 DEBUG (RemoteInvocationTraceInterceptor.java:73) - Incoming RmiServiceExporter remote call: com.otv.rmi.server.IRMIUserService.deleteUser\r\n04.03.2012 14:25:43 DEBUG (RMIUserService.java:45) - User has been deleted from cache. User : Id : 1, Name : Bruce, Surname : Willis\r\n04.03.2012 14:25:43 DEBUG (RemoteInvocationTraceInterceptor.java:79) - Finished processing of RmiServiceExporter remote call: com.otv.rmi.server.IRMIUserService.deleteUser\r\n \r\n04.03.2012 14:25:43 DEBUG (RemoteInvocationTraceInterceptor.java:73) - Incoming RmiServiceExporter remote call: com.otv.rmi.server.IRMIUserService.getUserList\r\n04.03.2012 14:25:43 DEBUG (RMIUserService.java:57) - User List : []\r\n04.03.2012 14:25:43 DEBUG (RemoteInvocationTraceInterceptor.java:79) - Finished processing of RmiServiceExporter remote call: com.otv.rmi.server.IRMIUserService.getUserList\r\n<\/pre>\n<p><strong>STEP 13 : DOWNLOAD <\/strong><\/p>\n<p><a href=\"http:\/\/www.onlinetechvision.com\/wp-content\/uploads\/2012\/03\/OTV_SpringRMI.zip\">OTV_SpringRMI<\/a> <\/p>\n<p><strong><i>Reference: <\/i><\/strong><a href=\"http:\/\/www.onlinetechvision.com\/?p=510\">Spring Remoting Support and Developing RMI Service<\/a>&nbsp;from our <a href=\"http:\/\/www.javacodegeeks.com\/p\/jcg.html\">JCG partner<\/a> Eren Avsarogullari  at the <a href=\"http:\/\/www.onlinetechvision.com\/\">Online Technology Vision<\/a> blog.<\/p>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>The development of remote-enabled services is eased by Spring remoting support. Currently, Spring supports the following remoting technologies: Remote Method Invocation (RMI), HTTP Invoker, Hessian, Burlap, JAX-RPC, JAX-WS and JMS. Remote Method Invocation (RMI) : Spring supports RMI via RmiProxyFactoryBean and RmiServiceExporter. RmiServiceExporter exports any Spring-managed bean as an RMI service and registers. RmiProxyFactoryBean is &hellip;<\/p>\n","protected":false},"author":158,"featured_media":240,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[8],"tags":[464,30],"class_list":["post-1148","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-enterprise-java","tag-rmi","tag-spring"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.5 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Spring Remoting Support and Developing RMI Service - Java Code Geeks<\/title>\n<meta name=\"description\" content=\"The development of remote-enabled services is eased by Spring remoting support. Currently, Spring supports the following remoting technologies: Remote\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.javacodegeeks.com\/2012\/04\/spring-remoting-support-and-developing.html\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Spring Remoting Support and Developing RMI Service - Java Code Geeks\" \/>\n<meta property=\"og:description\" content=\"The development of remote-enabled services is eased by Spring remoting support. Currently, Spring supports the following remoting technologies: Remote\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.javacodegeeks.com\/2012\/04\/spring-remoting-support-and-developing.html\" \/>\n<meta property=\"og:site_name\" content=\"Java Code Geeks\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/javacodegeeks\" \/>\n<meta property=\"article:published_time\" content=\"2012-04-03T18:46:00+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2012-10-21T23:39:48+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2012\/10\/spring-logo.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"150\" \/>\n\t<meta property=\"og:image:height\" content=\"150\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"Eren Avsarogullari\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@javacodegeeks\" \/>\n<meta name=\"twitter:site\" content=\"@javacodegeeks\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Eren Avsarogullari\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"9 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2012\\\/04\\\/spring-remoting-support-and-developing.html#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2012\\\/04\\\/spring-remoting-support-and-developing.html\"},\"author\":{\"name\":\"Eren Avsarogullari\",\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/#\\\/schema\\\/person\\\/65e6e57c730ae5ade3adbadd483553bd\"},\"headline\":\"Spring Remoting Support and Developing RMI Service\",\"datePublished\":\"2012-04-03T18:46:00+00:00\",\"dateModified\":\"2012-10-21T23:39:48+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2012\\\/04\\\/spring-remoting-support-and-developing.html\"},\"wordCount\":480,\"commentCount\":1,\"publisher\":{\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/#organization\"},\"image\":{\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2012\\\/04\\\/spring-remoting-support-and-developing.html#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.javacodegeeks.com\\\/wp-content\\\/uploads\\\/2012\\\/10\\\/spring-logo.jpg\",\"keywords\":[\"RMI\",\"Spring\"],\"articleSection\":[\"Enterprise Java\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/www.javacodegeeks.com\\\/2012\\\/04\\\/spring-remoting-support-and-developing.html#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2012\\\/04\\\/spring-remoting-support-and-developing.html\",\"url\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2012\\\/04\\\/spring-remoting-support-and-developing.html\",\"name\":\"Spring Remoting Support and Developing RMI Service - Java Code Geeks\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2012\\\/04\\\/spring-remoting-support-and-developing.html#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2012\\\/04\\\/spring-remoting-support-and-developing.html#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.javacodegeeks.com\\\/wp-content\\\/uploads\\\/2012\\\/10\\\/spring-logo.jpg\",\"datePublished\":\"2012-04-03T18:46:00+00:00\",\"dateModified\":\"2012-10-21T23:39:48+00:00\",\"description\":\"The development of remote-enabled services is eased by Spring remoting support. Currently, Spring supports the following remoting technologies: Remote\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2012\\\/04\\\/spring-remoting-support-and-developing.html#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/www.javacodegeeks.com\\\/2012\\\/04\\\/spring-remoting-support-and-developing.html\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2012\\\/04\\\/spring-remoting-support-and-developing.html#primaryimage\",\"url\":\"https:\\\/\\\/www.javacodegeeks.com\\\/wp-content\\\/uploads\\\/2012\\\/10\\\/spring-logo.jpg\",\"contentUrl\":\"https:\\\/\\\/www.javacodegeeks.com\\\/wp-content\\\/uploads\\\/2012\\\/10\\\/spring-logo.jpg\",\"width\":150,\"height\":150,\"caption\":\"spring-interview-questions-answers\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2012\\\/04\\\/spring-remoting-support-and-developing.html#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/www.javacodegeeks.com\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Java\",\"item\":\"https:\\\/\\\/www.javacodegeeks.com\\\/category\\\/java\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"Enterprise Java\",\"item\":\"https:\\\/\\\/www.javacodegeeks.com\\\/category\\\/java\\\/enterprise-java\"},{\"@type\":\"ListItem\",\"position\":4,\"name\":\"Spring Remoting Support and Developing RMI Service\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/#website\",\"url\":\"https:\\\/\\\/www.javacodegeeks.com\\\/\",\"name\":\"Java Code Geeks\",\"description\":\"Java Developers Resource Center\",\"publisher\":{\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/#organization\"},\"alternateName\":\"JCG\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/www.javacodegeeks.com\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/#organization\",\"name\":\"Exelixis Media P.C.\",\"url\":\"https:\\\/\\\/www.javacodegeeks.com\\\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/#\\\/schema\\\/logo\\\/image\\\/\",\"url\":\"https:\\\/\\\/www.javacodegeeks.com\\\/wp-content\\\/uploads\\\/2022\\\/06\\\/exelixis-logo.png\",\"contentUrl\":\"https:\\\/\\\/www.javacodegeeks.com\\\/wp-content\\\/uploads\\\/2022\\\/06\\\/exelixis-logo.png\",\"width\":864,\"height\":246,\"caption\":\"Exelixis Media P.C.\"},\"image\":{\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/#\\\/schema\\\/logo\\\/image\\\/\"},\"sameAs\":[\"https:\\\/\\\/www.facebook.com\\\/javacodegeeks\",\"https:\\\/\\\/x.com\\\/javacodegeeks\"]},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/#\\\/schema\\\/person\\\/65e6e57c730ae5ade3adbadd483553bd\",\"name\":\"Eren Avsarogullari\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/d90f2a1d9c2144dd49935d6c84d5c3aa0832793a522148f397bda79bd8e04c16?s=96&d=mm&r=g\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/d90f2a1d9c2144dd49935d6c84d5c3aa0832793a522148f397bda79bd8e04c16?s=96&d=mm&r=g\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/d90f2a1d9c2144dd49935d6c84d5c3aa0832793a522148f397bda79bd8e04c16?s=96&d=mm&r=g\",\"caption\":\"Eren Avsarogullari\"},\"sameAs\":[\"http:\\\/\\\/www.onlinetechvision.com\\\/\"],\"url\":\"https:\\\/\\\/www.javacodegeeks.com\\\/author\\\/Eren-Avsarogullari\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Spring Remoting Support and Developing RMI Service - Java Code Geeks","description":"The development of remote-enabled services is eased by Spring remoting support. Currently, Spring supports the following remoting technologies: Remote","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.javacodegeeks.com\/2012\/04\/spring-remoting-support-and-developing.html","og_locale":"en_US","og_type":"article","og_title":"Spring Remoting Support and Developing RMI Service - Java Code Geeks","og_description":"The development of remote-enabled services is eased by Spring remoting support. Currently, Spring supports the following remoting technologies: Remote","og_url":"https:\/\/www.javacodegeeks.com\/2012\/04\/spring-remoting-support-and-developing.html","og_site_name":"Java Code Geeks","article_publisher":"https:\/\/www.facebook.com\/javacodegeeks","article_published_time":"2012-04-03T18:46:00+00:00","article_modified_time":"2012-10-21T23:39:48+00:00","og_image":[{"width":150,"height":150,"url":"https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2012\/10\/spring-logo.jpg","type":"image\/jpeg"}],"author":"Eren Avsarogullari","twitter_card":"summary_large_image","twitter_creator":"@javacodegeeks","twitter_site":"@javacodegeeks","twitter_misc":{"Written by":"Eren Avsarogullari","Est. reading time":"9 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.javacodegeeks.com\/2012\/04\/spring-remoting-support-and-developing.html#article","isPartOf":{"@id":"https:\/\/www.javacodegeeks.com\/2012\/04\/spring-remoting-support-and-developing.html"},"author":{"name":"Eren Avsarogullari","@id":"https:\/\/www.javacodegeeks.com\/#\/schema\/person\/65e6e57c730ae5ade3adbadd483553bd"},"headline":"Spring Remoting Support and Developing RMI Service","datePublished":"2012-04-03T18:46:00+00:00","dateModified":"2012-10-21T23:39:48+00:00","mainEntityOfPage":{"@id":"https:\/\/www.javacodegeeks.com\/2012\/04\/spring-remoting-support-and-developing.html"},"wordCount":480,"commentCount":1,"publisher":{"@id":"https:\/\/www.javacodegeeks.com\/#organization"},"image":{"@id":"https:\/\/www.javacodegeeks.com\/2012\/04\/spring-remoting-support-and-developing.html#primaryimage"},"thumbnailUrl":"https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2012\/10\/spring-logo.jpg","keywords":["RMI","Spring"],"articleSection":["Enterprise Java"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.javacodegeeks.com\/2012\/04\/spring-remoting-support-and-developing.html#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.javacodegeeks.com\/2012\/04\/spring-remoting-support-and-developing.html","url":"https:\/\/www.javacodegeeks.com\/2012\/04\/spring-remoting-support-and-developing.html","name":"Spring Remoting Support and Developing RMI Service - Java Code Geeks","isPartOf":{"@id":"https:\/\/www.javacodegeeks.com\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.javacodegeeks.com\/2012\/04\/spring-remoting-support-and-developing.html#primaryimage"},"image":{"@id":"https:\/\/www.javacodegeeks.com\/2012\/04\/spring-remoting-support-and-developing.html#primaryimage"},"thumbnailUrl":"https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2012\/10\/spring-logo.jpg","datePublished":"2012-04-03T18:46:00+00:00","dateModified":"2012-10-21T23:39:48+00:00","description":"The development of remote-enabled services is eased by Spring remoting support. Currently, Spring supports the following remoting technologies: Remote","breadcrumb":{"@id":"https:\/\/www.javacodegeeks.com\/2012\/04\/spring-remoting-support-and-developing.html#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.javacodegeeks.com\/2012\/04\/spring-remoting-support-and-developing.html"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.javacodegeeks.com\/2012\/04\/spring-remoting-support-and-developing.html#primaryimage","url":"https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2012\/10\/spring-logo.jpg","contentUrl":"https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2012\/10\/spring-logo.jpg","width":150,"height":150,"caption":"spring-interview-questions-answers"},{"@type":"BreadcrumbList","@id":"https:\/\/www.javacodegeeks.com\/2012\/04\/spring-remoting-support-and-developing.html#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.javacodegeeks.com\/"},{"@type":"ListItem","position":2,"name":"Java","item":"https:\/\/www.javacodegeeks.com\/category\/java"},{"@type":"ListItem","position":3,"name":"Enterprise Java","item":"https:\/\/www.javacodegeeks.com\/category\/java\/enterprise-java"},{"@type":"ListItem","position":4,"name":"Spring Remoting Support and Developing RMI Service"}]},{"@type":"WebSite","@id":"https:\/\/www.javacodegeeks.com\/#website","url":"https:\/\/www.javacodegeeks.com\/","name":"Java Code Geeks","description":"Java Developers Resource Center","publisher":{"@id":"https:\/\/www.javacodegeeks.com\/#organization"},"alternateName":"JCG","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.javacodegeeks.com\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/www.javacodegeeks.com\/#organization","name":"Exelixis Media P.C.","url":"https:\/\/www.javacodegeeks.com\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.javacodegeeks.com\/#\/schema\/logo\/image\/","url":"https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2022\/06\/exelixis-logo.png","contentUrl":"https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2022\/06\/exelixis-logo.png","width":864,"height":246,"caption":"Exelixis Media P.C."},"image":{"@id":"https:\/\/www.javacodegeeks.com\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/javacodegeeks","https:\/\/x.com\/javacodegeeks"]},{"@type":"Person","@id":"https:\/\/www.javacodegeeks.com\/#\/schema\/person\/65e6e57c730ae5ade3adbadd483553bd","name":"Eren Avsarogullari","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/d90f2a1d9c2144dd49935d6c84d5c3aa0832793a522148f397bda79bd8e04c16?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/d90f2a1d9c2144dd49935d6c84d5c3aa0832793a522148f397bda79bd8e04c16?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/d90f2a1d9c2144dd49935d6c84d5c3aa0832793a522148f397bda79bd8e04c16?s=96&d=mm&r=g","caption":"Eren Avsarogullari"},"sameAs":["http:\/\/www.onlinetechvision.com\/"],"url":"https:\/\/www.javacodegeeks.com\/author\/Eren-Avsarogullari"}]}},"_links":{"self":[{"href":"https:\/\/www.javacodegeeks.com\/wp-json\/wp\/v2\/posts\/1148","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.javacodegeeks.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.javacodegeeks.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.javacodegeeks.com\/wp-json\/wp\/v2\/users\/158"}],"replies":[{"embeddable":true,"href":"https:\/\/www.javacodegeeks.com\/wp-json\/wp\/v2\/comments?post=1148"}],"version-history":[{"count":0,"href":"https:\/\/www.javacodegeeks.com\/wp-json\/wp\/v2\/posts\/1148\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.javacodegeeks.com\/wp-json\/wp\/v2\/media\/240"}],"wp:attachment":[{"href":"https:\/\/www.javacodegeeks.com\/wp-json\/wp\/v2\/media?parent=1148"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.javacodegeeks.com\/wp-json\/wp\/v2\/categories?post=1148"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.javacodegeeks.com\/wp-json\/wp\/v2\/tags?post=1148"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}