Lin Ren
2018-05-16 06:11:57 UTC
Hi all,
Â
Iâm currently trying my project on Jetty standalone mode.
Â
I wrote a BootstrapServerService, which annotated by â@ManagedObjectâ and extends org.eclipse.jetty.util.component.AbstractLifeCycle.
Â
The BootstrapServerService is now added into Server as a bean (in jetty.xml):
Â
   <Call name="addBean">
     <Arg>
       <New class="com.bea.wlcp.wlng.core.wls.BootstrapServerService"/>
     </Arg>
   </Call>
Â
Then the BootstrapServerService is started before deployed application is activated, just as my expected.
Â
However, in the BootstrapServerService, there is logic to get the RMI repository and bind local object:
Â
       final Registry registry = LocateRegistry.getRegistry();
       registry.bind(fullJndiName, stub);
Â
It fails because the RMI service is NOT started yet. So I tried to single out the bind logic and trying to find a hook from Jetty to execute this logic after the RMI is ready, but so far Iâm not able to find it out.
Â
Can anyone give advisement?
Â
Thanks!
Â
Lin
Â
Iâm currently trying my project on Jetty standalone mode.
Â
I wrote a BootstrapServerService, which annotated by â@ManagedObjectâ and extends org.eclipse.jetty.util.component.AbstractLifeCycle.
Â
The BootstrapServerService is now added into Server as a bean (in jetty.xml):
Â
   <Call name="addBean">
     <Arg>
       <New class="com.bea.wlcp.wlng.core.wls.BootstrapServerService"/>
     </Arg>
   </Call>
Â
Then the BootstrapServerService is started before deployed application is activated, just as my expected.
Â
However, in the BootstrapServerService, there is logic to get the RMI repository and bind local object:
Â
       final Registry registry = LocateRegistry.getRegistry();
       registry.bind(fullJndiName, stub);
Â
It fails because the RMI service is NOT started yet. So I tried to single out the bind logic and trying to find a hook from Jetty to execute this logic after the RMI is ready, but so far Iâm not able to find it out.
Â
Can anyone give advisement?
Â
Thanks!
Â
Lin