[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[equinox-dev] DS activation and error logging

Hi all,


I have recently upgraded to the release candidate versions of Equinox 3.5 and am seeing some unexpected behavior from DS.




The first question I have is in regard to component activation. In the RC versions I have noticed that if an exception is thrown in the activate() method, the SCR will attempt to instantiate the component again, a variable number of times. As far as I can tell, this number of times seems to be related to how many other bundles (components/services) are activated within the framework.


So, for example:


protected void activate(ComponentContext context)


System.out.println(“Failing activation”);

throw new RuntimeException();



“Failing activation” will be printed once for a run configuration that includes that bundle, the OSGi bundles, and nothing else. However, if a number of other bundles are activated, it can appear more than once. Is the SCR attempting to start this bundle repeatedly? If so, does that behavior jive with the specification? This behavior is new to the 3.5 releases, and did not occur in 3.4.2.




The second question I have is regarding the exception logging behavior of DS. What has been doubly confusing about this simple example situation is that I am not seeing any report about the exception thrown in the activate() method. No log file is generated in the configuration directory, and no stack trace is printed to the console. (I’m using the –consoleLog program argument). The strange thing is that if I use a much more complex run configuration with many bundles using DS, I can slip an exception into the activate() method of one of them and I will see the log file and console statements generated.


The set of Equinox jars I am using is (3.5 RC4):










Program arguments are:


-console –consoleLog




Any thoughts or advice would be appreciated.



-Mike Furtak

THIS MESSAGE IS INTENDED FOR THE USE OF THE PERSON TO WHOM IT IS ADDRESSED. IT MAY CONTAIN INFORMATION THAT IS PRIVILEGED, CONFIDENTIAL AND EXEMPT FROM DISCLOSURE UNDER APPLICABLE LAW. If you are not the intended recipient, your use of this message for any purpose is strictly prohibited. If you have received this communication in error, please delete the message and notify the sender so that we may correct our records.