Dynamic binding of jar file delivered meanwhile runtime. [message #102124] |
Thu, 29 November 2007 16:09 |
Eclipse User |
|
|
|
Originally posted by: felix.dobslaw.prolifics.de
Hi,
I am using Eclipse 3.3 for developing a plugin for the eclipse environment.
I have a problem, concerning the build path. I have 2 plugins (Provider <
- > Consumer). I want to realize the dependency
like a contract. Consumer sets Provider into the dependency and has to
deliver certain information over an Interface, so the Provider can work
with it (by an Extension Point).
This works already fine; the information arrives and the producer can work
with it.
However, a new feature makes it necessary for the provider to add a jar
file to the buildpath, which he doesn't know before the startup; the
Consumer tells him meanwhile startup the absolute path for binding the jar.
To make it concrete, it is about JDBC-drivers for whoever
database-publisher.
I tried to change the Bundles "Header" (class "Dictionary" representing
the manifest.mf) by adding jar entries to the classpath meanwhile startup
(in MyPlugin.start(BundleContext)), but receive an
UnsupportedOperationException. Should this not somehow be possible; am I
digging on the wrong place?
Would be glad if someone has any ideas.
Best regards,
Felix
|
|
|
Re: Dynamic binding of jar file delivered meanwhile runtime. [message #102173 is a reply to message #102124] |
Fri, 30 November 2007 13:55 |
Eclipse User |
|
|
|
Originally posted by: jacek.pospychala.pl.ibm.com
Felix,
Would it be possible for you to use fragments to carry additional jars?
This way I believe you could add jar to classpath of already installed
bundle (in this case to fragment Master).
As far as I know, one way to manipulate bundle classpath from outside is
thru Classpath Hook but it won't help you.
Felix Dobslaw wrote:
> Hi,
>
> I am using Eclipse 3.3 for developing a plugin for the eclipse
> environment.
>
> I have a problem, concerning the build path. I have 2 plugins
> (Provider < - > Consumer). I want to realize the dependency
> like a contract. Consumer sets Provider into the dependency and has to
> deliver certain information over an Interface, so the Provider can
> work with it (by an Extension Point).
> This works already fine; the information arrives and the producer can
> work with it.
>
> However, a new feature makes it necessary for the provider to add a
> jar file to the buildpath, which he doesn't know before the startup;
> the Consumer tells him meanwhile startup the absolute path for binding
> the jar.
>
> To make it concrete, it is about JDBC-drivers for whoever
> database-publisher.
>
> I tried to change the Bundles "Header" (class "Dictionary"
> representing the manifest.mf) by adding jar entries to the classpath
> meanwhile startup (in MyPlugin.start(BundleContext)), but receive an
> UnsupportedOperationException. Should this not somehow be possible; am
> I digging on the wrong place?
>
> Would be glad if someone has any ideas.
>
> Best regards,
>
> Felix
>
|
|
|
Re: Dynamic binding of jar file delivered meanwhile runtime. [message #102267 is a reply to message #102173] |
Sat, 01 December 2007 14:28 |
Eclipse User |
|
|
|
Originally posted by: Felix.Dobslaw.prolifics.de
Hi Jacek,
as far as I understood the fragment principle (concerning build path), it
is a way to supply certain jars for the host-plugin, which it could need
meanwhile runtime, due to some circumstances (for example the OS in use).
But this is a fixed set of circumstances, the fragment could take care of.
The jar-pathes that I pass from the customer to the provider(host) plugin
could differ every start; and it might be drivers of databases I never
heart about; as long as they fulfill the jdbc interfaces. Please correct
me, when there is something I oversee.
Thank you so far Jacek!
Best regards,
Felix
|
|
|
Powered by
FUDForum. Page generated in 0.02607 seconds