You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Chris Chiappone <ch...@gmail.com> on 2005/11/01 19:48:23 UTC

Replacing Deprecated methods

I've successfully upgraded my tap3 app consisting of ~40 pages, and
removed all but two deprecated class/methods from it.

The two that I am not sure of how to replace are
cycle.getEngine().getService("MyService");  which I noticed the the
workbench application also continues to use.  And I subclass
BaseEngine cleanupAfterRequest to invalidate the session.  In that
methed I use cycle.getRequestContext() which has been deprecated, and
I'm not sure of the replacement.

Other than that I recommed upgrading for those who are looking into
it, it actually isn't as bad as I expected.

--
~chris

---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-user-help@jakarta.apache.org


Injecting ServletContext into a service?

Posted by Eric Schneider <er...@centralparksoftware.com>.
Hi,

I haven't stumbled across a way to inject an application's ServletContext 
into a hivemind singleton service.  Is there an easy way to do this that 
I'm missing? 

I need to load some XML files in the WEB-INF directory.  Maybe there's 
another way to read files in as an input stream? 

Also the application is stateless, so the servlet context cannot be 
retrieved via the session.

Thanks.
e.

---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-user-help@jakarta.apache.org


Re: Replacing Deprecated methods

Posted by Ron Piterman <rp...@gmx.net>.
true - sorry...
but you can surley get the service point from hivedoc...


ציטוט Chris Chiappone:
> Correct me if I'm wrong but I don't think you can inject that in an
> Engine class, only pages or components.
> 
> On 11/1/05, Ron Piterman <rp...@gmx.net> wrote:
> 
>>I think
>><inject object="infrastructure:WebRequest"/>
>>Cheers,
>>Ron
>>
>>PS look at the infrastructure configuration point at the hivedoc.
>>
>>
>>ציטוט Chris Chiappone:
>>
>>>Ok I've just figured out how to contribute myService to hivemind and
>>>inject it into my component, so the only other deprecated method I
>>>have left is getRequestContext(), I don't belive I can inject a
>>>WebRequest here since it extends the BaseEngine, so the question is
>>>how to get the webRequest?
>>>
>>>
>>>On 11/1/05, Chris Chiappone <ch...@gmail.com> wrote:
>>>
>>>
>>>>I've successfully upgraded my tap3 app consisting of ~40 pages, and
>>>>removed all but two deprecated class/methods from it.
>>>>
>>>>The two that I am not sure of how to replace are
>>>>cycle.getEngine().getService("MyService");  which I noticed the the
>>>>workbench application also continues to use.  And I subclass
>>>>BaseEngine cleanupAfterRequest to invalidate the session.  In that
>>>>methed I use cycle.getRequestContext() which has been deprecated, and
>>>>I'm not sure of the replacement.
>>>>
>>>>Other than that I recommed upgrading for those who are looking into
>>>>it, it actually isn't as bad as I expected.
>>>>
>>>>--
>>>>~chris
>>>>
>>>
>>>
>>>
>>>--
>>>~chris
>>>
>>>---------------------------------------------------------------------
>>>To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
>>>For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
>>>
>>>
>>
>>
>>---------------------------------------------------------------------
>>To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
>>For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
>>
>>
> 
> 
> 
> --
> ~chris


---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-user-help@jakarta.apache.org


Re: Replacing Deprecated methods

Posted by Howard Lewis Ship <hl...@gmail.com>.
Yes, the point is that the things you used to do by subclassing
BaseEngine can now be done as HiveMind services.  The VirtualLibrary
has some examples of this.

On 11/1/05, Chris Chiappone <ch...@gmail.com> wrote:
> Correct me if I'm wrong but I don't think you can inject that in an
> Engine class, only pages or components.
>
> On 11/1/05, Ron Piterman <rp...@gmx.net> wrote:
> > I think
> > <inject object="infrastructure:WebRequest"/>
> > Cheers,
> > Ron
> >
> > PS look at the infrastructure configuration point at the hivedoc.
> >
> >
> > ציטוט Chris Chiappone:
> > > Ok I've just figured out how to contribute myService to hivemind and
> > > inject it into my component, so the only other deprecated method I
> > > have left is getRequestContext(), I don't belive I can inject a
> > > WebRequest here since it extends the BaseEngine, so the question is
> > > how to get the webRequest?
> > >
> > >
> > > On 11/1/05, Chris Chiappone <ch...@gmail.com> wrote:
> > >
> > >>I've successfully upgraded my tap3 app consisting of ~40 pages, and
> > >>removed all but two deprecated class/methods from it.
> > >>
> > >>The two that I am not sure of how to replace are
> > >>cycle.getEngine().getService("MyService");  which I noticed the the
> > >>workbench application also continues to use.  And I subclass
> > >>BaseEngine cleanupAfterRequest to invalidate the session.  In that
> > >>methed I use cycle.getRequestContext() which has been deprecated, and
> > >>I'm not sure of the replacement.
> > >>
> > >>Other than that I recommed upgrading for those who are looking into
> > >>it, it actually isn't as bad as I expected.
> > >>
> > >>--
> > >>~chris
> > >>
> > >
> > >
> > >
> > > --
> > > ~chris
> > >
> > > ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
> > > For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
> > >
> > >
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
> > For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
> >
> >
>
>
> --
> ~chris
>


--
Howard M. Lewis Ship
Independent J2EE / Open-Source Java Consultant
Creator, Jakarta Tapestry
Creator, Jakarta HiveMind

Professional Tapestry training, mentoring, support
and project work.  http://howardlewisship.com

Re: Replacing Deprecated methods

Posted by Chris Chiappone <ch...@gmail.com>.
Correct me if I'm wrong but I don't think you can inject that in an
Engine class, only pages or components.

On 11/1/05, Ron Piterman <rp...@gmx.net> wrote:
> I think
> <inject object="infrastructure:WebRequest"/>
> Cheers,
> Ron
>
> PS look at the infrastructure configuration point at the hivedoc.
>
>
> ציטוט Chris Chiappone:
> > Ok I've just figured out how to contribute myService to hivemind and
> > inject it into my component, so the only other deprecated method I
> > have left is getRequestContext(), I don't belive I can inject a
> > WebRequest here since it extends the BaseEngine, so the question is
> > how to get the webRequest?
> >
> >
> > On 11/1/05, Chris Chiappone <ch...@gmail.com> wrote:
> >
> >>I've successfully upgraded my tap3 app consisting of ~40 pages, and
> >>removed all but two deprecated class/methods from it.
> >>
> >>The two that I am not sure of how to replace are
> >>cycle.getEngine().getService("MyService");  which I noticed the the
> >>workbench application also continues to use.  And I subclass
> >>BaseEngine cleanupAfterRequest to invalidate the session.  In that
> >>methed I use cycle.getRequestContext() which has been deprecated, and
> >>I'm not sure of the replacement.
> >>
> >>Other than that I recommed upgrading for those who are looking into
> >>it, it actually isn't as bad as I expected.
> >>
> >>--
> >>~chris
> >>
> >
> >
> >
> > --
> > ~chris
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
> > For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
> >
> >
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
>
>


--
~chris

Re: Replacing Deprecated methods

Posted by Ron Piterman <rp...@gmx.net>.
I think
<inject object="infrastructure:WebRequest"/>
Cheers,
Ron

PS look at the infrastructure configuration point at the hivedoc.


ציטוט Chris Chiappone:
> Ok I've just figured out how to contribute myService to hivemind and
> inject it into my component, so the only other deprecated method I
> have left is getRequestContext(), I don't belive I can inject a
> WebRequest here since it extends the BaseEngine, so the question is
> how to get the webRequest?
> 
> 
> On 11/1/05, Chris Chiappone <ch...@gmail.com> wrote:
> 
>>I've successfully upgraded my tap3 app consisting of ~40 pages, and
>>removed all but two deprecated class/methods from it.
>>
>>The two that I am not sure of how to replace are
>>cycle.getEngine().getService("MyService");  which I noticed the the
>>workbench application also continues to use.  And I subclass
>>BaseEngine cleanupAfterRequest to invalidate the session.  In that
>>methed I use cycle.getRequestContext() which has been deprecated, and
>>I'm not sure of the replacement.
>>
>>Other than that I recommed upgrading for those who are looking into
>>it, it actually isn't as bad as I expected.
>>
>>--
>>~chris
>>
> 
> 
> 
> --
> ~chris
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
> 
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-user-help@jakarta.apache.org


Re: Replacing Deprecated methods

Posted by Chris Chiappone <ch...@gmail.com>.
Ok I've just figured out how to contribute myService to hivemind and
inject it into my component, so the only other deprecated method I
have left is getRequestContext(), I don't belive I can inject a
WebRequest here since it extends the BaseEngine, so the question is
how to get the webRequest?


On 11/1/05, Chris Chiappone <ch...@gmail.com> wrote:
> I've successfully upgraded my tap3 app consisting of ~40 pages, and
> removed all but two deprecated class/methods from it.
>
> The two that I am not sure of how to replace are
> cycle.getEngine().getService("MyService");  which I noticed the the
> workbench application also continues to use.  And I subclass
> BaseEngine cleanupAfterRequest to invalidate the session.  In that
> methed I use cycle.getRequestContext() which has been deprecated, and
> I'm not sure of the replacement.
>
> Other than that I recommed upgrading for those who are looking into
> it, it actually isn't as bad as I expected.
>
> --
> ~chris
>


--
~chris

---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-user-help@jakarta.apache.org