[jboss-dev-forums] [JBoss AS7 Development] - types of deployment errors and their handling

Alexey Loubyansky do-not-reply at jboss.com
Thu Aug 19 09:49:08 EDT 2010


Alexey Loubyansky [http://community.jboss.org/people/alex.loubyansky%40jboss.com] created the discussion

"types of deployment errors and their handling"

To view the discussion, visit: http://community.jboss.org/message/558137#558137

--------------------------------------------------------------
I'd like to understand the idea behind the current design, atm it's confusing to me. I want to clarify whether there is a central point for service startup/lifecycle error handling or different kinds of errors at different phases are supposed to go through different error handling code.


There is ServiceListener which has event callbacks including serviceFailed for startup errors. There are implementations of ServiceListener (like ServerStartupListener) that collect all the failures and then later they can be queried for the errors to handle/log them, etc.
ServiceListeners are available only inside BatchBuilder, BatchServiceBuilder, ServiceBuilder, ServiceController, so listeners can be invoked from only instances of those classes.

Question 1. There could be errors related to a service creation/initialization/start that happen before a service (service builder, controller, etc) is even created (as a Java object). E.g. the logic that is performed in ServiceActivator.activate(ctx) and errors like the deployment root doesn't exist, etc. So, should these errors be reported to ServiceListener? Currently, they are not and this logic executed outside of service builders and controllers, so they can't be reported to service listeners.

Question 2. There is BatchBuilder.install() method which may throw ServiceRegistryException. This method installs services going through the dependencies, etc. If errors happen, those errors are immediately propagated up and are re-thrown from install() w/o notifying the registered listeners. I guess, the listeners are actually supposed to be notified in this case?

--------------------------------------------------------------

Reply to this message by going to Community
[http://community.jboss.org/message/558137#558137]

Start a new discussion in JBoss AS7 Development at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2225]

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/jboss-dev-forums/attachments/20100819/07851143/attachment.html 


More information about the jboss-dev-forums mailing list