Hi Alex,

I still have no clue on how to resolve the issue.

While looking at the code of the codec in the 'DefaultLdapCodecService' class I 
saw we're accessing the "org.apache.felix.framework.*" packages to launch a new 
Felix instance.
Looking back at the Manifest of the 'org.apache.felix.framework' bundle 
(attached at [1]), I found that this packages is marked as private:
> Private-Package: org.apache.felix.framework,[...]

That might be the cause of Studio issues.

As well as the fact that both Eclipse and this Felix bundle embeds and exports 
'org.osgi.*' packages, making it complicated for bundles importing such 
packages to select which bundle to use.

For those who are not aware of the situation, in the 'm1' branch Studio cannot 
be launched anymore. Most of our plugins are being "invalidated" and not 
resolved by Eclipse OSGI container.
The situation is the consequence of the introduction of Felix in the codec part 
of Shared.

I will try to dig some more.
Any help appreciated. ;)

Regards,
Pierre-Arnaud


[1] - MANIFEST.MF file from bundle 'org.apache.felix.framework' version 3.0.8:
> Manifest-Version: 1.0
> Built-By: pauls
> Created-By: Apache Maven Bundle Plugin
> Bundle-License: http://www.apache.org/licenses/LICENSE-2.0.txt
> Bnd-LastModified: 1296420512109
> Export-Package: org.osgi.service.packageadmin;uses:="org.osgi.framewor
>  k";version="1.2",org.osgi.framework.hooks.service;uses:="org.osgi.fra
>  mework";version="1.0",org.osgi.service.url;version="1.0",org.osgi.ser
>  vice.startlevel;uses:="org.osgi.framework";version="1.1",org.osgi.fra
>  mework;version="1.5",org.osgi.framework.launch;uses:="org.osgi.framew
>  ork";version="1.0",org.osgi.util.tracker;uses:="org.osgi.framework";v
>  ersion="1.4"
> Bundle-Version: 3.0.8
> Ignore-Package: java.lang,org.osgi.framework.hooks.service,java.nio.ch
>  annels,java.net,android.dalvik,org.osgi.service.startlevel,java.secur
>  ity,javax.security.auth.x500,org.osgi.framework,dalvik.system,java.la
>  ng.reflect,org.osgi.service.packageadmin,org.osgi.service.url,java.ut
>  il,java.lang.ref,java.io,java.security.cert,org.osgi.framework.launch
>  ,java.util.zip,org.osgi.util.tracker,java.util.jar
> Bundle-Name: Apache Felix Framework
> Bundle-Description: OSGi R4 framework implementation.
> Build-Jdk: 1.5.0_22
> Private-Package: org.apache.felix.framework,org.apache.felix.framework
>  .cache,org.apache.felix.framework.capabilityset,org.apache.felix.fram
>  ework.ext,org.apache.felix.framework.resolver,org.apache.felix.framew
>  ork.util,org.apache.felix.framework.util.manifestparser
> Bundle-DocURL: http://www.apache.org/
> Bundle-ManifestVersion: 2
> Bundle-Vendor: The Apache Software Foundation
> Bundle-SymbolicName: org.apache.felix.framework
> Tool: Bnd-0.0.255


On 8 févr. 2011, at 23:37, Alex Karasulu wrote:

> Pierre,
> 
> If you cannot find a solution to our new problem, we may have to write
> a separate codec service implementation just for Studio. Unfortunately
> this means we're probably going to need 2 separate modules instead of
> a single ldap-codec. Let me break down what I am thinking:
> 
> ldap-codec => For Studio and Future Pure OSGi Environments
>    1 - pure OSGi codec service bundle
>    2 - bundle activator registers the codec service within any OSGi 
> environment
>    3 - studio must accesses codec service running inside equinox
>    4 - might need some extra (custom) goooo inside the MANIFEST.MF to
> work in eclipse/equinox environment
> 
> ldap-codec-standalone => For Present Client and Server (ApacheDS)
>    1 - a bundle, but no activator
>    2 - default service implementation embeds Felix
>    3 - starts up the codec bundle first, whose activator registers
> the pure OSGi codec service in Felix
>    4 - gets handle on the service inside Felix
>    5 - then discovers, and starts up extension plugins
>    6 - default implementation not the same as service inside Felix,
> default implementation wraps service inside Felix
> 
> OK so this is a bit involved. If you cannot figure something out
> tomorrow maybe we have no choice but to pursue this approach. In step
> 3 in first block above:
> 
>    3 - studio must accesses codec service running inside equinox
> 
> I presume this is possible but it will take know how in studio. I'm
> sure it's really easy to access a registered service. Never done it
> myself so would need your feedback here.
> 
> Cheers,
> Alex

Reply via email to