Page tree

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

We will now present some example configurations, which can be included in the Apache Tomcat ROOT.xml configuration file.

...

MyTimetable configuration properties file.

Simple Syllabus Plus data source configuration

A simple Syllabus Plus data source configuration, listing two Syllabus Plus databases (for 20132016/14 17 and 20142017/1518) looks something like:

Code Block
languagexmltext
themeRDark
<!--# Define 2two Syllabus Plus data sources, without intermediate uniting or merging groups
-->
<Environment name="scheduleviewer/server/Database/Components" value="DS_2014;DS_2013" type="java.lang.String" />
 
<!-- Syllabus PlusDatabase.Components = DS_2017;DS_2016

# Define the name of the data source usedas forshown academicin year 2014-2015 -->
<Environment name="scheduleviewer/server/Database/DataSources/2014/Label" value="2014/15" type="java.lang.String" />
<Environment name="scheduleviewer/server/Database/DataSources/2014/ContextConfiguration" value="classpath:syllabus.xml" type="java.lang.String" /> 
 
<!-- For MyTimetable 2.5 use a JDBC url: -->
<Environment name="scheduleviewer/server/Database/DataSources/2014/Syllabus/Url" value="jdbc:jtds:sqlserver://{DB_SERVER_HOSTNAME}/{DATABASE};socketTimeout=15;loginTimeout=15;sendStringParametersAsUnicode=false;user={USERNAME};password={PASSWORD}" type="java.lang.String" />
 
<!-- For MyTimetable 2.6+ use separate settings for the database connection: -->
<Environment name="scheduleviewer/server/Database/DataSources/2014/Syllabus/ServerName" value="{HOSTNAME}" type="java.lang.String" />
<Environment name="scheduleviewer/server/Database/DataSources/2014/Syllabus/DatabaseName" value="{DATABASE}" type="java.lang.String" />
<Environment name="scheduleviewer/server/Database/DataSources/2014/Syllabus/Username" value="{USERNAME}" type="java.lang.String" />
<Environment name="scheduleviewer/server/Database/DataSources/2014/Syllabus/Password" value="{PASSWORD}" type="java.lang.String" />
<!-- Following settings are optional, and only need to be added when necessary: -->
<Environment name="scheduleviewer/server/Database/DataSources/2014/Syllabus/Instance" value="{INSTANCE_NAME}" type="java.lang.String" />
<Environment name="scheduleviewer/server/Database/DataSources/2014/Syllabus/Domain" value="{DOMAIN_NAME_IF_USING_WINDOWS_AUTH}" type="java.lang.String" />
<Environment name="scheduleviewer/server/Database/DataSources/2014/Syllabus/PortNumber" value="1433" type="java.lang.String" />
<!-- To use SSL (use require instead of authenticate to skip the CA check, not recommended): -->
<Environment name="scheduleviewer/server/Database/DataSources/2014/Syllabus/Ssl" value="authenticate" type="java.lang.String" />
<!-- To use a named pipes instead of TCP/IP: -->
<Environment name="scheduleviewer/server/Database/DataSources/2014/Syllabus/NamedPipe" value="true" type="java.lang.String" />

<!-- Syllabus Plus data source used for academic year 2013-2014 -->
<Environment name="scheduleviewer/server/Database/DataSources/2013/Label" value="2013/14" type="java.lang.String" />
<Environment name="scheduleviewer/server/Database/DataSources/2013/ContextConfiguration" value="classpath:syllabus.xml" type="java.lang.String" /> 
<Environment name="scheduleviewer/server/Database/DataSources/2013/Syllabus/Url" value="jdbc:jtds:sqlserver://{DB_SERVER_HOSTNAME}/{DATABASE};socketTimeout=15;loginTimeout=15;sendStringParametersAsUnicode=false;user={USERNAME};password={PASSWORD}" type="java.lang.String" />
Warning

Note: MyTimetable 2.5 uses a single setting to specify the JDBC URL, whereas MyTimetable 2.6 and newer use separate settings for server name, database name, username, etc.

The example below uses the 2.5 format. Replace the line with 'Url' with the newer config if necessary.
the interface
Database.DataSources.2016.Label = 2016/2017


# Optionally, define a label for another language
#Database.DataSources.2016.Label.nl = DB van 2010
# Optionally, make this a 'secondary' data source. Secondary data source types are shown in a submenu in the interface.
#Database.UnitingGroups.2016.Secondary = true

Database.DataSources.2016.ContextConfiguration = classpath:nl/eveoh/mytimetable/dataprovider/syllabus/syllabus.xml
Database.DataSources.2016.Syllabus.ServerName = my_server_name
Database.DataSources.2016.Syllabus.DatabaseName = my_database_name
Database.DataSources.2016.Syllabus.User = my_user_name
Database.DataSources.2016.Syllabus.Password = my_password


# Optionally, specify database port or instance, and the use of SSL encryption
#Database.DataSources.2016.Syllabus.PortNumber = 1433
#Database.DataSources.2016.Syllabus.Instance = my_instance
#Database.DataSources.2016.Syllabus.Ssl = authenticate

# Optionally, define the start and end date
#Database.DataSources.2016.Syllabus.StartDate = 2016-09-01
#Database.DataSources.2016.Syllabus.EndDate = 2017-08-31

Database.DataSources.2017.Label = 2017/2018

Database.DataSources.2017.ContextConfiguration = classpath:nl/eveoh/mytimetable/dataprovider/syllabus/syllabus.xml
Database.DataSources.2017.Syllabus.ServerName = my_server_name
Database.DataSources.2017.Syllabus.DatabaseName = my_database_name
Database.DataSources.2017.Syllabus.User = my_user_name
Database.DataSources.2017.Syllabus.Password = my_password

More advanced Syllabus Plus data source configuration

A more advanced Syllabus Plus configuration, utilising uniting and merging groups, and containing translations for the labels, looks something like:

Code Block
languagexmltext
themeRDark
<!-- Define 2 uniting groups -->
<Environment name="scheduleviewer/server/Database/Components" value="UG_2014;UG_2013" type="java.lang.String" />


<!-- Uniting group 2014 (i.e., all 2014 timetable data) -->
<!-- Define 2 merging groups for uniting group 2014 --> 
<Environment name="scheduleviewer/server/Database/UnitingGroups/2014/Components" value="MG_2014a;MG_2014b" type="java.lang.String" />
<!-- Define label for this group, shown in the user interface (default language + Dutch specific) -->
<Environment name="scheduleviewer/server/Database/UnitingGroups/2014/Label" value="Timetable 2014/15" type="java.lang.String" />
<Environment name="scheduleviewer/server/Database/UnitingGroups/2014/Label/nl" value="Rooster 2014/15" type="java.lang.String" />

<!-- Merging group 2014a (i.e., all 2014 timetable data of department A (semester 1 + 2) -->
<Environment name="scheduleviewer/server/Database/MergingGroups/2014a/Components" value="DS_2014asm2;DS_2014asm1" type="java.lang.String" />

<!-- Data source config 2014asm2 (i.e., 2014 SM2 timetable data of department A -->
<Environment name="scheduleviewer/server/Database/DataSources/2014asm2/ContextConfiguration" value="classpath:syllabus.xml" type="java.lang.String" /> 
<Environment name="scheduleviewer/server/Database/DataSources/2014asm2/Syllabus/Url" value="jdbc:jtds:sqlserver://{DB_SERVER_HOSTNAME}/{DATABASE};socketTimeout=15;loginTimeout=15;sendStringParametersAsUnicode=false;user={USERNAME};password={PASSWORD}" type="java.lang.String" />

<!-- Data source config 2014asm1 (i.e., 2014 SM1 timetable data of department A -->
<Environment name="scheduleviewer/server/Database/DataSources/2014asm1/ContextConfiguration" value="classpath:syllabus.xml" type="java.lang.String" /> 
<Environment name="scheduleviewer/server/Database/DataSources/2014asm1/Syllabus/Url" value="jdbc:jtds:sqlserver://{DB_SERVER_HOSTNAME}/{DATABASE};socketTimeout=15;loginTimeout=15;sendStringParametersAsUnicode=false;user={USERNAME};password={PASSWORD}" type="java.lang.String" />

<!-- Merging group 2014b (i.e., all 2014 timetable data of department B (semester 1 + 2) -->
<Environment name="scheduleviewer/server/Database/MergingGroups/2014b/Components" value="DS_2014bsm2;DS_2014bsm1" type="java.lang.String" />

<!-- Data source config 2014bsm2 (i.e., 2014 SM2 timetable data of department B -->
<Environment name="scheduleviewer/server/Database/DataSources/2014bsm2/ContextConfiguration" value="classpath:syllabus.xml" type="java.lang.String" /> 
<Environment name="scheduleviewer/server/Database/DataSources/2014bsm2/Syllabus/Url" value="jdbc:jtds:sqlserver://{DB_SERVER_HOSTNAME}/{DATABASE};socketTimeout=15;loginTimeout=15;sendStringParametersAsUnicode=false;user={USERNAME};password={PASSWORD}" type="java.lang.String" />

<!-- Data source config 2014bsm1 (i.e., 2014 SM1 timetable data of department B -->
<Environment name="scheduleviewer/server/Database/DataSources/2014bsm1/ContextConfiguration" value="classpath:syllabus.xml" type="java.lang.String" /> 
<Environment name="scheduleviewer/server/Database/DataSources/2014bsm1/Syllabus/Url" value="jdbc:jtds:sqlserver://{DB_SERVER_HOSTNAME}/{DATABASE};socketTimeout=15;loginTimeout=15;sendStringParametersAsUnicode=false;user={USERNAME};password={PASSWORD}" type="java.lang.String" />



<!-- Uniting group 2013 (i.e., all 2013 timetable data) -->
<!-- Define 2 merging groups for uniting group 2013 --> 
<Environment name="scheduleviewer/server/Database/UnitingGroups/2013/Components" value="MG_2013a;MG_2013b" type="java.lang.String" />
<!-- Define label for this group, shown in the user interface (default language + Dutch specific) -->
<Environment name="scheduleviewer/server/Database/UnitingGroups/2013/Label" value="Timetable 2013/14" type="java.lang.String" />
<Environment name="scheduleviewer/server/Database/UnitingGroups/2013/Label/nl" value="Rooster 2013/14" type="java.lang.String" />

<!-- Merging group 2014a (i.e., all 2013 timetable data of department A (semester 1 + 2) -->
<Environment name="scheduleviewer/server/Database/MergingGroups/2013a/Components" value="DS_2013asm2;DS_2013asm1" type="java.lang.String" />

<!-- Data source config 2014asm2 (i.e., 2013 SM2 timetable data of department A -->
<Environment name="scheduleviewer/server/Database/DataSources/2013asm2/ContextConfiguration" value="classpath:syllabus.xml" type="java.lang.String" /> 
<Environment name="scheduleviewer/server/Database/DataSources/2013asm2/Syllabus/Url" value="jdbc:jtds:sqlserver://{DB_SERVER_HOSTNAME}/{DATABASE};socketTimeout=15;loginTimeout=15;sendStringParametersAsUnicode=false;user={USERNAME};password={PASSWORD}" type="java.lang.String" />

<!-- Data source config 2014asm1 (i.e., 2013 SM1 timetable data of department A -->
<Environment name="scheduleviewer/server/Database/DataSources/2013asm1/ContextConfiguration" value="classpath:syllabus.xml" type="java.lang.String" /> 
<Environment name="scheduleviewer/server/Database/DataSources/2013asm1/Syllabus/Url" value="jdbc:jtds:sqlserver://{DB_SERVER_HOSTNAME}/{DATABASE};socketTimeout=15;loginTimeout=15;sendStringParametersAsUnicode=false;user={USERNAME};password={PASSWORD}" type="java.lang.String" />

<!-- Merging group 2013b (i.e., all 2013 timetable data of department B (semester 1 + 2) -->
<Environment name="scheduleviewer/server/Database/MergingGroups/2013b/Components" value="DS_2013bsm2;DS_2013bsm1" type="java.lang.String" />

<!-- Data source config 2013bsm2 (i.e., 2013 SM2 timetable data of department B -->
<Environment name="scheduleviewer/server/Database/DataSources/2013bsm2/ContextConfiguration" value="classpath:syllabus.xml" type="java.lang.String" /> 
<Environment name="scheduleviewer/server/Database/DataSources/2013bsm2/Syllabus/Url" value="jdbc:jtds:sqlserver://{DB_SERVER_HOSTNAME}/{DATABASE};socketTimeout=15;loginTimeout=15;sendStringParametersAsUnicode=false;user={USERNAME};password={PASSWORD}" type="java.lang.String" />

<!-- Data source config 2013bsm1 (i.e., 2013 SM1 timetable data of department B -->
<Environment name="scheduleviewer/server/Database/DataSources/2013bsm1/ContextConfiguration" value="classpath:syllabus.xml" type="java.lang.String" /> 
<Environment name="scheduleviewer/server/Database/DataSources/2013bsm1/Syllabus/Url" value="jdbc:jtds:sqlserver://{DB_SERVER_HOSTNAME}/{DATABASE};socketTimeout=15;loginTimeout=15;sendStringParametersAsUnicode=false;user={USERNAME};password={PASSWORD}" type="java.lang.String" />
Database.Components = DS_2017;UG_2016

Database.UnitingGroups.2016.Label = 2016/2017
Database.UnitingGroups.2016.Components = MG_2016a;MG_2016b

Database.MergingGroups.2016a.Components = DS_2016a2;DS_2016a2

Database.DataSources.2016a1.ContextConfiguration = classpath:nl/eveoh/mytimetable/dataprovider/syllabus/syllabus.xml
Database.DataSources.2016a1.Syllabus.ServerName = my_server_name
Database.DataSources.2016a1.Syllabus.DatabaseName = my_database_name
Database.DataSources.2016a1.Syllabus.User = my_user_name
Database.DataSources.2016a1.Syllabus.Password = my_password


Database.DataSources.2016a2.ContextConfiguration = classpath:nl/eveoh/mytimetable/dataprovider/syllabus/syllabus.xml
Database.DataSources.2016a2.Syllabus.ServerName = my_server_name
Database.DataSources.2016a2.Syllabus.DatabaseName = my_database_name
Database.DataSources.2016a2.Syllabus.User = my_user_name
Database.DataSources.2016a2.Syllabus.Password = my_password


Database.MergingGroups.2016b.Components = DS_2016b2;DS_2016b2

Database.DataSources.2016b1.ContextConfiguration = classpath:nl/eveoh/mytimetable/dataprovider/syllabus/syllabus.xml
Database.DataSources.2016b1.Syllabus.ServerName = my_server_name
Database.DataSources.2016b1.Syllabus.DatabaseName = my_database_name
Database.DataSources.2016b1.Syllabus.User = my_user_name
Database.DataSources.2016b1.Syllabus.Password = my_password

Database.DataSources.2016b2.ContextConfiguration = classpath:nl/eveoh/mytimetable/dataprovider/syllabus/syllabus.xml
Database.DataSources.2016b2.Syllabus.ServerName = my_server_name
Database.DataSources.2016b2.Syllabus.DatabaseName = my_database_name
Database.DataSources.2016b2.Syllabus.User = my_user_name
Database.DataSources.2016b2.Syllabus.Password = my_password


Database.DataSources.2017.Label = 2017/2018

Database.DataSources.2017.ContextConfiguration = classpath:nl/eveoh/mytimetable/dataprovider/syllabus/syllabus.xml
Database.DataSources.2017.Syllabus.ServerName = my_server_name
Database.DataSources.2017.Syllabus.DatabaseName = my_database_name
Database.DataSources.2017.Syllabus.User = my_user_name
Database.DataSources.2017.Syllabus.Password = my_password