[
https://issues.apache.org/jira/browse/FELIX-4720?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14242261#comment-14242261
]
Valentin Valchev commented on FELIX-4720:
-----------------------------------------
I looked at Log Service TCK and completely agree that Equinox Log service will
pass it.
Anyway, to help your implementation, here are some problems that we've met
before:
1. You have a bundle with native code
- there is an exception class declared in that bundle
- the exception is thrown somewhere and logged
- if the log entry, with the exception above is inside the log queue, the
bundle update will fail
* the reason is that the class loader of the first version of the bundle cannot
be discarded, so the native library is not unloaded. When the new version is
installed, and tries to load the native library it will fails, because the
library is already loaded.
! the solution is to use the method mentioned by LogReaderService.getLog() - to
wrap the exception so you don't keep references to the original exception
2. If you are using IBM J9/VAME virtual machine :
- you may throw and log IOException as example
- in that case your bundle becomes part of the stack trace
- your bundle is updated or uninstalled
- another bundle uses the log reader to get the exceptions
- when that bundle gets the IOException and tries to print the stack trace the
virtual machine dies
! the solution is same as above
--
At ProSyst we using Web Console a lot and we also invest a lot of it's
development and improvements. We also contributed few other plugins that covers
core OSGi functionality like user admin and upnp plugin. We've already invested
hundreds of man-hours on development and testing. I convinced my boss that
Apache Web Console is good and quality product, that's why we invested so much
in it. I personally will not be happy, if Web Console is the cause of JVM
crashes and be blamed for that.
> Web Console and Gogo rely on Log history buffer in the Log Service
> ------------------------------------------------------------------
>
> Key: FELIX-4720
> URL: https://issues.apache.org/jira/browse/FELIX-4720
> Project: Felix
> Issue Type: Bug
> Components: Gogo Command, Web Console
> Reporter: Peter Kriens
>
> The OSGi Log Reader Service has a command to get the history of the log.
> However, the specification states that this history can be empty. The Equinox
> framework is nowadays registering a Log Reader Service that has such an empty
> history to prevent pinning objects in memory.
> Using the history this way was always at odds with the specification since
> the history was only intended to hold the start up events. The primary model
> of the Log Service is a dispatcher.
> I suggest that the Gogo log command and the Web Console maintain their own
> history buffer to become independent on this fragile history buffer in the
> Log Reader service.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)