I'm facing a problem that seems to have started after some changes that has
forced changes in the startup order/timing of some components.
Using Paxweb 7.2.26 with http whiteboard. I have here a Filter component
that is being bounced a few times and ultimately when page is loaded, it
ends up using an instance that has been deactivated as shown below, from
some key logged events, both in our code and in the AbstractTracker:
07:33:34.020 [ConfigurationListener Event Queue] ::: DEBUG
o.o.p.w.e.w.i.t.AbstractTracker - Service available {javax.servlet.Filter}={
service.id=2672, service.bundleid=86, service.scope=prototype,
service.ranking=3, osgi.http.whiteboard.context.select=(
osgi.http.whiteboard.context.name=WebviewerServletContextHelper),
filter.init.excludedUrls=/zkcomet, osgi.http.whiteboard.filter.pattern=/*,
component.name=com.castortech.iris.ba.web.filters.TenantFilter,
osgi.http.whiteboard.filter.asyncSupported=true, component.id=733}
07:33:34.049 [ConfigurationListener Event Queue] ::: TRACE
c.c.iris.ba.web.filters.TenantFilter - Activating class
com.castortech.iris.ba.web.filters.TenantFilter/203832382
07:33:50.118 [ConfigurationListener Event Queue] ::: DEBUG
o.o.p.w.e.w.i.t.AbstractTracker - Service removed {javax.servlet.Filter}={
service.id=2672, service.bundleid=86, service.scope=prototype,
service.ranking=3, osgi.http.whiteboard.context.select=(
osgi.http.whiteboard.context.name=WebviewerServletContextHelper),
filter.init.excludedUrls=/zkcomet, osgi.http.whiteboard.filter.pattern=/*,
component.name=com.castortech.iris.ba.web.filters.TenantFilter,
osgi.http.whiteboard.filter.asyncSupported=true, component.id=733}
07:33:50.118 [ConfigurationListener Event Queue] ::: DEBUG
o.o.p.w.e.w.i.t.AbstractTracker - Shared Context ...
07:33:50.118 [ConfigurationListener Event Queue] ::: DEBUG
o.o.p.w.e.w.i.t.AbstractTracker - ... counter:23
07:33:50.118 [ConfigurationListener Event Queue] ::: DEBUG
o.o.p.w.e.w.i.t.AbstractTracker - reduced counter:22
07:33:50.118 [ConfigurationListener Event Queue] ::: DEBUG
o.o.p.w.e.w.i.t.AbstractTracker - service can be removed: false
07:33:50.121 [ConfigurationListener Event Queue] ::: TRACE
c.c.iris.ba.web.filters.TenantFilter - Deactivating class
com.castortech.iris.ba.web.filters.TenantFilter/203832382
07:33:52.104 [ConfigurationListener Event Queue] ::: DEBUG
o.o.p.w.e.w.i.t.AbstractTracker - Service available {javax.servlet.Filter}={
service.id=2941, service.bundleid=86, service.scope=prototype,
service.ranking=3, osgi.http.whiteboard.context.select=(
osgi.http.whiteboard.context.name=WebviewerServletContextHelper),
filter.init.excludedUrls=/zkcomet, osgi.http.whiteboard.filter.pattern=/*,
component.name=com.castortech.iris.ba.web.filters.TenantFilter,
osgi.http.whiteboard.filter.asyncSupported=true, component.id=733}
07:33:52.110 [ConfigurationListener Event Queue] ::: TRACE
c.c.iris.ba.web.filters.TenantFilter - Activating class
com.castortech.iris.ba.web.filters.TenantFilter/352919773
07:33:54.579 [ConfigurationListener Event Queue] ::: DEBUG
o.o.p.w.e.w.i.t.AbstractTracker - Service removed {javax.servlet.Filter}={
service.id=2941, service.bundleid=86, service.scope=prototype,
service.ranking=3, osgi.http.whiteboard.context.select=(
osgi.http.whiteboard.context.name=WebviewerServletContextHelper),
filter.init.excludedUrls=/zkcomet, osgi.http.whiteboard.filter.pattern=/*,
component.name=com.castortech.iris.ba.web.filters.TenantFilter,
osgi.http.whiteboard.filter.asyncSupported=true, component.id=733}
07:33:54.579 [ConfigurationListener Event Queue] ::: DEBUG
o.o.p.w.e.w.i.t.AbstractTracker - Shared Context ...
07:33:54.579 [ConfigurationListener Event Queue] ::: DEBUG
o.o.p.w.e.w.i.t.AbstractTracker - ... counter:23
07:33:54.579 [ConfigurationListener Event Queue] ::: DEBUG
o.o.p.w.e.w.i.t.AbstractTracker - reduced counter:22
07:33:54.579 [ConfigurationListener Event Queue] ::: DEBUG
o.o.p.w.e.w.i.t.AbstractTracker - service can be removed: false
07:33:54.581 [ConfigurationListener Event Queue] ::: TRACE
c.c.iris.ba.web.filters.TenantFilter - Deactivating class
com.castortech.iris.ba.web.filters.TenantFilter/352919773
07:34:24.216 [ConfigurationListener Event Queue] ::: DEBUG
o.o.p.w.e.w.i.t.AbstractTracker - Service available {javax.servlet.Filter}={
service.id=3872, service.bundleid=86, service.scope=prototype,
service.ranking=3, osgi.http.whiteboard.context.select=(
osgi.http.whiteboard.context.name=WebviewerServletContextHelper),
filter.init.excludedUrls=/zkcomet, osgi.http.whiteboard.filter.pattern=/*,
component.name=com.castortech.iris.ba.web.filters.TenantFilter,
osgi.http.whiteboard.filter.asyncSupported=true, component.id=733}
07:34:24.219 [ConfigurationListener Event Queue] ::: TRACE
c.c.i.b.w.f.BaseSessionTenantHelper - Activating class
com.castortech.iris.ba.web.filters.BaseSessionTenantHelper/1101462560
07:34:24.222 [ConfigurationListener Event Queue] ::: TRACE
c.c.iris.ba.web.filters.TenantFilter - Activating class
com.castortech.iris.ba.web.filters.TenantFilter/634603573
Called at page load time: 203832382 which is the first one
We can actually see 3 activations and 2 deactivation. In our log we show
the identity hash code for the TenantFilter (our component). Finally when
we load the page at the browser, we get an IllegalStateException from
ComponentServiceObject since the CSO is deactivated. When putting a
breakpoint and introspecting the TenantFilter that is active at that point,
we can see that it is the very first one that has been replaced twice, but
it is still being used.
I'm not sure I understand the logic with the counters and if it can be the
cause. The number of 22 seems to be about right from the number of servlets
and filters in that context.
Any help would be much appreciated as I'm at a total loss here.
Alain
--
--
------------------
OPS4J - http://www.ops4j.org - [email protected]
---
You received this message because you are subscribed to the Google Groups
"OPS4J" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/ops4j/CAAq-gCysX85S3c5LYLG7KxJ0bguQsyRci5B77vAhiJ-Tvf%3Df7A%40mail.gmail.com.