tag:blogger.com,1999:blog-9390811.post5730054459239590518..comments2024-03-26T09:19:44.679+00:00Comments on Ad-Hockery: Asynchronous application events in GrailsRobhttp://www.blogger.com/profile/01855523354151116481noreply@blogger.comBlogger22125tag:blogger.com,1999:blog-9390811.post-22627473700855040562022-06-04T10:13:17.948+01:002022-06-04T10:13:17.948+01:00browse around these guys why not find out more W... browse around these guys <a href="https://www.dolabuy.ru/messenger-c-157_158_262/louis-vuitton-replica-n40000-wholesale-anton-tote-damier-graphite-canvas-bags-p-4041.html" rel="nofollow"><strong>why not find out more</strong></a> Website <a href="https://www.dolabuy.ru/nba-c-157_158_370/top-louis-vuitton-replica-m45785-trunk-black-p-4517.html" rel="nofollow"><strong>her explanation</strong></a> read the article <a href="https://www.dolabuy.ru/backpack-c-157_158_159/louis-vuitton-replica-dauphine-backpack-pm-monogram-m45142-marron-p-870.html" rel="nofollow"><strong>weblink</strong></a>mcpethehttps://www.blogger.com/profile/04270652718400464102noreply@blogger.comtag:blogger.com,1999:blog-9390811.post-69439588575060287942022-04-07T07:33:00.042+01:002022-04-07T07:33:00.042+01:00The first-ever One Year MBA program in Digital En...The first-ever <a href="https://www.iimu.ac.in/programs/one-year-mba-dem/dem-at-a-glance" rel="nofollow"> One Year MBA program in Digital Enterprise Management (DEM) </a> introduces candidates with work experience to management concepts and leadership styles in the emerging digital business enterprises.IIM Udaipurhttps://www.blogger.com/profile/15501764797254386412noreply@blogger.comtag:blogger.com,1999:blog-9390811.post-39455052103793105772021-11-23T08:39:06.704+00:002021-11-23T08:39:06.704+00:00TV commercials are one of the best ways to grow yo...<a href="https://mobito.ir/radio-tv-ads/tv-commercials/" rel="nofollow">TV commercials</a> are one of the best ways to grow your business.mobito.irhttps://www.blogger.com/profile/08979171635184258836noreply@blogger.comtag:blogger.com,1999:blog-9390811.post-77189131062869507232019-12-02T09:51:20.742+00:002019-12-02T09:51:20.742+00:00this is amazing site 바카라사이트this is amazing site <a href="https://www.cosbaccarat.com" rel="nofollow"> 바카라사이트</a>Jan Jomeshttps://www.blogger.com/profile/06032328090268605807noreply@blogger.comtag:blogger.com,1999:blog-9390811.post-1134320532714629942016-02-26T21:45:57.125+00:002016-02-26T21:45:57.125+00:00Can I track events like login , logout and login f...Can I track events like login , logout and login failure?Catherine Augustinehttps://www.blogger.com/profile/16287952373588758724noreply@blogger.comtag:blogger.com,1999:blog-9390811.post-26032717580769309452014-06-18T08:25:14.128+01:002014-06-18T08:25:14.128+01:00Hi Rob, I'm running Grails 2.2.0 and have been...Hi Rob, I'm running Grails 2.2.0 and have been using the technique outlined in your article and it's been working great. For some reason I never noticed that it wasn't actually executing asynchronously until I bumped into a long running task the other day and started to investigate. <br /><br />Coming back to your article I simply configured the resources.groovy to what you have outlined but now I'm getting really bizarre issues like domain objects rejecting validation because dateCreated is null (an attribute that Grails sets itself). Turn of the resources.groovy change and everything goes back to normal. Saves work no lack of session Exceptions.<br /><br />I'm just wondering if I'm using an outdate technique now and should be perhaps using some other setting. This article is over 4 years old.Simonhttps://www.blogger.com/profile/12285662493322559389noreply@blogger.comtag:blogger.com,1999:blog-9390811.post-24604478893978205032014-04-08T18:17:26.442+01:002014-04-08T18:17:26.442+01:00Good Day Rob,
I am using the spring-events plugin...Good Day Rob,<br /><br />I am using the spring-events plugin in a Grails 2.2.4 application. I was able to configure it per your plugin README, and everything is working fine with the default retryPolicy. I would like to execute some code on the final failed attempt of a retryPolicy. I have a database domain object that gets populated via the 'event.source'. I would like to update the field on the last failed attempt, but I am not sure how to do that. <br /><br />Thanks!Chuckhttps://www.blogger.com/profile/15854216801092578481noreply@blogger.comtag:blogger.com,1999:blog-9390811.post-66863506270293473372013-07-12T10:15:54.873+01:002013-07-12T10:15:54.873+01:00had to explicitly register my service for grails 2...had to explicitly register my service for grails 2.1.. Only then were the events received. However with grails 2.2 they have built awesomeness with implicit event transmission capacity for controllers and even integration with spring integration<br />Anonymoushttps://www.blogger.com/profile/09347295357059070745noreply@blogger.comtag:blogger.com,1999:blog-9390811.post-66209308779976202692011-11-22T12:54:59.912+00:002011-11-22T12:54:59.912+00:00which version of the plugin are you using & wh...which version of the plugin are you using & which version of Grails?Robhttps://www.blogger.com/profile/01855523354151116481noreply@blogger.comtag:blogger.com,1999:blog-9390811.post-79936504928079501992011-11-02T16:40:14.434+00:002011-11-02T16:40:14.434+00:00Hello Rob, thanks for your answer.
To be more pre...Hello Rob, thanks for your answer.<br /><br />To be more precise, I have the following situation:<br />From a grails service, I'm doing:<br /><br />applicationContext.publishEvent(new GenericIdEvent(id));<br /><br />Then, I have an AsyncProcessingService, which implements ApplicationListener.<br />In it's onApplicationEvent() method, I'm fetching an entity based on the id I have published above.<br />Then when I want to get entity.myInnerProperty, I m getting the famous org.hibernate.LazyInitializationException: could not initialize proxy - no Session.<br /><br />I have configured the threadpool in resources.groovy, just like in the example:<br />applicationEventMulticaster(SimpleApplicationEventMulticaster) {<br /> taskExecutor = Executors.newCachedThreadPool()<br /> }<br />The listener - AsyncProcessingService has the boolean transactional = false,<br />while the service that published the event has it set to true.<br /><br />Am i missing something very obvious here?<br /><br />ThanksAnonymousnoreply@blogger.comtag:blogger.com,1999:blog-9390811.post-35116207676978329192011-11-02T04:37:22.418+00:002011-11-02T04:37:22.418+00:00@cristiancalugaru yes, I wrote the Grails Spring E...@cristiancalugaru yes, I wrote the Grails Spring Events plugin based on this blog post & that includes a mechanism for ensuring the asynchronous event processing can access a Hibernate session.Robhttps://www.blogger.com/profile/01855523354151116481noreply@blogger.comtag:blogger.com,1999:blog-9390811.post-22224709721913296642011-10-31T16:26:05.082+00:002011-10-31T16:26:05.082+00:00Hello,
It seems that once you override the Applic...Hello,<br /><br />It seems that once you override the ApplicationEventMulticaster bean in resources.groovy(to set it to async), there is no longer support for lazy-loading properties of domain objects, hence you get LazyInititExceptions.<br /><br />Anyone has any ideea about this?Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-9390811.post-72341599780620657532010-05-21T13:12:41.649+01:002010-05-21T13:12:41.649+01:00I'm assuming DocumentEvent is some kind of cla...I'm assuming DocumentEvent is some kind of class that extends ApplicationEvent.Robhttps://www.blogger.com/profile/01855523354151116481noreply@blogger.comtag:blogger.com,1999:blog-9390811.post-60357180017202840022010-05-20T19:38:13.194+01:002010-05-20T19:38:13.194+01:00In the domain class, you are calling publish() wit...In the domain class, you are calling publish() with new DocumentEvent. Did you mean ApplicationEvent? If not, what is the import statement for DocumentEvent? I'm new to this stuff and it's not quite clear to me :^)Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-9390811.post-90693248293477507822010-05-18T20:41:33.581+01:002010-05-18T20:41:33.581+01:00@Luke: Purely that the taskExecutor property wasn&...@Luke: Purely that the taskExecutor property wasn't overridden. I've certainly used property override config successfully at other times so I'm not sure what the problem is.Robhttps://www.blogger.com/profile/01855523354151116481noreply@blogger.comtag:blogger.com,1999:blog-9390811.post-49181216065500239322010-05-18T03:05:11.696+01:002010-05-18T03:05:11.696+01:00What didn't work about using property override...What didn't work about using property overrides?Luke Daleyhttps://www.blogger.com/profile/00074701550720952708noreply@blogger.comtag:blogger.com,1999:blog-9390811.post-52406951869925673052010-05-08T00:50:33.250+01:002010-05-08T00:50:33.250+01:00Great Post!
Another skill, you can define a prope...Great Post!<br /><br />Another skill, you can define a property named grailsApplication in your Service to get the Instance of GrailsApplication. Then get ApplicationContext from it. The following is a sample:<br /><br />class EventService {<br /> <br /> def grailsApplication<br /><br /> boolean transactional = false<br /><br /> void publish(def event) {<br /> println "Raising event '$event' in thread ${Thread.currentThread().id}"<br /> grailsApplication.mainContext.publishEvent(event)<br /> }<br />}<br /><br />cheersfoxgemhttps://www.blogger.com/profile/12938727581809086766noreply@blogger.comtag:blogger.com,1999:blog-9390811.post-78238716697986005792010-05-05T15:46:16.585+01:002010-05-05T15:46:16.585+01:00Robert,
Thanks a lot for posting. I think this w...Robert,<br /><br />Thanks a lot for posting. I think this will resolve a design issue I've been trying to figure out for a while. <br /><br />JeanJean Barmashhttps://www.blogger.com/profile/00307745503542974136noreply@blogger.comtag:blogger.com,1999:blog-9390811.post-53349621821882540812010-05-04T06:54:10.827+01:002010-05-04T06:54:10.827+01:00In that case what would fire the event? Perhaps th...In that case what would fire the event? Perhaps the onUpdate of the domain class? Sounds reasonable I guess. Quartz would be another option.Robhttps://www.blogger.com/profile/01855523354151116481noreply@blogger.comtag:blogger.com,1999:blog-9390811.post-5147873701444975632010-05-04T00:10:31.215+01:002010-05-04T00:10:31.215+01:00Would you recommend this technique for implementin...Would you recommend this technique for implementing simple work flow?<br /><br />For example, I have a record that starts in worker queue. I want to check when certain fields have been completed and then move the record into the supervisor queue.Brad Rhoadshttps://www.blogger.com/profile/16181029506340764324noreply@blogger.comtag:blogger.com,1999:blog-9390811.post-85057136992724919642010-05-03T23:17:49.861+01:002010-05-03T23:17:49.861+01:00The code is based on the Spring framework API but ...The code is based on the Spring framework API but yeah it runs in a standard Grails app on Tomcat.Robhttps://www.blogger.com/profile/01855523354151116481noreply@blogger.comtag:blogger.com,1999:blog-9390811.post-58683105237098190192010-05-03T22:28:53.670+01:002010-05-03T22:28:53.670+01:00Hello!
Just wondering(noob question): can I use t...Hello!<br /><br />Just wondering(noob question): can I use the same features through a simple web server like tomcat? Or only through spring application server?Victor Hugo Germanohttps://www.blogger.com/profile/12030160604255283986noreply@blogger.com