[jboss-dev-forums] [Design the new POJO MicroContainer] - Re: Deployers Ordering Issue

alesj do-not-reply at jboss.com
Thu Jun 25 07:56:19 EDT 2009


"richard.opalka at jboss.com" wrote : 
  | Rule no. 1: Always implement comparable if your object instances represents natural order.
  | 
There is a better rule.
Only implement what you actually need.
There is no need to really compare stages, at least not atm.

But you could do it this way:
ControllerStateModel model = ...;
DeploymentStage ds1 = ...;
ControllerState cs1 = new ControllerState(ds1.getString());
DeploymentStage ds2 = ...;
ControllerState cs2 = new ControllerState(ds1.getString());
boolean isBefore = model.isBefore(cs1, cs2);

"richard.opalka at jboss.com" wrote : 
  | "alesj" wrote : 
  |   | If we have to resort to name comparison it either means:
  |   | * the order of how we process attachments doesn't matter
  |   | * you are describing/ordering your deployers wrong == lack of info
  |   | 
  | Sorry, I don't understand this? Could you explain me what do you mean, please.
What don't you understand?

If I need A and output B, and then need C and output D,
why should I care how are they ordered?

But if I in both cases need A and output B,
where in 1st deployer I set A.someprop
but in 2nd deployer I use that A.someprop,
all I need to do is express this via proper input/output,
e.g. D1.output=A.someprop, D2.input=A.someprop

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

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



More information about the jboss-dev-forums mailing list