I'm just wondering if there is any possibility to hook up the "application deployed" event to some code, i.e. have a callback for this event.
I have an EJB-application which needs some action taken immediately after it is started, like initializing interfaces, preparing a scheduler using Quartz, maintaining some kind of internal cache for a faster start of clients and so on.
It looks like the EJB standard has nothing available for this? What about JBoss specific, is there any "best practice" for this use case?
I mean, this must be a pretty common case, every "self grown" server application normally has a lot of startup things that happen so I can't believe it's not available in the EJB world ,-))
An if the startup hook is there: What about shutdown (thanks)?
Thanks in advance,
Have a look at MBeans:
Also, here's how your MBean can "depend" on a EJB:
And for lot's of other information on MBeans, have a look at: