JBoss Community

Re: Overall control of graceful shutdown

created by Emanuel Muckenhuber in JBoss AS7 Development - View the full discussion

I guess the startup could be different from case to case, but we could provide a way to register a runnable we run after deployment completed. More precisely a service using the asynchronous() feature of msc and registering a runnable which does something like:

 

 

    public void run() {
        try {
            connector.start();
            startContext.complete();
        } catch (Throwable t) {
            startContext.failed(new StartException(t));
        }
    }
    public void run() {
        try {
            connector.start();
            startContext.complete();
        } catch (Exception e) {
            startContext.failed(new StartException(e));
        }
    }

Reply to this message by going to Community

Start a new discussion in JBoss AS7 Development at Community