Great! I'll update my patch on the Jira issue I created. -----Original Message----- From: Tat leung [mailto:[EMAIL PROTECTED] Sent: Wednesday, May 10, 2006 2:27 AM To: Tapestry users Subject: Re: Tapernate-Example HiveMindAutowireWorker Problem
James, The change resolved the problem that I was having. Thanks, Tat James Carman wrote: > Oh, sorry. I committed a change to my tapernate-example application which > implements this change. For those of you who were encountering this > problem, can you download it and try out the changes? Thanks! > > > -----Original Message----- > From: James Carman [mailto:[EMAIL PROTECTED] > Sent: Monday, May 08, 2006 9:31 PM > To: 'Tapestry users' > Subject: RE: Tapernate-Example HiveMindAutowireWorker Problem > > Well, I could specify *all* of the workers that I want my auto-wire worker > to follow by using a comma-separated list. That might do the trick! > > -----Original Message----- > From: Mark Lehmacher [mailto:[EMAIL PROTECTED] > Sent: Monday, May 08, 2006 6:04 PM > To: Tapestry users > Subject: RE: Tapernate-Example HiveMindAutowireWorker Problem > Importance: High > > The way I see it, it definitely IS the ordering: > > When you contribute the autowirer with > before="tapestry.enhance.abstract-property" and > after="tapestry.enhance.dispatch-inject" parameters you don't guarantee that > the parameter-worker already performed it's work, because it is not part of > those services which make up dispatch-inject. > > The ordering of the enhancement workers is unspecified and relies on the > underlying Hivemind Order object, which in turn is backed by a HashMap. So I > guess if you add one or several enhancement workers to your chain you will > get the same problem sooner or later (as soon as the HashMap fucks up the > ordering for you and the parameter-worker runs before your autowire-worker). > > However, I'd really love to see a working autowiring function like that. If > it goes into the tapestry core it could be combined into the > abstract-property-worker, which would solve the ordering problem but raise > other questions instead (like seperation of concerns). > > > >> --- Ursprüngliche Nachricht --- >> Von: "James Carman" <[EMAIL PROTECTED]> >> An: "'Tapestry users'" <users@tapestry.apache.org> >> Betreff: RE: Tapernate-Example HiveMindAutowireWorker Problem >> Datum: Mon, 8 May 2006 10:57:05 -0400 >> >> I thought the ordering was getting screwed up too. But, I added >> LoggingInterceptor to the ParameterPropertyWorker and my auto-wire worker >> and the parameter one seems to be running first. If the parameter worker >> runs first, this problem should not occur, since the property would have >> already been claimed and my worker would just bypass it. I intentionally >> put my worker after all that stuff, so I wouldn't step on anyone's toes. >> I >> wonder if there's some special case that's getting the ordering screwed >> up? >> >> -----Original Message----- >> From: Mark Lehmacher [mailto:[EMAIL PROTECTED] >> Sent: Monday, May 08, 2006 6:31 AM >> To: Tapestry users >> Subject: RE: Tapernate-Example HiveMindAutowireWorker Problem >> Importance: High >> >> Yup, that's what I am saying. >> >> Looks like it's wiring component parameters as well: >> >> 5705 HiveMindAutowireWorker:performEnhancement [DEBUG] Creating auto-wired >> accessor for property delegate on component >> classpath:/org/apache/tapestry/html/Shell.jwc, line 22, column 96 >> 5856 HiveMindAutowireWorker:performEnhancement [DEBUG] Creating auto-wired >> accessor for property delegate on component >> classpath:/org/apache/tapestry/html/Shell.jwc, line 22, column 96 >> >> With the result of getting this error: >> >> Error at classpath:/org/apache/tapestry/html/Shell.jwc, line 78, column >> 20: >> Error adding property delegate to class org.apache.tapestry.html.Shell: >> Property delegate has already been claimed by a different enhancement >> worker. >> >> >> So my uneducated guess is that somewhere in the depths of tapestry there >> might be a service which implements IValidationDelegate and it's gets >> wired >> to the component parameter. Looks like the order gets somehow fucked-up, >> because at the point at which the autowire stuff comes in all parameter >> properties should have already been claimed. So it probably has to do >> with >> the configuration contribution taking place in the seperate module >> descriptor within my drop-in jar. >> >> >> >>> --- Ursprüngliche Nachricht --- >>> Von: "James Carman" <[EMAIL PROTECTED]> >>> An: "'Tapestry users'" <users@tapestry.apache.org> >>> Betreff: RE: Tapernate-Example HiveMindAutowireWorker Problem >>> Datum: Sun, 7 May 2006 18:25:17 -0400 >>> >>> Hmmmm. That's weird. But, thanks for the tip. I've submitted the code >>> as >>> a patch to Tapestry. So, I need to figure out how to get it working. >>> >> So, >> >>> what you're saying is that if the auto-wiring stuff is inside a jar file >>> and >>> not part of your application's hivemodule.xml file, then it bombs? >>> >>> -----Original Message----- >>> From: Mark Lehmacher [mailto:[EMAIL PROTECTED] >>> Sent: Sunday, May 07, 2006 5:21 PM >>> To: Tapestry users >>> Subject: Re: Tapernate-Example HiveMindAutowireWorker Problem >>> Importance: High >>> >>> I had that very same problem when I tried to package the Tapernate >>> auto-wiring stuff in a drop-in jar. It said that one of the parameters >>> >> of >> >>> the Shell component has already been claimed by a different enhancement >>> worker. >>> >>> When I just put the service definition and configuration contribution >>> >> into >> >>> my application's "root" module descriptor everything works fine. >>> >>> >>> >>>> --- Ursprüngliche Nachricht --- >>>> Von: Tat leung <[EMAIL PROTECTED]> >>>> An: Tapestry users <users@tapestry.apache.org> >>>> Betreff: Tapernate-Example HiveMindAutowireWorker Problem >>>> Datum: Sun, 07 May 2006 12:52:15 -0700 >>>> >>>> Hi All, >>>> >>>> I am using Tapernate and HiveMindAutowireWorker and >>>> HiveMindAutowireWorkerFactory from the Tapernate example in my >>>> applicaiton. The XML in my hivemind.xml file and the auto-wire >>>> >> classes >> >>>> are taken from the Tapernate example: >>>> >>>> <service-point id="AutowireWorkerFactory" >>>> >>>> >> interface="org.apache.hivemind.ServiceImplementationFactory" >> >>>> parameters-occurs="none"> >>>> <invoke-factory> >>>> <construct >>>> class="org.apache.tapestry.enhance.HiveMindAutowireWorkerFactory" /> >>>> </invoke-factory> >>>> </service-point> >>>> >>>> <service-point id="AutowireWorker" >>>> interface="org.apache.tapestry.enhance.EnhancementWorker"> >>>> <invoke-factory service-id="AutowireWorkerFactory" /> >>>> </service-point> >>>> >>>> <contribution >>>> >>> configuration-id="tapestry.enhance.EnhancementWorkers"> >>> >>>> <command before="tapestry.enhance.abstract-property" >>>> after="tapestry.enhance.dispatch-inject" >>>> id="inject-autowire" object="service:AutowireWorker" /> >>>> </contribution> >>>> >>>> This is working as expected when there is no exception. But when the >>>> application throws any exception, it is causing the following >>>> >> exception >> >>>> in the log file. Has anyone encounter this problem? >>>> >>>> Thanks! >>>> Tat >>>> >>>> org.apache.hivemind.ApplicationRuntimeException: Property delegate has >>>> already been claimed by a different enhancement worker. >>>> at >>>> >>>> > org.apache.tapestry.enhance.EnhancementOperationImpl.claimProperty(Enhanceme > >>> ntOperationImpl.java:241) >>> >>>> at >>>> >>>> > org.apache.tapestry.enhance.ParameterPropertyWorker.addParameter(ParameterPr > >>> opertyWorker.java:117) >>> >>>> at >>>> >>>> > org.apache.tapestry.enhance.ParameterPropertyWorker.performEnhancement(Param > >>> eterPropertyWorker.java:81) >>> >>>> at >>>> >>>> > org.apache.tapestry.enhance.ParameterPropertyWorker.performEnhancement(Param > >>> eterPropertyWorker.java:53) >>> >>>> at >>>> >>>> > $EnhancementWorker_10b103b1964.performEnhancement($EnhancementWorker_10b103b > >>> 1964.java) >>> >>>> at >>>> >>>> > $EnhancementWorker_10b103b197c.performEnhancement($EnhancementWorker_10b103b > >>> 197c.java) >>> >>>> at >>>> >>>> > $EnhancementWorker_10b103b195a.performEnhancement($EnhancementWorker_10b103b > >>> 195a.java) >>> >>>> at >>>> >>>> > org.apache.tapestry.services.impl.ComponentConstructorFactoryImpl.getCompone > >>> ntConstructor(ComponentConstructorFactoryImpl.java:97) >>> >>>> at >>>> >>>> > $ComponentConstructorFactory_10b103b1947.getComponentConstructor($ComponentC > >>> onstructorFactory_10b103b1947.java) >>> >>>> at >>>> >>>> > org.apache.tapestry.pageload.PageLoader.instantiateComponent(PageLoader.java > >>> :531) >>> >>>> at >>>> >>>> > org.apache.tapestry.pageload.PageLoader.createImplicitComponent(PageLoader.j > >>> ava:481) >>> >>>> at >>>> >>>> > $IPageLoader_10b103b1937.createImplicitComponent($IPageLoader_10b103b1937.ja > >>> va) >>> >>>> at >>>> >>>> > $IPageLoader_10b103b1938.createImplicitComponent($IPageLoader_10b103b1938.ja > >>> va) >>> >>>> at >>>> >>>> > org.apache.tapestry.services.impl.ComponentTemplateLoaderLogic.createImplici > >>> tComponent(ComponentTemplateLoaderLogic.java:218) >>> >>>> at >>>> >>>> > org.apache.tapestry.services.impl.ComponentTemplateLoaderLogic.process(Compo > >>> nentTemplateLoaderLogic.java:172) >>> >>>> at >>>> >>>> > org.apache.tapestry.services.impl.ComponentTemplateLoaderLogic.process(Compo > >>> nentTemplateLoaderLogic.java:111) >>> >>>> at >>>> >>>> > org.apache.tapestry.services.impl.ComponentTemplateLoaderLogic.loadTemplate( > >>> ComponentTemplateLoaderLogic.java:88) >>> >>>> at >>>> >>>> > org.apache.tapestry.services.impl.ComponentTemplateLoaderImpl.loadTemplate(C > >>> omponentTemplateLoaderImpl.java:60) >>> >>>> at >>>> >>>> > $ComponentTemplateLoader_10b103b194b.loadTemplate($ComponentTemplateLoader_1 > >>> 0b103b194b.java) >>> >>>> at >>>> >>>> > org.apache.tapestry.pageload.PageLoader.loadTemplateForComponent(PageLoader. > >>> java:648) >>> >>>> at >>>> org.apache.tapestry.BaseComponent.readTemplate(BaseComponent.java:77) >>>> at >>>> org.apache.tapestry.BaseComponent.finishLoad(BaseComponent.java:107) >>>> at $Exception_7.finishLoad($Exception_7.java) >>>> at >>>> >>>> > org.apache.tapestry.pageload.PageLoader.constructComponent(PageLoader.java:4 > >>> 39) >>> >>>> at >>>> org.apache.tapestry.pageload.PageLoader.loadPage(PageLoader.java:613) >>>> at >>>> >> $IPageLoader_10b103b1937.loadPage($IPageLoader_10b103b1937.java) >> >>>> at >>>> >> $IPageLoader_10b103b1938.loadPage($IPageLoader_10b103b1938.java) >> >>>> at >>>> org.apache.tapestry.pageload.PageSource.getPage(PageSource.java:120) >>>> at $IPageSource_10b103b1897.getPage($IPageSource_10b103b1897.java) >>>> at >>>> >>>> >> org.apache.tapestry.engine.RequestCycle.loadPage(RequestCycle.java:268) >> >>>> at >>>> org.apache.tapestry.engine.RequestCycle.getPage(RequestCycle.java:251) >>>> at >>>> >>>> > org.apache.tapestry.error.ExceptionPresenterImpl.presentException(ExceptionP > >>> resenterImpl.java:40) >>> >>>> at >>>> >>>> > $ExceptionPresenter_10b103b18a3.presentException($ExceptionPresenter_10b103b > >>> 18a3.java) >>> >>>> at >>>> >>>> > org.apache.tapestry.engine.AbstractEngine.activateExceptionPage(AbstractEngi > >>> ne.java:121) >>> >>>> at >>>> >>>> >> org.apache.tapestry.engine.AbstractEngine.service(AbstractEngine.java:280) >> >>>> at >>>> >>>> > org.apache.tapestry.services.impl.InvokeEngineTerminator.service(InvokeEngin > >>> eTerminator.java:60) >>> >>>> at >>>> >>>> > $WebRequestServicer_10b103b1907.service($WebRequestServicer_10b103b1907.java > >>> ) >>> >>>> at >>>> >>>> > $WebRequestServicer_10b103b1903.service($WebRequestServicer_10b103b1903.java > >>> ) >>> >>>> --------------------------------------------------------------------- >>>> To unsubscribe, e-mail: [EMAIL PROTECTED] >>>> For additional commands, e-mail: [EMAIL PROTECTED] >>>> >>>> >>> -- >>> "Feel free" - 10 GB Mailbox, 100 FreeSMS/Monat ... >>> Jetzt GMX TopMail testen: http://www.gmx.net/de/go/topmail >>> >>> --------------------------------------------------------------------- >>> To unsubscribe, e-mail: [EMAIL PROTECTED] >>> For additional commands, e-mail: [EMAIL PROTECTED] >>> >>> >>> >>> --------------------------------------------------------------------- >>> To unsubscribe, e-mail: [EMAIL PROTECTED] >>> For additional commands, e-mail: [EMAIL PROTECTED] >>> >>> >> -- >> GMX Produkte empfehlen und ganz einfach Geld verdienen! >> Satte Provisionen für GMX Partner: http://www.gmx.net/de/go/partner >> >> --------------------------------------------------------------------- >> To unsubscribe, e-mail: [EMAIL PROTECTED] >> For additional commands, e-mail: [EMAIL PROTECTED] >> >> >> >> --------------------------------------------------------------------- >> To unsubscribe, e-mail: [EMAIL PROTECTED] >> For additional commands, e-mail: [EMAIL PROTECTED] >> >> > > --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]