Rafal Krzewski wrote:
> 
> "Diethelm Guallar, Gonzalo" wrote:
> 
> > Could anyone explain what the philosophy behind the idea of
> > Services is? When would I want to implement something as a
> > Service? Why are some things in Turbine (cache, localization,
> > etc.) Services, yet some other things (unique ids) are not?
> > Is the purpose of Services to be available only when the user
> > requests them?
> 
> What is a service?
> 
> 1. Is a singleton -  there is only one instance of it in the system
>    i.e. memory or connections are allocated once only
> 2. Has pluggable implementation - you can use your own implementation
>    if you need, just change  an entry in TR.properties, and there you go
> 3. Can access ServletConfig at system startup time to process
>    relative paths and the like.
> 4. Can access RunData on the first Turbine doGet execution to
>    get URL we're running under and the like.
> 5. Can initialize itself (allocate memory, make connctions)
>    just before the client requests it for the first time
> 6. Can execute some action upon system shutdown e.g. close the
>    connections
> 
> (3 & 4 were added about a month ago, and 6 was added two days ago :))

Rafal, will you add this to that package.html file?  Having the
definition enumerated like this is extremely helpful.
-- 

Daniel Rall <[EMAIL PROTECTED]>


------------------------------------------------------------
To subscribe:        [EMAIL PROTECTED]
To unsubscribe:      [EMAIL PROTECTED]
Search: <http://www.mail-archive.com/turbine%40list.working-dogs.com/>
Problems?:           [EMAIL PROTECTED]

Reply via email to