EPICS Controls Argonne National Laboratory

Experimental Physics and
Industrial Control System

1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  <20132014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024  Index 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  <20132014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
<== Date ==> <== Thread ==>

Subject: Re: CAJ/JCA question
From: "J. Lewis Muir" <[email protected]>
To: Till Straumann <[email protected]>
Cc: "[email protected]" <[email protected]>
Date: Fri, 14 Jun 2013 16:20:41 -0500
On 6/14/13 3:45 PM, Till Straumann wrote:
> My 2 cents:
> 
> I advise against setting this (or any) property from code.
> This might surprise and/or frustrate users who *do* want
> to use property files etc.
> 
> You can set 'jca.use_env' from a file or even on the command line
> 
> java -Djca.use_env=true
> 
> Cheers
> - Till

Hi, Till.

I think it depends on the situation.  If you're deploying a program or
library for someone to use, I think it's fine to set the property in
code if you've decided that's how the program or library behaves--it
take CA configuration from the environment.

In Mark's example, I think it also makes sense because he's deploying a
plug-in for ImageJ.  Plenty of people will start ImageJ by simply
double-clicking an application icon for it; they're not starting it by
typing "java" and arguments at a command prompt.  And again, he's
effectively defining how the plug-in receives its CA configuration--from
the environment, not from a properties file.  He could put the
properties file in the areaDetector plug-in JAR file, but what use is
that?  No one is going to extract it, change the properties file, and
create the JAR file again.  That's a pain, and now you've also modified
the JAR in a site specific way.

Where a properties file could be useful is for a library where its
environment might be harder to control (e.g. in a Servlet running in
Tomcat).

Or it could be useful just for the case you're talking about where a
user wishes to be able to control it with a properties file.  But that's
up to the author of the application or library to decide how they want
to allow it to be configured.

Lewis

References:
CAJ/JCA question Sinisa Veseli
RE: CAJ/JCA question Mark Rivers
Re: CAJ/JCA question Till Straumann

Navigate by Date:
Prev: RE: EPICS device disconnects and reconnects Feng, Kate
Next: Re: analog output record - constant DOL Rolf Keitel
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  <20132014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
Navigate by Thread:
Prev: Re: CAJ/JCA question Till Straumann
Next: EPICS device disconnects and reconnects Mark Rivers
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  <20132014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
ANJ, 20 Apr 2015 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·