You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Stephane Decleire <sd...@cariboo-networks.com> on 2006/05/08 18:18:11 UTC

InjectSpring initialisation error

It seems that when a Spring bean is injected in a Tapestry page using 
@InjectSpring, its initial state is not recovered where the page is 
detached.
Is it a known bug ? Is there a way to force the reinitialisation of the 
bean ?

Thanks in advance.

-- 
Stéphane Decleire

05 56 57 99 20
06 63 78 69 06


RE: InjectSpring initialisation error

Posted by James Carman <ja...@carmanconsulting.com>.
Well, it should probably take a parameter to say whether or not to cache
(defaults to true).

-----Original Message-----
From: Mark [mailto:lists@mark-arnold.net] 
Sent: Monday, May 08, 2006 1:25 PM
To: Tapestry users
Subject: Re: InjectSpring initialisation error

James Carman wrote:
> This has to do with the way the InjectObjectWorker is implemented.  I
think
> it should be changed to lookup the object each time rather than look it up
> once and inject that particular value into the object.   
>   
Oh, that's what the InjectObjectWorker does? It caches and reuses the 
objects after it gets them for the first time?
Then I agree, that sounds dangerous... That should probably be changed, 
unless doing so would break something else on the Hivemind/Tapestry side 
of things...

MARK

> -----Original Message-----
> From: James Carman [mailto:james@carmanconsulting.com] 
> Sent: Monday, May 08, 2006 12:22 PM
> To: 'Tapestry users'; sdecleire@cariboo-networks.com
> Subject: RE: InjectSpring initialisation error
>
> Are you trying to use a non-singleton Spring bean?
>
> -----Original Message-----
> From: Stephane Decleire [mailto:sdecleire@cariboo-networks.com] 
> Sent: Monday, May 08, 2006 12:18 PM
> To: users@tapestry.apache.org
> Subject: InjectSpring initialisation error
>
> It seems that when a Spring bean is injected in a Tapestry page using 
> @InjectSpring, its initial state is not recovered where the page is 
> detached.
> Is it a known bug ? Is there a way to force the reinitialisation of the 
> bean ?
>
> Thanks in advance.
>
>   


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org


Re: InjectSpring initialisation error

Posted by Mark <li...@mark-arnold.net>.
James Carman wrote:
> This has to do with the way the InjectObjectWorker is implemented.  I think
> it should be changed to lookup the object each time rather than look it up
> once and inject that particular value into the object.   
>   
Oh, that's what the InjectObjectWorker does? It caches and reuses the 
objects after it gets them for the first time?
Then I agree, that sounds dangerous... That should probably be changed, 
unless doing so would break something else on the Hivemind/Tapestry side 
of things...

MARK

> -----Original Message-----
> From: James Carman [mailto:james@carmanconsulting.com] 
> Sent: Monday, May 08, 2006 12:22 PM
> To: 'Tapestry users'; sdecleire@cariboo-networks.com
> Subject: RE: InjectSpring initialisation error
>
> Are you trying to use a non-singleton Spring bean?
>
> -----Original Message-----
> From: Stephane Decleire [mailto:sdecleire@cariboo-networks.com] 
> Sent: Monday, May 08, 2006 12:18 PM
> To: users@tapestry.apache.org
> Subject: InjectSpring initialisation error
>
> It seems that when a Spring bean is injected in a Tapestry page using 
> @InjectSpring, its initial state is not recovered where the page is 
> detached.
> Is it a known bug ? Is there a way to force the reinitialisation of the 
> bean ?
>
> Thanks in advance.
>
>   


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org


Re: InjectSpring initialisation error

Posted by Stephane Decleire <sd...@cariboo-networks.com>.
The reason is mainly historical ...
But i also prefer to keep the best of both world : Spring is for me the 
best way to glue the layers of our applications (Tapesty, Hibernate and 
AOP for transactions, Web Services, ...) as Tapestry is the best 
presentation layer ;-)

James Carman wrote:

>Use HiveMind and not Spring. :-)  Why are you using Spring to
>instantiate/configure your beans?  Do you have a compelling reason to use a
>different IoC container?  Are you using AOP?    
>
>-----Original Message-----
>From: Stephane Decleire [mailto:sdecleire@cariboo-networks.com] 
>Sent: Monday, May 08, 2006 12:34 PM
>To: Tapestry users
>Subject: Re: InjectSpring initialisation error
>
>No, my Spring bean is a "classic" one.
>Do you know a way to bypass this problem ?
>
>James Carman wrote:
>
>  
>
>>This has to do with the way the InjectObjectWorker is implemented.  I think
>>it should be changed to lookup the object each time rather than look it up
>>once and inject that particular value into the object.   
>>
>>-----Original Message-----
>>From: James Carman [mailto:james@carmanconsulting.com] 
>>Sent: Monday, May 08, 2006 12:22 PM
>>To: 'Tapestry users'; sdecleire@cariboo-networks.com
>>Subject: RE: InjectSpring initialisation error
>>
>>Are you trying to use a non-singleton Spring bean?
>>
>>-----Original Message-----
>>From: Stephane Decleire [mailto:sdecleire@cariboo-networks.com] 
>>Sent: Monday, May 08, 2006 12:18 PM
>>To: users@tapestry.apache.org
>>Subject: InjectSpring initialisation error
>>
>>It seems that when a Spring bean is injected in a Tapestry page using 
>>@InjectSpring, its initial state is not recovered where the page is 
>>detached.
>>Is it a known bug ? Is there a way to force the reinitialisation of the 
>>bean ?
>>
>>Thanks in advance.
>>
>> 
>>
>>    
>>
>
>  
>

-- 
Stéphane Decleire

05 56 57 99 20
06 63 78 69 06


RE: InjectSpring initialisation error

Posted by James Carman <ja...@carmanconsulting.com>.
Use HiveMind and not Spring. :-)  Why are you using Spring to
instantiate/configure your beans?  Do you have a compelling reason to use a
different IoC container?  Are you using AOP?    

-----Original Message-----
From: Stephane Decleire [mailto:sdecleire@cariboo-networks.com] 
Sent: Monday, May 08, 2006 12:34 PM
To: Tapestry users
Subject: Re: InjectSpring initialisation error

No, my Spring bean is a "classic" one.
Do you know a way to bypass this problem ?

James Carman wrote:

>This has to do with the way the InjectObjectWorker is implemented.  I think
>it should be changed to lookup the object each time rather than look it up
>once and inject that particular value into the object.   
>
>-----Original Message-----
>From: James Carman [mailto:james@carmanconsulting.com] 
>Sent: Monday, May 08, 2006 12:22 PM
>To: 'Tapestry users'; sdecleire@cariboo-networks.com
>Subject: RE: InjectSpring initialisation error
>
>Are you trying to use a non-singleton Spring bean?
>
>-----Original Message-----
>From: Stephane Decleire [mailto:sdecleire@cariboo-networks.com] 
>Sent: Monday, May 08, 2006 12:18 PM
>To: users@tapestry.apache.org
>Subject: InjectSpring initialisation error
>
>It seems that when a Spring bean is injected in a Tapestry page using 
>@InjectSpring, its initial state is not recovered where the page is 
>detached.
>Is it a known bug ? Is there a way to force the reinitialisation of the 
>bean ?
>
>Thanks in advance.
>
>  
>

-- 
Stéphane Decleire

05 56 57 99 20
06 63 78 69 06




---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org


Re: InjectSpring initialisation error

Posted by Stephane Decleire <sd...@cariboo-networks.com>.
No, my Spring bean is a "classic" one.
Do you know a way to bypass this problem ?

James Carman wrote:

>This has to do with the way the InjectObjectWorker is implemented.  I think
>it should be changed to lookup the object each time rather than look it up
>once and inject that particular value into the object.   
>
>-----Original Message-----
>From: James Carman [mailto:james@carmanconsulting.com] 
>Sent: Monday, May 08, 2006 12:22 PM
>To: 'Tapestry users'; sdecleire@cariboo-networks.com
>Subject: RE: InjectSpring initialisation error
>
>Are you trying to use a non-singleton Spring bean?
>
>-----Original Message-----
>From: Stephane Decleire [mailto:sdecleire@cariboo-networks.com] 
>Sent: Monday, May 08, 2006 12:18 PM
>To: users@tapestry.apache.org
>Subject: InjectSpring initialisation error
>
>It seems that when a Spring bean is injected in a Tapestry page using 
>@InjectSpring, its initial state is not recovered where the page is 
>detached.
>Is it a known bug ? Is there a way to force the reinitialisation of the 
>bean ?
>
>Thanks in advance.
>
>  
>

-- 
Stéphane Decleire

05 56 57 99 20
06 63 78 69 06


RE: InjectSpring initialisation error

Posted by James Carman <ja...@carmanconsulting.com>.
This has to do with the way the InjectObjectWorker is implemented.  I think
it should be changed to lookup the object each time rather than look it up
once and inject that particular value into the object.   

-----Original Message-----
From: James Carman [mailto:james@carmanconsulting.com] 
Sent: Monday, May 08, 2006 12:22 PM
To: 'Tapestry users'; sdecleire@cariboo-networks.com
Subject: RE: InjectSpring initialisation error

Are you trying to use a non-singleton Spring bean?

-----Original Message-----
From: Stephane Decleire [mailto:sdecleire@cariboo-networks.com] 
Sent: Monday, May 08, 2006 12:18 PM
To: users@tapestry.apache.org
Subject: InjectSpring initialisation error

It seems that when a Spring bean is injected in a Tapestry page using 
@InjectSpring, its initial state is not recovered where the page is 
detached.
Is it a known bug ? Is there a way to force the reinitialisation of the 
bean ?

Thanks in advance.

-- 
Stéphane Decleire

05 56 57 99 20
06 63 78 69 06




---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org




---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org


RE: InjectSpring initialisation error

Posted by James Carman <ja...@carmanconsulting.com>.
Are you trying to use a non-singleton Spring bean?

-----Original Message-----
From: Stephane Decleire [mailto:sdecleire@cariboo-networks.com] 
Sent: Monday, May 08, 2006 12:18 PM
To: users@tapestry.apache.org
Subject: InjectSpring initialisation error

It seems that when a Spring bean is injected in a Tapestry page using 
@InjectSpring, its initial state is not recovered where the page is 
detached.
Is it a known bug ? Is there a way to force the reinitialisation of the 
bean ?

Thanks in advance.

-- 
Stéphane Decleire

05 56 57 99 20
06 63 78 69 06




---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org