Wicket job opening in Estonia
Hi! We have a wicket job opening in Estonia, required fluency in Estonian and Finnish. Feel free to email me or apply via http://www.youritprofile.com/job_ad/id/701 ** Martin
Re: What is the proper way to start a secondary process in Wicket 6
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. Also if your sevices has no state Service holder could be a singleton that is created on application init and just shared by all bridges. On Fri, Nov 21, 2014 at 5:53 PM, Warren Bell wrote: > 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 > thread. Injecting the service in a Service holder is the same thing, isn’t > it ? > > I haven’t tried attaching the app to the new thread and injecting the > service straight into the new task/thread itself. I think that would be > cleaner. I will try that out. > > Warren Bell > > On Nov 21, 2014, at 8:19 AM, Ernesto Reinaldo Barreiro > wrote: > > > @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:05 AM, Ernesto Reinaldo Barreiro < > > reier...@gmail.com> wrote: > > > >> 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 Reinaldo Barreiro" < > reier...@gmail.com > >>> > >>> wrote: > >>> > 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/src/main/java/com/antilia/panel/TasksListPanel.java#L70 > > I had to re-add Timer behavior: I do not see yet why? It is as if the > >> timer > is not re-rendered: they are not isTemporar :-( I will check when I > >> have > more time. > > I would appreciate if you can review the code... before I write > >> anything on > my fork of Wicket in Action. This probably could be done in a leaner > >> way > mounting a resource to serve JSON for task states and building the UI > >> at > client side... But example illustrates how to do it with "plain > >> Wicket". > > > On Thu, Nov 20, 2014 at 8:40 AM, Ernesto Reinaldo Barreiro < > reier...@gmail.com> wrote: > > > 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 < > >> mgrigo...@apache.org> > > wrote: > > > >> 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? > >>> > >>> On Thu, Nov 20, 2014 at 7:54 AM, Martin Grigorov < > mgrigo...@apache.org> > >>> 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 Pull Request at > https://github.com/dashorst/wicketinaction.com with such > >> article. > > Martin Grigorov > Wicket Training and Consulting > https://twitter.com/mtgrigorov > > On Thu, Nov 20, 2014 at 7:26 AM, Ernesto Reinaldo Barreiro < > reier...@gmail.com> wrote: > > > Hi Warren, > > > > > > On Thu, Nov 20, 2014 at 12:46 AM, Warren Bell < > >> warrenbe...@gmail.com> > > 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 > >> attached to this thre
Re: What is the proper way to start a secondary process in Wicket 6
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 thread. Injecting the service in a Service holder is the same thing, isn’t it ? I haven’t tried attaching the app to the new thread and injecting the service straight into the new task/thread itself. I think that would be cleaner. I will try that out. Warren Bell On Nov 21, 2014, at 8:19 AM, Ernesto Reinaldo Barreiro wrote: > @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:05 AM, Ernesto Reinaldo Barreiro < > reier...@gmail.com> wrote: > >> 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 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/blob/master/bgprocess/src/main/java/com/antilia/panel/TasksListPanel.java#L50 and >> https://github.com/reiern70/antilia-bits/blob/master/bgprocess/src/main/java/com/antilia/panel/TasksListPanel.java#L70 I had to re-add Timer behavior: I do not see yet why? It is as if the >> timer is not re-rendered: they are not isTemporar :-( I will check when I >> have more time. I would appreciate if you can review the code... before I write >> anything on my fork of Wicket in Action. This probably could be done in a leaner >> way mounting a resource to serve JSON for task states and building the UI >> at client side... But example illustrates how to do it with "plain >> Wicket". On Thu, Nov 20, 2014 at 8:40 AM, Ernesto Reinaldo Barreiro < reier...@gmail.com> wrote: > 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 < >> mgrigo...@apache.org> > wrote: > >> 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? >>> >>> On Thu, Nov 20, 2014 at 7:54 AM, Martin Grigorov < mgrigo...@apache.org> >>> 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 Pull Request at https://github.com/dashorst/wicketinaction.com with such >> article. Martin Grigorov Wicket Training and Consulting https://twitter.com/mtgrigorov On Thu, Nov 20, 2014 at 7:26 AM, Ernesto Reinaldo Barreiro < reier...@gmail.com> wrote: > Hi Warren, > > > On Thu, Nov 20, 2014 at 12:46 AM, Warren Bell < >> warrenbe...@gmail.com> > 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 >> attached to this thread” exception when I try to use an >> injected service. >> This logging process is a little more complicated than what log4j >> or >> loopback can do. The bottom line is that I do not want the > request/response >> process to have to wait for the logging process to complete. What >> is the >> proper way of doing this in Wicket 6 using an injected >> service. >> >> Sometimes what I do is I create a context class >> ServiceHolder, >>> inject > what I need on this class (e.g. services) and pass this to >> the non >> web > thread (e.g as an argument to the runnable). Injector.inject >> will >> have > WicketApp in contex
Bes practice for deployment to avoid ClassNotFoundException
Hi all, I'm new to wicket and just recently started to use it for a new web app for one of our projects. Today I came across a similar issue like described in [1], a ClassNotFoundException during deserialization of a page. The interesting part about this in my mind is, that the mentioned missing class was missing for a good reason: I simply refactored a bit and renamed the class, redeployed and restarted my Tomcat. This looks like a normal use case to me, but is something I didn't thought of when I've read through the docs because. My deployment is very simple: I check out a SVN working copy with a pre-configured tag containing the whole application once and afterwards just need to merge/update and stop/start the web server/app. How is deployment supposed to work in Wicket after I have refactored or otherwise changed my classes regarding cached and serialized pages? Is there anything I need to tell wicket to clear its caches on each deployment or ignore those or whatever? Am I forced to not delete once deployed classes for a fair period of time? That would be a litte nightmare... Or is there any other issue I ran into I should have avoided? Obviously others do deploy their Wicket apps as well, so I hope you have some input on how to avoid the problem I've ran into. Thanks! The important parts of the stacktrace: java.lang.ClassNotFoundException: de.am_soft.util.frontend.wicket.markup.link.LogoutLink at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1720) at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1571) at java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Unknown Source) at org.apache.wicket.application.AbstractClassResolver.resolveClass(AbstractClassResolver.java:108) at org.apache.wicket.serialize.java.JavaSerializer$ClassResolverObjectInputStream.resolveClass(JavaSerializer.java:218) at java.io.ObjectInputStream.[...] [...] at org.apache.wicket.serialize.java.JavaSerializer.deserialize(JavaSerializer.java:122) at org.apache.wicket.pageStore.DefaultPageStore.deserializePage(DefaultPageStore.java:396) at org.apache.wicket.pageStore.DefaultPageStore.getPage(DefaultPageStore.java:135) at org.apache.wicket.page.PageStoreManager$SessionEntry.getPage(PageStoreManager.java:203) at org.apache.wicket.page.PageStoreManager$PersistentRequestAdapter.getPage(PageStoreManager.java:360) at org.apache.wicket.page.AbstractPageManager.getPage(AbstractPageManager.java:107) [1]: https://issues.apache.org/jira/browse/WICKET-4785 Mit freundlichen Grüßen, Thorsten Schöning -- Thorsten Schöning E-Mail: thorsten.schoen...@am-soft.de AM-SoFT IT-Systeme http://www.AM-SoFT.de/ Telefon...05151- 9468- 55 Fax...05151- 9468- 88 Mobil..0178-8 9468- 04 AM-SoFT GmbH IT-Systeme, Brandenburger Str. 7c, 31789 Hameln AG Hannover HRB 207 694 - Geschäftsführer: Andreas Muchow - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: What is the proper way to start a secondary process in Wicket 6
@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:05 AM, Ernesto Reinaldo Barreiro < reier...@gmail.com> wrote: > 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 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/blob/master/bgprocess/src/main/java/com/antilia/panel/TasksListPanel.java#L50 > > > > > > and > > > > > > > > > > https://github.com/reiern70/antilia-bits/blob/master/bgprocess/src/main/java/com/antilia/panel/TasksListPanel.java#L70 > > > > > > I had to re-add Timer behavior: I do not see yet why? It is as if the > timer > > > is not re-rendered: they are not isTemporar :-( I will check when I > have > > > more time. > > > > > > I would appreciate if you can review the code... before I write > anything on > > > my fork of Wicket in Action. This probably could be done in a leaner > way > > > mounting a resource to serve JSON for task states and building the UI > at > > > client side... But example illustrates how to do it with "plain > Wicket". > > > > > > > > > On Thu, Nov 20, 2014 at 8:40 AM, Ernesto Reinaldo Barreiro < > > > reier...@gmail.com> wrote: > > > > > > > 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 < > mgrigo...@apache.org> > > > > wrote: > > > > > > > >> 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? > > > >> > > > > >> > On Thu, Nov 20, 2014 at 7:54 AM, Martin Grigorov < > > > mgrigo...@apache.org> > > > >> > 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 Pull Request at > > > >> > > https://github.com/dashorst/wicketinaction.com with such > article. > > > >> > > > > > >> > > Martin Grigorov > > > >> > > Wicket Training and Consulting > > > >> > > https://twitter.com/mtgrigorov > > > >> > > > > > >> > > On Thu, Nov 20, 2014 at 7:26 AM, Ernesto Reinaldo Barreiro < > > > >> > > reier...@gmail.com> wrote: > > > >> > > > > > >> > > > Hi Warren, > > > >> > > > > > > >> > > > > > > >> > > > On Thu, Nov 20, 2014 at 12:46 AM, Warren Bell < > > > >> warrenbe...@gmail.com> > > > >> > > > 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 > > > >> > > > > attached to this thread” exception when I try to use an > injected > > > >> > > service. > > > >> > > > > This logging process is a little more complicated than what > > > log4j > > > >> or > > > >> > > > > loopback can do. The bottom line is that I do not want the > > > >> > > > request/response > > > >> > > > > process to have to wait for the logging process to complete. > > > What > > > >> is > > > >> > > the > > > >> > > > > proper way of doing this in Wicket 6 using an injected > service. > > > >> > > > > > > > >> > > > > Sometimes what I do is I create a context class > ServiceHolder, > > > >> > inject > > > >> > > > what I need on this class (e.g. services) and pass this to > the non > > > >> web > > > >> > > > thread (e.g as an argument to the runnable). Injector.inject > will > > > >> have > > > >> > > > WicketApp in context. > > > >> > > > > > > >> > > > > > > >> > > > > 1) Get request > > > >> > > > > 2) Log some data (Do not wait for this to complete) > > > >> > > > > 3) Process request > > > >> > > > > 4) Return response > > > >> > > > > > > > >> > > > > > > >> > > > You could use the same ServiceHolder as a bridge to pass info > to > > > the > > > >> > WEB > > > >> > > > layer. 1) keep a reference to it 2) in another (polling) > requ
Re: (Stupid) license questions
Wicket is licensed under the Apache Software License, v2.0. Do you have any questions that aren't answered here: http://www.apache.org/foundation/license-faq.html Martijn On Fri, Nov 21, 2014 at 2:53 PM, Fred wrote: > Are there any requirements on what license (if any) code that uses Wicket > must be released under and what acknowledgements (if any) must be provided? > Does it differ depending on the nature of what is being released? (e.g. > whole apps that use Wicket vs individual, only slightly modified copies of > Wicket components) -- Become a Wicket expert, learn from the best: http://wicketinaction.com - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
(Stupid) license questions
Are there any requirements on what license (if any) code that uses Wicket must be released under and what acknowledgements (if any) must be provided? Does it differ depending on the nature of what is being released? (e.g. whole apps that use Wicket vs individual, only slightly modified copies of Wicket components)
Re: What is the proper way to start a secondary process in Wicket 6
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 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/blob/master/bgprocess/src/main/java/com/antilia/panel/TasksListPanel.java#L50 > > > > and > > > > > > https://github.com/reiern70/antilia-bits/blob/master/bgprocess/src/main/java/com/antilia/panel/TasksListPanel.java#L70 > > > > I had to re-add Timer behavior: I do not see yet why? It is as if the timer > > is not re-rendered: they are not isTemporar :-( I will check when I have > > more time. > > > > I would appreciate if you can review the code... before I write anything on > > my fork of Wicket in Action. This probably could be done in a leaner way > > mounting a resource to serve JSON for task states and building the UI at > > client side... But example illustrates how to do it with "plain Wicket". > > > > > > On Thu, Nov 20, 2014 at 8:40 AM, Ernesto Reinaldo Barreiro < > > reier...@gmail.com> wrote: > > > > > 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://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? > > >> > > > >> > On Thu, Nov 20, 2014 at 7:54 AM, Martin Grigorov < > > mgrigo...@apache.org> > > >> > 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 Pull Request at > > >> > > https://github.com/dashorst/wicketinaction.com with such article. > > >> > > > > >> > > Martin Grigorov > > >> > > Wicket Training and Consulting > > >> > > https://twitter.com/mtgrigorov > > >> > > > > >> > > On Thu, Nov 20, 2014 at 7:26 AM, Ernesto Reinaldo Barreiro < > > >> > > reier...@gmail.com> wrote: > > >> > > > > >> > > > Hi Warren, > > >> > > > > > >> > > > > > >> > > > On Thu, Nov 20, 2014 at 12:46 AM, Warren Bell < > > >> warrenbe...@gmail.com> > > >> > > > 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 > > >> > > > > attached to this thread” exception when I try to use an injected > > >> > > service. > > >> > > > > This logging process is a little more complicated than what > > log4j > > >> or > > >> > > > > loopback can do. The bottom line is that I do not want the > > >> > > > request/response > > >> > > > > process to have to wait for the logging process to complete. > > What > > >> is > > >> > > the > > >> > > > > proper way of doing this in Wicket 6 using an injected service. > > >> > > > > > > >> > > > > Sometimes what I do is I create a context class ServiceHolder, > > >> > inject > > >> > > > what I need on this class (e.g. services) and pass this to the non > > >> web > > >> > > > thread (e.g as an argument to the runnable). Injector.inject will > > >> have > > >> > > > WicketApp in context. > > >> > > > > > >> > > > > > >> > > > > 1) Get request > > >> > > > > 2) Log some data (Do not wait for this to complete) > > >> > > > > 3) Process request > > >> > > > > 4) Return response > > >> > > > > > > >> > > > > > >> > > > You could use the same ServiceHolder as a bridge to pass info to > > the > > >> > WEB > > >> > > > layer. 1) keep a reference to it 2) in another (polling) request > > >> use it > > >> > > to > > >> > > > see how back-ground job is progressing. Sometimes I also use it to > > >> > > control > > >> > > > the Job: e.g. stop/pause it, cancel it. Once Job finishes just let > > >> > > service > > >> > > > holder "go". > > >> > > > > > >> > > > > > >> > > > > Thanks, > > >> > > > > > > >> > > > > Warren Bell > > >> > > > > > > >> - > > >> > > > > To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org > > >> > > > > For additional commands, e-mail: users-h...@wicket.apache.org > > >> > > > > > > >> > > > > > > >> > > > > > >> > > > > > >> > > > -- > > >> > > > Regards
Re: Question on Double Submit and rendering strategy
Hi Please give more details what you try to avoid exactly by making changes in this area. On Nov 21, 2014 12:25 AM, "Hesketh, Mark" wrote: > Hello, > > I just wanted to know what the impact of removing the buffered response > (referring to javadoc below for REDIRECT_TO_BUFFER) for a request is if > there's presumably a bunch of other duplicate requests following it on > solving the Double Submit problem. > ( > http://ci.apache.org/projects/wicket/apidocs/6.x/org/apache/wicket/settings/IRequestCycleSettings.html > ) > > I'm puzzled about throwing a response away when I would have thought it's > buffered and reused to service the (duplicate) requests following? > > Many thanks > > cheers. > -m. > > > --- > This email, and any attachments, may be confidential and also privileged. > If you are not the intended recipient, please notify the sender and delete > all copies of this transmission along with any attachments immediately. You > should not copy or use it for any purpose, nor disclose its contents to any > other person. > --- >
Re: Is there a hook where I can run code after response and connection is closed
Hi, You can flush the response yourself with Response.flush(). Or create your own Servlet Filter that does its job after calling chain.doFilter() On Nov 20, 2014 11:08 PM, "Warren Bell" wrote: > Just a follow up on a previous post where I was trying to log some data to > a db and not have the response wait. > > Is there a hook somewhere that is called after the response has left to > the client and the connection is closed. > > onAfterConnectionClosed(…)? > > This would need to be accessible somehow in my “REST Annotations” > implementation of IResource. > > Thanks, > > Warren Bell > - > To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org > For additional commands, e-mail: users-h...@wicket.apache.org > >
Re: What is the proper way to start a secondary process in Wicket 6
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/blob/master/bgprocess/src/main/java/com/antilia/panel/TasksListPanel.java#L50 > > and > > > https://github.com/reiern70/antilia-bits/blob/master/bgprocess/src/main/java/com/antilia/panel/TasksListPanel.java#L70 > > I had to re-add Timer behavior: I do not see yet why? It is as if the timer > is not re-rendered: they are not isTemporar :-( I will check when I have > more time. > > I would appreciate if you can review the code... before I write anything on > my fork of Wicket in Action. This probably could be done in a leaner way > mounting a resource to serve JSON for task states and building the UI at > client side... But example illustrates how to do it with "plain Wicket". > > > On Thu, Nov 20, 2014 at 8:40 AM, Ernesto Reinaldo Barreiro < > reier...@gmail.com> wrote: > > > 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://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? > >> > > >> > On Thu, Nov 20, 2014 at 7:54 AM, Martin Grigorov < > mgrigo...@apache.org> > >> > 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 Pull Request at > >> > > https://github.com/dashorst/wicketinaction.com with such article. > >> > > > >> > > Martin Grigorov > >> > > Wicket Training and Consulting > >> > > https://twitter.com/mtgrigorov > >> > > > >> > > On Thu, Nov 20, 2014 at 7:26 AM, Ernesto Reinaldo Barreiro < > >> > > reier...@gmail.com> wrote: > >> > > > >> > > > Hi Warren, > >> > > > > >> > > > > >> > > > On Thu, Nov 20, 2014 at 12:46 AM, Warren Bell < > >> warrenbe...@gmail.com> > >> > > > 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 > >> > > > > attached to this thread” exception when I try to use an injected > >> > > service. > >> > > > > This logging process is a little more complicated than what > log4j > >> or > >> > > > > loopback can do. The bottom line is that I do not want the > >> > > > request/response > >> > > > > process to have to wait for the logging process to complete. > What > >> is > >> > > the > >> > > > > proper way of doing this in Wicket 6 using an injected service. > >> > > > > > >> > > > > Sometimes what I do is I create a context class ServiceHolder, > >> > inject > >> > > > what I need on this class (e.g. services) and pass this to the non > >> web > >> > > > thread (e.g as an argument to the runnable). Injector.inject will > >> have > >> > > > WicketApp in context. > >> > > > > >> > > > > >> > > > > 1) Get request > >> > > > > 2) Log some data (Do not wait for this to complete) > >> > > > > 3) Process request > >> > > > > 4) Return response > >> > > > > > >> > > > > >> > > > You could use the same ServiceHolder as a bridge to pass info to > the > >> > WEB > >> > > > layer. 1) keep a reference to it 2) in another (polling) request > >> use it > >> > > to > >> > > > see how back-ground job is progressing. Sometimes I also use it to > >> > > control > >> > > > the Job: e.g. stop/pause it, cancel it. Once Job finishes just let > >> > > service > >> > > > holder "go". > >> > > > > >> > > > > >> > > > > Thanks, > >> > > > > > >> > > > > Warren Bell > >> > > > > > >> - > >> > > > > To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org > >> > > > > For additional commands, e-mail: users-h...@wicket.apache.org > >> > > > > > >> > > > > > >> > > > > >> > > > > >> > > > -- > >> > > > Regards - Ernesto Reinaldo Barreiro > >> > > > > >> > > > >> > > >> > > >> > > >> > -- > >> > Regards - Ernesto Reinaldo Barreiro > >> > > >> > > > > > > > > -- > > Regards - Ernesto Reinaldo Barreiro > > > > > > -- > Regards - Ernesto Reinaldo Barreiro >