Prev | Next |
Sparx Intel Service Configuration
The program SparxIntelService.exe runs one or more intel services for Enterprise Architect. The program is located in the same install folder as Enterprise Architect, and it uses a configuration file that names the services that can run on the local machine.
In the examples in this topic, the program will attempt to use the file c:\mystuff\myservices.config. It will look for a service named EA and, if found, start it.
SparxIntelService.exe listen service=EA config=c:\mystuff\myservices.config
The Config File Format
The configuration file has this format:# comment
# comment
# comment
{ # start of service definition
... # list of directives as pairs
} # end of service definition
{ # start of service definition
... # list of directives as pairs
} # end of service definition
Comments are indicated by the # character.
If the config directive is omitted (not recommended), the program will look for a config file of the same name as the program, in the same directory as the program.
In this example the program will attempt to use the file SparxIntelService.config in the same folder:
SparxIntelService.exe listen service:EA
Directive |
Description |
See also |
---|---|---|
name |
When a service is named on the command line, the service with the matching name attribute will be started. |
|
status |
When status = ON, the service will be started; otherwise, it will not be started. |
|
lazyload |
When lazyload is 'true', any Code Miner database will be delay loaded until an Intel request is made to the service. |
|
loglevel |
Defines the level of information logged, as a combination of keywords { information, warning, error} separated by a '|'. For example: loglevel= Information|warning|error |
|
logoutput |
Specifies the full pathname of the log file to write to. For example: logoutput=c:\logfiles\intel-service-project1.log |
|
database |
Specifies the full path name of the Code Miner database to be loaded. For example: database=c:\intel--service\project1.cdb Multiple 'database' directives are allowed, each specifying a different database. |
|
allow |
Identifies the IP address that is permitted to connect to the service on the Port. For example: allow=localhost allow=127.0.0.1 allow=172.160.* (wildcards are allowed when the 'network' directive has a value of 'network' or 'public', but not 'local') |
|
network |
Allows service connections to be restricted.
|
|
show |
When 'true', the Console window for the service will be shown; the default is 'false'. |
|
port |
The Port on which the service will listen. |
The Service Configuration Template
When choosing the 'Execute > Tools > Services > Code Miner Service > Edit Configuration File' ribbon option you display the Windows 'Save As' browser through which you can choose either the config file to open or where a file should be created.If no config file is recorded in the registry and you specify a non-existent filename, that file is created, filled with a 'bare bones' configuration skeleton and saved. The selected/new configuration is then shown in the Enterprise Architect default editor.
The 'bare bones' template is shown here.
#--------------------------------------------------------------------------------
# Sparx Intel Service Configuration File
# ---------------------------------------------------------------------------------
# This file is used to describe one or more intel services and the code miner databases that they support
# This file can be used in EA to manage a number of services on the local machine
# ---------------------------------------------------------------------------------
# Service Attributes
# ---------------------------------------------------------------------------------
# name The unique name of the service in this file
# status "ON" - service can run, "OFF" service will never run
# lazyload "true" - databases are loaded n demand, "false" - databases are loaded when service starts
# port Unique Port number that service will listen on and EA will connect to
# network [optional,default=local] Restricts service to listening to locahost only (local), to a range of addresses (network) or any address (public)
# allow Allows a specific IP address or wildcard IP address to connect (if network is NOT local)
# (There can be multiple allow directives present)
# autoupdate "true" - will detect updates to listed databases and reload them, "false" default, changes are not detected
# show [optional,default=false] shows the console window for the service
# logoutput [optional] The path of a log file which service can write to
# loglevel [optional] The levels of information logged. Combine with '|' character, e.g.: { information|warning|error }
# database [Required] The full path to a codeminer database which usually has the .cdb file extension
# (There can be multiple database directives present)
#
# ---------------------------------------------------------------------------------
# Attribute Values
# ---------------------------------------------------------------------------------
#
# <string> - text. (do not include quotes)
# <boolean> - text, { true, false, ON, OFF }
# <path> - fully specified file path to codeminer database
# <number> - digits
# ---------------------------------------------------------------------------------
#
{
name=<string>,
status=<boolean>,
lazyload=<boolean>,
port=<number>,
allow=<string>,
allow=<string>,
network=<string>,
autoupdate=<string>,
show=<boolean>,
logoutput=<string>,
loglevel=<string>,
database=<path>,
database=<path>,
database=<path>
},
{
name=Project1,
status=ON,
lazyload=TRUE,
allow=localhost,
allow=127.0.0.1,
port=9999,
autoupdate=true,
database=c:\Project1\Project1.cdb
}
The Sparx Intel Service Ribbon Options
When a Service Configuration file exists, you can edit it or execute it using a number of options available from the 'Execute > Tools > Services' ribbon option within the Code Miner menu option group.
Option |
Description |
---|---|
View Status of All Services |
(Above all categories of Service.) This option displays a view that lists the status of each Enterprise Architect service named in the current Configuration file, and its state. |
Start |
This option reads the current Service Configuration file and starts services that are configured to run, and stops running services that are not configured to run. A service is configured if:
|
Stop All |
This option stops any services that are currently running. |
Edit Configuration File |
This option prompts for the Service Configuration file to use, then opens that file in an Enterprise Architect text editor. The system remembers where the file is held. |
Auto Start with EA |
This option automatically starts services having the 'status:ON' attribute when the model opens. The messages logged to the System Output window here when the model is opened indicate that the service was already running. |
Auto Stop on Close |
This option automatically stops running services when Enterprise Architect is closed down. |