Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
JMap has a database named System that contains JMap Server’s configurations and geometry tables. This database is mandatory and generally should not be modified.
The System database cannot be deleted and should only be manipulated by advanced users.
JMap Server’s System database is a relational database that stores important data for JMap Server.
User account and group data is stored in this database if you are using JMap Server’s built-in user manager. This is not the case if you are using another user manager (e.g.: LDAP/Active Directory).
Also, when spatial data sources read their data from files (SHP, MIF, DWG, etc.), the geometry and descriptive data read from the files are inserted in tables of the System database. There is one data table per such data source, as well as spatial index tables that speed up data extraction.
Personal layers created by the users as well as JMap Spatial tables are also stored in the System database
The relational database management system (RDBMS) used by default for storing JMap Server’s System databases is Apache Derby. It is embedded in JMap Server and requires no maintenance. This system is suitable for publishing small spatial data volumes or for test environments.
It is strongly recommended to use another relational database management system.
The list of compatible systems is presented in the Technical specifications of JMap Server Lima.
By default, Derby’s database files are located under the directory JMAP_HOME/db/database.
Never delete or alter any file located in this directory.
JMap Server’s System database can be moved to another RDBMS easily. It is recommended to do it for scalability or performance reasons or to take advantage of more advanced features such as backups.
The officially supported RDBMS for storing the JMap System database are detailed in the Technical specifications of JMap Server Lima.
Note that other RDBMS and versions will also probably be supported because JMap Server uses mostly very common and simple database functions.
To store the System database, you should use a database or schema that is reserved exclusively for JMap. The user account that established the connection must have sufficient permissions to select, insert, create, and delete tables and indexes.
To move the System database towards another RDBMS, you must modify the database called System in JMap Admin. Select the database driver and connection parameters associated with the environment of the new System database. JMap Server will automatically create the required tables in the new database.
After the System database is moved, any spatial data source that reads vector data files will have a Not ready status. It will need to be updated before it can be used. Other types of data sources (raster, Oracle Spatial, SDE, etc.) will not be affected.
In addition, if you move the System database, all user data from the previous database must be moved using the data import and export tool. For more information, see the Import and Export section.
The Permissions button appears in the Databases section and is enabled when at least one database is selected. It is also displayed in the database configuration interface.
The Permissions section has two tabs: Permissions and Owners. Owners are the only ones who can manage administrative permissions for the database, manage the list of owners and delete it.
A list of users and groups with permissions appears in the Permissions tab. Click on to add new users or groups.
Available users and groups are configured in the JMap Server section of JMap Admin. Refer to the section for more information about managing users in JMap Server.
There are only administrator permissions for databases.
JMap Server manages database connections by placing them in pools. The pools contain a certain number of open database connections. These connections are shared with the entire system and used according to database access needs.
All the database connection pools (hereafter called databases for simplicity) are centrally managed using JMap Admin. Databases are typically used by JMap Server to read spatial data stored in tables and to access descriptive data related to spatial data. Once databases are configured in JMap Admin, they can be used from other sections and for various purposes in the administration process.
The Databases section in JMap Admin Resources displays a table of configured databases. In this section you can create a new database, access the database configuration interface by clicking on its name as well as manage the databases you select in the table.
When you click on the name of a database in the Database section, the Database configuration interface displays.
This interface has buttons to manage the database: Edit, Reinitialize, access to Permissions, Deactivate or Delete the database. More details are shown in Managing Databases.
Several subsections display information on the database. The parameter values indicated were defined when the database connection was created. Refer to Creating Databases for the details of each parameter. Some parameters can be modified directly in the section, others by clicking on Edit.
This subsection displays the name, Id (internal JMap identifier), a description, and the database owner.
This subsection displays the details of the connection pool. The parameters indicated are the following: Initial size, Maximum size, Pool usage, Pool usage peak, Connection timeout, and Connection wait timeout.
This subsection displays the details of the database connection. The parameters indicated are the following: Status, Database (indicates the type), Driver, Connection string, Username, Validation query, and Connection type.
This subsection shows all the resources using the data from the database. The information in this section is presented hierarchically and displays the spatial data sources as well as the projects with the layers, reports, and forms, all showing the attributes used. This can be useful to view the resources that would be affected by changes made to the database.
Access database | Allows an administrator to view detailed database information. |
Administrate database | Allows an administrator to modify the database configuration. |
Use SQL console | Allows to use the on the database. The SQL console allows you to view the database structure and run SQL queries against the database. |
Reinitializing a database closes all open connections and creates new ones. This can be useful to force a reconnection to a database system.
Deactivating a database closes connections to the database without deleting its configuration. JMap Server can no longer query the database. Deactivating is useful when the database stops responding and causes delays in the local server.
Deleting a database deletes the connection configuration for the database system. The data contained in the database is not affected at all.
Each database has a status. The status indicates the condition of the database connection. The following table describes the possible statuses of a database.
Statuses
Error
The database connections are broken.
The database cannot be used until the error is resolved and the connections are reopened. Reinitializing the database might correct the problem.
You can view a description of the error by clicking on the word Error displayed in red.
Inactive
The database connections are closed but they are configured. JMap can no longer query the database.
Connected
The database connections were created successfully and are ready to be used.
Identification
Name
Enter a name for the new database. The name must be unique.
Description
Optionally enter a description for the new database. The description can only be viewed by administrators in JMap Admin.
Connection parameters
Driver
Select the driver for the database system you wish to connect to.You can add new drivers by creating new configuration files in the JMAP_HOME/conf/db directory on the server.
Host
(Depending on the selected driver) The name or TCP/IP address of the database server.
Port
(Depending on the selected driver) The TCP/IP port of the database server.
Database
(Depending on the selected driver) The name of the database to access, as defined in the database server.
Folder
(Depending on the selected driver) The path to the database folder.
Connection string configuration - Advanced
(Only for Oracle driver) Advanced configuration allows you to configure the connection string by writing it directly to the wizard. This is a more flexible way to configure the string under certain circumstances.
Extra parameters
In some rare cases, database systems may require additional parameters. They can be entered in this field.
Username
Enter a username for the database connection. The authentication of domain users is not supported; you must make sure your database allows database authentication.
Password
Enter a password for the database connection.
Connections
Number of connections
Enter the initial size of the pool of connections. This determines how many connections to the database will be kept open.
Maximum connections
Enter the maximum number of connections allowed for this pool. It must be equal to or greater than the initial number of connections. If the pool needs to be increased, new database connections will be created automatically until the maximum value is reached. After a certain period of time, additional connections are automatically closed, and the connection pool returns to its initial size. The maximum value can be disabled by unselecting the check box, allowing the pool to increase without restriction.
Additional parameters
In some rare cases, database systems may require additional parameters.
They can be entered in this field.
Validation query
JMap uses a query validation mechanism to validate database connections.
This query is used to test the connection each time a query needs to be executed. If the validation query fails, which typically means that the connection to the database is broken, JMap Server will try to establish a new connection automatically. This mechanism ensures the database connections are always working. The query must be valid and very quick to execute.
In order to reduce the impact on performance, make sure you minimize the number of returned records (zero is perfect) and use indexed fields in the WHERE clause. Default queries are provided. They normally don’t need to be changed.
Connection timeout
The connection inactivity timeout is used to close and reopen connections that are inactive for a long period.
This mechanism ensures that the database system does not close inactive connections. Make sure that this value is lesser than the connection timeout of your database system.
A default value of 2 hours is appropriate most of the time.
Connection wait timeout
Sets the wait timeout value for database operations.
This parameter can be lowered to prevent slowdowns or deadlocks in situations where the database server is taking too long to respond, or increased to allow longer wait periods so that queries with long processing time can be successfully executed.
The default value is 60 sec. Enable this option to specify a different value for this connection.
Connection type
Specify the connection type to create.
Generic connections are all created with the same user information (username and password) defined earlier. From the perspective of the database system, it is as if the same user performed all queries. This type of connection is used most of the time. Identified connections are created on the fly for each user connected to JMap Server. The same connection is reused during the session for each user. From the perspective of the database management system, each query is done by the user who is connected to JMap Server. This connection mode is useful in environments where security is managed at the database level. In order for the identified connection mode to work, it is required that JMap and the database system share the same list of users. This can be the case when the Oracle user manager module is used to manage users.