Antwort: Re: [OJB-developers] JUnit Tests & MySQL / global IDs
Brought to you by:
thma
From: <Joa...@tp...> - 2002-03-21 15:01:56
|
> [snip global ids] >> This is a cool functionality! feel free to contribute it. > > I will commit it as soon as I've got a more flexible Configuration > System working. Ok, now it's done. It's configurable by setting SequenceManagerGlobalIDs to true/false. The default-setting (old-style, per-class IDs) will stay, unless explicitely reconfigured. It got a little bit of documentation in OJB.properties. I think I'll add some more documentation in the "true" documentation (as soon as I find the correct place for it). >>> The function is not yet configurable (except for setting >>> globalSequence = true in the constructor and recompiling), as I >>> don't to wait for the rewrite of BaseConfiguration (which I would >>> volunteer to do, if no-one has started work on it yet, maybe if >>> anyone has any design ideas. If not, I'll just do it how I see fit >>> ;-) >> >> >> I think that no one has started on the refactoring of the >> Configuration stuff. So you can just give it a try. > > OK, I'll try this. My idea is to unite Type-Conversion and > Default-Values so that an incorrect entry could result in a good > log-entry and the default value beeing used. something like > getBoolean("someConfiguration", true) and > getInteger("someConfiguration", 42) and so on. Done & checked in. Basically you now have the ability to do a getString, getBoolean, getInteger with default values. Additionally there's a getClass-Function, that can even check, wether the specified class implements/extends the correct Interface/Baseclass. And getStrings() is just the next-generation parseSeperatedString(). Right now only PersitenceBrokerFactoryConfiguration and SequenceManagerHighLowImpl use these functions. I'm pretty sure that some of PersistenceBrokerFactoryConfigurations getter-methods can be made obsolete by doing direct get<type>-access in the plugabble classes (like getSequenceManagerGrabSize()). regards Joachim Sauer |