Hello,
Just a quick update. I just resolved the FELIX-1159 issue. This allows
to specify the version of the factory required by an instance:
<component classname="..." version="1.0"/>
<component classname="..." version="1.1"/>
<instance component="..." version="1.0"/> -> Use the version 1.0
<instance component="..." version="1.1"/> -> Use the version 1.1
<instance component="..."/> -> Any version
It also defines the "bundle" constant reusing the bundle version:
<component classname="..." version="bundle"/> -> Use the bundle version
This should fix your issue. Let me know if something is missing.
Regards,
Clement
On 15.05.2009, at 11:07, Clement Escoffier wrote:
Hello,
This is not really supported for the time being (except if you
create your instances "manually" (from the Factory service
directly). I fill out the Jira issue https://cwiki.apache.org/jira/browse/FELIX-1159
. I hope to be able to fix it soon.
Be aware that this feature will not be compatible with the
configuration admin, selecting the ManagedServiceFactory by using
the service.pid (i.e. the factory name).
Regards,
Clement
On 14.05.2009, at 19:07, Vrignaud Etienne wrote:
Hi,
I am trying to figure out how we can manage to run in Felix several
versions
of the same component that is using iPojo.
iPojo use a component name to create component instances.
My problem is that with the time some components will evolve and
there
version number will increase. The old version can remain used as
mandatory
dependency by other bundles. So we will have to start several
versions of
the same component.
I have noticed that if I set a different name for each component (for
example I add the version number into the component name)
everything just go
fine.
But, I think that it's not a good practice to rename the component
name
given in the @Component annotation each time a new release is out.
And in my
case, it’s quite impossible.
I would like know how it’s possible to manage this case using iPojo.
To help understanding better my concern, I have made a test case.
It is composed of two OSGi bundles. (module and plugin).
module is somewhat a container of plugins.
In my test case, I have module V1.0, plugin V1.0
and module V2.0, plugin V2.0
The test consists of starting those four OSGi bundles and see what
happens.
As the components are named identically ModuleManager and MyPlugin
for V1.0
and V2.0, the component of one bundle is instantiated twice.
To launch the test case, just type "mvn install" in v1 and v2.
And then type "./run.sh" in the Felix directory. You will see what
happens.
Don't hesitate to tell me if I am not so clear in my explanations.
Regards,
/Etienne
http://www.nabble.com/file/p23544877/ipojo-component-testcase.tar.gz
ipojo-component-testcase.tar.gz
--
View this message in context:
http://www.nabble.com/iPojo---How-to-create-several-instances-of-the-same-component-installed-in-different-versions-tp23544877p23544877.html
Sent from the Apache Felix - Users mailing list archive at
Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]