Or, you could do a filter that would setup the connection and properties in the request to these actions, then after they are done, return the connection or close it, and essentially clean up whatever you created.
"Filters Rock!" - Area Culligan man | -----Original Message----- | From: John Espey [mailto:[EMAIL PROTECTED]] | Sent: Thursday, January 30, 2003 5:35 PM | To: Struts Users Mailing List | Subject: RE: one desing question, need help | | Just write a singleton class with methods that take the appropriate | parameters, and have both actions delegate to that class. Then any other | classes can use those services also. | | -----Original Message----- | From: Ashish Kulkarni [mailto:[EMAIL PROTECTED]] | Sent: Thursday, January 30, 2003 5:30 PM | To: [EMAIL PROTECTED] | Subject: one desing question, need help | | | Hi, | | I want to write 2 classes , one class say MyAction | extends Action and the other class say | MyDispatchAction extends DispatchAction. | I want to have some code ( like setting some | parameters or getting connection from pool) handled in | both the classes, but i want to write it in such a way | that i dont have to code all the common methods in | both classes. | I dont want to have one class which extends | DispatchAction, because DispatchAction needs parameter | as required field in struts-config file. | | This way i would be reducing my coding and future | maintenance, since if there is any modification i can | do it at only one place and will be applicable to both | places | | Any suggestions are welcome | | | | | | | | ===== | A$HI$H | | __________________________________________________ | Do you Yahoo!? | Yahoo! Mail Plus - Powerful. Affordable. Sign up now. | http://mailplus.yahoo.com | | --------------------------------------------------------------------- | To unsubscribe, e-mail: [EMAIL PROTECTED] | For additional commands, e-mail: [EMAIL PROTECTED] | | | --------------------------------------------------------------------- | To unsubscribe, e-mail: [EMAIL PROTECTED] | For additional commands, e-mail: [EMAIL PROTECTED] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]