RE: Re: Re: Re: Dynamic Redirector

2013-04-28 Thread Grant
I haven't dug into this code, but I suspect you aren't manipulating References properly. I advise printing out the intermediate steps of your Reference computation to see where it goes wrong. That's just it, I don't think it is even selecting my Redirector as the target for the endpoint, b/c

Re: Re: Re: Re: Dynamic Redirector

2013-04-28 Thread Tim Peierls
On Sun, Apr 28, 2013 at 11:42 AM, Grant gsing...@apache.org wrote: I haven't dug into this code, but I suspect you aren't manipulating References properly. I advise printing out the intermediate steps of your Reference computation to see where it goes wrong. That's just it, I don't think

RE: Re: Re: Re: Re: Dynamic Redirector

2013-04-28 Thread Grant
On Sun, Apr 28, 2013 at 11:42 AM, Grant gsingers at apache dot org wrote: I haven't dug into this code, but I suspect you aren't manipulating References properly. I advise printing out the intermediate steps of your Reference computation to see where it goes wrong. That's just it,

Re: Re: Re: Re: Re: Dynamic Redirector

2013-04-28 Thread Tim Peierls
On Sun, Apr 28, 2013 at 12:58 PM, Grant gsing...@apache.org wrote: I am attaching my DynRedirector at: http://foo:port/a What's the code for this? It could be a Component level routing: VirtualHost host = component.getDefaultHost(); host.attach(/a, new DynRedirector(... args ...));

RE: Re: Dynamic Redirector

2013-04-27 Thread Grant
Hmm, digging in on this a bit more, I'm not sure it fully works for what I'm trying to do. The issue seems to be in the handling of the {rr} template. In other words, if I'm just redirecting a single URI to another (i.e. http://foo/a to http://bar/b), this approach works, but if I want to

Re: Re: Dynamic Redirector

2013-04-27 Thread Tim Peierls
I don't understand what you mean by the handling of the {rr} template. The approach I suggested, overriding getTargetRef, ignores the template argument entirely. --tim On Sat, Apr 27, 2013 at 2:54 PM, Grant gsing...@apache.org wrote: Hmm, digging in on this a bit more, I'm not sure it fully

RE: Re: Re: Dynamic Redirector

2013-04-27 Thread Grant
I don't understand what you mean by the handling of the {rr} template. The approach I suggested, overriding getTargetRef, ignores the template argument entirely. In my old code, I had: URI = hardcoded URI to resource Redirector redir = new Redirector(router.getContext(), URI + {rr},

Re: Re: Re: Dynamic Redirector

2013-04-27 Thread Tim Peierls
I haven't dug into this code, but I suspect you aren't manipulating References properly. I advise printing out the intermediate steps of your Reference computation to see where it goes wrong. Also, the template argument to Redirector is ignored if you override getTargetRef. --tim On Sat, Apr

Re: Dynamic Redirector

2013-04-16 Thread Tim Peierls
Subclass Redirector, overriding getTargetRef(Request, Response) to return a Reference that you determine dynamically from the request and response parameters. --tim On Mon, Apr 15, 2013 at 10:06 PM, Grant gsing...@apache.org wrote: I have a front end API which I want to use to proxy/redirect

RE: Re: Dynamic Redirector

2013-04-16 Thread Grant
That works beautifully, thank you! For the record, I used what was in getTargetRef almost as is, except I replaced the baseRef with a dynamically discovered one (that I get from Zookeeper). Thanks, Grant --