JBoss Community

Logging deployment errors on start-up

created by Alexey Loubyansky in JBoss AS7 Development - View the full discussion

At the moment it's silent. Suppose there is a deployment unit in the repository and listed in the config in <deployments> which is invalid and can't be deployed. Starting the server (standalone, at least) the logs will contain a line like

 

"INFO  [org.jboss.as.deployment] (pool-1-thread-2) Activating deployment: managedbeans.jar"

 

but nothing more even if the deployment fails. One of the easiest ways to fix this would probably be using a UpdateResultHandler which would log things from AbstractServerModelUpdate

 

/**     * Apply the boot action for this update.  This action is only executed when the update is processed during     * server startup.  By default, this method simply invokes {@link #applyUpdate(UpdateContext, UpdateResultHandler, Object)}     * directly, but this behavior should be overriden if a different action must be taken at boot time.     *     * @param updateContext the update context     */    public void applyUpdateBootAction(UpdateContext updateContext) {        applyUpdate(updateContext, UpdateResultHandler.NULL, null);    }

 

instead of using UpdateResultHandler.NULL.

 

Any objections or other suggestions?

Reply to this message by going to Community

Start a new discussion in JBoss AS7 Development at Community