I want an EJB call a Servlet *on the same server* on server startup.
This looks very easy, but is very hard.
@Startup / @Singleton / @PostConstruct is triggered before the http port is up and open, so @PostConstruct hangs forever. Indeed as @PostConstruct never comes back, the server never opens the listen port.
Tried to trigger the EJB from an @WebListener. Same behaviour.
Is there a better way than to trigger in @PostConstruct an EJB Timer that waits a minute or so and then calls the servlet?