You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@turbine.apache.org by Filippos Slavik <fs...@forthnet.gr> on 2003/12/13 22:59:06 UTC
Turbine Servlet override ?
Dear All,
Turbine's design policy (let's say so) prohibits a programmer to extend the
Turbine Servlet. Are we all sure, that this wise ? Although, in general, it's
safer to not extend the base turbine servlet, but there are circumstances
where this design "limitation" is really inconvenient.
I think we should give the ability to the experienced coders to choose to
extend or not. Take an example (this is a real life example) :
[*] I need to execute some code everytime the servlet's service method is
about to be executed by the servlet container.
[*] I need to execute some custom initialization code just before the Turbine
Servlet attempts to initialize its self by reading the properties file
(imagine: the properties configuration file is stored elsewere, in an db not
accessible via jdbc ...)
[*] I need to execute code once the servlet is initialized correctly and just
before it's destroyed.
I know.. all these "I need" are not common needs for an usual turbine based
application, but I think it would be good If could have the choice ;)
Also, I'm currently developing an Enterprise Application based on Turbine
which heavily uses xdoclet. I'm unable to use xdoclet for the generation of
the web.xml file (which would be very convenient since now I have to manually
add all those ejb-ref tags by hand) because I'm not "allowed" to extend the
turbine servlet with a dummy class which will only contain some xdoc tags.
I really think turbine's main servlet should be refactored a bit (there is no
need for great refactoring) and give the ability to the experienced to
extend. What do you think ?
Best Regards
Filippos Slavik
--
####################################################################
Filippos Slavik
FORTHnet R&D, Heraklion, Greece
e-mail : fsla@forthnet.gr
phone : (+30) 2811 391230
Key ID: 0xF4B5B375 Filippos Slavik(search pgp.mit.edu)
Key FingerPrint: 81D4 25D0 01EB 9DCA 62E4 B694 20E7 31FB F4B5 B375
####################################################################
"The software said 'runs on Win95 or better,' so I installed it
on Linux..."
---------------------------------------------------------------------
To unsubscribe, e-mail: turbine-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: turbine-dev-help@jakarta.apache.org
Re: Turbine Servlet override ?
Posted by Jim Hicks <tu...@yahoo.com>.
We modify the Turbine Servlet so the configuration method and some of the properties used in configuration are protected instead of private. Then distribute this modifed version to our devlopers. We do this so the devlopers can override the configuration method. We have to do this to get Turbine to work in the different environments that exist out there. The Turbine configuration does not have all the options we need.
We don't really want to have each of our devlopers creating new custom configuration methods so just last week I created a class we call TurbineConfigurator. It allows us to specify how to set LogFactory to something other than log4j. It also allows us to specify other Avalon containers.
Angelo Turetta <at...@commit.it> wrote:
----- Original Message -----
From: "Filippos Slavik"
Sent: Saturday, December 13, 2003 10:59 PM
> Dear All,
( ........ )
> Best Regards
> Filippos Slavik
>
Filippos,
maybe I'm wrong, but I believe all of your 'I need' might be covered, in a
more standard way, with a servlet filter.
http://jcp.org/aboutJava/communityprocess/first/jsr053/index.html
Ciao,
Angelo Turetta
---------------------------------------------------------------------
To unsubscribe, e-mail: turbine-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: turbine-dev-help@jakarta.apache.org
---------------------------------
Do you Yahoo!?
Free Pop-Up Blocker - Get it now
Re: Turbine Servlet override ?
Posted by Angelo Turetta <at...@commit.it>.
----- Original Message -----
From: "Filippos Slavik" <fs...@forthnet.gr>
Sent: Saturday, December 13, 2003 10:59 PM
> Dear All,
( ........ )
> Best Regards
> Filippos Slavik
>
Filippos,
maybe I'm wrong, but I believe all of your 'I need' might be covered, in a
more standard way, with a servlet filter.
http://jcp.org/aboutJava/communityprocess/first/jsr053/index.html
Ciao,
Angelo Turetta
---------------------------------------------------------------------
To unsubscribe, e-mail: turbine-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: turbine-dev-help@jakarta.apache.org