org.tynamo.jdo.sample.services
Class AppModule
java.lang.Object
org.tynamo.jdo.sample.services.AppModule
public class AppModule
- extends Object
This module is automatically included as part of the Tapestry IoC Registry,
it's a good place to configure and extend Tapestry, or to place your own
service definitions.
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
AppModule
public AppModule()
bind
public static void bind(org.apache.tapestry5.ioc.ServiceBinder binder)
contributeApplicationDefaults
public static void contributeApplicationDefaults(org.apache.tapestry5.ioc.MappedConfiguration<String,String> configuration)
buildTimingFilter
public org.apache.tapestry5.services.RequestFilter buildTimingFilter(org.slf4j.Logger log)
- This is a service definition, the service will be named "TimingFilter".
The interface, RequestFilter, is used within the RequestHandler service
pipeline, which is built from the RequestHandler service configuration.
Tapestry IoC is responsible for passing in an appropriate Logger
instance. Requests for static resources are handled at a higher level, so
this filter will only be invoked for Tapestry related requests.
<
p/>
Service builder methods are useful when the implementation is inline as
an inner class (as here) or require some other kind of special
initialization. In most cases, use the static bind() method instead.
<
p/>
If this method was named "build", then the service id would be taken from
the service interface and would be "RequestFilter". Since Tapestry
already defines a service named "RequestFilter" we use an explicit
service id that we can reference inside the contribution method.
adviseTransactions
@Match(value="*Service")
public static void adviseTransactions(JDOTransactionAdvisor advisor,
org.apache.tapestry5.ioc.MethodAdviceReceiver receiver)
Copyright © 2011-2012. All Rights Reserved.