KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > tc > object > config > SpringWebFlowAspectModule


1 /*
2  * All content copyright (c) 2003-2006 Terracotta, Inc., except as may otherwise be noted in a separate copyright notice. All rights reserved.
3  */

4 package com.tc.object.config;
5
6 import com.tc.aspectwerkz.DeploymentModel;
7 import com.tc.aspectwerkz.definition.deployer.AspectDefinitionBuilder;
8 import com.tc.aspectwerkz.definition.deployer.AspectModule;
9 import com.tc.aspectwerkz.definition.deployer.AspectModuleDeployer;
10
11
12 /**
13  * Manages deployment of all AW aspects used for Spring WebFlow support
14  *
15  * @author Eugene Kuleshov
16  */

17 public class SpringWebFlowAspectModule implements AspectModule {
18
19   public void deploy(final AspectModuleDeployer deployer) {
20     buildDefinitionForConversationLockProtocol(deployer);
21   }
22
23   private void buildDefinitionForConversationLockProtocol(AspectModuleDeployer deployer) {
24     AspectDefinitionBuilder builder = deployer.newAspectBuilder("com.tcspring.ConversationLockProtocol",
25                                                                 DeploymentModel.PER_JVM, null);
26
27     builder.addAdvice("around",
28       "execution(* org.springframework.webflow.conversation.impl.ConversationLockFactory.createLock())",
29       "replaceUtilConversationLock(StaticJoinPoint jp)");
30   }
31
32 }
33
Popular Tags