Database
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
- Create the database on MySQL
- Connect to MySQL
mysql -u root -p
- Create the database littleims
CREATE DATABASE littleims;
- Set the privileges
GRANT ALL PRIVILEGES ON littleims.* TO 'littleims' IDENTIFIED BY "1234";
- Connect to MySQL
- Replace
${littleims.home}/HSS/etc/hss-db.properties
with the following content${littleims.home}/HSS/etc/hss-db.propertieshibernate.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
- Decompress the file
${littleims.home}/HSS/sipapps/ROOT.war
to${littleims.home}/HSS/sipapps/ROOT
- insert the JDBC connector into
${littleims.home}/HSS/sipapps/ROOT/WEB-INF/lib
- 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