dev@glassfish.java.net

Re: doc error in add-resources?

From: Prashanth Abbagani <Prashanth.Abbagani_at_Sun.COM>
Date: Tue, 18 Mar 2008 09:23:20 -0800

>>>> Vince Kraemer wrote:
>>>>> I was reading the 9.1 docs on add-resources... and it looks suspect.
>>>>>
>>>>> My main area of concern is the description of xml_file_path...
>>>>>
>>>>> Is that description actually correct?
>>>>>
>>>>> This snippit from my terminal window seems to say NO, to me.
>>>>>
>>>>> > pe/6/sailfin/bin/asadmin add-resources this-name-is-unique.txt
>>>>> Operation 'createResource' failed in 'resources' Config Mbean.
>>>>> Target exception message: DOCTYPE is not present in xml
>>>>> /export/home/vbk/sf/this-name-is-unique.txt. Please correct the
>>>>> issue.
>>>>> CLI137 Command add-resources failed.
>
> In the example above...
>
> The file doesn't exist in <install-dir>/domains/domain1/config.
>
> The command did not append <install-dir>/domains/domain1/config to the
> aperand to create an absolute path.
>
> Based on the description of xml-file-path... I was expecting to see
> something like
>
> Operation 'createResource' failed in 'resources' Config Mbean.
> Target exception message:
> /export/home/vbk/v21/pe/6/glassfish/domains/domain1/config/this-name-is-unique.xml
> (No such file or directory)
> CLI137 Command add-resources failed.
>
> Since I did not see that... I was a bit confused... Is the
> implementation of add-resources incorrect?
>
> vbk
>
Its picking up the file from your current working directory, which is
definitely not the way its been explained in docs. How can this be
fixed, As I own this functionality for V3, I am interested to see if the
behavior can be fixed (Please file a bug in Sailfin separately)...

Now there are two scenarios.
One where asadmin is invoked from a remote machine w.r.t DAS. Ideally,
the file if located on the same machine, should be uploaded to the DAS
machine and continue from there. We can do this the way deploy command
does, with an --upload option, default is true. So the file is assumed
to be on the local machine by default.
Other, when the file resides on the DAS machine. Which means the user
has to specify --upload=false and should give an absolute path. This is
again inline with how 'deploy' behaves.