Re: global object
"Malcolm Edgar" <[email protected]> Sun, 12 Jan 2003 15:56:04 +0800
| Newsgroups | gmane.comp.java.tapestry.contrib |
|---|---|
| Message-ID | <[email protected]> |
Howard, would you mind making this change. I am a bit time impovished at the moment (house renovations), and I dont want to hold up the T2.3 release. regards Malcolm >From: "Howard M. Lewis Ship" <[email protected]> >To: "Malcolm Edgar" ><[email protected]>,<[email protected]> >Subject: Re: [Tapestry-contrib] global object >Date: Sat, 11 Jan 2003 17:49:54 -0500 > >It's fairly recent, based on suggestions by Geoff. > >----- Original Message ----- >From: "Malcolm Edgar" <[email protected]> >To: <tapestry-contrib-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org> >Sent: Saturday, January 11, 2003 4:42 PM >Subject: Re: [Tapestry-contrib] global object > > > > I never even knew that the extension stuff existed. Yes, it sounds idea >for > > the job. I think global will be a great place for sticking EJB stuff. > > > > regards Malcolm > > > > >From: "Howard M. Lewis Ship" <[email protected]> > > >To: "Malcolm Edgar" > > ><[email protected]>,<[email protected]> > > >Subject: Re: [Tapestry-contrib] global object > > >Date: Fri, 10 Jan 2003 06:59:07 -0500 > > > > > >Yes, but those things could also be done using <extension> beans in the >app > > >spec and setting the immediate flag on. Then the Global object could >exist > > >to simplify access to those objects. > > > > > >Actually, I've been picturing the Global object as the place where you > > >stick > > >your EJB home and remote interfaces. If you look at the Vlib, it does >this > > >using variables on the VlibEngine, and includes some retry logic that >sets > > >them back to null on a RemoteException; this the Vlib is very good at > > >riding > > >out JBoss restarts (when the Vlib is not running within JBoss). > > > > > >----- Original Message ----- > > >From: "Malcolm Edgar" <[email protected]> > > >To: <tapestry-contrib-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org> > > >Sent: Friday, January 10, 2003 3:05 AM > > >Subject: Re: [Tapestry-contrib] global object > > > > > > > > > > One advantage of initializing the global in the Servlet.init() is >that > > >it > > >is > > > > done when the servlet is loaded, this may be an advantage in > > >instantiating > > > > heavy weight or time consuming global objects (e.g. loading a > > >database/LDAP > > > > cache or setting a connection pool) rather than doing initializing >when > > >the > > > > ApplicationServlet/Engine is first hit. > > > > > > > > regards Malcolm > > > > > > > > >From: "Malcolm Edgar" <[email protected]> > > > > >To: [email protected], [email protected] > > > > >Subject: Re: [Tapestry-contrib] global object > > > > >Date: Fri, 10 Jan 2003 15:56:53 +0800 > > > > > > > > > >Hi Howard, > > > > > > > > > >Yeah I don't mind if you move the global initialization out of > > > > >ApplicationServlet into AbstractEngine and have it place it in the > > > > >ServletContext, this would remove global code from >ApplicationServlet > > >and > > > > >RequestContext. > > > > > > > > > >I think I was still thinking in terms of Servlets and initializing > > >stuff > > >in > > > > >init(). > > > > > > > > > >I think you will need to initialize global in setupForRequest() as >it > > >has > > > > >access to ServletContext. I would make the global servlet context > > >attribute > > > > >key constant public so that JSP code can reference it. > > > > > > > > > >Regards Malcolm > > > > > > > > > >>From: "Howard M. Lewis Ship" <[email protected]> > > > > >>To: "Tapestry Contrib" <tapestry-contrib-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org> > > > > >>Subject: [Tapestry-contrib] global object > > > > >>Date: Thu, 9 Jan 2003 21:14:06 -0500 > > > > >> > > > > >>I would like to discuss the global property added to IEngine. > > > > >> > > > > >>I would like to see the solution fleshed out a little bit. > > > > >> > > > > >>What I see is that, if there's a particularily named object in the > > >servlet > > > > >>context, it is accessible from the IEngine. I have to assume the > > >intent > > > > >>was to override ApplicationServlet.init() to provide Global. This >is > > >a > > > > >>bit different than how many other similar constructs, such as >Visit, > > >are > > > > >>implemented. > > > > >> > > > > >>I would like to see: > > > > >> > > > > >>1) An overridable method on AbstractEngine to create the Global. > > > > >>2) A default implementation of getGlobal that checks for the >Global >in > > >the > > > > >>servlet context and, if not present, creates and stores it into >the > > > > >>servlet context. > > > > >>3) A default implementation of createGlobal() that uses an >app-spec > > > > >>property to define the name of the class to instantiate (i.e., >same > > > > >>pattern as Visit). > > > > >> > > > > >>Basically, Global should be just like Visit, except shared by all > > > > >>sessions/engines. > > > > >> > > > > >>Because creating and storing the Global will not force the >creation >of > > >a > > > > >>HttpSession, it should be done from setupForRequest(), like the >many > > >other > > > > >>shared objects (page source, template source, etc.). > > > > >> > > > > >>I don't see that the Global should be any part of RequestContext. > > > > >> > > > > >>I like the idea of Global; I'm increasingly enamored of solutions >that > > > > >>leverage aggregation instead of inheritance. > > > > >> > > > > >>I can whip my ideas together in a few minutes; I just wanted to >see > > >what > > > > >>Malcolm thinks of the changes. > > > > >> > > > > >>---- > > > > >>Howard Lewis Ship > > > > >>[email protected] > > > > >>http://tapestry.sf.net > > > > >> > > > > > > > > > > > > > > >_________________________________________________________________ > > > > >MSN 8 with e-mail virus protection service: 2 months FREE* > > > > >http://join.msn.com/?page=features/virus > > > > > > > > > > > > > > > > > > > >------------------------------------------------------- > > > > >This SF.NET email is sponsored by: > > > > >SourceForge Enterprise Edition + IBM + LinuxWorld = Something 2 >See! > > > > >http://www.vasoftware.com > > > > >_______________________________________________ > > > > >Tapestry-contrib mailing list > > > > >Tapestry-contrib-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org > > > > >https://lists.sourceforge.net/lists/listinfo/tapestry-contrib > > > > > > > > > > > > _________________________________________________________________ > > > > The new MSN 8: smart spam protection and 2 months FREE* > > > > http://join.msn.com/?page=features/junkmail > > > > > > > > > > > > > > > > ------------------------------------------------------- > > > > This SF.NET email is sponsored by: > > > > SourceForge Enterprise Edition + IBM + LinuxWorld = Something 2 See! > > > > http://www.vasoftware.com > > > > _______________________________________________ > > > > Tapestry-contrib mailing list > > > > Tapestry-contrib-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org > > > > https://lists.sourceforge.net/lists/listinfo/tapestry-contrib > > > > > > > > > > > > > > > >------------------------------------------------------- > > >This SF.NET email is sponsored by: > > >SourceForge Enterprise Edition + IBM + LinuxWorld = Something 2 See! > > >http://www.vasoftware.com > > >_______________________________________________ > > >Tapestry-contrib mailing list > > >Tapestry-contrib-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org > > >https://lists.sourceforge.net/lists/listinfo/tapestry-contrib > > > > > > _________________________________________________________________ > > MSN 8 helps eliminate e-mail viruses. Get 2 months FREE* > > http://join.msn.com/?page=features/virus > > > > > > > > ------------------------------------------------------- > > This SF.NET email is sponsored by: > > SourceForge Enterprise Edition + IBM + LinuxWorld = Something 2 See! > > http://www.vasoftware.com > > _______________________________________________ > > Tapestry-contrib mailing list > > Tapestry-contrib-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org > > https://lists.sourceforge.net/lists/listinfo/tapestry-contrib > > > >------------------------------------------------------- >This SF.NET email is sponsored by: >SourceForge Enterprise Edition + IBM + LinuxWorld = Something 2 See! >http://www.vasoftware.com >_______________________________________________ >Tapestry-contrib mailing list >Tapestry-contrib-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org >https://lists.sourceforge.net/lists/listinfo/tapestry-contrib _________________________________________________________________ MSN 8 with e-mail virus protection service: 2 months FREE* http://join.msn.com/?page=features/virus ------------------------------------------------------- This SF.NET email is sponsored by: SourceForge Enterprise Edition + IBM + LinuxWorld = Something 2 See! http://www.vasoftware.com