calling an arbitrary method via Spring ?

Tom Zeller tzeller at dragonacea.biz
Tue Apr 30 11:24:30 EDT 2013


Anyone know if it is reasonable to call a non-constructor non-property
method via Spring ?

I was looking at using Spring to configure Jetty, but realized I was
unable to duplicate the default Jetty configuration via Spring because
I do not know how to call Server.addLifeCycleListener().

For example, jetty-started.xml:

<Configure id="Server" class="org.eclipse.jetty.server.Server">
  <Call name="addLifeCycleListener">
    <Arg>
      <New class="org.eclipse.jetty.util.component.FileNoticeLifeCycleListener">
        <Arg><SystemProperty name="jetty.state" default="./jetty.state"/></Arg>
      </New>
    </Arg>
  </Call>
</Configure>

I was hoping to avoid anything too fancy with Spring.

Thanks.


More information about the dev mailing list