dev@glassfish.java.net

RE: the details of how the payload works (with injected File param)

From: lvsongping <lvsongping_at_cn.fujitsu.com>
Date: Fri, 11 Jan 2013 18:24:10 +0900

Dear Tom:



I found the position to initial the “DEFAULT”, which is exists in
RemoteRestAdminCommand.java.



Thanks



Best Regards

-Jeremy



From: lvsongping [mailto:lvsongping_at_cn.fujitsu.com]
Sent: Friday, January 11, 2013 3:17 PM
To: Tom Mueller (Tom.Mueller_at_oracle.com)
Cc: dev_at_glassfish.java.net
Subject: the details of how the payload works (with injected File param)



Dear Tom:

Cc: devs

After some of my investigation, I found something different between the two
definations as follows(DeployCommandParameters.java):
Sample1:

@Param(primary=true)

    public File path;

    public File getPath() {

      return path;

    }

Sample2:

private File path;



    @Param(primary=true)

    public void setPath(File path) {

        this.path = path;

    }



    public File getPath() {

      return path;

    }

When the @Param are defined to declare the method as the Sample2 showed, The
value of "DEFAULT" parameter is not correct when deployed as a relative File
path. After I have found the different value of “DEFAULT”, I try to debug
the all codes and found that the value of inputStream on the module of
jersey are difference.

However, I found some annotation in the interface of Param.java that permit
the @Param can be placed on a field or setter method to identify the
parameter. I want to know the details of how the payload works (with
injected File param).

Thanks

Best Regards

-Jeremy