Jan
Jan

Reputation: 1130

How to get called when glassfish finished starting web services in current EAR deployment

I need a way to get called when the start of the current EAR services are done. Specifically web services. The @PostConstruct annotation is usefull, but too early. A commented pseudo server.log should show the problem:

// All JNDI bindings get established
[2020-05-19... Portable JNDI names for EJB TemplateCreator: [java:global/AllInOne/L...]

// @PostConstruct methods get called. Far too early.
[2020-05-19... Trying to interact with web services failed]

// Starting of web services
[2020-05-19... Mojarra 2.3.14... for context '/app' gets initialized]

[2020-05-19... Loading application [AllInOne#TheApp.war] at [/app]]]

// Other web services get started the same...

// ========== This! Exactly here I need the call! Not earlier! =================

What would be the alternative to @PostConstruct which gets called at the right moment?

Upvotes: 0

Views: 36

Answers (0)

Related Questions