Experimental Physics and Industrial Control System
On May 11, 2007, at 10:45 , David Dudley wrote:
All is fine and good to be able to use this, -except-, in the case of
distributing an application, or as an applet, there is no way to
provide
a location of where to get the 'JCALibrary.properties' file. Can the
capability of providing a location (preferably being able to use a URL
Link as well) be added to 'getInstance' (or should I do it?)?
Actually I think you can already put something like this in your code:
System.setProperty("com.cosylab.epics.caj.CAJContext.addr_list",
... your value ...);
System.setProperty
("com.cosylab.epics.caj.CAJContext.auto_addr_list",
... "YES" or "NO" ...);
Meaning:
All that's usually loaded from the JCALibrary.properties
can be initialized in your code.
So you can hardcode it in your application,
or have your application read that info from
some jar file location as you suggest and copy it to
System.setProperty().
Also, is there a way to create a channel and then 'add' a connection
Listener as a separate function?
Maybe not. But not a show stopper:
Just always create the channel with your 'Forwarding Listener',
and then those later listeners register with your 'Forwarding Listener'.
Of course you'll have to implement that 'Forwarding Listener'.
Or a way to close a channel?
There is a
Channel.destroy()
as well as a
Channel.dispose().
I don't know the difference, but I use the 'destroy()' call and
that works nicely.
Beware, though:
If you have listeners, the 'JNI' version will completely remove the
channel and all listener information,
while the 'CAJ' version might still invoke your listener
with another value update, where the status is actually
indicating "channel was destroyed",
so it makes some sense, it's just that most people who've used
the JNI (C/C++) based CA client lib might not expect another
event from the destroyed channel.
-Kay
- Replies:
- Re: JCA Library usage David Dudley
- References:
- JCA Library usage David Dudley
- Navigate by Date:
- Prev:
Re: JCA Library usage J. Lewis Muir
- Next:
Re: JCA Library usage David Dudley
- Index:
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
<2007>
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
- Navigate by Thread:
- Prev:
Re: JCA Library usage J. Lewis Muir
- Next:
Re: JCA Library usage David Dudley
- Index:
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
<2007>
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025