[jboss-dev-forums] [JBoss Microcontainer Development] - Re: Optimizing ControllerState

adrian@jboss.org do-not-reply at jboss.com
Wed Oct 14 11:46:10 EDT 2009


The whole point is that you're supposed to be able to add/interpolate new states.
You might as well just make it an enum if you're going to add an ordinal to the state
(especially if they are sequential ;-)

The real problem is using an ad hoc shared list of states and having to find out where in
the list you are everytime, i.e. are you trying to transistion to before 
or after the current state.

Like we've discussed before, this logic goes away if you specify what
transistions/path the context should go through.
https://jira.jboss.org/jira/browse/JBKERNEL-48

The only hard part is for backwards comapbility you've got to generate a path
from the legacy shared states when somebody invokes

change(ControllerContext, newControllerState);

and similar for install() if the ControllerMode is AUTOMATIC.

So I'd spend my time on JBKERNEL-48 rather than trying to fix the before/after
stuff that is going to go away anyway.

View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4260341#4260341

Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4260341



More information about the jboss-dev-forums mailing list