File tree Expand file tree Collapse file tree 2 files changed +21
-1
lines changed
services/save-and-restore
src/main/java/org/phoebus/service/saveandrestore/application Expand file tree Collapse file tree 2 files changed +21
-1
lines changed Original file line number Diff line number Diff line change @@ -5,7 +5,7 @@ The save-and-restore service implements service as a collection
55of REST endpoints. These can be used by clients to manage configurations (aka save sets) and
66snapshots, to compare snapshots and to restore PV values from snapshots.
77
8- The service is packaged as a self-contained Spring Boot jar file. External dependencies are limited to a JVM (Java 11 +)
8+ The service is packaged as a self-contained Spring Boot jar file. External dependencies are limited to a JVM (Java 17 +)
99and a running instance of Elasticsearch (8.x).
1010
1111Running the service
@@ -14,6 +14,18 @@ Running the service
1414The file ``application.properties `` lists a few settings that can be customized to each site's need, e.g.
1515connection parameters for Elasticsearch.
1616
17+ Server-side IOC communication
18+ -----------------------------
19+
20+ The service exposes endpoints for reading and writing PVs, i.e. to create or restore snapshots. Depending on the
21+ setup this server-side IOC communication may need some configuration:
22+
23+ For ca (channel access) the service must be started with the ``-Dca.use_env=true `` Java option, and the list of
24+ gateways - if any - must be set as a system environment named ``EPICS_CA_ADDR_LIST ``.
25+
26+ For pva (pv access) the service must be started with the ``-DdefaultProtocol=pva `` Java option, and the list of
27+ gateways - if any - must be set as a system environment named ``EPICS_PVA_ADDR_LIST ``.
28+
1729Elasticsearch setup
1830-------------------
1931
Original file line number Diff line number Diff line change 1717 */
1818package org .phoebus .service .saveandrestore .application ;
1919
20+ import org .phoebus .pv .PVPool ;
2021import org .phoebus .service .saveandrestore .migration .MigrateRdbToElastic ;
2122import org .phoebus .service .saveandrestore .persistence .dao .impl .elasticsearch .ElasticsearchDAO ;
2223import org .springframework .boot .SpringApplication ;
@@ -55,6 +56,13 @@ private static void help() {
5556 */
5657 public static void main (String [] args ) {
5758
59+ // Hack: PVPool reads properties from dependency jar. Override of default
60+ // protocol done here by direct access to PVPool.default_type.
61+ String defaultProtocol = System .getProperty ("defaultProtocol" );
62+ if (defaultProtocol != null && !defaultProtocol .isEmpty ()){
63+ PVPool .default_type = defaultProtocol ;
64+ }
65+ System .out .println ("Using default EPICS protocol: " + PVPool .default_type );
5866 // load the default properties
5967 final Properties properties = PropertiesHelper .getProperties ();
6068
You can’t perform that action at this time.
0 commit comments