Results 1 to 4 of 4

Thread: Accessing a Remote Spring Bean without a second container

  1. #1
    Join Date
    Oct 2008
    Posts
    9

    Default 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. #2
    Join Date
    May 2007
    Location
    Saint Petersburg, Russian Federation
    Posts
    1,189

    Default

    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();

  3. #3
    Join Date
    Oct 2008
    Posts
    9

    Default

    Thanks a lot ;-) you are an angel

  4. #4
    Join Date
    Oct 2012
    Posts
    1

    Default 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

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •