[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Newsgroup Home]
[news.eclipse.newcomer] Re: Loading jars dynamic from plugins

Felix Dorner wrote:

Hey Franz,

for example I wan't to "drop in" jdbc drivers, that will be used by the core app loading them the "normal" way with Class.forName("com.mysql.jdbc.Driver"). I don't know witch driver the end user will use so it can be configured and added by installing the right plugin.

Maybe something like this would work (but I'm an eclipse newbie, so handle with care):

Your core plugin would abstract over the different database drivers and only 'talk' the java database interface language. Further, your core defines an extension point where one (or more) driver-plugins can register themselves. Each driver-plugin just wraps (and exports) one or more specific database drivers. The core plugin would be aware of the registered driver plugins and let users choose between them. Note, that the extension point mechanism is 'declarative', which means that your core plugin can create the driver-list without the need to load any driver-plugin class at all. This lazy-loading lemma is used all over in eclipse.

I was thinking of that to but jdbc was just an example. But I will give this a try and create my own "jdbc Driver Decorator".


Felix

Thanks Philipp