[
https://issues.apache.org/jira/browse/KARAF-3918?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15047407#comment-15047407
]
Jean-Baptiste Onofré commented on KARAF-3918:
---------------------------------------------
Basically, the DynamicImport-Private header is not the cause of the refresh. I
removed this header in the BlueprintTransformer and the bundle is refreshed
anyway (whatever the feature I install):
{code}
karaf@root()> bundle:headers 52
Bundle 52
---------
Manifest-Version = 2
Bundle-ManifestVersion = 2
Bundle-SymbolicName = test.xml
Bundle-UpdateLocation = blueprint:file:/home/jbonofre/test.xml
Bundle-Version = 0.0.0
Import-Package =
org.apache.karaf.features
karaf@root()> feature:install -v jndi
...
karaf@root()> feature:install -v jndi
The specified feature: 'jndi' version '4.0.4.SNAPSHOT' is already installed
Adding features: jndi/[4.0.4.SNAPSHOT,4.0.4.SNAPSHOT]
Changes to perform:
Region: root
Bundles to update:
test.xml/0.0.0 with blueprint:file:/home/jbonofre/test.xml
Stopping bundles:
test.xml/0.0.0
Updating bundles:
blueprint:file:/home/jbonofre/test.xml
Stopping bundles:
test.xml/0.0.0
Refreshing bundles:
test.xml/0.0.0 (Bundle will be updated)
Starting bundles:
test.xml/0.0.0
Done.
karaf@root()> feature:install jdbc
...
Stopping bundles:
test.xml/0.0.0
Refreshing bundles:
test.xml/0.0.0 (Bundle will be updated)
...
{code}
The problem is in the feature Deployer: the computeDeployment() method is not
fully correct when dealing with blueprint XML directly. I'm fixing that.
> An installed blueprint.xml has always been updated and restarted when install
> another unrelated feature
> -------------------------------------------------------------------------------------------------------
>
> Key: KARAF-3918
> URL: https://issues.apache.org/jira/browse/KARAF-3918
> Project: Karaf
> Issue Type: Bug
> Components: karaf-feature
> Affects Versions: 4.0.0
> Environment: Java 7
> Reporter: Xilai Dai
> Assignee: Jean-Baptiste Onofré
> Fix For: 4.0.4
>
>
> There is an installed blueprint.xml. (by install -s
> blueprint:mvn:org.abc/my-project/1.0-SNAPSHOT/xml, or deploy this
> blueprint.xml into deploy folder).
> then, if you do feature:install xxxx, to install some other feature (no
> dependencies to the blueprint.xml above), the installed blueprint.xml will
> always be updated and restarted, that's not expected behavious.
> After checking with org.apache.karaf.features.internal.service.Deployer
> class, I found that the old checksum will only be calculated in case of url
> start with "jar:" (Line 1159), so in case of the url start with "blueprint:",
> the new checksum will never equal with old checksum, then it will be put into
> deployment.toUpdate Map.
> The Deployer class should be fixed for "blueprint:" deployment.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)