Actually, as i understand it, if you contribute to tapestry.services.ApplicationServices, you can override a specific service used by tapestry with your own and still have in the registry the original provided by tapestry. e.g.: I want to override Home service so it uses my own HomeServiceWrapper class...
In my hivemodule.xml i would put: <service-point id="HomeWrapper" interface="IEngineService"> <invoke-factory> <construct class="HomeServiceWrapper"> <set-object property="wrappedService" value="service:tapestry.services.Home" /> </construct> </invoke-factory> </service-point> <contribution configuration-id="tapestry.services.ApplicationServices"> <service name="home" object="service:HomeWrapper" /> </contribution> I did not test it, but i'm fairly confident it would work. Please correct me if i somehow forgot something, i'm still getting used to hivemind. Ron Piterman wrote: > I don't get exactly what you want to do by "wrapping". > You can replace an implementation of a service by providing another > implementation, but then the old one will not exist in the registry > anymore. > > But it sounds more what you need is to intercept the services - take a > look at hivemind interceptors... > > Cheers, > Ron > > > Patrick Moore wrote: >> Hi -- >> >> I am trying to wrap some engine service by replacing the configuration >> point, tapestry.services.FactoryServices with this definition: >> >> <contribution >> configuration-id="service:tapestry.services.FactoryServices"> >> <service name="home" object="service:tapestry.services.Home" /> >> <service name="direct" >> object="service:transactionalDirectService" /> >> <service name="page" object="service:transactionalPageService" /> >> <service name="reset" object="service:tapestry.services.Reset" /> >> <service name="restart" >> object="service:tapestry.services.Restart" /> >> <service name="asset" object="service:tapestry.services.Asset" /> >> <service name="external" >> object="service:tapestry.services.External" /> >> </contribution> >> >> I did something similiar to this to replace >> tapestry.services.ResponseContributors: >> >> <contribution >> configuration-id="tapestry.services.ResponseContributors"> >> <invoker object="service:ScriptResponseContributor" /> >> <invoker >> object="service:tapestry.services.JSONResponseContributor" /> >> <invoker >> object="service:tapestry.services.DojoAjaxResponseContributor" /> >> <invoker >> object="service:tapestry.services.DefaultResponseContributor" /> >> </contribution> >> >> but for the factoryservices I get : >> >> Error building service transparentpolitics.sessionFactory: Error at >> context:/WEB-INF/hivemodule.xml, line 76, column 87: Unable to >> construct service tapestry.services.ServiceMap: Error building service >> tapestry.services.ServiceMap: Error at >> jar:file:/C:/Documents%20and%20Settings/Owner/.m2/repository/org/apache/tapestry/tapestry-framework/4.1.1-SNAPSHOT/tapestry-framework-4.1.1-SNAPSHOT.jar!/META-INF/tapestry.services.xml, >> >> line 159, column 81: Unable to initialize service >> tapestry.services.ServiceMap (by invoking method initializeService on >> org.apache.tapestry.services.impl.ServiceMapImpl): Unable to construct >> configuration tapestry.services.FactoryServices: Element service (at >> context:/WEB-INF/transpol.persistence.xml, line 47, column 72) >> contains errors: Value for attribute 'name' ('home') duplicates a >> prior instance at >> jar:file:/C:/Documents%20and%20Settings/Owner/.m2/repository/org/apache/tapestry/tapestry-framework/4.1.1-SNAPSHOT/tapestry-framework-4.1.1-SNAPSHOT.jar!/META-INF/tapestry.services.xml, >> >> line 53, column 54. >> >> >> Does anyone have any ideas on how I can do this service wrapping? >> >> -Pat >> >> --------------------------------------------------------------------- >> 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]