You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@servicemix.apache.org by econoplas <ec...@gmail.com> on 2010/02/22 05:31:27 UTC

Better way than manually adding "DynamicImport-Package:*" to camel-ibatis and ibatis-sqlmapper bundles?

This is partly a how-to and partly a request for a better workaround (if
any).

Working with ServiceMix 4.2.0 this week, we ran into the "no suitable driver
found" problem with camel-ibatis (2.2.0.fuse-01-00) for which the only
suitable work-around we could find (thanks to earlier posting from
cmoulliard) was to add to the bundle's MANIFEST.MF:

DynamicImport-Package: *

We did this for both the ibatis-sqlmap (2.3.4.726_2) and camel-ibatis
bundles in order to find the JDBC driver at runtime (in our test case
HSQLDB).

We also discovered that implementing our own BundleActivator that pre-loaded
the org.hsqldb.jdbcDriver was necessary, but later found that we could
accomplish the same thing by simply adding 
jdbc.drivers=org.hsqldb.jdbcDriver to the $SMX_HOME/etc/system.properties
file.  Not sure if this is a good idea though.  After testing again today,
without the BundleActivator and without the jdbc.drivers= entry in
system.properties, things seemed to still work as long as I had the
DynamicImport-Package: * in the aforementioned bundles.  So perhaps the
driver preloading isn't really required.  I'm not sure yet.

I guess the question is whether there is some other injection mechanism for
updating the bundle MANIFEST.MF so we don't have to manually edit these
bundles every release?

If the addition of the DynamicImport-Package is always required, perhaps I
might inquire of the maintainers of these bundles if they'd be willing to
modify the headers in MANIFEST.MF to always include the DynamicImport?

Thanks in advance for any advice for a better work-around.

-- 
View this message in context: http://old.nabble.com/Better-way-than-manually-adding-%22DynamicImport-Package%3A*%22-to-camel-ibatis-and-ibatis-sqlmapper-bundles--tp27682769p27682769.html
Sent from the ServiceMix - User mailing list archive at Nabble.com.