This sounds like the pipeline/chain setup from ATG.  My one concern is 
that you will end up with convoluted processing logic in the xml. 
 Iwould recomend that this type of processing stay in the java code.  I 
also would be a little wary of the SQL code migrating into the XML.  

If this is related to the idea of chaining actions we talked about 
before, it may be better to provide an API inside of the Action object 
Forward to another action.  Although What I would like to see is the 
ability of a Action object to take a collection of Form's.  While I 
typically would use two (The previopus pages form and the next pages 
form)  I could see needing another.


Oleg V Alexeev wrote:

>Hello struts-dev,
>
>  This day I start to build new service for ServiceManager -
>  CommandService. It would be based on FactoryService (early published
>  as BeanFactory).
>  
>  FactoryService (as BeanFactory) build on base of Abstract Factory
>  pattern. So its idea is to generate beans and store it to the some
>  context. Now I found such approach as limited.
>
>  CommandService idea is based on Command pattern. There are two
>  entity types on playground - Command and Processor. Processor's
>  missing is to perform Command and prepare predefined count of result
>  objects. Every action can contain list of calls to the Processors
>  with appropriate Commands. The most simple way to pass results from
>  on Porcessor to another is to perfom processing and store result in
>  some context (request, session, etc.). More flexible way is to
>  write nested calls to the Processors with appropriate Commands. And
>  generally all this stuff (set of Processors and 
>  Commands) can be used to build some kind of scripting in
>  struts-config.xml with BSF framework.
>
>  Example of service manager config in struts-config -
>
>  <service-manager>
>   <process-registrations>
>    <process-registration name="preprocess"/>
>   </process-registrations>
>   <service-registrations>
>    <service-registration
>       name="command" 
>       type="org.apache.struts.service.command.CommandService" 
>       useDigester="true">
>     <command-service>
>      <processors>
>       <processor name="jdbcUpdate" type="some.package.Class">
>        <result
>          name="totalUpdated"
>          type="java.lang.Integer"/>
>       </processor>
>      </processors>
>      <commands>
>       <command 
>         name="createUser"
>         command="insert into rb.user( name ) values ( ? )">
>        <processors>
>         <processor name="jdbcUpdate"/>
>        </processors>
>        <parameter
>          name="method"
>          type="java.lang.String"
>          value="preparedStatement"/>
>        <parameter
>          name="userName"
>          type="java.lang.String"/>
>       </command>
>      </commands>
>     </command-service>
>   </service-registrations>
>  </service-manager>
>
>  <action-mappings>
>   <action    path="/user/insert"
>              type="some.package.Action"
>              name="userForm"
>              input="/WEB-INF/jsp/userEdit.jsp">
>       <perform-command name="createUser"/>
>       <forward name="success" path="/WEB-INF/jsp/userList.jsp"/>
>   </action>
>  </action-mappings>
>  
>
>


Reply via email to