Announcement Announcement Module
Collapse
No announcement yet.
Accessing a Remote Spring Bean without a second container Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Accessing a Remote Spring Bean without a second container

    Hi friends,

    I have a Swing application witch needs to access a Remote Spring Bean. I would like to connect to this Bean without installing a Spring container in the Swing side. Using Spring code in the Swing one is not a problem ....

    is it possible ? do you have some code examples ?

    Thanks a lot.

  • #2
    It's possible. Spring config just parsed by the IoC container and necessary actions are performed. You can do that manually as well.

    E.g. if you have the following bean definition:
    HTML Code:
    <bean id="accountService" class="org.springframework.remoting.rmi.RmiProxyFactoryBean">
        <property name="serviceUrl" value="rmi://HOST:1199/AccountService"/>
        <property name="serviceInterface" value="example.AccountService"/>
    </bean>
    it's possible to get the same bean as a result via the following actions:
    Code:
    		RmiProxyFactoryBean factoryBean = new RmiProxyFactoryBean();
    		factoryBean.setServiceUrl("rmi://HOST:1199/AccountService");
    		factoryBean.setServiceInterface(example.AccountService.class);
    		factoryBean.afterPropertiesSet();
    		example.AccountService service = factoryBean.getObject();

    Comment


    • #3
      Thanks a lot ;-) you are an angel

      Comment


      • #4
        Deployment in detail with JBoss

        Hi All,

        Can you please let me know how to deploy spring beans in jboss7 and access it remotely with a client code with a simple example.

        Thanks in advance.
        Gowtham

        Comment

        Working...
        X