struts-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Oleg V Alexeev <>
Subject About extensons support mechanism...
Date Sun, 01 Jul 2001 20:25:51 GMT
Hello struts-dev,

  This evening I end up druft of ServicesServlet - extended version of
  ActionServlet with support of pluggable services (extensions in old
  terms). I puzzle over architectural question about ServicesServlet
  and may be anybody can suggest me right way...

  ServiceServlet work on idea - developer can register unlimited
  number of services in struts-config, each service is a java class
  based on Service interface, each service can be subscribed to any
  processing point, such as - init, destroy, initDigester,
  processPreprocess, processPopulateBefore, processPopulateAfter,
  processValidateBefore, processValidateAfter. ServiceServlet iterate
  via list of subscriptions at every processing point and call
  appropriate method from service.

  My question is - what way is the best to serve processing points
  listed above? Now I create FastArrayList instances for every
  subscription list and all manipulations with subscriptions
  (register, get iterator via subscriptions, drop, etc.) are made with
  help of separate method -
   registerInitMember( Service service, int order ) {}
   regisetrInitDigesterMember( Service service, int order ) {}

  May be such solution would be more flexible? -
   registerMember( Service service, int order, String pointName ) {
         //find ArrayList of subscriptions for such pointName
         //register service at ArrayList

  Hard coded solution is more reliable, but time consume and not
  flexible. But more flexible solution, with search for appropriate
  subscription, is slow for my mind. What way is the best?

Best regards,

View raw message