[ 
https://issues.apache.org/jira/browse/KARAF-2420?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13724857#comment-13724857
 ] 

Uwe Barthel commented on KARAF-2420:
------------------------------------

The depend reference is configured and will be resolved.

I've to describe the scenario more clearly and try to create a simple test case.
                
> 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
>
>         Attachments: datasource.xml
>
>
> 1) Start clean Karaf instance
> 2) Install 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.
> 4) Stop Karaf instance
> 5) Start Karaf
> The blueprint container got the installed {{Datasource}} service bundle:
> {code}
> 2013-07-30 23:12:53,804 | DEBUG | FelixStartLevel  | BlueprintExtender        
>         | 9 - org.apache.aries.blueprint - 0.3.2 | Scanning bundle 
> datasource.xml for blueprint application
> 2013-07-30 23:12:53,805 | DEBUG | FelixStartLevel  | BlueprintExtender        
>         | 9 - org.apache.aries.blueprint - 0.3.2 | Found blueprint 
> application in bundle datasource.xml with paths: 
> [bundle://59.0:0/OSGI-INF/blueprint/datasource.xml]
> {code}
> and exports the {{Datasource}} service.
> The {{fileinstall}} on {{deploy/}} folder found the initially blueprint 
> {{Datasource}} service XML file:
> {code}
> 2013-07-30 23:12:55,827 | INFO  | af-2.2.11/deploy | fileinstall              
>         | 6 - org.apache.felix.fileinstall - 3.2.4 | Installed 
> /home/barthel/work/app/apache-karaf-2.2.11/deploy/datasource.xml
> {code}
> and redeploying it.
> {code}
> 2013-07-30 23:12:55,875 | DEBUG | elixPackageAdmin | BlueprintExtender        
>         | 9 - org.apache.aries.blueprint - 0.3.2 | Destroying 
> BlueprintContainer for bundle datasource.xml
> 2013-07-30 23:12:55,881 | DEBUG | elixPackageAdmin | BlueprintEventDispatcher 
>         | 9 - org.apache.aries.blueprint - 0.3.2 | Sending blueprint 
> container event BlueprintEvent[type=DESTROYING] for bundle datasource.xml
> 2013-07-30 23:12:55,882 | DEBUG | elixPackageAdmin | BlueprintEventDispatcher 
>         | 9 - org.apache.aries.blueprint - 0.3.2 | Sending blueprint 
> container event BlueprintEvent[type=DESTROYED] for bundle datasource.xml
> {code}
> {code}
> 2013-07-30 23:12:55,951 | INFO  | af-2.2.11/deploy | fileinstall              
>         | 6 - org.apache.felix.fileinstall - 3.2.4 | Started bundle: 
> blueprint:file:/home/barthel/work/app/apache-karaf-2.2.11/deploy/datasource.xml
> {code}
> {code}
> 2013-07-30 23:12:58,174 | DEBUG | rint Extender: 2 | BlueprintContainerImpl   
>         | 9 - org.apache.aries.blueprint - 0.3.2 | Running blueprint 
> container for bundle datasource.xml in state Unknown
> 2013-07-30 23:12:58,174 | DEBUG | rint Extender: 2 | BlueprintEventDispatcher 
>         | 9 - org.apache.aries.blueprint - 0.3.2 | Sending blueprint 
> container event BlueprintEvent[type=CREATING] for bundle datasource.xml
> {code}
> {code}
> 2013-07-30 23:12:58,197 | DEBUG | rint Extender: 2 | ServiceRecipe            
>         | 9 - org.apache.aries.blueprint - 0.3.2 | Registering service 
> .component-1 with interfaces [javax.sql.DataSource] and properties 
> {osgi.service.blueprint.compname=dataSource, 
> osgi.jndi.service.name=jdbc/hsqlds}
> {code}
> *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.
> *temp. Solution*
> 1) Stop Karaf
> 2) Remove blueprint xml file from {{deploy/}}
> 3) Start Karaf
> *possible Solution*
> 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.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Reply via email to