admin@glassfish.java.net

Re: Default Values and _at_Param

From: Jason Lee <jason.d.lee_at_oracle.com>
Date: Tue, 18 May 2010 16:14:16 -0500

On 5/18/10 3:48 PM, Jerome Dochez wrote:
>> @Param(name="steadypoolsize", camelCaseName = "steadyPoolSize", optional=true)
>> String steadypoolsize = "8";
>>
> I think this is the wrong design pattern
>
> it should be :
>
> @Param(name="steadypoolsize", camelCaseName = "steadyPoolSize", optional=true, defaultValue="8")
> String steadypoolsize;
>
> and have the @Param injector takes care of "injecting" the fields with the annotation default value if the parameter was not specified on the command line.
>
> should I implement that ?
>
Big +1 from me on that.

-- 
Jason Lee
Senior Member of Technical Staff
GlassFish Administration Console
Oracle Corporation
Phone x31197/+1 405-343-1964
Blog http://blogs.steeplesoft.com