Schema Refresh Without Restart

Since version 17.16.0, it is possible to use IJC to modify schema without a need to restart the Plexus Suite servlet container. When a change to the schema is done via IJC, IJC sends set of changes applied to running Plexus Connect instance. Plexus Connect server together with server schema id is specified in the IJS file for a schema connection. The server schema id is the name of .ijs file.

Prerequisities

  • Plexus Connect 17.16.0 and higher

  • IJC 17.16.0 and higher

  • Additional settings to the .ijs file used by IJC.

To enable this functionality, you need to add 2 new options into the .ijs file that IJC uses:

URL, where the Plexus Connect is running and available to the users

<entry key="ijc.schema.refresh.url">http://plexus-server.yourdomain.com:9000</entry>

Schema ID that you want to be able to pick the changes up without restart. The value for this option is basically the name of the .ijs file

<entry key="ijc.schema.refresh.id">ijc</entry>

IJS files on the server do not need to be touched. Only IJS files used by IJC.


A complete .ijs file example can be seen at the bottom here:

chembl_20.ijs
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE properties SYSTEM "http://java.sun.com/dtd/properties.dtd">
<properties>
<comment>Schema connection config. Do not edit this file unless
you are sure about what you are doing.
For documentation see:
https://docs.chemaxon.com/display/instantjchem/Editing+Schema+Connection+Settings</comment>
<entry key="database.schema">CHEMBL_20</entry>
<entry key="database.username">something here</entry>
<entry key="ijc.username">something here</entry>
<entry key="database.url">jdbc:oracle:thin:@database.server:1521:orcl</entry>
<entry key="schema.name">chembl_20</entry>
<entry key="database.password">something here</entry>
<entry key="algorithm">AES256</entry>
<entry key="schema.id">F49EFE434DA34EC8AE4794EE32B44D0D</entry>
<entry key="ijc.password">something here</entry>
<entry key="database.driver">oracle.jdbc.driver.OracleDriver</entry>
<entry key="showoptions.ijc.username">ALWAYS</entry>
<entry key="showoptions.db.username">DEFAULT</entry>
<!-- Additional options to enable schema refresh without restart: -->
<entry key="ijc.schema.refresh.id">chembl_20</entry>
<entry key="ijc.schema.refresh.url">http://localhost:9000/</entry>
</properties>


There is a "blank" time, where any changes done to the schema will not be picked up by Plexus Server. First obvious time is when Plexus Server is not running. The other time is, when Plexus Connect servlet is just starting up and is not yet fully initialised. To make sure you are aware such state, IJC will show you an information dialog. The dialog lets you either try again, or simply dismiss the dialog. If dismissed, the dialog will not appear again, until IJC is restarted again.

images/download/attachments/51808925/SchemaRefresh.png

Support for multiple schemas

In case of deployment of multiple instances of Connect backend for the same IJC schema. The multiple instances are defined by “server.url1”, “server.url2” properties.

<entry key="ijc.schema.refresh.url1">http://plexus-server1.yourdomain.com:9000</entry>
<entry key="ijc.schema.refresh.url2">http://plexus-server2.yourdomain.com:9000</entry>
...
<entry key="ijc.schema.refresh.urlN">http://plexus-serverN.yourdomain.com:9000</entry>