Details
-
Bug
-
Status: Open
-
Major
-
Resolution: Unresolved
-
2.3.6
-
None
-
None
-
None
Description
The attached jar contains following class
package com; public class Test { public void init() throws Exception { System.out.println("Starting ..."); } }
The attached blueprint file initializes the bean using the init method. If the both files are deployed using hot deploy, the method init seems to be called twice after Karaf restart.
karaf@root> Starting ... Warning: org.apache.xerces.jaxp.SAXParserImpl$JAXPSAXParser: Property 'http://www.oracle.com/xml/jaxp/properties/entityExpansionLimit' is not recognized. Compiler warnings: WARNING: 'org.apache.xerces.jaxp.SAXParserImpl: Property 'http://javax.xml.XMLConstants/property/accessExternalDTD' is not recognized.' Starting ...
After deleting the data directory before starting Karaf, the method is called once
karaf@root> Warning: org.apache.xerces.jaxp.SAXParserImpl$JAXPSAXParser: Property 'http://www.oracle.com/xml/jaxp/properties/entityExpansionLimit' is not recognized. Compiler warnings: WARNING: 'org.apache.xerces.jaxp.SAXParserImpl: Property 'http://javax.xml.XMLConstants/property/accessExternalDTD' is not recognized.' Starting ...
The bean is probably started once from the cached bundle and next is refreshed when it is detected in deploy directory.
This effect does not occur in Karaf 2.x, 3.0.x and master
Attachments
Attachments
Issue Links
- blocks
-
SM-2325 Blueprint bean loading multiple times
- Closed