[ 
https://issues.apache.org/activemq/browse/SMX4KNL-132?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=48523#action_48523
 ] 

Guillaume Nodet commented on SMX4KNL-132:
-----------------------------------------

I agree with you.  
Maybe a solution would be to first check the if the bundle is spring-powered 
(i.e. it has a Spring-Context manifest attribute and some xml files in the 
META-INF/spring folder).
I think determining the state will involve some heuristic:
  * if the spring context is to be published in the osgi registry (need to be 
checked from the Spring-Context manifest header), and if the context has 
already been published, this should mean the bundle has been corectly started
  * in all other cases, i'm not sure what we can do ....

Actually, I may have just found a better way: registering a instance of 
OsgiBundleApplicationContextListener in the OSGi registry may be the right way 
to do that.  We should receive events for sucessful starts and failures.

> OSGi bundle status doesn't match with the real state
> ----------------------------------------------------
>
>                 Key: SMX4KNL-132
>                 URL: https://issues.apache.org/activemq/browse/SMX4KNL-132
>             Project: ServiceMix Kernel
>          Issue Type: Bug
>    Affects Versions: 1.0.0
>         Environment: OS : Linux Debian
> Kernel : 2.6.26
> JDK : 1.6.0_01 (Sun)
> ServiceMix : 4.0-m1
>            Reporter: Jean-Baptiste Onofré
>            Priority: Minor
>
> When I deploy a bundle (using osgi install in the shell or putting in the 
> deploy directory), if I go to the SMX shell, I can see :
> service...@devfms-6:/> osgi list
> [...]
> [  82] [Active     ] [   50] FSB :: Services :: OSGi :: Automatic Simulation 
> (4.0)
> So it seems that my bundle is correctly deployed.
> But if I go to the log file (data/logs/servicemix.log), I can see an error in 
> my bundle :
> Caused by: java.io.FileNotFoundException: OSGi 
> resource[classpath:META-INF/cxf/transport/nmr/cxf-transport-nmr.xml|bnd.id=82|bnd.sym=automatic-simulation-osgi-service]
>  cannot be resolved to URL because it does not exist
> To avoid to confuse people, it will be great that the osgi list in the SMX 
> shell display error or inactive in place of active status.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to