Open the web interface of InterFormNG. If you are running InterFormNG local on the default port, then the address is: http://127.0.0.1:1885
You setup the database configuration under ‘Input’ and ‘Database’:
On the first tab, General Settings, enter the following
Active
Yes
Processing Priority
Normal
Driver Name
com.mysql.jdbc.Driver
Database URL
jdbc:mysql://localhost:3306/interformDatabase
Username
interformUser
Password
interformPassword
If you are using another database server, driver, database, user, etc. you'll have to change it.
Further below enter the following:
Hibernate Dialect
org.hibernate.dialect.MySQL5InnoDBDialect
DDL Strategy
update
Show SQL
No
If you are using an existing database and table(s), the Hibernate Dialect might not be needed.
But if you want InterFormNG to create the database and table(s), it is needed.
BE VERY CAREFUL WITH THE DDL STRATEGY!!
On a running system it should ALWAYS be empty.
But you can use it to make InterFormNG create or update the database and table(s).
For more information, google hibernate.hbm2ddl.auto or see any book about Hibernate.
As the Hibernate Configuration, you can change the way the database table(s) is mapped to InterFormNG data.
Enter the following:
<?xml version="1.0"?>
<!DOCTYPE hibernate-mapping PUBLIC "-//Hibernate/Hibernate Mapping DTD 3.0//EN" "http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
<hibernate-mapping package="com.interform400.xml.plugin.db.model">
<class name="Job" table="JOB">
<id name="id" column="C_PERSIST_ID">
<generator class="native" />
</id>
<property name="processingStatus" column="C_WAS_PROCESSED" />
<property name="createdDate" column="C_CREATED_DATE_TIME" />
<property name="xmlData" column="C_XML" not-null="true" type="com.interform400.xml.plugin.db.hibernate.BlobUserType" update="false" />
</class>
<query name="Job.findUnprocessedJobs"><![CDATA[
from Job job where job.processingStatus = 0 order by createdDate, id
]]></query>
</hibernate-mapping>