You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@wicket.apache.org by fachhoch <fa...@gmail.com> on 2013/03/06 13:10:21 UTC

using static fileds in a page

to run my lengthy  operation, my pages needs, I am using a static filed which
is a proxy  of my service in the page class itself, on ahjaxevent I use this
proxy to get my data, this proxy times out based on configration to avoid
wicket  freezing for lengthy operation.

Is it advised to have static field in page? Its not instance data so will
they be serialized ?
Please clarify will this cause issues  with   page serialization and
denationalization?




--
View this message in context: http://apache-wicket.1842946.n4.nabble.com/using-static-fileds-in-a-page-tp4657021.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: using static fileds in a page

Posted by fachhoch <fa...@gmail.com>.
I am creating a proxy on a spring bean  for timing out length operation. This
proxy is static.



--
View this message in context: http://apache-wicket.1842946.n4.nabble.com/using-static-fileds-in-a-page-tp4657021p4657050.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: using static fileds in a page

Posted by Jochen Mader <pf...@gmail.com>.
If you are already using Spring why do you need the field to be static?
Beans are by default singleton scoped and can be tailored to
session/request scoped.

On Wed, Mar 6, 2013 at 1:41 PM, Martin Grigorov <mg...@apache.org> wrote:
> If you create an ExecutorService then you should shutdown it too.
> See org.apache.wicket.Application#getApplicationListeners &
> org.apache.wicket.IApplicationListener#onBeforeDestroyed
> or org.apache.wicket.Application#onDestroy
>
>
> On Wed, Mar 6, 2013 at 2:32 PM, fachhoch <fa...@gmail.com> wrote:
>
>> My proxy executes  my service  call in  a thread for which I ma uisng
>> google
>> Guava com.google.common.util.concurrent.SimpleTimeLimiter
>>
>> this uses   Executors.newCachedThreadPool() ,  if I want to restart my
>> server   do I have to worry about all these threads    not stopping or any
>> issue with this ?
>>
>>
>>
>>
>>
>>
>> --
>> View this message in context:
>> http://apache-wicket.1842946.n4.nabble.com/using-static-fileds-in-a-page-tp4657021p4657024.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
>>
>>
>
>
> --
> Martin Grigorov
> jWeekend
> Training, Consulting, Development
> http://jWeekend.com <http://jweekend.com/>

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


Re: using static fileds in a page

Posted by Martin Grigorov <mg...@apache.org>.
If you create an ExecutorService then you should shutdown it too.
See org.apache.wicket.Application#getApplicationListeners &
org.apache.wicket.IApplicationListener#onBeforeDestroyed
or org.apache.wicket.Application#onDestroy


On Wed, Mar 6, 2013 at 2:32 PM, fachhoch <fa...@gmail.com> wrote:

> My proxy executes  my service  call in  a thread for which I ma uisng
> google
> Guava com.google.common.util.concurrent.SimpleTimeLimiter
>
> this uses   Executors.newCachedThreadPool() ,  if I want to restart my
> server   do I have to worry about all these threads    not stopping or any
> issue with this ?
>
>
>
>
>
>
> --
> View this message in context:
> http://apache-wicket.1842946.n4.nabble.com/using-static-fileds-in-a-page-tp4657021p4657024.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
>
>


-- 
Martin Grigorov
jWeekend
Training, Consulting, Development
http://jWeekend.com <http://jweekend.com/>

Re: using static fileds in a page

Posted by fachhoch <fa...@gmail.com>.
My proxy executes  my service  call in  a thread for which I ma uisng google
Guava com.google.common.util.concurrent.SimpleTimeLimiter

this uses   Executors.newCachedThreadPool() ,  if I want to restart my
server   do I have to worry about all these threads    not stopping or any
issue with this ?






--
View this message in context: http://apache-wicket.1842946.n4.nabble.com/using-static-fileds-in-a-page-tp4657021p4657024.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: using static fileds in a page

Posted by fachhoch <fa...@gmail.com>.
Yes it is ok, Its just a wrapper on my service   (spring singleton ) which
timesout the service method call if  its taking long  and return default
value.



--
View this message in context: http://apache-wicket.1842946.n4.nabble.com/using-static-fileds-in-a-page-tp4657021p4657023.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: using static fileds in a page

Posted by Martin Grigorov <mg...@apache.org>.
Hi,

Since it is static it wont be (de)serialized at all.
But it will be used by *all* instances of this page. Is this OK for your
case ?


On Wed, Mar 6, 2013 at 2:10 PM, fachhoch <fa...@gmail.com> wrote:

> to run my lengthy  operation, my pages needs, I am using a static filed
> which
> is a proxy  of my service in the page class itself, on ahjaxevent I use
> this
> proxy to get my data, this proxy times out based on configration to avoid
> wicket  freezing for lengthy operation.
>
> Is it advised to have static field in page? Its not instance data so will
> they be serialized ?
> Please clarify will this cause issues  with   page serialization and
> denationalization?
>
>
>
>
> --
> View this message in context:
> http://apache-wicket.1842946.n4.nabble.com/using-static-fileds-in-a-page-tp4657021.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
>
>


-- 
Martin Grigorov
jWeekend
Training, Consulting, Development
http://jWeekend.com <http://jweekend.com/>