users@glassfish.java.net

Re: configuring check-passthrough with sun webserver loadbalancer.xml

From: Pankaj Jairath <Pankaj.Jairath_at_Sun.COM>
Date: Wed, 27 Aug 2008 17:37:46 +0530

Hello,

If you really want to achieve something like a first attempt with
WebServer (say docroot ) and if that does not succeed then try another
load balancing to application server tier;

you can then build a customized NameTrans SAF, that would be able
determine whether you can map the URL internally if not then, you allow
it to proceed such that WebServer would try other NameTrans directives
in default object. In this case you should add your customized SAF prior
to loadbalancer NameTrans directive.

so something like

<Object name=default>
..
NameTrans fn=<your_SAF> name=<your-object>
NameTrans fn="name-trans-passthrough" name="lbplugin"
config-file="loadbalancer.xml"

...
<Object name=<your-object"
..
</Object>

You can also refer to NSAPI programmer guide on how to create custom
SAFs - http://docs.sun.com/app/docs/doc/819-6515
regards
Pankaj

glassfish_at_javadesktop.org wrote:
> Hello Everyone !!!
>
> I am using the Sun Webserver 6.1 sp6 with loadbalancer plugin to route the traffic to the Sun application server 8.1. Currently the webserver is directing all the requests (both static and dynamic) succesfully to the Application servers listed in the loadbalancer.xml file. I would like to configure the Webserver to serve all the static content like html,css,gifs,png etc and forward the request to appserver in case the requested resource is not available on webserver.
>
> It was mentioned in the sun documentation to use the check-passthrough directive for this requirement, But I am not able to configure this directive successfully. Did someone implemented this directive successfully to serve the static content from webserver and forward only those resource requests which does not present on the webserver.
>
> Here is the snippet of obj.conf I was using..
>
> <Object name="lbplugin">
> ObjectType fn="force-type" type="magnus-internal/lbplugin"
> ObjectType fn="check-passthrough" type="magnus-internal/passthrough"
> PathCheck fn="deny-existence" path="/WEB-INF/"
> Service type="magnus-internal/lbplugin" fn="service-passthrough"
> Error reason="Bad Gateway" fn="send-error" uri="$docroot/badgateway.html"
> </Object>
>
> The lbplugin will be mapped to the location of the loadbalancer.xml file on the webserver.
>
> I already tried several combinations with no luck and below was one of them.
>
> <Object name="lbplugin">
> ObjectType fn="check-passthrough" type="magnus-internal/passthrough"
> Service type="magnus-internal/passthrough" fn="service-passthrough"
> Error reason="Bad Gateway" fn="send-error" uri="$docroot/badgateway.html"
> </Object>
>
>
> -Thanks
> [Message sent by forum member 'narirag' (narirag)]
>
> http://forums.java.net/jive/thread.jspa?messageID=295550
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe_at_glassfish.dev.java.net
> For additional commands, e-mail: users-help_at_glassfish.dev.java.net
>
>