Hi Alejandro,
in fact, it dosen't matter how many bundles are using classes/services
from another bundle and the OSGi aproach makes it very easy to e.g.
update or manage it. Also maybe in the future you (or a third party lib)
might use h2 for other purposes and you will then have lib duplications.
You even might see ClassCastExceptions in such scenarios.
As you have already seen, fighting the framework makes life harder than
neccessary.
In general (even though I do not recommend this in this case) when
working with eclipse, it should be enough to use the Manifest-Editor and
add the jar on the tab "Runtime" in the Classpath section (it must be
located inside your Bundle project!). Also make sure the jar is added to
your Binary Build (located i the buld tab) or it will not be included in
an exported artifact by default.
If you still encounter problems, you should provide more details (e.g.
MANIFEST, project layout, Runtime you are using to execute your bundle).
regards,
Christoph
Am 06.02.2014 20:48, schrieb Alejandro Villamarin:
Hello Christoph,
Thanks for your response. I was thinking in throwing the JAR in the
plugins folder in Eclipse and the create a listener that waits for the
service that the H2 bundle registers and then use it, that would be
the "OSGi" way...but I'm not sure that fits my case, since only one
bundle is going to access the H2 database, there is no need really for
my other bundles to access this db....thus, I think the second
scenario fits my needs better...that said, any example on how to setup
the bundle classpath in the manifest so it doesn't throw NFE all the
time? I've tried everything and is still crashing...
Regards,
Alejandro
--
You received this message because you are subscribed to the Google Groups "H2
Database" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/h2-database.
For more options, visit https://groups.google.com/groups/opt_out.