[Design the new POJO MicroContainer] - Re: Deployers Ordering Issue
by richard.opalka@jboss.com
"alesj" wrote :
| And you as well for not shutting my mouth on the first post. :-)
Agreed
"alesj" wrote : You should simply point this fact when I closed the issue,
| since the rest of the discussion really went in all sorts of wrong directions.
|
Yes, it was really a long round, uuuf ;)
"alesj" wrote :
| The lazy was never meant as *you* being lazy, but in general. (hope you didn't take it personally ;-))
| Specially with checking the existing deployers, which is very simple to do with statistics.
I knew it's just a phrase.
"alesj" wrote :
| I'll now try to get to the bottom of the *real* issue. :-)
IMHO it's the fact you're not validating the inputs (as mentioned so many times).
But new impl should take deployer stages into account, because domino sorting happens only on deployers on the same stage in current impl.
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4240020#4240020
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4240020
15 years, 6 months
[Design of Messaging on JBoss (Messaging/JBoss)] - Re: Journal Cleanup and Journal Compactor
by timfox
"clebert.suconic(a)jboss.com" wrote :
|
| The problem is, when deleteing or updating a record, I don't know where the AddRecord is going to be located at. So, I don't know where to add the negative value to.
|
| So, what I'm thinking as a solution is:
|
| - During compacting, all Adds, updates and deletes are stored to the current-file, as we aways do.
|
| - But instead of discounting POSFiles right away, I cache those IDs on a collection. When I'm done compacting I do a fast operation applying the reference counts accordingly.
|
| - Case the server is interrupted during reload, the delete or update will take the original location of the record.
|
Isn't it simpler than this?
When compacting you don't touch the information in memory. So if an update or delete comes in you just update as normal.
Then when the compacting is done you just do a quick switch over in memory.
I don't see why you need to cache anything.
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4240019#4240019
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4240019
15 years, 6 months
[Design the new POJO MicroContainer] - Re: Deployers Ordering Issue
by richard.opalka@jboss.com
"alesj" wrote : "richard.opalka(a)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.
|
Agreed
"alesj" wrote :
| 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);
|
IMHO ds1.compareTo(ds2) its more intuitive.
Your solution includes whole MC knowledge people usually don't have ;)
"alesj" wrote :
| But if I in both cases need A and output A, 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
Then tell me what's wrong with this? Where's the lack of info I didn't provide?
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4240006#4240006
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4240006
15 years, 6 months