You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@wicket.apache.org by Arjun Dhar <dh...@yahoo.com> on 2011/08/29 17:39:05 UTC

How to update @SpringBean proxy?

Hi,
I believe @SpringBean creates a proxy over the original bean.

I have a situation where in the Application.init() --<callls> --> Service
layer that has direct access to SpringContext. I modify the original Bean
(getting it via Spring Context). However, this update to the object wont
reflect in the associated proxy.

Anyone know how I can get a ref to the original bean or have the proxy
updated; so without the Annotation how can I get access to the Proxy object
via API?

Currently looking @ for clues...
https://cwiki.apache.org/WICKET/spring.html

Pointers appreciated!
thanks




-----
Software documentation is like sex: when it is good, it is very, very good; and when it is bad, it is still better than nothing!
--
View this message in context: http://apache-wicket.1842946.n4.nabble.com/How-to-update-SpringBean-proxy-tp3776522p3776522.html
Sent from the Users forum mailing list archive at Nabble.com.

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


Re: How to update @SpringBean proxy?

Posted by Igor Vaynberg <ig...@gmail.com>.
its not currently possible to flush the proxy's cache

however, modifying the original bean should be fine because the proxy
should forward all method invocation to the bean...

-igor


On Mon, Aug 29, 2011 at 8:39 AM, Arjun Dhar <dh...@yahoo.com> wrote:
> Hi,
> I believe @SpringBean creates a proxy over the original bean.
>
> I have a situation where in the Application.init() --<callls> --> Service
> layer that has direct access to SpringContext. I modify the original Bean
> (getting it via Spring Context). However, this update to the object wont
> reflect in the associated proxy.
>
> Anyone know how I can get a ref to the original bean or have the proxy
> updated; so without the Annotation how can I get access to the Proxy object
> via API?
>
> Currently looking @ for clues...
> https://cwiki.apache.org/WICKET/spring.html
>
> Pointers appreciated!
> thanks
>
>
>
>
> -----
> Software documentation is like sex: when it is good, it is very, very good; and when it is bad, it is still better than nothing!
> --
> View this message in context: http://apache-wicket.1842946.n4.nabble.com/How-to-update-SpringBean-proxy-tp3776522p3776522.html
> Sent from the Users forum mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>
>

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


Re: How to update @SpringBean proxy?

Posted by Arjun Dhar <dh...@yahoo.com>.
Hey heads up, there is some bug in the logic of one of the services. And on
this front its clear. Thanks :)


-----
Software documentation is like sex: when it is good, it is very, very good; and when it is bad, it is still better than nothing!
--
View this message in context: http://apache-wicket.1842946.n4.nabble.com/How-to-update-SpringBean-proxy-tp3776522p3776761.html
Sent from the Users forum mailing list archive at Nabble.com.

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


Re: How to update @SpringBean proxy?

Posted by Arjun Dhar <dh...@yahoo.com>.
@PointBreak: imo not doing anything stupid like that, but I dont wanna be too
sure been up 14 hours. Maybe my eyes are missing something. Take a look.

Be the judge, here is a simplified version of the code:

Spring XML Summary: 
[The idea is that the menu model mixes Static & dynamic items via Spring so
i can generate Menus in a flexible way]


Code:


-----
Software documentation is like sex: when it is good, it is very, very good; and when it is bad, it is still better than nothing!
--
View this message in context: http://apache-wicket.1842946.n4.nabble.com/How-to-update-SpringBean-proxy-tp3776522p3776665.html
Sent from the Users forum mailing list archive at Nabble.com.

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


Re: How to update @SpringBean proxy?

Posted by Pointbreak <po...@ml1.net>.
What you are saying doesn't make sense. The SpringBean proxy doesn't
cache anything, so would still proxy all method calls to the original
bean. If you are not seeing updated values in that bean, there is
something else going on. Unless with "update" you mean that you replace
the original bean with another instance in the context, which you really
should not....

On Mon, 29 Aug 2011 08:39 -0700, "Arjun Dhar" <dh...@yahoo.com> wrote:
> Hi,
> I believe @SpringBean creates a proxy over the original bean.
> 
> I have a situation where in the Application.init() --<callls> --> Service
> layer that has direct access to SpringContext. I modify the original Bean
> (getting it via Spring Context). However, this update to the object wont
> reflect in the associated proxy.
> 
> Anyone know how I can get a ref to the original bean or have the proxy
> updated; so without the Annotation how can I get access to the Proxy
> object
> via API?
> 
> Currently looking @ for clues...
> https://cwiki.apache.org/WICKET/spring.html
> 
> Pointers appreciated!
> thanks
> 
> 
> 
> 
> -----
> Software documentation is like sex: when it is good, it is very, very
> good; and when it is bad, it is still better than nothing!
> --
> View this message in context:
> http://apache-wicket.1842946.n4.nabble.com/How-to-update-SpringBean-proxy-tp3776522p3776522.html
> Sent from the Users forum mailing list archive at Nabble.com.
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
> 
> 

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