users@glassfish.java.net

Re: gzip compression

From: <w.rittmeyer_at_jsptutorial.org>
Date: Tue, 27 Oct 2009 13:11:18 +0100 (CET)

I've installed v3 b69 and also build a new glassfish v3 build based on svn
revision 33357 (thus from today).

In b69 I get the error message which I posted yesterday.

With the build based on revision 3357 though I can set whatever string I want to
set. Thus no longer a Boolean value but still not the desired behaviour:
asadmin set
server.network-config.protocols.protocol.http-listener-1.http.compression=whatev
er
server.network-config.protocols.protocol.http-listener-1.http.compression=whatev
er

Command set executed successfully.


And as a result in domain.xml I see the following line:
<http max-connections="250" default-virtual-server="server"
compression="whatever" server-name="">


--
Wolfram Rittmeyer
Nandini Ektare <Nandini.Ektare_at_Sun.COM> hat am 26. Oktober 2009 um 19:20
geschrieben:
> Hmm..bean validation does not treat compression as boolean. Did anyone 
> change this ?
> 
> In Grizzly 1_9_18e branch (latest one integrated into v3) we have
> _
> Http.java_
>     @Attribute(defaultValue = "false", dataType = String.class)
>     String getCompression();
> 
>     void setCompression(String compression);
> 
> In latest GFv3 trunk we have
> 
> There is a property compression in _HttpListener.java_ which is also not 
> constrained as specified.   
>     @PropertyDesc(name="compression", defaultValue="off", 
> values={"off","on","force"},
>         description="Specifies use of HTTP/1.1 GZIP compression to save 
> server bandwidth. " +
>             "A positive integer specifies the minimum amount of data 
> required before the output is compressed. " +
>             "If the content-length is not known, the output is 
> compressed only if compression is set to 'on' or 'force'" ),
> 
> -Nandini
> 
> Jan Luehe wrote:
> > On 10/26/09 03:59, w.rittmeyer_at_jsptutorial.org wrote:
> >> Hi Felipe,
> >>
> >> I do not know for sure if this is the reason for your problem, but 
> >> the attribute "compression" is now of type boolean.
> >>
> >> Maybe you should try to use "true" instead.
> >>
> >> See the output of asadmin set:
> >>
> >> asadmin> set 
> >> server.network-config.protocols.protocol.http-listener-1.http.compression=f
> >> orce
> >> com.sun.enterprise.admin.cli.CommandException: remote failure: Could 
> >> not change the attributes: org.jvnet.hk2.config.ValidationException: 
> >> Validation Failed: force is not of data type: java.lang.Boolean
> >> org.jvnet.hk2.config.ValidationException: Validation Failed: force is 
> >> not of data type: java.lang.Boolean
> >>
> >> Command set failed.
> >> asadmin> set 
> >> server.network-config.protocols.protocol.http-listener-1.http.compression=t
> >> rue
> >> server.network-config.protocols.protocol.http-listener-1.http.compression=t
> >> rue
> >>
> >> Command set executed successfully.
> >>
> >> Afterwards in the domain.xml I see >>compression="true"<<.
> >
> > This seems like a regression.
> >
> > According to:
> >
> >   
> > http://weblogs.java.net/blog/jfarcand/archive/2006/06/enabling_http_c_1.html
> >
> >   compression: The Connector may use HTTP/1.1 GZIP compression in an
> >   attempt to save server bandwidth. The acceptable values for the
> >   parameter is "off" (disable compression), "on" (allow compression,
> >   which causes text data to be compressed), "force" (forces compression
> >   in all cases), or a numerical integer value (which is equivalent to
> >   "on", but specifies the minimum amount of data before the output is
> >   compressed).
> >
> > Felipe, can you file a bug against "configuration"?
> >
> > Thanks,
> >
> >
> > Jan
> >
> >>
> >>
> >> --
> >> Wolfram Rittmeyer
> >>
> >>
> >>
> >> "Felipe Gaúcho" <fgaucho_at_gmail.com> hat am 25. Oktober 2009 um 15:29 
> >> geschrieben:
> >>
> >> > following this manual: 
> >> http://docs.sun.com/app/docs/doc/820-4507/abhco?a=view
> >> >
> >> > the "http-listener" should be under the http-service element, right ?
> >> >
> >> >   <configs>
> >> >     <config name="server-config">
> >> >       <http-service>
> >> >         <access-log />
> >> >         <virtual-server id="server"
> >> > network-listeners="http-listener-1,http-listener-2" />
> >> >         <virtual-server id="__asadmin" 
> >> network-listeners="admin-listener" />
> >> >               <http-listener>
> >> >                 <property name="compression" value="force"/>
> >> >                 <property name="compressableMimeType"
> >> > 
> >> value="text/html,text/xml,text/plain,image/gif,image/jpeg,image/png,text/cs
> >> s,text/javascript,application/json,application/xml"/>
> >> >               </http-listener>
> >> >       </http-service>
> >> > ...
> >> >
> >> > and nothing happens.. what is missed ?
> >> >
> >> > ---------------------------------------------------------------------
> >> > To unsubscribe, e-mail: users-unsubscribe_at_glassfish.dev.java.net
> >> > For additional commands, e-mail: users-help_at_glassfish.dev.java.net
> >> >
> >
>