Results 1 to 4 of 4

Thread: Can I create my own RmiProxyFactoryBean client side?

  1. #1
    Join Date
    Feb 2005
    Posts
    19

    Default Can I create my own RmiProxyFactoryBean client side?

    Because I would like my client to choose a rmi objects host/port/servicename at runtime, client side I am trying to connect to server (spring enhanced) objects like this:

    ---------------------------------

    RmiProxyFactoryBean factory = new RmiProxyFactoryBean();
    factory.setServiceInterface(IMyInterface.class);
    factory.setServiceUrl("rmi://localhost:1099/MyServiceName");

    IMyInterface bsi = (IMyInterface) factory.getObject();

    bsi.doSomethingUsefull();

    -------------------------------------

    However I get back null from factory.getObject()... If I configure client side to use xml file and use FileSystemXmlApplicationContext everything works just fine.

    ------------------------------------

    What am I doing wrong? Also, is there a better way to handle discovering client host/port/service (and connecting) at runtime (apart from generating temp xml files)?

  2. #2
    Join Date
    Aug 2004
    Location
    Southampton, UK
    Posts
    826

    Default

    You need to call RmiProxyFactoryBean.afterPropertiesSet() before accessing the proxy.

    Rob
    Rob Harrop
    Lead Engineer, dm Server
    SpringSource
    http://www.springsource.com

    Co-Author - Pro Spring

  3. #3
    Join Date
    Feb 2005
    Posts
    19

    Default

    that worked, cool!

  4. #4
    Join Date
    Mar 2009
    Posts
    1

    Thumbs up yoyoyoyoyoyo yo yo join it

    join it now
    cmon its hard
    and cool join it
    cmon join it now
    plz
    plz
    plz
    plz plz
    cmon join it now
    plz plz plzp plz


Similar Threads

  1. Commons Validator - Client Side Messages
    By jv in forum Spring-Modules
    Replies: 0
    Last Post: Aug 3rd, 2005, 09:35 AM
  2. Replies: 2
    Last Post: Jul 13th, 2005, 05:53 PM
  3. JaxRpc client side authentication.
    By ervandew in forum Security
    Replies: 3
    Last Post: May 18th, 2005, 12:00 PM
  4. Replies: 1
    Last Post: Apr 27th, 2005, 09:17 AM
  5. Server side exceptions propogate to client - how to
    By darrell_2399 in forum Remoting
    Replies: 0
    Last Post: Oct 12th, 2004, 05:49 PM

Posting Permissions

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