Relatively simple by having handlers creating/adding all sorts of vars like 
this (package and imports not shown):


  | public class VariableActionHandler implements ActionHandler {
  | 
  |     private String name;
  | 
  |     private String method;
  | 
  |     private String value;
  |     
  |     public String getName() {
  |         return name;
  |     }
  | 
  |     public void setName(String name) {
  |         this.name = name;
  |     }
  | 
  |     public String getValue() {
  |         return value;
  |     }
  | 
  |     public void setValue(String value) {
  |         this.value = value;
  |     }
  | 
  |     public String getMethod() {
  |         return method;
  |     }
  | 
  |     public void setMethod(String method) {
  |         this.method = method;
  |     }
  | 
  |     public String getValue() {
  |         return value;
  |     }
  | 
  |     public void setValue(String value) {
  |         this.value = value;
  |     }
  |     
  | 
  |     public void execute(ExecutionContext executionContext) throws Exception 
{
  |             if ("NAMEVALUE".equals(method)) {
  |             executionContext.getContextInstance().setVariable(name, value);
  |     } else {
  |             // perform other methods like injecting GUIDS, Unique IDS, 
forward to business logic, etch...
  |     }
  |     }
  | 
  | }
  | 

Then, in your definition, use an action e.g.

  | <node>
  |     <action class="VariableActionHandler" config-type="bean">
  |             <name>processId</name>
  |             <value>123</value>
  |             <method>NAMEVALUE</method>
  |     </action>
  | </node>
  | 
  | <node>
  |     <action class="VariableActionHandler" config-type="bean">
  |             <name>processId</name>
  |             <method>GENERATEGUID</method>
  |     </action>
  | </node>
  | 

View the original post : 
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3941463#3941463

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3941463


-------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
JBoss-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jboss-user

Reply via email to