[jboss-user] [JBoss Microcontainer Development] New message: "Re: Profiling the dependency project"
Ales Justin
do-not-reply at jboss.com
Wed Feb 10 08:35:10 EST 2010
User development,
A new message was posted in the thread "Profiling the dependency project":
http://community.jboss.org/message/525416#525416
Author : Ales Justin
Profile : http://community.jboss.org/people/alesj
Message:
--------------------------------------------------------------
> What I would really like is to be able to is somehow roll the getting of the context and the on demand context into one, something along the lines of
>
> *public* *boolean* resolve(Controller controller)
> {
> *boolean* previous = resolved;
>
> ControllerState state = dependentState == *null* ? ControllerState.INSTALLED : dependentState;
> ControllerContext context = controller.getContextAtStateOrEnableOnDemand(iDependOn, state);
>
> *if* (context == *null*)
> {
> resolved = *false*;
> }
> *else*
> {
> addDependsOnMe(controller, context);
> resolved = *true*;
> }
> }
>
>
>
>
> That way we only query for the context once instead of twice (three times before my last change)
I would add Controller::getContext(name, state, boolean enableOnDemand),
where previous code would have false for 3rd param.
How much improvement do we see if you add this?
--------------------------------------------------------------
To reply to this message visit the message page: http://community.jboss.org/message/525416#525416
More information about the jboss-user
mailing list