Initial Setup
In order to use TIF, you need to configure a couple of things before taking it into use.
The main configuration files inside the TIF server is located under:
-
${TIF_ROOT}/etc
-
${TIF_ROOT}/modules/enovia/etc
The sub chapters describe the required setup.
In general, don’t modify the configuration files that are part of the TIF distribution. You can in most cases create a new file with a different name containing the customized configurations. For example: |
-
Don’t modify the file
${TIF_ROOT}/etc/tif.properties
directly.-
Create instead a new file in the same directory called
${TIF_ROOT}/etc/tif.custom.properties
.
-
-
Create/use the file
${TIF_ROOT}/modules/enovia/etc/module.properties
instead-
Create/use the file
${TIF_ROOT}/modules/enovia/etc/module.custom.properties
instead.
-
-
And also the file
${TIF_ROOT}/modules/enovia/etc/tvc.properties
-
Create/use the file
${TIF_ROOT}/modules/enovia/etc/tvc.custom.properties
instead.
-
These custom files are merged with the original file meaning that the content of the custom file takes precedence over the original file.
Selecting J2EE Mode
The default J2EE mode of the TIF Server is "javax". The other mode is "jakarta"
If you are using ENOVIA/3DEXPERIENCE 24xFD01 or later, you are using the "Jakarta" namespace from the JavaEE APIs. In such case, you need to configure the J2EE mode to Jakarta.
Within the file ${TIF_ROOT}/modules/enovia/etc/module.custom.properties
, add this property:
enovia.j2ee.mode = jakarta
Macros in Property Files
The property values in the property files may contain macros that resolves to a value.
The macro are defined using a ${}
construct.
You can reference other properties from the same file.
one=1
two=2
three=3
twenty_three=${two}${three}
dont_resolve=$${two}
When resolving properties from ${TIF_HOME}/etc/tif.properties
,
then macros are also resolved from system properties. Example:
directory=${user.home}/subdir
Multiple TIF Instances
To support horizonal scaling, you can setup multiple TIF instances.
Internally, a TIF instance is defined by its node id and instance id. The node id is equal to the hostname, which the TIF server binds to. The instance id is either automatically assigned or defined.
The data related to one TIF instance is stored below ${TIF_ROOT}/data/${NODE_ID}/${INSTANCE_ID}
, and
every TIF instance must have its own data directory.
The base location for the data can be specified in the tif.custom.properties file within ${TIF_ROOT}/etc. |
The first time TIF is started up, TIF will assign an instance id (unless the INSTANCE_ID has been defined, see below how the instance id is resolved) and create the directory.
You should NOT try to start two different instances using the same node id and instance id combination. A simple (and naive!) solution is to duplicate the TIF installation directory and simply start up the instances in the normal way. The auto generated instance id’s will be unique, however, you then have two TIF installations to setup and configure so this is not recommended.
The recommended approach is to use one installation base, and simply use different start scripts to start each instance with. See below how to specify the instance-id within a start-script.
The ENOVIA/3DEXPERIENCE Connector have some additional things to concern when setting up multiple instance. Please read more here. |
Resolving the Instance Id
The instance id is default set to auto
within the file ${TIF_ROOT}/etc/tif.properties
.
If you want to change this value to something else, you should do so in the custom
properties file ${TIF_ROOT}/etc/tif.custom.properties
.
You can also provide this parameter as a runtime parameter in the TIF start script like this:
java -Dtif.instance.id=auto -Dtif.http.port=8080 ...
The latter is useful in case you have one installation base and via different start scripts wants.
Production Mode
Per default, TIF starts in production mode. To start TIF in development mode, use the "productionMode" parameter.
Either set this property in ${TIF_HOME}/etc/tif.custom.properties
, or as a Java system parameter as shown below.
java -Dtif.productionMode=false ...
HTTP / HTTPS Port
Running different TIF instances on the same network address requires you to configure TIF to bind the HTTP/HTTPS server to a unique port.
This is then set via these Java system parameters:
java -Dtif.https.port=443 -Dtif.http.port=8181 ...
Shutdown Listen Port
TIF listens for shutdown signals by default at port 9005. To change this port, which is needed in case you launch multiple TIF instances on the same machine, set the value as a Java system parameter like this:
java -Dtif.shutdownListener.port=9006 ...
Example Start Script
Below is an example start script where additional parameters are defined.
@echo off
setlocal
set ENOVIA_HOME=c:\apps\ENOVIA\V6R2016X\Server
set JAVA_HOME=c:\apps\jdk64\7
set WEBAPP_ROOT=c:\webapps\2016X
rem #
rem # ENOVIA Important settings
rem #
set MX_MEMORY_SYSTEM_LIMIT=4096m
set MX_CHARSET=UTF8
set NLS_LANG=_.UTF8
set LANG=C
set EXTRA_OPTS=-Dtif.instance.id=TIF-2 -Dtif.http.port=8282 -Dtif.shutdownListener.port=9005 (1)
set START_ARGS=-Xdebug -Xrunjdwp:transport=dt_socket,address=8000,server=y,suspend=n (2)
set STOP_ARGS= (3)
call tif.bat run
1 | EXTRA_OPTS is handled in the tif.bat script and is appended to the Java argument list |
2 | START_ARGS works similar to EXTRA_OPTS, however they are only set if the TIF server is started |
3 | STOP_ARGS are only added to the argument list if the TIF server is stopped |