|
From: Alef A. <al...@jt...> - 2004-05-28 08:09:58
|
I've inserted an issue in JIRA. I'll see what I can do today.
By the way, could somebody create a component for documentation in JIRA?
Alef
-----Original Message-----
From: spr...@li...
[mailto:spr...@li...] On Behalf
Of Mike Cannon-Brookes
Sent: Friday, May 28, 2004 8:46 AM
To: Spring Developer
Subject: [Springframework-developer] Strange 'double' singleton bug
I'm not sure if this is a bug or not, it's certainly strange behaviour.
We had a singleton bean that was operating normally, but when we make
it implement ApplicationListener - we get _two_ instances of it
created. (Tested by simply putting a debug point in the constructor -
two separate beans are created)
Here's the config snippet:
<bean id=3D"macroManager"
class=3D"com.atlassian.renderer.macro.DefaultMacroManager">
<constructor-arg>
<ref local=3D"macroStateStore"/>
</constructor-arg>
<constructor-arg>
<list>
<ref local=3D"beanMacroLoader"/>
<ref local=3D"classpathMacroLoader"/>
</list>
</constructor-arg>
</bean>
Is this a known bug, a feature or am I not meant to use
ApplicationListener this way? (if it's a bug it's quite serious I'd
say)
I want to do it this way because another part of Confluence fires an
event to say that all setup has finished - and I want this bean to
listen for that event and further initialize itself.
I just guessed that in Spring I would just need to implement the
ApplicationListener interface and listen for events - if I need to do
anything else, let me know :)
Cheers,
Mike
-------------------------------------------------------
This SF.Net email is sponsored by: Oracle 10g
Get certified on the hottest thing ever to hit the market... Oracle 10g.
Take an Oracle 10g class now, and we'll give you the exam FREE.
http://ads.osdn.com/?ad_id=3D3149&alloc_id=3D8166&op=3Dclick
_______________________________________________
Springframework-developer mailing list
Spr...@li...
https://lists.sourceforge.net/lists/listinfo/springframework-developer
|
|
From: Alef A. <al...@jt...> - 2004-05-28 08:24:48
|
Errr, I replied to the wrong email I guess ;-)
It was supposed to be a reply to the scheduling question from Mike CB
Alef
-----Original Message-----
From: spr...@li... =
[mailto:spr...@li...] On Behalf =
Of Alef Arendsen
Sent: Friday, May 28, 2004 10:16 AM
To: spr...@li...
Subject: RE: [Springframework-developer] Strange 'double' singleton bug
I've inserted an issue in JIRA. I'll see what I can do today.
By the way, could somebody create a component for documentation in JIRA?
Alef
-----Original Message-----
From: spr...@li...
[mailto:spr...@li...] On Behalf
Of Mike Cannon-Brookes
Sent: Friday, May 28, 2004 8:46 AM
To: Spring Developer
Subject: [Springframework-developer] Strange 'double' singleton bug
I'm not sure if this is a bug or not, it's certainly strange behaviour.
We had a singleton bean that was operating normally, but when we make
it implement ApplicationListener - we get _two_ instances of it
created. (Tested by simply putting a debug point in the constructor -
two separate beans are created)
Here's the config snippet:
<bean id=3D"macroManager"
class=3D"com.atlassian.renderer.macro.DefaultMacroManager">
<constructor-arg>
<ref local=3D"macroStateStore"/>
</constructor-arg>
<constructor-arg>
<list>
<ref local=3D"beanMacroLoader"/>
<ref local=3D"classpathMacroLoader"/>
</list>
</constructor-arg>
</bean>
Is this a known bug, a feature or am I not meant to use
ApplicationListener this way? (if it's a bug it's quite serious I'd
say)
I want to do it this way because another part of Confluence fires an
event to say that all setup has finished - and I want this bean to
listen for that event and further initialize itself.
I just guessed that in Spring I would just need to implement the
ApplicationListener interface and listen for events - if I need to do
anything else, let me know :)
Cheers,
Mike
-------------------------------------------------------
This SF.Net email is sponsored by: Oracle 10g
Get certified on the hottest thing ever to hit the market... Oracle 10g.
Take an Oracle 10g class now, and we'll give you the exam FREE.
http://ads.osdn.com/?ad_id=3D3149&alloc_id=3D8166&op=3Dclick
_______________________________________________
Springframework-developer mailing list
Spr...@li...
https://lists.sourceforge.net/lists/listinfo/springframework-developer
-------------------------------------------------------
This SF.Net email is sponsored by: Oracle 10g
Get certified on the hottest thing ever to hit the market... Oracle 10g. =
Take an Oracle 10g class now, and we'll give you the exam FREE.
http://ads.osdn.com/?ad_id149&alloc_id=8166&op=3Dick
_______________________________________________
Springframework-developer mailing list
Spr...@li...
https://lists.sourceforge.net/lists/listinfo/springframework-developer
|
|
From: Dmitriy K. <dko...@ru...> - 2004-05-28 12:45:04
|
I've created a component in JIRA for documentation called SpringDOCO Regards, Dmitriy. Alef Arendsen wrote: > Errr, I replied to the wrong email I guess ;-) > > It was supposed to be a reply to the scheduling question from Mike CB > > Alef > > > -----Original Message----- > From: spr...@li... [mailto:spr...@li...] On Behalf Of Alef Arendsen > Sent: Friday, May 28, 2004 10:16 AM > To: spr...@li... > Subject: RE: [Springframework-developer] Strange 'double' singleton bug > > I've inserted an issue in JIRA. I'll see what I can do today. > > By the way, could somebody create a component for documentation in JIRA? > > Alef > > > -----Original Message----- > From: spr...@li... > [mailto:spr...@li...] On Behalf > Of Mike Cannon-Brookes > Sent: Friday, May 28, 2004 8:46 AM > To: Spring Developer > Subject: [Springframework-developer] Strange 'double' singleton bug > > I'm not sure if this is a bug or not, it's certainly strange behaviour. > > We had a singleton bean that was operating normally, but when we make > it implement ApplicationListener - we get _two_ instances of it > created. (Tested by simply putting a debug point in the constructor - > two separate beans are created) > > Here's the config snippet: > > <bean id="macroManager" > class="com.atlassian.renderer.macro.DefaultMacroManager"> > <constructor-arg> > <ref local="macroStateStore"/> > </constructor-arg> > <constructor-arg> > <list> > <ref local="beanMacroLoader"/> > <ref local="classpathMacroLoader"/> > </list> > </constructor-arg> > </bean> > > Is this a known bug, a feature or am I not meant to use > ApplicationListener this way? (if it's a bug it's quite serious I'd > say) > > I want to do it this way because another part of Confluence fires an > event to say that all setup has finished - and I want this bean to > listen for that event and further initialize itself. > > I just guessed that in Spring I would just need to implement the > ApplicationListener interface and listen for events - if I need to do > anything else, let me know :) > > Cheers, > Mike > > > ------------------------------------------------------- > This SF.Net email is sponsored by: Oracle 10g > Get certified on the hottest thing ever to hit the market... Oracle 10g. > > Take an Oracle 10g class now, and we'll give you the exam FREE. > http://ads.osdn.com/?ad_id=3149&alloc_id=8166&op=click > _______________________________________________ > Springframework-developer mailing list > Spr...@li... > https://lists.sourceforge.net/lists/listinfo/springframework-developer > > > > > > > ------------------------------------------------------- > This SF.Net email is sponsored by: Oracle 10g > Get certified on the hottest thing ever to hit the market... Oracle 10g. > Take an Oracle 10g class now, and we'll give you the exam FREE. > http://ads.osdn.com/?ad_id149&alloc_id66&op=ick > _______________________________________________ > Springframework-developer mailing list > Spr...@li... > https://lists.sourceforge.net/lists/listinfo/springframework-developer > > > > > > > ------------------------------------------------------- > This SF.Net email is sponsored by: Oracle 10g > Get certified on the hottest thing ever to hit the market... Oracle 10g. > Take an Oracle 10g class now, and we'll give you the exam FREE. > http://ads.osdn.com/?ad_id149&alloc_id66&op=click > _______________________________________________ > Springframework-developer mailing list > Spr...@li... > https://lists.sourceforge.net/lists/listinfo/springframework-developer |
|
From: <jue...@we...> - 2004-05-28 12:58:14
|
Mike,
=20
Your approach seems to be perfectly OK. I've just tried to reproduce =
your issue but wasn't able to: I always get a single instance, no matter =
if implementing ApplicationListener or not. Could you double-check the =
effect, and possibly send a minimal test case that reproduces the =
problem?
=20
Juergen
=20
________________________________
Von: spr...@li... im Auftrag =
von Mike Cannon-Brookes
Gesendet: Fr 28.05.2004 08:39
An: Spring Developer
Betreff: [Springframework-developer] Strange 'double' singleton bug
I'm not sure if this is a bug or not, it's certainly strange behaviour.
We had a singleton bean that was operating normally, but when we make
it implement ApplicationListener - we get _two_ instances of it
created. (Tested by simply putting a debug point in the constructor -
two separate beans are created)
Here's the config snippet:
<bean id=3D"macroManager"
class=3D"com.atlassian.renderer.macro.DefaultMacroManager">
<constructor-arg>
<ref local=3D"macroStateStore"/>
</constructor-arg>
<constructor-arg>
<list>
<ref local=3D"beanMacroLoader"/>
<ref local=3D"classpathMacroLoader"/>
</list>
</constructor-arg>
</bean>
Is this a known bug, a feature or am I not meant to use
ApplicationListener this way? (if it's a bug it's quite serious I'd
say)
I want to do it this way because another part of Confluence fires an
event to say that all setup has finished - and I want this bean to
listen for that event and further initialize itself.
I just guessed that in Spring I would just need to implement the
ApplicationListener interface and listen for events - if I need to do
anything else, let me know :)
Cheers,
Mike
-------------------------------------------------------
This SF.Net email is sponsored by: Oracle 10g
Get certified on the hottest thing ever to hit the market... Oracle 10g.
Take an Oracle 10g class now, and we'll give you the exam FREE.
http://ads.osdn.com/?ad_id=3D3149&alloc_id=3D8166&op=3Dclick
_______________________________________________
Springframework-developer mailing list
Spr...@li...
https://lists.sourceforge.net/lists/listinfo/springframework-developer
|
|
From: Mike Cannon-B. <mca...@gm...> - 2004-06-01 07:18:12
|
I just tried to reproduce it with our code against CVS HEAD and can't replicate it. Against 1.0.1 I can replicate it every time though. Should I just assume it's fixed in Spring CVS HEAD and therefore will be fixed in the next release? Cheers, Mike=20 On Fri, 28 May 2004 14:55:29 +0200, j=FCrgen h=F6ller [werk3AT] <jue...@we...> wrote: >=20 > Mike, >=20 > Your approach seems to be perfectly OK. I've just tried to reproduce your= issue but wasn't able to: I always get a single instance, no matter if imp= lementing ApplicationListener or not. Could you double-check the effect, an= d possibly send a minimal test case that reproduces the problem? >=20 > Juergen >=20 > ________________________________ >=20 > Von: spr...@li... im Auftrag von= Mike Cannon-Brookes > Gesendet: Fr 28.05.2004 08:39 > An: Spring Developer > Betreff: [Springframework-developer] Strange 'double' singleton bug >=20 >=20 >=20 >=20 > I'm not sure if this is a bug or not, it's certainly strange behaviour. >=20 > We had a singleton bean that was operating normally, but when we make > it implement ApplicationListener - we get _two_ instances of it > created. (Tested by simply putting a debug point in the constructor - > two separate beans are created) >=20 > Here's the config snippet: >=20 > <bean id=3D"macroManager" > class=3D"com.atlassian.renderer.macro.DefaultMacroManager"> > <constructor-arg> > <ref local=3D"macroStateStore"/> > </constructor-arg> > <constructor-arg> > <list> > <ref local=3D"beanMacroLoader"/> > <ref local=3D"classpathMacroLoader"/> > </list> > </constructor-arg> > </bean> >=20 > Is this a known bug, a feature or am I not meant to use > ApplicationListener this way? (if it's a bug it's quite serious I'd > say) >=20 > I want to do it this way because another part of Confluence fires an > event to say that all setup has finished - and I want this bean to > listen for that event and further initialize itself. >=20 > I just guessed that in Spring I would just need to implement the > ApplicationListener interface and listen for events - if I need to do > anything else, let me know :) >=20 > Cheers, > Mike >=20 > ------------------------------------------------------- > This SF.Net email is sponsored by: Oracle 10g > Get certified on the hottest thing ever to hit the market... Oracle 10g. > Take an Oracle 10g class now, and we'll give you the exam FREE. > http://ads.osdn.com/?ad_id=3D3149&alloc_id=3D8166&op=3Dclick > _______________________________________________ > Springframework-developer mailing list > Spr...@li... > https://lists.sourceforge.net/lists/listinfo/springframework-developer >=20 > ------------------------------------------------------- > This SF.Net email is sponsored by: Oracle 10g > Get certified on the hottest thing ever to hit the market... Oracle 10g. > Take an Oracle 10g class now, and we'll give you the exam FREE. > http://ads.osdn.com/?ad_id149&alloc_id=8166&op=3Dclick > _______________________________________________ > Springframework-developer mailing list > Spr...@li... > https://lists.sourceforge.net/lists/listinfo/springframework-developer > |
|
From: <jue...@we...> - 2004-06-01 16:22:47
|
That's odd - I don't really know why this has changed since 1.0.1. Might = be worth tracking down the root cause: For example, log an exception = from the constructor of your class to see the instantiation stacktraces = (or use a debugger to see those stacktraces). On the other hand, it's = good that it seems to behave properly now rather than the other way = round... Juergen -----Original Message----- From: spr...@li... on behalf of = Mike Cannon-Brookes Sent: Tue 6/1/2004 9:18 AM To: spr...@li... Subject: Re: [Springframework-developer] Strange 'double' singleton bug =20 I just tried to reproduce it with our code against CVS HEAD and can't replicate it. Against 1.0.1 I can replicate it every time though. Should I just assume it's fixed in Spring CVS HEAD and therefore will be fixed in the next release? Cheers, Mike=20 On Fri, 28 May 2004 14:55:29 +0200, j=FCrgen h=F6ller [werk3AT] <jue...@we...> wrote: >=20 > Mike, >=20 > Your approach seems to be perfectly OK. I've just tried to reproduce = your issue but wasn't able to: I always get a single instance, no matter = if implementing ApplicationListener or not. Could you double-check the = effect, and possibly send a minimal test case that reproduces the = problem? >=20 > Juergen >=20 > ________________________________ >=20 > Von: spr...@li... im Auftrag = von Mike Cannon-Brookes > Gesendet: Fr 28.05.2004 08:39 > An: Spring Developer > Betreff: [Springframework-developer] Strange 'double' singleton bug >=20 >=20 >=20 >=20 > I'm not sure if this is a bug or not, it's certainly strange = behaviour. >=20 > We had a singleton bean that was operating normally, but when we make > it implement ApplicationListener - we get _two_ instances of it > created. (Tested by simply putting a debug point in the constructor - > two separate beans are created) >=20 > Here's the config snippet: >=20 > <bean id=3D"macroManager" > class=3D"com.atlassian.renderer.macro.DefaultMacroManager"> > <constructor-arg> > <ref local=3D"macroStateStore"/> > </constructor-arg> > <constructor-arg> > <list> > <ref local=3D"beanMacroLoader"/> > <ref local=3D"classpathMacroLoader"/> > </list> > </constructor-arg> > </bean> >=20 > Is this a known bug, a feature or am I not meant to use > ApplicationListener this way? (if it's a bug it's quite serious I'd > say) >=20 > I want to do it this way because another part of Confluence fires an > event to say that all setup has finished - and I want this bean to > listen for that event and further initialize itself. >=20 > I just guessed that in Spring I would just need to implement the > ApplicationListener interface and listen for events - if I need to do > anything else, let me know :) >=20 > Cheers, > Mike >=20 > ------------------------------------------------------- > This SF.Net email is sponsored by: Oracle 10g > Get certified on the hottest thing ever to hit the market... Oracle = 10g. > Take an Oracle 10g class now, and we'll give you the exam FREE. > http://ads.osdn.com/?ad_id=3D3149&alloc_id=3D8166&op=3Dclick > _______________________________________________ > Springframework-developer mailing list > Spr...@li... > https://lists.sourceforge.net/lists/listinfo/springframework-developer >=20 > ------------------------------------------------------- > This SF.Net email is sponsored by: Oracle 10g > Get certified on the hottest thing ever to hit the market... Oracle = 10g. > Take an Oracle 10g class now, and we'll give you the exam FREE. > http://ads.osdn.com/?ad_id149&alloc_id=8166&op=3Dclick > _______________________________________________ > Springframework-developer mailing list > Spr...@li... > https://lists.sourceforge.net/lists/listinfo/springframework-developer > ------------------------------------------------------- This SF.Net email is sponsored by: Oracle 10g Get certified on the hottest thing ever to hit the market... Oracle 10g. = Take an Oracle 10g class now, and we'll give you the exam FREE. http://ads.osdn.com/?ad_id149&alloc_id=8166&op=3Dick _______________________________________________ Springframework-developer mailing list Spr...@li... https://lists.sourceforge.net/lists/listinfo/springframework-developer |