Skip to end of metadata
Go to start of metadata

littleIMS HSS is using hibernate to acess to the database. This framework allows to connect to nearly all databases.

Configuration

The database configuration is set in ${littleims.home}/HSS/etc/hss-db.properties.

HSQDB

By default, the HSS is running with HSQDB which is a pure java database and is embedded in the HSS.

Database is save as a file into the directory ${littleims.home}/HSS/db.

${littleims.home}/HSS/etc/hss-db.properties
hibernate.connection.driver_class=org.hsqldb.jdbcDriver
hibernate.cache.provider_class=org.hibernate.cache.NoCacheProvider
hibernate.dialect=org.hibernate.dialect.HSQLDialect
hibernate.connection.username=sa
hibernate.hbm2ddl.auto=update
hibernate.connection.url=jdbc:hsqldb:file:${jetty.home}/db/hss;shutdown=true
hibernate.connection.password=
hibernate.show_sql=false

MySQL

To use MySQL database with the HSS, you should

  1. Create the database on MySQL
    1. Connect to MySQL
      mysql -u root -p
    2. Create the database littleims
      CREATE DATABASE littleims;
    3. Set the privileges
      GRANT ALL PRIVILEGES ON littleims.* TO 'littleims' IDENTIFIED BY "1234";
  2. Replace ${littleims.home}/HSS/etc/hss-db.properties with the following content
    ${littleims.home}/HSS/etc/hss-db.properties
    hibernate.c3p0.idleConnectionTestPeriod=300
    hibernate.c3p0.timeout=10
    hibernate.c3p0.maxStatements=50
    hibernate.connection.driver_class=com.mysql.jdbc.Driver
    hibernate.c3p0.acquireIncrement=5
    hibernate.cache.provider_class=org.hibernate.cache.NoCacheProvider
    hibernate.c3p0.max_size=100
    hibernate.dialect=org.hibernate.dialect.MySQLDialect
    hibernate.c3p0.acquireRetryAttempts=30
    hibernate.c3p0.initialPoolSize=20
    hibernate.c3p0.min_size=10
    hibernate.connection.username=littleims
    hibernate.hbm2ddl.auto=update
    hibernate.connection.url=jdbc\:mysql\://localhost/littleims
    hibernate.connection.password=1234
    hibernate.show_sql=false
    

Other database

To use another database, you should

  1. Decompress the file ${littleims.home}/HSS/sipapps/ROOT.war to ${littleims.home}/HSS/sipapps/ROOT
  2. insert the JDBC connector into ${littleims.home}/HSS/sipapps/ROOT/WEB-INF/lib
  3. modify in ${littleims.home}/HSS/etc/hss-db.properties the following properties: (definitition of theses properties are available in hibernate documentation)
    • hibernate.connection.driver_class
    • hibernate.dialect
    • hibernate.connection.url
    • hibernate.connection.username
    • hibernate.connection.password
Labels:
None
Enter labels to add to this page:
Please wait 
Looking for a label? Just start typing.