[jboss-dev-forums] [Design the new POJO MicroContainer] - Re: Handling contexts in error
julien@jboss.com
do-not-reply at jboss.com
Wed Feb 20 08:32:20 EST 2008
So actually Ales is trying to explain a use case that I need MC to handle for me. Suppose we have the POJO:
| public class Bean {
|
| private int count = 0;
|
| public void start() throws InitializationException
| {
| if (count++ == 0)
| throw new InitializationException();
| }
|
| }
|
Can MC handle a use case where the failure is not trigerred by its initial state (bean meta data if I understand correctly) like in the use case I am posting ?
How can I handle the following transitions:
NOT_INSTALLED -> CREATE -> start() -> ERROR -> start() -> INSTALLED
if the Bean I listed above is reinstantiated every time it will fail whatsoever. If the same instance is used then it will fail only the first time.
Please try to get an answer understandable by someone that has little knowledge about MC.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4130743#4130743
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4130743
More information about the jboss-dev-forums
mailing list