Le Vendredi 7 Juillet 2006 16:14, Frank Schönheit - Sun Microsystems Germany a écrit : > I see the potential for sharing code here, but I'm not sure whether a > shared "first-level" driver lib would be the way to go. Reason is that > some differences in the different implementations can only be > implemented on code level, /me thinks. > > That is, the driver differ, for instance, in their acceptsURL behaviour: > Every driver decides the acceptance depending on a fixed URL pattern. > This could for instance be put into the configuration (so we could > register some "KAB driver" which states its URL pattern sdbc:kaddress:* > in the configuration, and the generic driver finds configuration > information (along with the sdbc:mozab:* and sdbc:evoab:*), and thus > returns |true| in acceptsURL. > > On the other hand there is code other than just "load the secondary lib, > if this fails, throw a generic error" in the different drivers. This > code would need to be a parameter of the "generic" driver, depending on > which connection type it should actually create. This boils down to: You > still need a small piece of code from your primary lib, which is > different for different drivers. > > Or I missed something in your suggestion :)
My suggestion is just to merge all "primary" libs into one single lib. Not sharing, merging. Not a factorization, rather an addition. This primary lib would have little to do with a driver. It would rather be a "driver loader". And yes, you are right, it would not only contain generic code, but also driver-specific code. AcceptUrl() could go there, for each driver. The primary lib would basically be "for each driver, check the environment to determine whether I should load the driver. In a driver-specific way.". Just ideas, you know... They might be useless. -- - Maman, quel est le cri de la fourmi ? - La fourmi croonde, mon chéri. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
