Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Rich Client Platform (RCP) » Database layer via ExtensionPoint, classloading issues
Database layer via ExtensionPoint, classloading issues [message #985557] Thu, 15 November 2012 13:45 Go to next message
Heinzi Muella is currently offline Heinzi MuellaFriend
Messages: 1
Registered: November 2012
Junior Member

i am using the eclipse RCP to build some plugins. Now i wanted to have a plugin that
is responsible for saving and loading objects to a persistent storage.

I plan to have a plugin offer a service for saving and loading, that will take care of some things
above simple loading and saving.

I used db4o as a database with the acording OSGI Plugin ,that i slightly modified to incorporate
Eclipse BuddyLoading. That modification was necessary to dodge classloading issues.

My plan was to "inject"the conrete implementation of a database in an extra plugin via extension points.
So that conrecte implementation could be changed later.

Now i found that the EclipseBuddyPolicy makes it necessary to have the concrete database(db4o) in dependencies.
That would hinder my plans as a dependency would not make the component exchangeable.

So desired structure would be:

MyDatabasePlugIn(offers ExtensionPoint) -//-> ConcreteDatabasePlugIn.

There should not exist a dependency between those too, but this would be necessary for db4o
to access classloading via EclipseBuddyPolicy.

Is there a way to solve this?

Re: Database layer via ExtensionPoint, classloading issues [message #986427 is a reply to message #985557] Tue, 20 November 2012 11:53 Go to previous message
Thorsten Schlathölter is currently offline Thorsten SchlathölterFriend
Messages: 303
Registered: February 2012
Location: Düsseldorf
Senior Member
could you elaborate on the usage of BuddyPolicy? The BuddyPolicy should be used with care and should be avoided if possible. It is seldomly necessary. For the architecture you describe above it is not necessary.

1. Write your plugin, that exports the extension point
2. Write onother plugin that implements this extension point and imports the db4o bundle. The implementation of your extension point can then use db4o. This plugin might as well be a fragment to the db4o bundle.
3. (optional) Write yet another plugin/fragment that implements the extension point while importing another db implementation.


Previous Topic:How to use IElementUpdater
Next Topic:How to set a part to default trim toolbar when it minimize
Goto Forum:

Current Time: Tue Apr 24 07:06:29 GMT 2018

Powered by FUDForum. Page generated in 0.01334 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software