karaf-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jean-Baptiste Onofré (JIRA) <j...@apache.org>
Subject [jira] [Updated] (KARAF-2420) blueprint deployer: redeploy untouched blueprint xml in deploy folder after restart
Date Fri, 25 Jul 2014 14:43:42 GMT

     [ https://issues.apache.org/jira/browse/KARAF-2420?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Jean-Baptiste Onofré updated KARAF-2420:
----------------------------------------

    Fix Version/s: 2.4.0

> blueprint deployer: redeploy untouched blueprint xml in deploy folder after restart
> -----------------------------------------------------------------------------------
>
>                 Key: KARAF-2420
>                 URL: https://issues.apache.org/jira/browse/KARAF-2420
>             Project: Karaf
>          Issue Type: Bug
>          Components: karaf-core
>    Affects Versions: 2.2.8, 2.2.11
>         Environment: Karaf 2.2.11
> JNDI feature installed
> HSQLDB 2.3.0
>            Reporter: Uwe Barthel
>             Fix For: 2.2.12, 2.4.0, 4.0.0, 3.0.2, 2.3.6
>
>         Attachments: datasource.xml
>
>
> *Preparation*
> 1) Start clean Karaf instance
> 2) Install Aries JNDI and HSQLDB via:
> {code}
> karaf@root> bundle:install -s mvn:org.hsqldb/hsqldb
> karaf@root> feature:install jndi
> {code}
> 3) Copy attached blueprint {{Datasource}} service description into {{deploy/}} folder
and check if the blueprint deployer creates a bundle ({{datasource.xml}} bundle).
> 4) Deploy a blueprint service bundle use {{Datasource}} internally via JNDI lookup via
KAR file ({{consumer}} bundle)
> 5) Stop Karaf instance
> 6) Start Karaf
> *Problem*
> If a blueprint service bundle is installed depending on the {{Datasource}} service. This
bundle may or may not start depending of the {{Datasource}} service state. It's a timing issue
and difficult to reproduce with a simple test case.
> The {{datasource.xml}} bundle will start up and Aries JNDI setup the InitialContext and
exports the {{javax.sql.Datasource}} service.
> _FINE_
> The dependency for the {{Datasource}} service (incl. filter on the datasource name {{(osgi.jndi.service.name=jdbc/hsqlds)}})
is resolvable and the {{consumer}} bundle is starting up.
> Within the {{#activate(...)}} method of the service implementation (created and exported
via blueprint service on {{consumer}} bundle) the code is trying to get the {{Datasource}}
reference via JNDI lookup.
> _*BUT*_
> +At the same time+ the {{fileinstall}} get two file references from {{deploy/}} folder.
It is the KAR file (contains the blueprint {{consumer}} bundle) and the KAR deployer don't
redeploying it if timestamp of the file was not changed. The other file is the {{datasource.xml}}
file. The blueprint deployer *redeploy* this file.
> It seems that the {{Datasource}} service reference for the {{consumer}} bundle was resolved
*before* redeploying the {{datasource.xml}} but the JNDI lookup starts after deregistering
the {{Datasource}} service from JNDI during the redeploy of the {{datasource.xml}}.
> The start of the {{consumer}} bundle failed.
> I tried the configuration {{org.apache.aries.blueprint.synchronous=true}} but it doesn't
help either.
> *temp. Solution*
> 1) Stop Karaf
> 2) Remove blueprint xml file from {{deploy/}}
> 3) Start Karaf
> *possible Solution*
> a) Create {{.timestamp}} file for blueprint service xml files and don't redeploy the
xml if these files wasn't touch. Like the KAR deployer does.
> b) Use bundle version with file specific content like the modification timestamp (_0.0.0.20130731071830100_)
instead of the default bundle version (_0.0.0_) and check version number before reinstall
the generated bundle.
> c) ???



--
This message was sent by Atlassian JIRA
(v6.2#6252)

Mime
View raw message