Em Tue, 07 Oct 2008 15:48:23 -0300, Keith Bottner <[EMAIL PROTECTED]>
escreveu:
I have been looking for documentation that explains more detailed
information on how Services are implemented but I have not found any.
Does anybody know where some good documentation can be located?
Here: http://tapestry.apache.org/tapestry5/tapestry-ioc/service.html
Are Services singletons? (i.e. does everyone that uses a Service share
the same underlying object?) Or does a new Singleton get created for
each Page in the page pool?
By default yes, but you can have other lifecycles (scopes). See the above
URL for more details.
Do Services exist for the lifetime of the web application or if nobody
is using them do they eventually get garbage collected? (kinda of a
secondary question to above)
AFAIK, for the lifetime, unless it is perthread-scoped (or having another
scope).
Can Services use other Services?
Yes, and this happens all the time.
Do services pick up aspects of the calling Page to allow the injection
of Messages and ASO? Or do they have to be passed into any methods the
Page calls of the Service?
Services do not pick up aspects of the calling page, as they're page
independent.
You can access ASOs in a service using the ApplicationStateManager service
or the messages catalog using the Messages service.
These are just a few of my outstanding questions. It is hard to figure
out how to port parts of my previous Struts/Tiles web applications when
I cannot make the design decisions due to lack of information so if
anyone can point me in more detailed design information of Services
and/or answer the above questions I would appreciate it.
Advice: don't try to learn Tapestry thinking in JSP, servlets, Struts
(argh!), or Tiles (argh!) concepts.
--
Thiago H. de Paula Figueiredo
Independent Java consultant, developer, and instructor
Consultor, desenvolvedor e instrutor em Java
http://www.arsmachina.com.br/thiago
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]