De rien!
2015-01-05 9:54 GMT+00:00 Francois Meillet :
> Thanks Ernesto !
>
> François Meillet
>
>
>
>
> Le 5 janv. 2015 à 10:38, Ernesto Reinaldo Barreiro a
> écrit :
>
> > Martin
>
>
--
Regards - Ernesto Reinaldo Barreiro
Thanks Ernesto !
François Meillet
Le 5 janv. 2015 à 10:38, Ernesto Reinaldo Barreiro a écrit
:
> Martin
Dear All,
With the invaluable help of Martin Grigorov, I have summarized the
discussion on this thread on a small Wicket in Action article [1]. The
complete sample project can be found at [2].
1- http://wicketinaction.com/2014/07/working-with-background-jobs/
2-https://github.com/reiern70/antilia
@Martin,
Many thanks! I will try to have a look today at the PR and see if I find
the time to write the blogs article during this week.
Thanks again!
On Mon, Nov 24, 2014 at 5:46 PM, Martin Grigorov
wrote:
> Hi Ernesto,
>
> See https://github.com/reiern70/antilia-bits/pull/1
> I've moved the c
Hi Ernesto,
See https://github.com/reiern70/antilia-bits/pull/1
I've moved the code that exports the Application thread local to
TasksRunnable. This way it is possible to export the Session too.
The code looks good (after removing all annoying whitespaces :-) ). Now it
needs some explanation (i.e
Warren,
ThreadContext.detach(); seems to be more proper than...
ThreadContext.setApplication(null); I will update demo.
On Sat, Nov 22, 2014 at 10:58 PM, Warren Bell wrote:
> Ernesto,
>
> That’s kind of what I ended up doing except with a different
> ThreadPoolExecutor implementation.
>
> Execu
Ernesto,
That’s kind of what I ended up doing except with a different ThreadPoolExecutor
implementation.
ExecutorService executorService = new ScheduledThreadPoolExecutor(20)
{
@Override
protected void beforeExecute(Thread t, Runnable r) {
ThreadCo
pushed a new version including injecting a Guice managed service class
On Sat, Nov 22, 2014 at 8:08 PM, Ernesto Reinaldo Barreiro <
reier...@gmail.com> wrote:
> Warren,
>
> Something like:
>
> ExecutorService executorService = new ThreadPoolExecutor(10, 10,
> 0L, TimeUnit.MILLISECOND
Warren,
Something like:
ExecutorService executorService = new ThreadPoolExecutor(10, 10,
0L, TimeUnit.MILLISECONDS,
new LinkedBlockingQueue()) {
@Override
protected void beforeExecute(final Thread t, final Runnable r) {
ThreadContext.setApplication(BgProc
Warren,
Service holder will be created in a WEB thread, so WebApplication will be
in context as a thread local. Mind that cosntructor of servce holder will
cal Injector.get().inject... too inject the services. After that unless you
need it for something else... you no longer need WebApplicatiion.
Ernesto,
I am not sure that creating a service holder will do the trick without still
attaching the app to the new thread. I am currently injecting a service into
your ExecutionBridge class that is instantiated in the request thread. All is
good until that ExecutionBridge gets passed to the new
@Warren,
Apologies for the extra t on your name: texting on a mobile phone is a
pain... I will update de demo to include a service. Just one question: the
app not in context is when you try to inject that service? Or because you
are using something else from WEB layer?
On Fri, Nov 21, 2014 at 11:
Thanks for your answer! There is no hurry.
I will add a service to the mix to cover Warrent use case. Eg using Guice
integration.
On 21 Nov 2014 09:34, "Martin Grigorov" wrote:
>
> Hi Ernesto,
>
> I'm traveling now. I'll be able to take a look at Sunday.
> On Nov 20, 2014 3:48 PM, "Ernesto Rein
Hi Ernesto,
I'm traveling now. I'll be able to take a look at Sunday.
On Nov 20, 2014 3:48 PM, "Ernesto Reinaldo Barreiro"
wrote:
> Martin,
>
> I have created
>
> https://github.com/reiern70/antilia-bits/tree/master/bgprocess
>
> My only caveats are
>
>
> https://github.com/reiern70/antilia-bits
I do not see a problem with the approach bellow But I normally op for
the solution I posted before.
On Thu, Nov 20, 2014 at 9:33 PM, Warren Bell
wrote:
> After doing a little digging, I found the ThreadContext class.
>
> ExecutorService executorService = new ScheduledThreadPoolExecutor(20)
>
Warren.
I just realized that part was missing... Look that when you create an
ExecutionBridge
you do in in a WEB thread. So you could do something like.
class ServcesHolder {
@Inject
private MyService service;
public ServicesHolder() {
Injector.get().inject(this);
}
// setter enad getter.
}
After doing a little digging, I found the ThreadContext class.
ExecutorService executorService = new ScheduledThreadPoolExecutor(20)
{
@Override
protected void beforeExecute(Thread t, Runnable r) {
ThreadContext.setApplication(app);
}
I have seen this from a 2010 post:
final Application app = Application.get();
final ExecutorService service = new ScheduledThreadPoolExecutor(1) {
@Override
protected void beforeExecute(final Thread t, final Runnable r) {
Application.set(app);
Ernesto, great job putting all that code together so quickly. I cloned your
project and cherry picked out the code that I needed, I don’t need all the
process progress code you have. I don’t really care what the process progress
is or even if it completes ok, just don’t want it holding up my res
Martin,
I have created
https://github.com/reiern70/antilia-bits/tree/master/bgprocess
My only caveats are
https://github.com/reiern70/antilia-bits/blob/master/bgprocess/src/main/java/com/antilia/panel/TasksListPanel.java#L50
and
https://github.com/reiern70/antilia-bits/blob/master/bgprocess/s
Ok. Let me see what I can do this weekend while I wait for my son to finish
he's shower after he's football match ;-)
On Thu, Nov 20, 2014 at 8:30 AM, Martin Grigorov
wrote:
> Sure! Thanks!
> It could be as fancy as you wish.
>
> Martin Grigorov
> Wicket Training and Consulting
> https://twitte
Sure! Thanks!
It could be as fancy as you wish.
Martin Grigorov
Wicket Training and Consulting
https://twitter.com/mtgrigorov
On Thu, Nov 20, 2014 at 10:17 AM, Ernesto Reinaldo Barreiro <
reier...@gmail.com> wrote:
> Can I give it a try? Something event showing some progress at client side?
>
>
Can I give it a try? Something event showing some progress at client side?
On Thu, Nov 20, 2014 at 7:54 AM, Martin Grigorov
wrote:
> Hi,
>
> Someday I'll write a blog (with a demo) about this at
> http://wicketinaction.com.
> The question is being asked regularly.
>
> Actually anyone can send a
Hi,
Someday I'll write a blog (with a demo) about this at
http://wicketinaction.com.
The question is being asked regularly.
Actually anyone can send a Pull Request at
https://github.com/dashorst/wicketinaction.com with such article.
Martin Grigorov
Wicket Training and Consulting
https://twitter.
Hi Warren,
On Thu, Nov 20, 2014 at 12:46 AM, Warren Bell wrote:
> I am using Wicket 6 REST annotations and want to asynchronously start a
> process that writes some logging data to a db. I don’t need the response to
> wait for this process. I have tried using threads, but I get the “App not
> a
I am using Wicket 6 REST annotations and want to asynchronously start a process
that writes some logging data to a db. I don’t need the response to wait for
this process. I have tried using threads, but I get the “App not attached to
this thread” exception when I try to use an injected service.
26 matches
Mail list logo