Oh no... Don't do anything remotely like that.

You want to go look at jakarta.apache.org/hivemind. It's a very powerful IoC
container - and it's also what t4 is built on.

You'll find almost any pattern (including thread per session ) available to
you once you peek inside. Almost all of the core of Tapestry is broken up
into easy to manage / inject services.

On 10/4/06, Dennis Sinelnikov <[EMAIL PROTECTED]> wrote:

Hello Dave,

There is 1 instance of ApplicationServlet, with newer releases of
tapestry there is less and less things I can think of doing in the
ApplicationServlet.  You can extend from
org.apache.tapestry.ApplicationServlet and create your own (perfectly ok
to do).  In ApplicationServlet, usually you would do some global
configuration settings, resource allocation, fork threads, etc..

Without knowing too much about the application you're trying to develop,
you could fork threads in your ApplicationServlet that would do your
background processing and just clean them up in destroy().  I would not
recommend getting your ApplicationServlet instance, but perhaps develop
separate logic that would get triggered via a UI.  This logic would do
monitoring/control and return response to the user via a UI.  If you
need some global object or perhaps one of the threads that got forked
upon ApplicationServlet startup, consider having a pool of threads that
have the same purpose that you can just grab at any point...

Hope this helps,
Dennis

Dave Rathnow wrote:
> I'm new to Tapestry and have just started working with it.  My
background is WebObjects so
> most of my question will come from that perspective.
>
> The application I'm developing will be doing some background processing
with the UI providing
> monitoring and control functions.  In WebObjects, we would use an single
Application instance
> that is created when the web application is first started. We would
store the objects required to
> access and control the back ground processing.  This Application
instance is then available in
> in each request-response loop through a Session object, or through a
global static method.
>
> Is this same model provided by the ApplicationServlet class in
Tapestry?  Is there a single instance
> of this object and if so, how can I get it?  Is it common practice to
subclass this class and
> then do all your own application specific logic in the derived class?
>
> Thanks,
> Dave.


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




--
Jesse Kuhnert
Tapestry/Dojo/(and a dash of TestNG), team member/developer

Open source based consulting work centered around
dojo/tapestry/tacos/hivemind. http://blog.opencomponentry.com

Reply via email to