felix-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Derek Baum (Resolved) (JIRA)" <j...@apache.org>
Subject [jira] [Resolved] (FELIX-2816) dependency manager calls init() twice
Date Sun, 13 Nov 2011 20:29:52 GMT

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

Derek Baum resolved FELIX-2816.
-------------------------------

    Resolution: Invalid

This is is invalid. One of the calls was due to the Servlet init() method.

Thanks to  Xander Uiterlinden for pointing this out.
                
> dependency manager calls init() twice
> -------------------------------------
>
>                 Key: FELIX-2816
>                 URL: https://issues.apache.org/jira/browse/FELIX-2816
>             Project: Felix
>          Issue Type: Bug
>          Components: Dependency Manager
>            Reporter: Derek Baum
>
> Log messages are placed at  the beginning of the component lifecycle methods (init, start,
stop, destroy).
> The number is the hashCode, which shows that init() is called twice on the same Object,
without intervening stop() or destroy():
> [Debug] [   ] MyServlet 1397120162 init: update=60
> [Debug] [   ] MyServlet 1397120162 start: endpoint=/myservlet period=60 history=null
> [Debug] [   ] MyServlet 1397120162 init: update=60
> [Debug] [   ] MyServlet add: gx2
> [Debug] [   ] MyServlet add: denzil
> The component is created as follows:
> 		manager.add(createComponent()
> 				.setImplementation(MyServlet.class)
> 				.add(createConfigurationDependency()
> 						.setPropagate(true)
> 						.setPid(PID))
> 	            .add(createServiceDependency()
> 	            		.setService(HttpService.class).setRequired(true))
> 	            .add(createServiceDependency()
> 	            		.setService(UserAdmin.class).setRequired(true))
> 				.add(createServiceDependency()
> 						.setService(MyStateStore.class).setRequired(false)
> 						.setCallbacks("addStore", "removeStore"))
> 				.add(createServiceDependency()
> 						.setService(HistoryService.class).setRequired(false))
> 				.add(createServiceDependency()
> 						.setService(LogService.class).setRequired(false))
> 		);

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Mime
View raw message