You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Jim Steinberger <st...@dynedge.com> on 2006/01/16 18:07:45 UTC

Injection into an ASO

How would I inject a property of HttpServletRequest (remoteHost) into an
application-scoped object?

 

Pre-Tapestry I would create this object in an initialization servlet
(i.e. loaded on startup and not mapped to any URL), which would, of
course, have access to the request-object.

 

I'm not sure what the Tapestry 4.0 equivalent would be, though.  In my
Tapestry 3.0 app, I did all that initialization in my own child-class of
BaseEngine, but that didn't include initializing ASOs, and I haven't yet
found how to do so programmatically if I were to take this approach in
Tapestry 4.0.

Any help would be greatly appreciated; thanks!

Jim 

 


Re: Injection into an ASO

Posted by Raul Raja Martinez <do...@estudiowebs.com>.
I had the same problem and I solved using Hiveutils, its objectbuilder 
allows you to inject services and objects into POJOS that then can be 
used as ASOs.

Take a look at the posting in this list whit title:


PROBLEM SOLVED | Re: Injecting registry services to POJOS





Jim Steinberger wrote:
> How would I inject a property of HttpServletRequest (remoteHost) into an
> application-scoped object?
> 
>  
> 
> Pre-Tapestry I would create this object in an initialization servlet
> (i.e. loaded on startup and not mapped to any URL), which would, of
> course, have access to the request-object.
> 
>  
> 
> I'm not sure what the Tapestry 4.0 equivalent would be, though.  In my
> Tapestry 3.0 app, I did all that initialization in my own child-class of
> BaseEngine, but that didn't include initializing ASOs, and I haven't yet
> found how to do so programmatically if I were to take this approach in
> Tapestry 4.0.
> 
> Any help would be greatly appreciated; thanks!
> 
> Jim 
> 
>  
> 
> 


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