You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tapestry.apache.org by bu...@apache.org on 2018/02/18 20:20:10 UTC
svn commit: r1025568 [2/4] - in /websites/production/tapestry/content: ./
cache/
Modified: websites/production/tapestry/content/integrating-with-spring-framework.html
==============================================================================
--- websites/production/tapestry/content/integrating-with-spring-framework.html (original)
+++ websites/production/tapestry/content/integrating-with-spring-framework.html Sun Feb 18 20:20:09 2018
@@ -109,12 +109,12 @@
</div>
-<p>For integrating Spring Security into your application, see <a href="integrating-with-spring-framework.html">Integrating with Spring Framework</a>.</p><p><strong>Contents</strong></p><p><style type="text/css">/*<![CDATA[*/
-div.rbtoc1518405638739 {padding: 0px;}
-div.rbtoc1518405638739 ul {list-style: disc;margin-left: 0px;}
-div.rbtoc1518405638739 li {margin-left: 0px;padding-left: 0px;}
+<p>For integrating Spring Security into your application, see <a href="security.html">Security</a>.</p><p><strong>Contents</strong></p><p><style type="text/css">/*<![CDATA[*/
+div.rbtoc1518985173367 {padding: 0px;}
+div.rbtoc1518985173367 ul {list-style: disc;margin-left: 0px;}
+div.rbtoc1518985173367 li {margin-left: 0px;padding-left: 0px;}
-/*]]>*/</style></p><div class="toc-macro rbtoc1518405638739">
+/*]]>*/</style></p><div class="toc-macro rbtoc1518985173367">
<ul class="toc-indentation"><li>Related Articles</li></ul>
<ul><li><a href="#IntegratingwithSpringFramework-SpringVersion">Spring Version</a></li><li><a href="#IntegratingwithSpringFramework-Usage">Usage</a>
<ul class="toc-indentation"><li><a href="#IntegratingwithSpringFramework-Requireddependency">Required dependency</a></li><li><a href="#IntegratingwithSpringFramework-Updateyourweb.xmlfile">Update your web.xml file</a></li><li><a href="#IntegratingwithSpringFramework-AccessingtheSpringApplicationContext">Accessing the Spring Application Context</a></li><li><a href="#IntegratingwithSpringFramework-Injectingbeans">Injecting beans</a></li><li><a href="#IntegratingwithSpringFramework-InjectingTapestryservicesinSpringbeans">Injecting Tapestry services in Spring beans</a></li></ul>
@@ -145,19 +145,13 @@ div.rbtoc1518405638739 li {margin-left:
</div></div><h3 id="IntegratingwithSpringFramework-Injectingbeans">Injecting beans</h3><p>Inside your component classes, you may use the @<a class="external-link" href="http://tapestry.apache.org/current/apidocs/org/apache/tapestry5/ioc/annotations/Inject.html">Inject</a> annotation. Typically, just adding @<a class="external-link" href="http://tapestry.apache.org/current/apidocs/org/apache/tapestry5/ioc/annotations/Inject.html">Inject</a> to the field type is sufficient to identify the Spring bean to inject:</p><div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
<pre class="brush: java; gutter: false; theme: Default" style="font-size:12px;"> @Inject
private UserDAO userDAO;</pre>
-</div></div><p>Searching for Spring beans is threaded into the <a href="integrating-with-spring-framework.html">MasterObjectProvider service</a>. The Spring context becomes one more place that Tapestry searches when determining the injection for a injected field or method parameter.</p><h3 id="IntegratingwithSpringFramework-InjectingTapestryservicesinSpringbeans">Injecting Tapestry services in Spring beans</h3>
+</div></div><p>Searching for Spring beans is threaded into the <a href="injection-in-detail.html">MasterObjectProvider service</a>. The Spring context becomes one more place that Tapestry searches when determining the injection for a injected field or method parameter.</p><h3 id="IntegratingwithSpringFramework-InjectingTapestryservicesinSpringbeans">Injecting Tapestry services in Spring beans</h3>
<div class="aui-message aui-message-info">
Added in 5.2
- If you have configured Spring to allow annotation-based injection, then you will be able to inject Tapestry services into your Spring Beans.
-
-This feature is only available when Spring ApplicationContext is not configured and loaded externally.
-
-Inside your Spring beans, you may use @[Inject|http://tapestry.apache.org/current/apidocs/org/apache/tapestry5/ioc/annotations/Inject.html] and @[Autowired|http://static.springsource.org/spring/docs/3.0.x/javadoc-api/org/springframework/beans/factory/annotation/Autowired.html] annotations.
-
-
+ If you have configured Spring to allow annotation-based injection, then you will be able to inject Tapestry services into your Spring Beans. This feature is only available when Spring ApplicationContext is not configured and loaded externally. Inside your Spring beans, you may use @[Inject|http://tapestry.apache.org/current/apidocs/org/apache/tapestry5/ioc/annotations/Inject.html] and @[Autowired|http://static.springsource.org/spring/docs/3.0.x/javadoc-api/org/springframework/beans/factory/annotation/Autowired.html] annotations.
</div><pre>Simply add these two annotations on top the field you want to inject in your Spring bean.
</pre><pre>{code:language=java}</pre><pre> @Inject
@Autowired
@@ -177,7 +171,7 @@ This is accomplished by a BeanFactoryPos
<bean id="myBean" class="org.example.MyBean">
<property name="productionMode" value="${tapestry.production-mode}"/>
</bean>
-{code}</pre><h2 id="IntegratingwithSpringFramework-ApplicationContextCustomizer">ApplicationContextCustomizer</h2><p>A chain-of-command service, <a class="external-link" href="http://tapestry.apache.org/current/apidocs/org/apache/tapestry5/spring/ApplicationContextCustomizer.html">ApplicationContextCustomizer</a> allows the application context, created by Tapestry, to be customized as it is created. You may contribute your own ApplicationContextCustomizer instances as needed.</p><h2 id="IntegratingwithSpringFramework-5.0CompatibilityMode">5.0 Compatibility Mode</h2><p>In some circumstances, it is desirable to configure the Spring ApplicationContext externally. The context <config-param> "tapestry.use-external-spring-context" can be configured to "true". Tapestry will then use an existing ApplicationContext, provided by a Spring ContextLoaderListener. You will still be able to inject Spring beans into Tapestry components and services, and the ApplicationContext service will be
visible ... but you will not be able to inject Tapestry IoC services into Spring beans.</p><p>This option provides compatibility with the tapestry-spring 5.0, including exposing Spring beans as Tapestry IoC services (something that no longer occurs unless compatibility mode is enabled).</p><h2 id="IntegratingwithSpringFramework-ChangesFrom5.0">Changes From 5.0</h2><p>The changes below represent an unfortunate backwards compatibility issue. If necessary, you can still use tapestry-spring version 5.0.18 with the rest of Tapestry.</p><ul class="alternate"><li>You may now use the @Inject or @InjectService annotations inside Spring beans; these will be resolved to Tapestry services or other objects available via the MasterObjectProvider. Please see the <a href="integrating-with-spring-framework.html">detailed guide to Injection</a>.</li><li>The dependency on Spring is no longer scope "provider" and has changed to 2.5.6.</li><li>Spring Beans are no longer exposed as services, unless 5.0
compatibility mode is enabled.</li><li>You no longer create a ContextLoaderListener.</li></ul><h2 id="IntegratingwithSpringFramework-Limitations">Limitations</h2><p>Non-singleton beans are not handled properly. Tapestry will request the beans from the application context in a manner unsuitable for their life cycle. For the moment, you should consider the non-singleton beans to be not injectable. Instead, inject the ApplicationContext service and obtain the non-singleton beans as needed.</p></div>
+{code}</pre><h2 id="IntegratingwithSpringFramework-ApplicationContextCustomizer">ApplicationContextCustomizer</h2><p>A chain-of-command service, <a class="external-link" href="http://tapestry.apache.org/current/apidocs/org/apache/tapestry5/spring/ApplicationContextCustomizer.html">ApplicationContextCustomizer</a> allows the application context, created by Tapestry, to be customized as it is created. You may contribute your own ApplicationContextCustomizer instances as needed.</p><h2 id="IntegratingwithSpringFramework-5.0CompatibilityMode">5.0 Compatibility Mode</h2><p>In some circumstances, it is desirable to configure the Spring ApplicationContext externally. The context <config-param> "tapestry.use-external-spring-context" can be configured to "true". Tapestry will then use an existing ApplicationContext, provided by a Spring ContextLoaderListener. You will still be able to inject Spring beans into Tapestry components and services, and the ApplicationContext service will be
visible ... but you will not be able to inject Tapestry IoC services into Spring beans.</p><p>This option provides compatibility with the tapestry-spring 5.0, including exposing Spring beans as Tapestry IoC services (something that no longer occurs unless compatibility mode is enabled).</p><h2 id="IntegratingwithSpringFramework-ChangesFrom5.0">Changes From 5.0</h2><p>The changes below represent an unfortunate backwards compatibility issue. If necessary, you can still use tapestry-spring version 5.0.18 with the rest of Tapestry.</p><ul class="alternate"><li>You may now use the @Inject or @InjectService annotations inside Spring beans; these will be resolved to Tapestry services or other objects available via the MasterObjectProvider. Please see the <a href="injection-in-detail.html">detailed guide to Injection</a>.</li><li>The dependency on Spring is no longer scope "provider" and has changed to 2.5.6.</li><li>Spring Beans are no longer exposed as services, unless 5.0 compatibility
mode is enabled.</li><li>You no longer create a ContextLoaderListener.</li></ul><h2 id="IntegratingwithSpringFramework-Limitations">Limitations</h2><p>Non-singleton beans are not handled properly. Tapestry will request the beans from the application context in a manner unsuitable for their life cycle. For the moment, you should consider the non-singleton beans to be not injectable. Instead, inject the ApplicationContext service and obtain the non-singleton beans as needed.</p></div>
</div>
<div class="clearer"></div>
Modified: websites/production/tapestry/content/object-providers.html
==============================================================================
--- websites/production/tapestry/content/object-providers.html (original)
+++ websites/production/tapestry/content/object-providers.html Sun Feb 18 20:20:09 2018
@@ -75,17 +75,17 @@
</div>
<div id="content">
- <div id="ConfluenceContent"><p>When you don't provide the @<a class="external-link" href="http://tapestry.apache.org/current/apidocs/org/apache/tapestry5/ioc/annotations/InjectService.html">InjectService</a> annotation on a parameter (to a service builder method or constructor), Tapestry will resolve the parameter automatically.</p><p>This is called <em>object injection</em>, rather than <em>service injection</em>, because the value that will ultimately be injected is not necessarily a service; it may be some arbitrary object.</p><p>If this sounds vague, its because there is not just one <a class="external-link" href="http://tapestry.apache.org/current/apidocs/org/apache/tapestry5/ioc/ObjectProvider.html">ObjectProvider</a>; there's a whole set of them, forming a <a href="object-providers.html">chain of command</a>. The commands in the chain may provide an object based on the parameter type, or based on additional annotations on the parameter.</p><p>There are seve
ral built-in object providers:</p><ul><li>Check for @<a class="external-link" href="http://tapestry.apache.org/current/apidocs/org/apache/tapestry5/ioc/annotations/Value.html">Value</a> annotation</li><li>Check for @<a class="external-link" href="http://tapestry.apache.org/current/apidocs/org/apache/tapestry5/ioc/annotations/Symbol.html">Symbol</a> annotation</li><li>Check for a <em>unique</em> service in the Registry whose service interface matches the parameter type<br clear="none"> Usually, the @Inject annotation is supplemented by an additional annotation which triggers a specific ObjectProvider to provide the value.</li></ul><h1 id="ObjectProviders-@ValueAnnotationProvider">@Value Annotation Provider</h1><p>The Value annotation allows a literal value to be injected. When combined with <a href="object-providers.html">symbols</a>, they represent a way for parts of the overall service network to be spot-configured. For example:</p><div class="code panel pdl" style="border-width
: 1px;"><div class="codeContent panelContent pdl">
+ <div id="ConfluenceContent"><p>When you don't provide the @<a class="external-link" href="http://tapestry.apache.org/current/apidocs/org/apache/tapestry5/ioc/annotations/InjectService.html">InjectService</a> annotation on a parameter (to a service builder method or constructor), Tapestry will resolve the parameter automatically.</p><p>This is called <em>object injection</em>, rather than <em>service injection</em>, because the value that will ultimately be injected is not necessarily a service; it may be some arbitrary object.</p><p>If this sounds vague, its because there is not just one <a class="external-link" href="http://tapestry.apache.org/current/apidocs/org/apache/tapestry5/ioc/ObjectProvider.html">ObjectProvider</a>; there's a whole set of them, forming a <a href="chainbuilder-service.html">chain of command</a>. The commands in the chain may provide an object based on the parameter type, or based on additional annotations on the parameter.</p><p>There are
several built-in object providers:</p><ul><li>Check for @<a class="external-link" href="http://tapestry.apache.org/current/apidocs/org/apache/tapestry5/ioc/annotations/Value.html">Value</a> annotation</li><li>Check for @<a class="external-link" href="http://tapestry.apache.org/current/apidocs/org/apache/tapestry5/ioc/annotations/Symbol.html">Symbol</a> annotation</li><li>Check for a <em>unique</em> service in the Registry whose service interface matches the parameter type<br clear="none"> Usually, the @Inject annotation is supplemented by an additional annotation which triggers a specific ObjectProvider to provide the value.</li></ul><h1 id="ObjectProviders-@ValueAnnotationProvider">@Value Annotation Provider</h1><p>The Value annotation allows a literal value to be injected. When combined with <a href="object-providers.html">symbols</a>, they represent a way for parts of the overall service network to be spot-configured. For example:</p><div class="code panel pdl" style="border-w
idth: 1px;"><div class="codeContent panelContent pdl">
<pre class="brush: java; gutter: false; theme: Default" style="font-size:12px;"> public MyService build(@Value("${max-seconds}") long maxSeconds)
{
return new MyServiceImpl(maxSeconds);
}</pre>
-</div></div><p>Here, the MyService service requires a configuration of a number of seconds. The value is supplied as a symbol, with a factory default that may be overwritten with an application default.</p><p>Usually, the symbol reference is only part of the string, i.e. <code>@Value("${report.dir}/${<a class="external-link" href="http://report.name" rel="nofollow">report.name</a>}.txt")</code></p><h1 id="ObjectProviders-@SymbolAnnotationProvider">@Symbol Annotation Provider</h1><p>This is closely related to the @Value annotation approach, except that the annotation directly specifies a symbol name.</p><div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
+</div></div><p>Here, the MyService service requires a configuration of a number of seconds. The value is supplied as a symbol, with a factory default that may be overwritten with an application default.</p><p>Usually, the symbol reference is only part of the string, i.e. <code>@Value("${report.dir}/${report.name}.txt")</code></p><h1 id="ObjectProviders-@SymbolAnnotationProvider">@Symbol Annotation Provider</h1><p>This is closely related to the @Value annotation approach, except that the annotation directly specifies a symbol name.</p><div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
<pre class="brush: java; gutter: false; theme: Default" style="font-size:12px;"> public MyService build(@Symbol("max-seconds") long maxSeconds)
{
return new MyServiceImpl(maxSeconds);
}</pre>
-</div></div><h1 id="ObjectProviders-ServiceProvider">Service Provider</h1><p>This is always that last object provider checked.</p><p>A <em>single</em> service must exist whose service interface matches the parameter type. This is <em>not</em> an exact match: a search is made for any and all services whose service interface is a super class of the parameter type.</p><p>An exception is thrown if there are no matches, or if there are multiple matches.</p><h1 id="ObjectProviders-AliasObjectProvider">Alias Object Provider</h1><p>The tapestry-core module defines the <a href="object-providers.html">Alias object provider</a>, which is used as a way to override services or disambiguate services (when multiple services implement the same interface).</p><h1 id="ObjectProviders-DefiningNewProviders">Defining New Providers</h1><p>New providers can be specified by contributing to the MasterObjectProvider service's configuration. The configuration is mapped, with the keys being the provider prefi
x, and the values being the object provider implementation.</p><p>Example:</p><div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
+</div></div><h1 id="ObjectProviders-ServiceProvider">Service Provider</h1><p>This is always that last object provider checked.</p><p>A <em>single</em> service must exist whose service interface matches the parameter type. This is <em>not</em> an exact match: a search is made for any and all services whose service interface is a super class of the parameter type.</p><p>An exception is thrown if there are no matches, or if there are multiple matches.</p><h1 id="ObjectProviders-AliasObjectProvider">Alias Object Provider</h1><p>The tapestry-core module defines the <a href="aliases.html">Alias object provider</a>, which is used as a way to override services or disambiguate services (when multiple services implement the same interface).</p><h1 id="ObjectProviders-DefiningNewProviders">Defining New Providers</h1><p>New providers can be specified by contributing to the MasterObjectProvider service's configuration. The configuration is mapped, with the keys being the provider prefix, and th
e values being the object provider implementation.</p><p>Example:</p><div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
<pre class="brush: java; gutter: false; theme: Default" style="font-size:12px;"> public void contributeMasterObjectProvider(OrderedConfiguration<ObjectProvider> configuration)
{
configuration.add("MyObject", new MyObjectProvider());
Modified: websites/production/tapestry/content/operation-tracker.html
==============================================================================
--- websites/production/tapestry/content/operation-tracker.html (original)
+++ websites/production/tapestry/content/operation-tracker.html Sun Feb 18 20:20:09 2018
@@ -109,10 +109,10 @@
</div>
-<p>The <a class="external-link" href="http://tapestry.apache.org/current/apidocs/org/apache/tapestry5/ioc/OperationTracker.html">OperationTracker</a> is a resource; it's actually a singleton, and is available for injection into any IoC service (or Tapestry component).</p><p>Using the OperationTracker you may run a Runnable, or invoke an Invokable (returning a typed response).  Associated with the operation is a description string.</p><p>If there are no exceptions, then no problem.</p><p>If there  are exceptions, then you'll see the console output logged at the point of the exception:</p><pre></pre><p>qtp644826761-13 [ERROR] Registry Operations trace:<br clear="none">qtp644826761-13 [ERROR] Registry [ 1] Handling page render request for page DatumEditor<br clear="none">qtp644826761-13 [ERROR] Registry [ 2] Constructing instance of page class org.apache.tapestry5.integration.app1.pages.DatumEditor<br clear="none">qtp644826761-13 [ERROR] Registry [ 3] Assembling root compone
nt for page DatumEditor<br clear="none">qtp644826761-13 [ERROR] Registry [ 4] Running component class transformations on org.apache.tapestry5.integration.app1.pages.Datum<br clear="none">qtp644826761-13 [ERROR] RequestExceptionHandler Processing of request failed with uncaught exception: java.lang.RuntimeException: Exception assembling root component of page DatumEditor: Unable to instantiate instance of transformed class org.apache.tapestry5.integration.app1.pages.DatumEditor: java.lang.reflect.InvocationTargetException<br clear="none">java.lang.RuntimeException: Exception assembling root component of page DatumEditor: Unable to instantiate instance of transformed class org.apache.tapestry5.integration.app1.pages.DatumEditor: java.lang.reflect.InvocationTargetException<br clear="none">at org.apache.tapestry5.internal.pageload.ComponentAssemblerImpl.performAssembleRootComponent(ComponentAssemblerImpl.<a class="external-link" href="http://java:129" rel="nofollow">java:129</a>)<br cl
ear="none">at org.apache.tapestry5.internal.pageload.ComponentAssemblerImpl.access$000(ComponentAssemblerImpl.java:37)<br clear="none">at org.apache.tapestry5.internal.pageload.ComponentAssemblerImpl$1.invoke(ComponentAssemblerImpl.java:81)<br clear="none">at org.apache.tapestry5.internal.pageload.ComponentAssemblerImpl$1.invoke(ComponentAssemblerImpl.java:78)<br clear="none">at org.apache.tapestry5.ioc.internal.OperationTrackerImpl.invoke(OperationTrackerImpl.java:82)<br clear="none">at org.apache.tapestry5.ioc.internal.PerThreadOperationTracker.invoke(PerThreadOperationTracker.java:72)<br clear="none">at org.apache.tapestry5.ioc.internal.RegistryImpl.invoke(RegistryImpl.<a class="external-link" href="http://java:1258" rel="nofollow">java:1258</a>)<br clear="none">at org.apache.tapestry5.internal.pageload.ComponentAssemblerImpl.assembleRootComponent(ComponentAssemblerImpl.java:76)<br clear="none">at org.apache.tapestry5.internal.pageload.PageLoaderImpl$3.invoke(PageLoaderImpl.<a
class="external-link" href="http://java:197" rel="nofollow">java:197</a>)<br clear="none">at org.apache.tapestry5.internal.pageload.PageLoaderImpl$3.invoke(PageLoaderImpl.<a class="external-link" href="http://java:190" rel="nofollow">java:190</a>)<br clear="none">at org.apache.tapestry5.ioc.internal.OperationTrackerImpl.invoke(OperationTrackerImpl.java:82)<br clear="none">at org.apache.tapestry5.ioc.internal.PerThreadOperationTracker.invoke(PerThreadOperationTracker.java:72)<br clear="none">at org.apache.tapestry5.ioc.internal.RegistryImpl.invoke(RegistryImpl.<a class="external-link" href="http://java:1258" rel="nofollow">java:1258</a>)<br clear="none">at org.apache.tapestry5.internal.pageload.PageLoaderImpl.loadPage(PageLoaderImpl.<a class="external-link" href="http://java:189" rel="nofollow">java:189</a>)<br clear="none">at $PageLoader_13a0346ec83c4e52.loadPage(Unknown Source)<br clear="none">at org.apache.tapestry5.internal.services.PageSourceImpl.getPage(PageSourceImpl.<a cl
ass="external-link" href="http://java:104" rel="nofollow">java:104</a>)<br clear="none">at $PageSource_13a0346ec83c4e51.getPage(Unknown Source)<br clear="none">at $PageSource_13a0346ec83c4e50.getPage(Unknown Source)<br clear="none">at org.apache.tapestry5.internal.services.RequestPageCacheImpl.get(RequestPageCacheImpl.java:86)<br clear="none">at $RequestPageCache_13a0346ec83c4e4f.get(Unknown Source)<br clear="none">at $RequestPageCache_13a0346ec83c4e4e.get(Unknown Source)<br clear="none">at org.apache.tapestry5.internal.services.PageRenderRequestHandlerImpl.handle(PageRenderRequestHandlerImpl.java:56)<br clear="none">at org.apache.tapestry5.modules.TapestryModule$34.handle(TapestryModule.<a class="external-link" href="http://java:1978" rel="nofollow">java:1978</a>)<br clear="none">at $PageRenderRequestHandler_13a0346ec83c4f9c.handle(Unknown Source)<br clear="none">at $PageRenderRequestHandler_13a0346ec83c4f97.handle(Unknown Source)<br clear="none">at org.apache.tapestry5.internal.s
ervices.ComponentRequestHandlerTerminator.handlePageRender(ComponentRequestHandlerTerminator.java:48)<br clear="none">at org.apache.tapestry5.internal.services.DeferredResponseRenderer.handlePageRender(DeferredResponseRenderer.java:52)<br clear="none">at $ComponentRequestFilter_13a0346ec83c4f95.handlePageRender(Unknown Source)<br clear="none">at $ComponentRequestHandler_13a0346ec83c4f98.handlePageRender(Unknown Source)<br clear="none">at org.apache.tapestry5.services.InitializeActivePageName.handlePageRender(InitializeActivePageName.java:47)<br clear="none">at $ComponentRequestFilter_13a0346ec83c4f94.handlePageRender(Unknown Source)<br clear="none">at $ComponentRequestHandler_13a0346ec83c4f98.handlePageRender(Unknown Source)<br clear="none">at org.apache.tapestry5.internal.services.ProductionModeUnknownComponentFilter.handlePageRender(ProductionModeUnknownComponentFilter.java:62)<br clear="none">at $ComponentRequestFilter_13a0346ec83c4f93.handlePageRender(Unknown Source)<br clear="n
one">at $ComponentRequestHandler_13a0346ec83c4f98.handlePageRender(Unknown Source)<br clear="none">at org.apache.tapestry5.internal.services.RequestOperationTracker$2.run(RequestOperationTracker.java:73)<br clear="none">at org.apache.tapestry5.ioc.internal.OperationTrackerImpl.run(OperationTrackerImpl.java:56)<br clear="none">at org.apache.tapestry5.ioc.internal.PerThreadOperationTracker.run(PerThreadOperationTracker.java:60)<br clear="none">at org.apache.tapestry5.ioc.internal.RegistryImpl.run(RegistryImpl.<a class="external-link" href="http://java:1252" rel="nofollow">java:1252</a>)<br clear="none">at org.apache.tapestry5.internal.services.RequestOperationTracker.handlePageRender(RequestOperationTracker.java:66)<br clear="none">at $ComponentRequestFilter_13a0346ec83c4f92.handlePageRender(Unknown Source)<br clear="none">at $ComponentRequestHandler_13a0346ec83c4f98.handlePageRender(Unknown Source)<br clear="none">at $ComponentRequestHandler_13a0346ec83c4f81.handlePageRender(Unknown
Source)<br clear="none">at org.apache.tapestry5.internal.services.PageRenderDispatcher.dispatch(PageRenderDispatcher.java:52)<br clear="none">at $Dispatcher_13a0346ec83c4f7f.dispatch(Unknown Source)<br clear="none">at $Dispatcher_13a0346ec83c4f80.dispatch(Unknown Source)<br clear="none">at $Dispatcher_13a0346ec83c4f74.dispatch(Unknown Source)<br clear="none">at org.apache.tapestry5.modules.TapestryModule$RequestHandlerTerminator.service(TapestryModule.<a class="external-link" href="http://java:304" rel="nofollow">java:304</a>)<br clear="none">at org.apache.tapestry5.internal.services.RequestErrorFilter.service(RequestErrorFilter.java:26)<br clear="none">at $RequestFilter_13a0346ec83c4f73.service(Unknown Source)<br clear="none">at $RequestHandler_13a0346ec83c4f75.service(Unknown Source)<br clear="none">at org.apache.tapestry5.modules.TapestryModule$3.service(TapestryModule.<a class="external-link" href="http://java:854" rel="nofollow">java:854</a>)<br clear="none">at $RequestHandl
er_13a0346ec83c4f75.service(Unknown Source)<br clear="none">at org.apache.tapestry5.modules.TapestryModule$2.service(TapestryModule.<a class="external-link" href="http://java:844" rel="nofollow">java:844</a>)<br clear="none">at $RequestHandler_13a0346ec83c4f75.service(Unknown Source)<br clear="none">at org.apache.tapestry5.internal.services.StaticFilesFilter.service(StaticFilesFilter.java:89)<br clear="none">at $RequestHandler_13a0346ec83c4f75.service(Unknown Source)<br clear="none">at org.apache.tapestry5.integration.app1.services.AppModule$2.service(AppModule.<a class="external-link" href="http://java:111" rel="nofollow">java:111</a>)<br clear="none">at $RequestFilter_13a0346ec83c4f71.service(Unknown Source)<br clear="none">at $RequestHandler_13a0346ec83c4f75.service(Unknown Source)<br clear="none">at $RequestHandler_13a0346ec83c4f6a.service(Unknown Source)<br clear="none">at org.apache.tapestry5.modules.TapestryModule$HttpServletRequestHandlerTerminator.service(TapestryModule.<
a class="external-link" href="http://java:255" rel="nofollow">java:255</a>)<br clear="none">at org.apache.tapestry5.internal.gzip.GZipFilter.service(GZipFilter.java:59)<br clear="none">at $HttpServletRequestHandler_13a0346ec83c4f6c.service(Unknown Source)<br clear="none">at org.apache.tapestry5.internal.services.IgnoredPathsFilter.service(IgnoredPathsFilter.java:62)<br clear="none">at $HttpServletRequestFilter_13a0346ec83c4f6d.service(Unknown Source)<br clear="none">at $HttpServletRequestFilter_13a0346ec83c4f68.service(Unknown Source)<br clear="none">at $HttpServletRequestHandler_13a0346ec83c4f6c.service(Unknown Source)<br clear="none">at org.apache.tapestry5.modules.TapestryModule$1.service(TapestryModule.<a class="external-link" href="http://java:804" rel="nofollow">java:804</a>)<br clear="none">at $HttpServletRequestHandler_13a0346ec83c4f6c.service(Unknown Source)<br clear="none">at $HttpServletRequestHandler_13a0346ec83c4f67.service(Unknown Source)<br clear="none">at org.apach
e.tapestry5.TapestryFilter.doFilter(TapestryFilter.<a class="external-link" href="http://java:166" rel="nofollow">java:166</a>)<br clear="none">at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.<a class="external-link" href="http://java:1291" rel="nofollow">java:1291</a>)<br clear="none">at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.<a class="external-link" href="http://java:443" rel="nofollow">java:443</a>)<br clear="none">at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.<a class="external-link" href="http://java:137" rel="nofollow">java:137</a>)<br clear="none">at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.<a class="external-link" href="http://java:556" rel="nofollow">java:556</a>)<br clear="none">at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.<a class="external-link" href="http://java:227" rel="nofollow">java:227</a>)<br clear="none">at org.eclipse.je
tty.server.handler.ContextHandler.doHandle(ContextHandler.<a class="external-link" href="http://java:1044" rel="nofollow">java:1044</a>)<br clear="none">at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.<a class="external-link" href="http://java:372" rel="nofollow">java:372</a>)<br clear="none">at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.<a class="external-link" href="http://java:189" rel="nofollow">java:189</a>)<br clear="none">at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.<a class="external-link" href="http://java:978" rel="nofollow">java:978</a>)<br clear="none">at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.<a class="external-link" href="http://java:135" rel="nofollow">java:135</a>)<br clear="none">at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.<a class="external-link" href="http://java:116" rel="nofollow">java:116</a>)<br clear="none">at org.eclipse
.jetty.server.Server.handle(Server.<a class="external-link" href="http://java:369" rel="nofollow">java:369</a>)<br clear="none">at org.eclipse.jetty.server.AbstractHttpConnection.handleRequest(AbstractHttpConnection.<a class="external-link" href="http://java:486" rel="nofollow">java:486</a>)<br clear="none">at org.eclipse.jetty.server.AbstractHttpConnection.headerComplete(AbstractHttpConnection.<a class="external-link" href="http://java:933" rel="nofollow">java:933</a>)<br clear="none">at org.eclipse.jetty.server.AbstractHttpConnection$RequestHandler.headerComplete(AbstractHttpConnection.<a class="external-link" href="http://java:995" rel="nofollow">java:995</a>)<br clear="none">at org.eclipse.jetty.http.HttpParser.parseNext(HttpParser.<a class="external-link" href="http://java:644" rel="nofollow">java:644</a>)<br clear="none">at org.eclipse.jetty.http.HttpParser.parseAvailable(HttpParser.<a class="external-link" href="http://java:235" rel="nofollow">java:235</a>)<br clear="no
ne">at org.eclipse.jetty.server.AsyncHttpConnection.handle(AsyncHttpConnection.java:82)<br clear="none">at <a class="external-link" href="http://org.eclipse.jetty.io" rel="nofollow">org.eclipse.jetty.io</a>.nio.SelectChannelEndPoint.handle(SelectChannelEndPoint.<a class="external-link" href="http://java:668" rel="nofollow">java:668</a>)<br clear="none">at <a class="external-link" href="http://org.eclipse.jetty.io" rel="nofollow">org.eclipse.jetty.io</a>.nio.SelectChannelEndPoint$1.run(SelectChannelEndPoint.java:52)<br clear="none">at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.<a class="external-link" href="http://java:608" rel="nofollow">java:608</a>)<br clear="none">at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.<a class="external-link" href="http://java:543" rel="nofollow">java:543</a>)<br clear="none">at java.lang.Thread.run(Thread.<a class="external-link" href="http://java:724" rel="nofollow">java:724</a>)<br clear="non
e">Caused by: java.lang.RuntimeException: Unable to instantiate instance of transformed class org.apache.tapestry5.integration.app1.pages.DatumEditor: java.lang.reflect.InvocationTargetException<br clear="none">at org.apache.tapestry5.internal.plastic.ClassInstantiatorImpl.newInstance(ClassInstantiatorImpl.<a class="external-link" href="http://java:113" rel="nofollow">java:113</a>)<br clear="none">at org.apache.tapestry5.internal.services.ComponentInstantiatorSourceImpl$2$1.newInstance(ComponentInstantiatorSourceImpl.<a class="external-link" href="http://java:235" rel="nofollow">java:235</a>)<br clear="none">at org.apache.tapestry5.internal.structure.InternalComponentResourcesImpl.<init>(InternalComponentResourcesImpl.<a class="external-link" href="http://java:163" rel="nofollow">java:163</a>)<br clear="none">at org.apache.tapestry5.internal.structure.ComponentPageElementImpl.<init>(ComponentPageElementImpl.<a class="external-link" href="http://java:555" rel="nofollo
w">java:555</a>)<br clear="none">at org.apache.tapestry5.internal.structure.ComponentPageElementImpl.<init>(ComponentPageElementImpl.<a class="external-link" href="http://java:579" rel="nofollow">java:579</a>)<br clear="none">at org.apache.tapestry5.internal.pageload.ComponentAssemblerImpl.performAssembleRootComponent(ComponentAssemblerImpl.java:97)<br clear="none">... 94 more<br clear="none">Caused by: java.lang.reflect.InvocationTargetException<br clear="none">at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)<br clear="none">at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57)<br clear="none">at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)<br clear="none">at java.lang.reflect.Constructor.newInstance(Constructor.<a class="external-link" href="http://java:526" rel="nofollow">java:526</a>)<br clear="none">at org.apache.tapestry5.internal.plastic.ClassInsta
ntiatorImpl.newInstance(ClassInstantiatorImpl.<a class="external-link" href="http://java:109" rel="nofollow">java:109</a>)<br clear="none">... 99 more<br clear="none">Caused by: org.apache.tapestry5.ioc.internal.OperationException: Field _value of class org.apache.tapestry5.integration.app1.pages.Datum must be instrumented, and may not be public.<br clear="none">at org.apache.tapestry5.ioc.internal.OperationTrackerImpl.logAndRethrow(OperationTrackerImpl.<a class="external-link" href="http://java:184" rel="nofollow">java:184</a>)<br clear="none">at org.apache.tapestry5.ioc.internal.OperationTrackerImpl.run(OperationTrackerImpl.java:62)<br clear="none">at org.apache.tapestry5.ioc.internal.PerThreadOperationTracker.run(PerThreadOperationTracker.java:60)<br clear="none">at org.apache.tapestry5.ioc.internal.RegistryImpl.run(RegistryImpl.<a class="external-link" href="http://java:1252" rel="nofollow">java:1252</a>)<br clear="none">at org.apache.tapestry5.internal.services.ComponentInst
antiatorSourceImpl.transform(ComponentInstantiatorSourceImpl.<a class="external-link" href="http://java:266" rel="nofollow">java:266</a>)<br clear="none">at org.apache.tapestry5.internal.plastic.PlasticClassPool.loadAndTransformClass(PlasticClassPool.<a class="external-link" href="http://java:368" rel="nofollow">java:368</a>)<br clear="none">at org.apache.tapestry5.internal.plastic.PlasticClassLoader.loadClass(PlasticClassLoader.java:38)<br clear="none">at java.lang.ClassLoader.loadClass(ClassLoader.<a class="external-link" href="http://java:357" rel="nofollow">java:357</a>)<br clear="none">at org.apache.tapestry5.integration.app1.pages.DatumEditor.initializeInstance(DatumEditor.java:22)<br clear="none">at org.apache.tapestry5.integration.app1.pages.DatumEditor.<init>(DatumEditor.java)<br clear="none">... 104 more<br clear="none">Caused by: java.lang.IllegalArgumentException: Field _value of class org.apache.tapestry5.integration.app1.pages.Datum must be instrumented, and m
ay not be public.<br clear="none">at org.apache.tapestry5.internal.plastic.PlasticFieldImpl.ensureNotPublic(PlasticFieldImpl.<a class="external-link" href="http://java:166" rel="nofollow">java:166</a>)<br clear="none">at org.apache.tapestry5.internal.plastic.PlasticFieldImpl.replaceFieldReadAccess(PlasticFieldImpl.<a class="external-link" href="http://java:423" rel="nofollow">java:423</a>)<br clear="none">at org.apache.tapestry5.internal.plastic.PlasticFieldImpl.setComputedConduit(PlasticFieldImpl.<a class="external-link" href="http://java:292" rel="nofollow">java:292</a>)<br clear="none">at org.apache.tapestry5.internal.transform.UnclaimedFieldWorker.transformField(UnclaimedFieldWorker.java:99)<br clear="none">at org.apache.tapestry5.internal.transform.UnclaimedFieldWorker.transform(UnclaimedFieldWorker.java:88)<br clear="none">at $ComponentClassTransformWorker2_13a0346ec83c4e9a.transform(Unknown Source)<br clear="none">at $ComponentClassTransformWorker2_13a0346ec83c4e9c.transfo
rm(Unknown Source)<br clear="none">at $ComponentClassTransformWorker2_13a0346ec83c4e7f.transform(Unknown Source)<br clear="none">at org.apache.tapestry5.internal.services.ComponentInstantiatorSourceImpl$3.run(ComponentInstantiatorSourceImpl.<a class="external-link" href="http://java:316" rel="nofollow">java:316</a>)<br clear="none">at org.apache.tapestry5.ioc.internal.OperationTrackerImpl.run(OperationTrackerImpl.java:56)<br clear="none">... 112 more</p>
+<p>The <a class="external-link" href="http://tapestry.apache.org/current/apidocs/org/apache/tapestry5/ioc/OperationTracker.html">OperationTracker</a> is a resource; it's actually a singleton, and is available for injection into any IoC service (or Tapestry component).</p><p>Using the OperationTracker you may run a Runnable, or invoke an Invokable (returning a typed response).  Associated with the operation is a description string.</p><p>If there are no exceptions, then no problem.</p><p>If there  are exceptions, then you'll see the console output logged at the point of the exception:</p><pre></pre><p>qtp644826761-13 [ERROR] Registry Operations trace:<br clear="none">qtp644826761-13 [ERROR] Registry [ 1] Handling page render request for page DatumEditor<br clear="none">qtp644826761-13 [ERROR] Registry [ 2] Constructing instance of page class org.apache.tapestry5.integration.app1.pages.DatumEditor<br clear="none">qtp644826761-13 [ERROR] Registry [ 3] Assembling root compone
nt for page DatumEditor<br clear="none">qtp644826761-13 [ERROR] Registry [ 4] Running component class transformations on org.apache.tapestry5.integration.app1.pages.Datum<br clear="none">qtp644826761-13 [ERROR] RequestExceptionHandler Processing of request failed with uncaught exception: java.lang.RuntimeException: Exception assembling root component of page DatumEditor: Unable to instantiate instance of transformed class org.apache.tapestry5.integration.app1.pages.DatumEditor: java.lang.reflect.InvocationTargetException<br clear="none">java.lang.RuntimeException: Exception assembling root component of page DatumEditor: Unable to instantiate instance of transformed class org.apache.tapestry5.integration.app1.pages.DatumEditor: java.lang.reflect.InvocationTargetException<br clear="none">at org.apache.tapestry5.internal.pageload.ComponentAssemblerImpl.performAssembleRootComponent(ComponentAssemblerImpl.java:129)<br clear="none">at org.apache.tapestry5.internal.pageload.ComponentAssemb
lerImpl.access$000(ComponentAssemblerImpl.java:37)<br clear="none">at org.apache.tapestry5.internal.pageload.ComponentAssemblerImpl$1.invoke(ComponentAssemblerImpl.java:81)<br clear="none">at org.apache.tapestry5.internal.pageload.ComponentAssemblerImpl$1.invoke(ComponentAssemblerImpl.java:78)<br clear="none">at org.apache.tapestry5.ioc.internal.OperationTrackerImpl.invoke(OperationTrackerImpl.java:82)<br clear="none">at org.apache.tapestry5.ioc.internal.PerThreadOperationTracker.invoke(PerThreadOperationTracker.java:72)<br clear="none">at org.apache.tapestry5.ioc.internal.RegistryImpl.invoke(RegistryImpl.java:1258)<br clear="none">at org.apache.tapestry5.internal.pageload.ComponentAssemblerImpl.assembleRootComponent(ComponentAssemblerImpl.java:76)<br clear="none">at org.apache.tapestry5.internal.pageload.PageLoaderImpl$3.invoke(PageLoaderImpl.java:197)<br clear="none">at org.apache.tapestry5.internal.pageload.PageLoaderImpl$3.invoke(PageLoaderImpl.java:190)<br clear="none">at org.a
pache.tapestry5.ioc.internal.OperationTrackerImpl.invoke(OperationTrackerImpl.java:82)<br clear="none">at org.apache.tapestry5.ioc.internal.PerThreadOperationTracker.invoke(PerThreadOperationTracker.java:72)<br clear="none">at org.apache.tapestry5.ioc.internal.RegistryImpl.invoke(RegistryImpl.java:1258)<br clear="none">at org.apache.tapestry5.internal.pageload.PageLoaderImpl.loadPage(PageLoaderImpl.java:189)<br clear="none">at $PageLoader_13a0346ec83c4e52.loadPage(Unknown Source)<br clear="none">at org.apache.tapestry5.internal.services.PageSourceImpl.getPage(PageSourceImpl.java:104)<br clear="none">at $PageSource_13a0346ec83c4e51.getPage(Unknown Source)<br clear="none">at $PageSource_13a0346ec83c4e50.getPage(Unknown Source)<br clear="none">at org.apache.tapestry5.internal.services.RequestPageCacheImpl.get(RequestPageCacheImpl.java:86)<br clear="none">at $RequestPageCache_13a0346ec83c4e4f.get(Unknown Source)<br clear="none">at $RequestPageCache_13a0346ec83c4e4e.get(Unknown Source)<b
r clear="none">at org.apache.tapestry5.internal.services.PageRenderRequestHandlerImpl.handle(PageRenderRequestHandlerImpl.java:56)<br clear="none">at org.apache.tapestry5.modules.TapestryModule$34.handle(TapestryModule.java:1978)<br clear="none">at $PageRenderRequestHandler_13a0346ec83c4f9c.handle(Unknown Source)<br clear="none">at $PageRenderRequestHandler_13a0346ec83c4f97.handle(Unknown Source)<br clear="none">at org.apache.tapestry5.internal.services.ComponentRequestHandlerTerminator.handlePageRender(ComponentRequestHandlerTerminator.java:48)<br clear="none">at org.apache.tapestry5.internal.services.DeferredResponseRenderer.handlePageRender(DeferredResponseRenderer.java:52)<br clear="none">at $ComponentRequestFilter_13a0346ec83c4f95.handlePageRender(Unknown Source)<br clear="none">at $ComponentRequestHandler_13a0346ec83c4f98.handlePageRender(Unknown Source)<br clear="none">at org.apache.tapestry5.services.InitializeActivePageName.handlePageRender(InitializeActivePageName.java:47)
<br clear="none">at $ComponentRequestFilter_13a0346ec83c4f94.handlePageRender(Unknown Source)<br clear="none">at $ComponentRequestHandler_13a0346ec83c4f98.handlePageRender(Unknown Source)<br clear="none">at org.apache.tapestry5.internal.services.ProductionModeUnknownComponentFilter.handlePageRender(ProductionModeUnknownComponentFilter.java:62)<br clear="none">at $ComponentRequestFilter_13a0346ec83c4f93.handlePageRender(Unknown Source)<br clear="none">at $ComponentRequestHandler_13a0346ec83c4f98.handlePageRender(Unknown Source)<br clear="none">at org.apache.tapestry5.internal.services.RequestOperationTracker$2.run(RequestOperationTracker.java:73)<br clear="none">at org.apache.tapestry5.ioc.internal.OperationTrackerImpl.run(OperationTrackerImpl.java:56)<br clear="none">at org.apache.tapestry5.ioc.internal.PerThreadOperationTracker.run(PerThreadOperationTracker.java:60)<br clear="none">at org.apache.tapestry5.ioc.internal.RegistryImpl.run(RegistryImpl.java:1252)<br clear="none">at org.
apache.tapestry5.internal.services.RequestOperationTracker.handlePageRender(RequestOperationTracker.java:66)<br clear="none">at $ComponentRequestFilter_13a0346ec83c4f92.handlePageRender(Unknown Source)<br clear="none">at $ComponentRequestHandler_13a0346ec83c4f98.handlePageRender(Unknown Source)<br clear="none">at $ComponentRequestHandler_13a0346ec83c4f81.handlePageRender(Unknown Source)<br clear="none">at org.apache.tapestry5.internal.services.PageRenderDispatcher.dispatch(PageRenderDispatcher.java:52)<br clear="none">at $Dispatcher_13a0346ec83c4f7f.dispatch(Unknown Source)<br clear="none">at $Dispatcher_13a0346ec83c4f80.dispatch(Unknown Source)<br clear="none">at $Dispatcher_13a0346ec83c4f74.dispatch(Unknown Source)<br clear="none">at org.apache.tapestry5.modules.TapestryModule$RequestHandlerTerminator.service(TapestryModule.java:304)<br clear="none">at org.apache.tapestry5.internal.services.RequestErrorFilter.service(RequestErrorFilter.java:26)<br clear="none">at $RequestFilter_13
a0346ec83c4f73.service(Unknown Source)<br clear="none">at $RequestHandler_13a0346ec83c4f75.service(Unknown Source)<br clear="none">at org.apache.tapestry5.modules.TapestryModule$3.service(TapestryModule.java:854)<br clear="none">at $RequestHandler_13a0346ec83c4f75.service(Unknown Source)<br clear="none">at org.apache.tapestry5.modules.TapestryModule$2.service(TapestryModule.java:844)<br clear="none">at $RequestHandler_13a0346ec83c4f75.service(Unknown Source)<br clear="none">at org.apache.tapestry5.internal.services.StaticFilesFilter.service(StaticFilesFilter.java:89)<br clear="none">at $RequestHandler_13a0346ec83c4f75.service(Unknown Source)<br clear="none">at org.apache.tapestry5.integration.app1.services.AppModule$2.service(AppModule.java:111)<br clear="none">at $RequestFilter_13a0346ec83c4f71.service(Unknown Source)<br clear="none">at $RequestHandler_13a0346ec83c4f75.service(Unknown Source)<br clear="none">at $RequestHandler_13a0346ec83c4f6a.service(Unknown Source)<br clear="none
">at org.apache.tapestry5.modules.TapestryModule$HttpServletRequestHandlerTerminator.service(TapestryModule.java:255)<br clear="none">at org.apache.tapestry5.internal.gzip.GZipFilter.service(GZipFilter.java:59)<br clear="none">at $HttpServletRequestHandler_13a0346ec83c4f6c.service(Unknown Source)<br clear="none">at org.apache.tapestry5.internal.services.IgnoredPathsFilter.service(IgnoredPathsFilter.java:62)<br clear="none">at $HttpServletRequestFilter_13a0346ec83c4f6d.service(Unknown Source)<br clear="none">at $HttpServletRequestFilter_13a0346ec83c4f68.service(Unknown Source)<br clear="none">at $HttpServletRequestHandler_13a0346ec83c4f6c.service(Unknown Source)<br clear="none">at org.apache.tapestry5.modules.TapestryModule$1.service(TapestryModule.java:804)<br clear="none">at $HttpServletRequestHandler_13a0346ec83c4f6c.service(Unknown Source)<br clear="none">at $HttpServletRequestHandler_13a0346ec83c4f67.service(Unknown Source)<br clear="none">at org.apache.tapestry5.TapestryFilter.
doFilter(TapestryFilter.java:166)<br clear="none">at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1291)<br clear="none">at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:443)<br clear="none">at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:137)<br clear="none">at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:556)<br clear="none">at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:227)<br clear="none">at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1044)<br clear="none">at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:372)<br clear="none">at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:189)<br clear="none">at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:978)<br clear="none">at org.eclipse.jetty.server.handler.ScopedHandler.handle(S
copedHandler.java:135)<br clear="none">at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:116)<br clear="none">at org.eclipse.jetty.server.Server.handle(Server.java:369)<br clear="none">at org.eclipse.jetty.server.AbstractHttpConnection.handleRequest(AbstractHttpConnection.java:486)<br clear="none">at org.eclipse.jetty.server.AbstractHttpConnection.headerComplete(AbstractHttpConnection.java:933)<br clear="none">at org.eclipse.jetty.server.AbstractHttpConnection$RequestHandler.headerComplete(AbstractHttpConnection.java:995)<br clear="none">at org.eclipse.jetty.http.HttpParser.parseNext(HttpParser.java:644)<br clear="none">at org.eclipse.jetty.http.HttpParser.parseAvailable(HttpParser.java:235)<br clear="none">at org.eclipse.jetty.server.AsyncHttpConnection.handle(AsyncHttpConnection.java:82)<br clear="none">at org.eclipse.jetty.io.nio.SelectChannelEndPoint.handle(SelectChannelEndPoint.java:668)<br clear="none">at org.eclipse.jetty.io.nio.SelectChannelEndPoi
nt$1.run(SelectChannelEndPoint.java:52)<br clear="none">at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:608)<br clear="none">at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:543)<br clear="none">at java.lang.Thread.run(Thread.java:724)<br clear="none">Caused by: java.lang.RuntimeException: Unable to instantiate instance of transformed class org.apache.tapestry5.integration.app1.pages.DatumEditor: java.lang.reflect.InvocationTargetException<br clear="none">at org.apache.tapestry5.internal.plastic.ClassInstantiatorImpl.newInstance(ClassInstantiatorImpl.java:113)<br clear="none">at org.apache.tapestry5.internal.services.ComponentInstantiatorSourceImpl$2$1.newInstance(ComponentInstantiatorSourceImpl.java:235)<br clear="none">at org.apache.tapestry5.internal.structure.InternalComponentResourcesImpl.<init>(InternalComponentResourcesImpl.java:163)<br clear="none">at org.apache.tapestry5.internal.structure.ComponentPageElemen
tImpl.<init>(ComponentPageElementImpl.java:555)<br clear="none">at org.apache.tapestry5.internal.structure.ComponentPageElementImpl.<init>(ComponentPageElementImpl.java:579)<br clear="none">at org.apache.tapestry5.internal.pageload.ComponentAssemblerImpl.performAssembleRootComponent(ComponentAssemblerImpl.java:97)<br clear="none">... 94 more<br clear="none">Caused by: java.lang.reflect.InvocationTargetException<br clear="none">at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)<br clear="none">at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57)<br clear="none">at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)<br clear="none">at java.lang.reflect.Constructor.newInstance(Constructor.java:526)<br clear="none">at org.apache.tapestry5.internal.plastic.ClassInstantiatorImpl.newInstance(ClassInstantiatorImpl.java:109)<br clear="none">... 99 more<br clear="none"
>Caused by: org.apache.tapestry5.ioc.internal.OperationException: Field _value of class org.apache.tapestry5.integration.app1.pages.Datum must be instrumented, and may not be public.<br clear="none">at org.apache.tapestry5.ioc.internal.OperationTrackerImpl.logAndRethrow(OperationTrackerImpl.java:184)<br clear="none">at org.apache.tapestry5.ioc.internal.OperationTrackerImpl.run(OperationTrackerImpl.java:62)<br clear="none">at org.apache.tapestry5.ioc.internal.PerThreadOperationTracker.run(PerThreadOperationTracker.java:60)<br clear="none">at org.apache.tapestry5.ioc.internal.RegistryImpl.run(RegistryImpl.java:1252)<br clear="none">at org.apache.tapestry5.internal.services.ComponentInstantiatorSourceImpl.transform(ComponentInstantiatorSourceImpl.java:266)<br clear="none">at org.apache.tapestry5.internal.plastic.PlasticClassPool.loadAndTransformClass(PlasticClassPool.java:368)<br clear="none">at org.apache.tapestry5.internal.plastic.PlasticClassLoader.loadClass(PlasticClassLoader.java:
38)<br clear="none">at java.lang.ClassLoader.loadClass(ClassLoader.java:357)<br clear="none">at org.apache.tapestry5.integration.app1.pages.DatumEditor.initializeInstance(DatumEditor.java:22)<br clear="none">at org.apache.tapestry5.integration.app1.pages.DatumEditor.<init>(DatumEditor.java)<br clear="none">... 104 more<br clear="none">Caused by: java.lang.IllegalArgumentException: Field _value of class org.apache.tapestry5.integration.app1.pages.Datum must be instrumented, and may not be public.<br clear="none">at org.apache.tapestry5.internal.plastic.PlasticFieldImpl.ensureNotPublic(PlasticFieldImpl.java:166)<br clear="none">at org.apache.tapestry5.internal.plastic.PlasticFieldImpl.replaceFieldReadAccess(PlasticFieldImpl.java:423)<br clear="none">at org.apache.tapestry5.internal.plastic.PlasticFieldImpl.setComputedConduit(PlasticFieldImpl.java:292)<br clear="none">at org.apache.tapestry5.internal.transform.UnclaimedFieldWorker.transformField(UnclaimedFieldWorker.java:99)<br c
lear="none">at org.apache.tapestry5.internal.transform.UnclaimedFieldWorker.transform(UnclaimedFieldWorker.java:88)<br clear="none">at $ComponentClassTransformWorker2_13a0346ec83c4e9a.transform(Unknown Source)<br clear="none">at $ComponentClassTransformWorker2_13a0346ec83c4e9c.transform(Unknown Source)<br clear="none">at $ComponentClassTransformWorker2_13a0346ec83c4e7f.transform(Unknown Source)<br clear="none">at org.apache.tapestry5.internal.services.ComponentInstantiatorSourceImpl$3.run(ComponentInstantiatorSourceImpl.java:316)<br clear="none">at org.apache.tapestry5.ioc.internal.OperationTrackerImpl.run(OperationTrackerImpl.java:56)<br clear="none">... 112 more</p>
-<p>Notice how the operation trace at the top of the text succinctly explains how execution arrived at the point of failure and why, information that isn't captured in a stack trace.</p><p>This operation trace appears in the Tapestry web applications, as part of the <a href="operation-tracker.html">default exception report page</a>.</p><p>There are times, especially when tracking down startup failures, where it is useful to see the operations log even without explicit exceptions.</p><p>Enabling <strong>debug</strong> level logging for the <strong>org.apache.tapestry5.ioc.Registry</strong> logging category will provide huge volumes of output in the console:</p><pre></pre><p>[DEBUG] Registry [ 1] --> Creating non-proxied instance of service ServiceConfigurationListenerHub<br clear="none">[DEBUG] Registry [ 2] --> Creating plan to instantiate org.apache.tapestry5.ioc.services.ServiceConfigurationListenerHub via public org.apache.tapestry5.ioc.services.ServiceConfigurati
onListenerHub(java.util.List)<br clear="none">[DEBUG] Registry [ 3] --> Determining injection value for parameter #1 (java.util.List)<br clear="none">[DEBUG] Registry [ 4] --> Collecting ordered configuration for service ServiceConfigurationListenerHub<br clear="none">[DEBUG] Registry [ 5] --> Invoking org.apache.tapestry5.ioc.FredModule.configureServiceConfigurationListener(OrderedConfiguration, CatchAllServiceConfigurationListener) (at FredModule.<a class="external-link" href="http://java:141" rel="nofollow">java:141</a>)<br clear="none">[DEBUG] Registry [ 6] --> Determining injection value for parameter #1 (org.apache.tapestry5.ioc.OrderedConfiguration)<br clear="none">[DEBUG] Registry [ 6] <-- Determining injection value for parameter #1 (org.apache.tapestry5.ioc.OrderedConfiguration) [0.17 ms]<br clear="none">[DEBUG] Registry [ 6] --> Determining injection value for parameter #2 (org.apache.tapestry5.ioc.CatchAllServiceConfigurationListener)<br clear="none">[
DEBUG] Registry [ 7] --> Creating proxy for service MasterObjectProvider<br clear="none">[DEBUG] Registry [ 7] <-- Creating proxy for service MasterObjectProvider [2.82 ms]<br clear="none">[DEBUG] Registry [ 7] --> Realizing service MasterObjectProvider<br clear="none">[DEBUG] Registry [ 8] --> Instantiating service MasterObjectProvider implementation via org.apache.tapestry5.ioc.internal.services.MasterObjectProviderImpl(List, OperationTracker) (at MasterObjectProviderImpl.java:33) via org.apache.tapestry5.ioc.modules.TapestryIOCModule.bind(ServiceBinder) (at TapestryIOCModule.java:50)<br clear="none">[DEBUG] Registry [ 9] --> Creating plan to instantiate org.apache.tapestry5.ioc.internal.services.MasterObjectProviderImpl via public org.apache.tapestry5.ioc.internal.services.MasterObjectProviderImpl(java.util.List,org.apache.tapestry5.ioc.OperationTracker)<br clear="none">[DEBUG] Registry [ 10] --> Determining injection value for parameter #1 (java.util.List)<br c
lear="none">[DEBUG] Registry [ 11] --> Collecting ordered configuration for service MasterObjectProvider<br clear="none">[DEBUG] Registry [ 12] --> Invoking org.apache.tapestry5.ioc.modules.TapestryIOCModule.setupObjectProviders(OrderedConfiguration, ServiceOverride) (at TapestryIOCModule.<a class="external-link" href="http://java:136" rel="nofollow">java:136</a>)<br clear="none">[DEBUG] Registry [ 13] --> Determining injection value for parameter #1 (org.apache.tapestry5.ioc.OrderedConfiguration)<br clear="none">[DEBUG] Registry [ 13] <-- Determining injection value for parameter #1 (org.apache.tapestry5.ioc.OrderedConfiguration) [0.17 ms]<br clear="none">[DEBUG] Registry [ 13] --> Determining injection value for parameter #2 (org.apache.tapestry5.ioc.services.ServiceOverride)<br clear="none">[DEBUG] Registry [ 14] --> Creating proxy for service ServiceOverride<br clear="none">[DEBUG] Registry [ 14] <-- Creating proxy for service ServiceOverride [2.15 ms]<br c
lear="none">[DEBUG] Registry [ 13] <-- Determining injection value for parameter #2 (org.apache.tapestry5.ioc.services.ServiceOverride) [2.62 ms]<br clear="none">[DEBUG] Registry [ 13] --> Creating proxy for service UpdateListenerHub<br clear="none">[DEBUG] Registry [ 13] <-- Creating proxy for service UpdateListenerHub [2.28 ms]</p><p>...</p>
+<p>Notice how the operation trace at the top of the text succinctly explains how execution arrived at the point of failure and why, information that isn't captured in a stack trace.</p><p>This operation trace appears in the Tapestry web applications, as part of the <a href="runtime-exceptions.html">default exception report page</a>.</p><p>There are times, especially when tracking down startup failures, where it is useful to see the operations log even without explicit exceptions.</p><p>Enabling <strong>debug</strong> level logging for the <strong>org.apache.tapestry5.ioc.Registry</strong> logging category will provide huge volumes of output in the console:</p><pre></pre><p>[DEBUG] Registry [ 1] --> Creating non-proxied instance of service ServiceConfigurationListenerHub<br clear="none">[DEBUG] Registry [ 2] --> Creating plan to instantiate org.apache.tapestry5.ioc.services.ServiceConfigurationListenerHub via public org.apache.tapestry5.ioc.services.ServiceConfigurat
ionListenerHub(java.util.List)<br clear="none">[DEBUG] Registry [ 3] --> Determining injection value for parameter #1 (java.util.List)<br clear="none">[DEBUG] Registry [ 4] --> Collecting ordered configuration for service ServiceConfigurationListenerHub<br clear="none">[DEBUG] Registry [ 5] --> Invoking org.apache.tapestry5.ioc.FredModule.configureServiceConfigurationListener(OrderedConfiguration, CatchAllServiceConfigurationListener) (at FredModule.<a class="external-link" href="http://java:141" rel="nofollow">java:141</a>)<br clear="none">[DEBUG] Registry [ 6] --> Determining injection value for parameter #1 (org.apache.tapestry5.ioc.OrderedConfiguration)<br clear="none">[DEBUG] Registry [ 6] <-- Determining injection value for parameter #1 (org.apache.tapestry5.ioc.OrderedConfiguration) [0.17 ms]<br clear="none">[DEBUG] Registry [ 6] --> Determining injection value for parameter #2 (org.apache.tapestry5.ioc.CatchAllServiceConfigurationListener)<br clear="none">
[DEBUG] Registry [ 7] --> Creating proxy for service MasterObjectProvider<br clear="none">[DEBUG] Registry [ 7] <-- Creating proxy for service MasterObjectProvider [2.82 ms]<br clear="none">[DEBUG] Registry [ 7] --> Realizing service MasterObjectProvider<br clear="none">[DEBUG] Registry [ 8] --> Instantiating service MasterObjectProvider implementation via org.apache.tapestry5.ioc.internal.services.MasterObjectProviderImpl(List, OperationTracker) (at MasterObjectProviderImpl.java:33) via org.apache.tapestry5.ioc.modules.TapestryIOCModule.bind(ServiceBinder) (at TapestryIOCModule.java:50)<br clear="none">[DEBUG] Registry [ 9] --> Creating plan to instantiate org.apache.tapestry5.ioc.internal.services.MasterObjectProviderImpl via public org.apache.tapestry5.ioc.internal.services.MasterObjectProviderImpl(java.util.List,org.apache.tapestry5.ioc.OperationTracker)<br clear="none">[DEBUG] Registry [ 10] --> Determining injection value for parameter #1 (java.util.List)<br
clear="none">[DEBUG] Registry [ 11] --> Collecting ordered configuration for service MasterObjectProvider<br clear="none">[DEBUG] Registry [ 12] --> Invoking org.apache.tapestry5.ioc.modules.TapestryIOCModule.setupObjectProviders(OrderedConfiguration, ServiceOverride) (at TapestryIOCModule.<a class="external-link" href="http://java:136" rel="nofollow">java:136</a>)<br clear="none">[DEBUG] Registry [ 13] --> Determining injection value for parameter #1 (org.apache.tapestry5.ioc.OrderedConfiguration)<br clear="none">[DEBUG] Registry [ 13] <-- Determining injection value for parameter #1 (org.apache.tapestry5.ioc.OrderedConfiguration) [0.17 ms]<br clear="none">[DEBUG] Registry [ 13] --> Determining injection value for parameter #2 (org.apache.tapestry5.ioc.services.ServiceOverride)<br clear="none">[DEBUG] Registry [ 14] --> Creating proxy for service ServiceOverride<br clear="none">[DEBUG] Registry [ 14] <-- Creating proxy for service ServiceOverride [2.15 ms]<br
clear="none">[DEBUG] Registry [ 13] <-- Determining injection value for parameter #2 (org.apache.tapestry5.ioc.services.ServiceOverride) [2.62 ms]<br clear="none">[DEBUG] Registry [ 13] --> Creating proxy for service UpdateListenerHub<br clear="none">[DEBUG] Registry [ 13] <-- Creating proxy for service UpdateListenerHub [2.28 ms]</p><p>...</p>
<p>The output identifies operation depth (the number in square brackets), whether the operation is starting (–>) or finishing (<–), and even the execution time of the operation.</p><p></p></div>
Modified: websites/production/tapestry/content/ordering-by-constraints.html
==============================================================================
--- websites/production/tapestry/content/ordering-by-constraints.html (original)
+++ websites/production/tapestry/content/ordering-by-constraints.html Sun Feb 18 20:20:09 2018
@@ -67,7 +67,7 @@
</div>
<div id="content">
- <div id="ConfluenceContent"><p>Tapestry IoC has two specific areas where it must put some form of contribution into a specific order:</p><ul><li><a href="ordering-by-constraints.html">Ordered Configurations</a>, where different modules may contribute into a service's configuration</li><li><a href="ordering-by-constraints.html">Service Decorators</a> which must be applied to services from a number of modules.<br clear="none"> In both these cases, objects (either contributions to a configuration, or decorators) are assigning qualified IDs, simple IDs qualified with the containing/contributing module's ID.</li></ul><p>Because the contributions can come from different modules, and there isn't a specific order in which the service contribution methods are invoked, there is no natural ordering of the contributed objects.</p><p>To resolve this, <em>constraints</em> are applied to each contribution. These constraints control what other objects must come before a contributi
on or after it.</p><p>The constraints are specified using the @<a class="external-link" href="http://tapestry.apache.org/current/apidocs/org/apache/tapestry5/ioc/annotations/Order.html">Order</a> annotation (for service decorator methods), or as variable arguments at the end of the add() method for ordered configurations.</p><p>Often a single contribution will have more than one constraint.</p><h1 id="OrderingbyConstraints-ConstraintTypes">Constraint Types</h1><p>Each constraint string begins with a prefix, <code>before:</code> or <code>after:</code>, used to identify the type of constraint.</p><p>The remainder of the constraint string is a comma-separated list of <em>patterns</em>. The contributed object will be ordered before or after the contributions identified by the patterns.</p><p><span class="confluence-anchor-link" id="OrderingbyConstraints-Match_Patterns"></span></p><h1 id="OrderingbyConstraints-ConstraintMatchPatterns">Constraint Match Patterns</h1><p>A constraint match
pattern is used to select one or more objects by their ID.</p><p>Match patterns support a very simple kind of wildcard matching. A <code>*</code> (asterisk character) may appear at the start and/or end of the pattern, and it will match zero or more characters there. Thus you can have patterns such as <code>Data*</code> or <code>*Logic</code> or even <code>*User*</code>.</p><p>Matching is <a href="ordering-by-constraints.html">case insensitive</a>.</p><p> </p><p></p></div>
+ <div id="ConfluenceContent"><p>Tapestry IoC has two specific areas where it must put some form of contribution into a specific order:</p><ul><li><a href="tapestry-ioc-configuration.html">Ordered Configurations</a>, where different modules may contribute into a service's configuration</li><li><a href="tapestry-ioc-decorators.html">Service Decorators</a> which must be applied to services from a number of modules.<br clear="none"> In both these cases, objects (either contributions to a configuration, or decorators) are assigning qualified IDs, simple IDs qualified with the containing/contributing module's ID.</li></ul><p>Because the contributions can come from different modules, and there isn't a specific order in which the service contribution methods are invoked, there is no natural ordering of the contributed objects.</p><p>To resolve this, <em>constraints</em> are applied to each contribution. These constraints control what other objects must come before a contrib
ution or after it.</p><p>The constraints are specified using the @<a class="external-link" href="http://tapestry.apache.org/current/apidocs/org/apache/tapestry5/ioc/annotations/Order.html">Order</a> annotation (for service decorator methods), or as variable arguments at the end of the add() method for ordered configurations.</p><p>Often a single contribution will have more than one constraint.</p><h1 id="OrderingbyConstraints-ConstraintTypes">Constraint Types</h1><p>Each constraint string begins with a prefix, <code>before:</code> or <code>after:</code>, used to identify the type of constraint.</p><p>The remainder of the constraint string is a comma-separated list of <em>patterns</em>. The contributed object will be ordered before or after the contributions identified by the patterns.</p><p><span class="confluence-anchor-link" id="OrderingbyConstraints-Match_Patterns"></span></p><h1 id="OrderingbyConstraints-ConstraintMatchPatterns">Constraint Match Patterns</h1><p>A constraint mat
ch pattern is used to select one or more objects by their ID.</p><p>Match patterns support a very simple kind of wildcard matching. A <code>*</code> (asterisk character) may appear at the start and/or end of the pattern, and it will match zero or more characters there. Thus you can have patterns such as <code>Data*</code> or <code>*Logic</code> or even <code>*User*</code>.</p><p>Matching is <a href="case-insensitivity.html">case insensitive</a>.</p><p> </p><p></p></div>
</div>
<div class="clearer"></div>
Modified: websites/production/tapestry/content/pipelinebuilder-service.html
==============================================================================
--- websites/production/tapestry/content/pipelinebuilder-service.html (original)
+++ websites/production/tapestry/content/pipelinebuilder-service.html Sun Feb 18 20:20:09 2018
@@ -126,7 +126,7 @@
</div>
-<p>In this pattern, an existing service is decorated with a filter. The filter will delegate to the service, but has the chance to alter or replace parameters before invoking the method, and can perform operations before returning. This is similar to <a href="pipelinebuilder-service.html">chain of responsibility</a>, but differs in that there are two interfaces (the service interface and the filter interface) and that each filter invokes the next filter via the service interface. In contrast, in the chain of responsibility, the chain invokes each method, which must return before the next command in the chain is invoked.</p><p>The service interface and the filter interface are closely related: the filter interface must match the service interface method for method, but each method of the filter interface must have an additional parameter whose type is the service interface. For example, a pipeline that performed string transformations might use the following interfaces:</p><div clas
s="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
+<p>In this pattern, an existing service is decorated with a filter. The filter will delegate to the service, but has the chance to alter or replace parameters before invoking the method, and can perform operations before returning. This is similar to <a href="chainbuilder-service.html">chain of responsibility</a>, but differs in that there are two interfaces (the service interface and the filter interface) and that each filter invokes the next filter via the service interface. In contrast, in the chain of responsibility, the chain invokes each method, which must return before the next command in the chain is invoked.</p><p>The service interface and the filter interface are closely related: the filter interface must match the service interface method for method, but each method of the filter interface must have an additional parameter whose type is the service interface. For example, a pipeline that performed string transformations might use the following interfaces:</p><div class="
code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
<pre class="brush: java; gutter: false; theme: Default" style="font-size:12px;">public interface StringTransformService
{
String transform(String input);
Modified: websites/production/tapestry/content/service-advisors.html
==============================================================================
--- websites/production/tapestry/content/service-advisors.html (original)
+++ websites/production/tapestry/content/service-advisors.html Sun Feb 18 20:20:09 2018
@@ -93,7 +93,7 @@
receiver.adviseAllMethods(advice);
};
</pre>
-</div></div><p>This is a method that is placed in a module class. Note the terminology: <em>advise</em> is the verb ("to advise a method") and <em>advice</em> is the noun ("with this advice"). The <a class="external-link" href="http://tapestry.apache.org/current/apidocs/org/apache/tapestry5/ioc/MethodAdviceReceiver.html">MethodAdviceReceiver</a> is a wrapper around the service being advised: you can add advice to some or all methods of the service, and also obtain the interface of the service. It is automatically passed into service advisor methods.</p><p>See <a href="service-advisors.html">Service Advisors</a> for what can be injected into a service advisor method.</p><p>Service advisor methods must have a parameter of type MethodAdviceReceiver.</p><p>A service will often be advised multiple times; any method may have any number of advice objects applied to it. Some methods may not get any advice. All of this is acceptable.</p><p>Service advisor methods are always void methods (t
his is different from <a href="service-advisors.html">service decorator methods</a>).</p><p>The @<a class="external-link" href="http://tapestry.apache.org/current/apidocs/org/apache/tapestry5/ioc/annotations/Match.html">Match</a>("*") annotation indicates that this advice applies to all services (both your own, and those defined by Tapestry). You will want to narrow down which services are actually targeted in most cases.</p><p>Note that some services, especially those built into Tapestry IoC, are marked as <a class="external-link" href="http://tapestry.apache.org/current/apidocs/org/apache/tapestry5/ioc/annotations/PreventServiceDecoration.html">not subject to decoration</a>, this applies to service advice as well as service decoration.</p><p>The <a class="external-link" href="http://tapestry.apache.org/current/apidocs/org/apache/tapestry5/ioc/MethodAdvice.html">MethodAdvice</a> interface is very simple; it receives an <a class="external-link" href="http://tapestry.apache.org/
current/apidocs/org/apache/tapestry5/ioc/Invocation.html">Invocation</a> representing a method call. Invocation has methods for inspecting the type and value of the parameters, and for overriding the values of the parameters.</p><p>The call to <code>proceed()</code> allows the invocation to continue; that is, the original method is invoked. If the method has been advised multiple times, the call to proceed() may chain into the next MethodAdvice object. In any case, after invoking <code>proceed()</code>, you may inspect and override the result (the return value).</p><p>Advice is pretty efficient, but it is still better to apply it only to methods that make sense. We can improve the service advisor method in our example to only advise methods that return String:</p><div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
+</div></div><p>This is a method that is placed in a module class. Note the terminology: <em>advise</em> is the verb ("to advise a method") and <em>advice</em> is the noun ("with this advice"). The <a class="external-link" href="http://tapestry.apache.org/current/apidocs/org/apache/tapestry5/ioc/MethodAdviceReceiver.html">MethodAdviceReceiver</a> is a wrapper around the service being advised: you can add advice to some or all methods of the service, and also obtain the interface of the service. It is automatically passed into service advisor methods.</p><p>See <a href="injection-in-detail.html">Injection in Detail</a> for what can be injected into a service advisor method.</p><p>Service advisor methods must have a parameter of type MethodAdviceReceiver.</p><p>A service will often be advised multiple times; any method may have any number of advice objects applied to it. Some methods may not get any advice. All of this is acceptable.</p><p>Service advisor methods are always void
methods (this is different from <a href="tapestry-ioc-decorators.html">service decorator methods</a>).</p><p>The @<a class="external-link" href="http://tapestry.apache.org/current/apidocs/org/apache/tapestry5/ioc/annotations/Match.html">Match</a>("*") annotation indicates that this advice applies to all services (both your own, and those defined by Tapestry). You will want to narrow down which services are actually targeted in most cases.</p><p>Note that some services, especially those built into Tapestry IoC, are marked as <a class="external-link" href="http://tapestry.apache.org/current/apidocs/org/apache/tapestry5/ioc/annotations/PreventServiceDecoration.html">not subject to decoration</a>, this applies to service advice as well as service decoration.</p><p>The <a class="external-link" href="http://tapestry.apache.org/current/apidocs/org/apache/tapestry5/ioc/MethodAdvice.html">MethodAdvice</a> interface is very simple; it receives an <a class="external-link" href="http://ta
pestry.apache.org/current/apidocs/org/apache/tapestry5/ioc/Invocation.html">Invocation</a> representing a method call. Invocation has methods for inspecting the type and value of the parameters, and for overriding the values of the parameters.</p><p>The call to <code>proceed()</code> allows the invocation to continue; that is, the original method is invoked. If the method has been advised multiple times, the call to proceed() may chain into the next MethodAdvice object. In any case, after invoking <code>proceed()</code>, you may inspect and override the result (the return value).</p><p>Advice is pretty efficient, but it is still better to apply it only to methods that make sense. We can improve the service advisor method in our example to only advise methods that return String:</p><div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
<pre class="brush: java; gutter: false; theme: Default" style="font-size:12px;"> @Match("*")
public static void adviseNonNull(MethodAdviceReceiver receiver)
{
@@ -161,7 +161,7 @@ Added in 5.2
...
}
</pre>
-</div></div><p>The advice above is applied to any implementation of the MyService interface that is marked by the @Blue annotation.</p><h1 id="ServiceAdvisors-DecoratorsandAdvice">Decorators and Advice</h1><p><a href="service-advisors.html">Service decorators</a> are another way to achieve the same thing; service advisors are a more recent addition, added in Tapestry 5.1.</p><p>It is not recommended that you mix advice and decoration. If you do, decoration take precedence; all decorators will be in effect before any advice (internally, they are two separate steps, with advice being processed and the result of that used by the decorators).</p><p> </p><p></p></div>
+</div></div><p>The advice above is applied to any implementation of the MyService interface that is marked by the @Blue annotation.</p><h1 id="ServiceAdvisors-DecoratorsandAdvice">Decorators and Advice</h1><p><a href="tapestry-ioc-decorators.html">Service decorators</a> are another way to achieve the same thing; service advisors are a more recent addition, added in Tapestry 5.1.</p><p>It is not recommended that you mix advice and decoration. If you do, decoration take precedence; all decorators will be in effect before any advice (internally, they are two separate steps, with advice being processed and the result of that used by the decorators).</p><p> </p><p></p></div>
</div>
<div class="clearer"></div>
Modified: websites/production/tapestry/content/service-implementation-reloading.html
==============================================================================
--- websites/production/tapestry/content/service-implementation-reloading.html (original)
+++ websites/production/tapestry/content/service-implementation-reloading.html Sun Feb 18 20:20:09 2018
@@ -74,7 +74,7 @@
</p><div class="aui-message aui-message-info">
Added in 5.2
 
-</div><strong>Service implementation reloading</strong> is the live reloading of Tapestry-IOC service implementation classes without having to stop & restart the servlet container. Available for Tapestry 5.2 and later, it extends the developer productivity gains of Tapestry's <a href="service-implementation-reloading.html">Live Class Reloading</a> to your Tapestry-IOC service modules.<div class="aui-label" style="float:right" title="Related Articles">
+</div><strong>Service implementation reloading</strong> is the live reloading of Tapestry-IOC service implementation classes without having to stop & restart the servlet container. Available for Tapestry 5.2 and later, it extends the developer productivity gains of Tapestry's <a href="class-reloading.html">Live Class Reloading</a> to your Tapestry-IOC service modules.<div class="aui-label" style="float:right" title="Related Articles">
Modified: websites/production/tapestry/content/starting-the-ioc-registry.html
==============================================================================
--- websites/production/tapestry/content/starting-the-ioc-registry.html (original)
+++ websites/production/tapestry/content/starting-the-ioc-registry.html Sun Feb 18 20:20:09 2018
@@ -93,7 +93,7 @@ Added in 5.2
</div><p>As of version 5.2 the class <a class="external-link" href="http://tapestry.apache.org/current/apidocs/org/apache/tapestry5/ioc/RegistryBuilder.html">RegistryBuilder</a> has convenience methods to build and start a Registry. The static method <a class="external-link" href="http://tapestry.apache.org/current/apidocs/org/apache/tapestry5/ioc/RegistryBuilder.html#buildAndStartupRegistry(java.lang.Class...)">RegistryBuilder.buildAndStartupRegistry(Class...)</a> constructs a registry, adds a number of modules to the registry and performs registry startup. The returned registry is ready to use.</p><div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
<pre class="brush: java; gutter: false; theme: Default" style="font-size:12px;">Registry registry = RegistryBuilder.buildAndStartupRegistry(AppModule.class, UtilModule.class);
</pre>
-</div></div><h1 id="StartingtheIoCRegistry-BuildingtheDefaultRegistry">Building the Default Registry</h1><p>The default registry is available by invoking the static method <a class="external-link" href="http://tapestry.apache.org/current/apidocs/org/apache/tapestry5/ioc/IOCUtilities.html#buildDefaultRegistry">IOCUtilities.buildDefaultRegistry()</a>. This method builds a Registry using <a href="starting-the-ioc-registry.html">autoloading logic</a>, where modules to load are identified via a JAR Manifest entry.</p><p>In addition, the JVM system property <code>tapestry.modules</code> (if specified) is a list of additional module classes to load. This is often used in development, where tests may be executed against the local classes, not JARs, and so there is no manifest to read.</p><h1 id="StartingtheIoCRegistry-ShuttingdowntheRegistry">Shutting down the Registry</h1><p>The method <a class="external-link" href="http://tapestry.apache.org/current/apidocs/org/apache/tapestry5/ioc/Reg
istry.html#shutdown">Registry.shutdown()</a> will shutdown the Registry. This immediately invalidates all service proxies. Some services may have chosen to register for shutdown notification (for example, to do cleanup work such as closing a database connection).</p><p>Once the Registry is shutdown, it may not be used again: it will not be possible to access services within the Registry, or invoke methods on services previously acquired. All you can do is release the Registry to the garbage collector.</p><p> </p><p></p></div>
+</div></div><h1 id="StartingtheIoCRegistry-BuildingtheDefaultRegistry">Building the Default Registry</h1><p>The default registry is available by invoking the static method <a class="external-link" href="http://tapestry.apache.org/current/apidocs/org/apache/tapestry5/ioc/IOCUtilities.html#buildDefaultRegistry">IOCUtilities.buildDefaultRegistry()</a>. This method builds a Registry using <a href="autoloading-modules.html">autoloading logic</a>, where modules to load are identified via a JAR Manifest entry.</p><p>In addition, the JVM system property <code>tapestry.modules</code> (if specified) is a list of additional module classes to load. This is often used in development, where tests may be executed against the local classes, not JARs, and so there is no manifest to read.</p><h1 id="StartingtheIoCRegistry-ShuttingdowntheRegistry">Shutting down the Registry</h1><p>The method <a class="external-link" href="http://tapestry.apache.org/current/apidocs/org/apache/tapestry5/ioc/Registry.
html#shutdown">Registry.shutdown()</a> will shutdown the Registry. This immediately invalidates all service proxies. Some services may have chosen to register for shutdown notification (for example, to do cleanup work such as closing a database connection).</p><p>Once the Registry is shutdown, it may not be used again: it will not be possible to access services within the Registry, or invoke methods on services previously acquired. All you can do is release the Registry to the garbage collector.</p><p> </p><p></p></div>
</div>
<div class="clearer"></div>