On 2/22/07, Roland Weber <[EMAIL PROTECTED]> wrote:
... I just wanted to point out that in HttpClient 3 (and 2), the class MultiThreadedHttpConnectionManager starts background threads when used. ...
Hi, Roland, Thanks for the tip. However, the bundling process simply repackages the library jar to include bundle metadata. With the bundle metadata, the jar can now be added to an OSGi runtime, but no code is actively started. Consumers of the bundle would need to be aware of the issue you mention. Besides some basics, like giving the bundle a name, the main purpose of the bundle metadata is to declare the packages the bundle imports and exports. This is the foundation for resolving dependencies in the OSGi framework. I've included the new MANIFEST.MF, below. The new values to look at are the "Import-Package" and "Export-Package" statements, as well as all the ones beginning with "Bundle-". As you can see this process is quite non-invasive; however, it is required to use this library in an OSGi runtime. Our hope is that this metadata is added by projects directly, obviating our need to provide repackaging at Felix. Enrique Manifest-Version: 1 Specification-Title: Jakarta Commons HttpClient Built-By: Michael Created-By: Bnd-0.0.107 Bundle-License: http://www.apache.org/licenses/LICENSE-2.0.txt Import-Package: javax.crypto,javax.crypto.spec,javax.net,javax.net.ssl ,org.apache.commons.codec,org.apache.commons.codec.binary,org.apache. commons.codec.net,org.apache.commons.httpclient,org.apache.commons.ht tpclient.auth,org.apache.commons.httpclient.cookie,org.apache.commons .httpclient.methods,org.apache.commons.httpclient.methods.multipart,o rg.apache.commons.httpclient.params,org.apache.commons.httpclient.pro tocol,org.apache.commons.httpclient.util,org.apache.commons.logging Export-Package: org.apache.commons.httpclient.util;uses:="org.apache.c ommons.httpclient,org.apache.commons.codec,org.apache.commons.logging ,org.apache.commons.codec.net",org.apache.commons.httpclient;uses:="o rg.apache.commons.httpclient.params,org.apache.commons.httpclient.aut h,org.apache.commons.httpclient.protocol,org.apache.commons.logging,o rg.apache.commons.httpclient.util,org.apache.commons.httpclient.cooki e,org.apache.commons.codec,org.apache.commons.codec.net",org.apache.c ommons.httpclient.cookie;uses:="org.apache.commons.httpclient.util,or g.apache.commons.httpclient,org.apache.commons.logging",org.apache.co mmons.httpclient.params;uses:="org.apache.commons.httpclient,org.apac he.commons.logging",org.apache.commons.httpclient.methods;uses:="org. apache.commons.httpclient.util,org.apache.commons.httpclient,org.apac he.commons.httpclient.params,org.apache.commons.httpclient.methods.mu ltipart,org.apache.commons.logging",org.apache.commons.httpclient.aut h;uses:="org.apache.commons.httpclient,org.apache.commons.httpclient. util,org.apache.commons.httpclient.params,javax.crypto.spec,org.apach e.commons.logging,javax.crypto,org.apache.commons.codec.binary",org.a pache.commons.httpclient.protocol;uses:="org.apache.commons.httpclien t.util,org.apache.commons.httpclient,org.apache.commons.httpclient.pa rams,javax.net,javax.net.ssl",org.apache.commons.httpclient.methods.m ultipart;uses:="org.apache.commons.httpclient.util,org.apache.commons .httpclient.methods,org.apache.commons.httpclient.params,org.apache.c ommons.logging" Bundle-Version: 3.0.1 Bundle-Name: commons-httpclient-osgi bundle Bundle-Description: This bundle simply wraps commons-httpclient-3.0.1. jar. Build-Jdk: 1.3.1_17 Ant-Version: Apache Ant 1.5.3 Bundle-DocURL: http://incubator.apache.org/felix/ Originally-Created-By: Apache Maven Bundle-ManifestVersion: 2 Bundle-Vendor: Apache Felix Project Implementation-Title: org.apache.commons.httpclient Bundle-SymbolicName: commons-httpclient-osgi Specification-Vendor: Apache Software Foundation Extension-Name: commons-httpclient Implementation-Version: 3.0.1 Package: org.apache.commons.httpclient Implementation-Vendor: Apache Software Foundation