Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [ptp-dev] Fw: Questions about JAXB parser

Hi Dave,

I'm taking a couple of days away from work, but I have been checking my email.  I can respond initially to your questions but ultimately we'll need to revisit them.

First, the validator.  This may be a bug; it should work.  However, in the case of simple numerical validation, why not just use a Spinner widget for that value and forget validation in the attribute? (of course, if this is a bug, I will fix it).

Second, environment variables defined inside a command are precisely that; they are not defined in the scope of the resource manager configuration.  So you will not get it as a substitution into the actual command that is issued; however, I would have thought the echo would get the actual environment variable from the process environment.  Two things:

a) as it stands, the value of the environment variable should not have the ${...} tag, this is added under the covers; try getting rid of that and see if it works.  Your usage, however, has suggested to me that it actually is better to do what you are doing, because the value may just be a constant, not a reference to a property or attribute (I had overlooked this), in which case, wrapping it in ${ptp_rm:...#value} would fail.  So I will eventually change the environment variable to work the way you have it here.

b) I am actually surprised this command runs at all. Do you actually get ptp_out?  I didn't think the RemoteProcessBuilder allowed explicit shell I/O redirection. 

I can be on the call today if you want to discuss this more.  Let me know.

Al

----- Dave Wootton <dwootton@xxxxxxxxxx> wrote:
> I intended to attach my XML file but hit send too soon. Trying again.
> Dave
> 
> 
> 
> ----- Forwarded by Dave Wootton/Poughkeepsie/IBM on 05/18/2011 08:36 PM 
> -----
> 
> 
> 
> Questions about JAXB parser
> 
> Dave Wootton 
> to:
> ptp-dev
> 05/18/2011 08:35 PM
> 
> 
> 
> 
> Al
> I have partial success with getting a working resource manager. I have a 
> simple XML file that defines two widgets in a dynamic tab, intended to set 
> MP_PROCS_ATTR and MP_HOSTFILE_ATTR attributes which each are defined as 
> attributes. I have a sumbit-interactive element which I use to invoke an 
> 'echo' command to try to display variables passed across to the remote 
> system. For now, I'm just redirecting stdout & stderr to a file on the 
> remote system by shell redirection ('echo foo > /tmp/file 2>&1')
> 
> I also have two environment variables MP_PROCS and MP_HOSTFILE which I 
> intende to get their values from MP_PROCS_ATTR and MP_HOSTFILE_ATTR 
> respectively.
> 
> When I open the run configurations, my widgets are displayed and I can 
> fill in values. Those values are saved across sessions. 
> 
> I have two problems
> 
> 1) If I click run in the run configuration, then look at the echo command 
> output, I can see the executable path and the value of the MP_PROCS_ATTR 
> attribute. However, I don't seem to get the value of the MP_PROCS 
> environment variable, either as a substitution into the args array for the 
> command or as an actual environment variable in the echo command.
> 
> 2) Also, I have a validator defined for MP_PROCS which I'm intending to 
> accept only numeric input and reject anything else. That doesn't seem to 
> be working.
> 
> Dave


Back to the top