You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cxf.apache.org by Alessio Soldano <as...@redhat.com> on 2012/06/15 12:47:00 UTC
Possible loop while creating CacheCleanupListener ?
Hi,
I'm seeing weird stacktraces most probably as a consequence of CXF-4366:
http://fpaste.org/waas/
While I actually still need to figure out how the CNFE is related to my
problem, I wondering if we're not running into an unwanted loop here.
The CacheCleanupListener tries registering itself into the lifecycle
managers (which need to be looked up):
public CacheCleanupListener(Bus b) {
ServerLifeCycleManager m = b.getExtension(ServerLifeCycleManager.class);
if (m != null) {
m.registerListener(this);
}
ClientLifeCycleManager cm = b.getExtension(ClientLifeCycleManager.class);
if (cm != null) {
cm.registerListener(this);
}
}
on the other hand, the ServletLifyCycleManagerImpl looks up any listener
and adds them:
public ServerLifeCycleManagerImpl(Bus b) {
Collection<? extends ServerLifeCycleListener> l =
b.getExtension(ConfiguredBeanLocator.class)
.getBeansOfType(ServerLifeCycleListener.class);
if (l != null) {
listeners.addAll(l);
}
}
Thanks
Alessio
--
Alessio Soldano
Web Service Lead, JBoss
Re: Possible loop while creating CacheCleanupListener ?
Posted by Alessio Soldano <as...@redhat.com>.
Thanks, I confirm the issue is gone now.
Cheers
Alessio
On 06/15/2012 08:47 PM, Daniel Kulp wrote:
>
> Yep. Definitely a problem. On it.
>
> Dan
>
>
> On Friday, June 15, 2012 12:47:00 PM Alessio Soldano wrote:
>> Hi,
>> I'm seeing weird stacktraces most probably as a consequence of CXF-4366:
>> http://fpaste.org/waas/
>> While I actually still need to figure out how the CNFE is related to my
>> problem, I wondering if we're not running into an unwanted loop here.
>>
>> The CacheCleanupListener tries registering itself into the lifecycle
>> managers (which need to be looked up):
>>
>> public CacheCleanupListener(Bus b) {
>> ServerLifeCycleManager m = b.getExtension(ServerLifeCycleManager.class);
>> if (m != null) {
>> m.registerListener(this);
>> }
>> ClientLifeCycleManager cm =
>> b.getExtension(ClientLifeCycleManager.class); if (cm != null) {
>> cm.registerListener(this);
>> }
>> }
>>
>> on the other hand, the ServletLifyCycleManagerImpl looks up any listener
>> and adds them:
>>
>> public ServerLifeCycleManagerImpl(Bus b) {
>> Collection<? extends ServerLifeCycleListener> l =
>> b.getExtension(ConfiguredBeanLocator.class)
>> .getBeansOfType(ServerLifeCycleListener.class);
>> if (l != null) {
>> listeners.addAll(l);
>> }
>> }
>>
>> Thanks
>> Alessio
--
Alessio Soldano
Web Service Lead, JBoss
Re: Possible loop while creating CacheCleanupListener ?
Posted by Daniel Kulp <dk...@apache.org>.
Yep. Definitely a problem. On it.
Dan
On Friday, June 15, 2012 12:47:00 PM Alessio Soldano wrote:
> Hi,
> I'm seeing weird stacktraces most probably as a consequence of CXF-4366:
> http://fpaste.org/waas/
> While I actually still need to figure out how the CNFE is related to my
> problem, I wondering if we're not running into an unwanted loop here.
>
> The CacheCleanupListener tries registering itself into the lifecycle
> managers (which need to be looked up):
>
> public CacheCleanupListener(Bus b) {
> ServerLifeCycleManager m = b.getExtension(ServerLifeCycleManager.class);
> if (m != null) {
> m.registerListener(this);
> }
> ClientLifeCycleManager cm =
> b.getExtension(ClientLifeCycleManager.class); if (cm != null) {
> cm.registerListener(this);
> }
> }
>
> on the other hand, the ServletLifyCycleManagerImpl looks up any listener
> and adds them:
>
> public ServerLifeCycleManagerImpl(Bus b) {
> Collection<? extends ServerLifeCycleListener> l =
> b.getExtension(ConfiguredBeanLocator.class)
> .getBeansOfType(ServerLifeCycleListener.class);
> if (l != null) {
> listeners.addAll(l);
> }
> }
>
> Thanks
> Alessio
--
Daniel Kulp
dkulp@apache.org - http://dankulp.com/blog
Talend Community Coder - http://coders.talend.com