Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[equinox-dev] Passing the context around


Hi,

I already had a similar question around the usage of services and context but I'd like to come back on that, because I'm really curious on the good practices (and I'm having problems).

Here is my situation:
        I have a bundle whose activator (name it ConfigurationActivator) run some code that may invoke some other classes (Converter) to generate files using XML parsing service.

So my questions are:
        Shall the service be acquired by the ConfigurationActivator and then republished (but where?) for the Converter to access it?
        Shall the ConfigurationActivator make its context available somewhere (for now I have a util class with a static method :-( ) and the converter get that to access it (this is the solution I chose for now).

I believe that a more general question is:
        What is the proper way for a random class of a bundle to acquire services, and put listeners on the framework?

Thank you

        PaScaL

Back to the top