ONess + tomcat bundle installation

If you download the ONess + tomcat bundle you don't need to configure anything, only uncompress, go to bin folder and run startup.bat (in Windows) or startup.sh (in Linux).

By default ONess uses HSQL in-memory database, if you want to use another database please read the following sections.

WAR files installation

If you download any of the war files you can deploy them in any web container (tomcat, jetty,...). You will need to configure the database used as described in the following sections.

Configuring database

You have two options

  • Configure the datasource in the application server (e.g. Tomcat) using JNDI (this is the default)
  • Configure a local datasource in each webapp

JNDI Configuration

Using an jndi defined datasource you don't need to modify the war file.

By default the webapps use a jndi datasource called oness that you need to setup it in your container. Check the sample file called tomcat-context.xml to see how tomcat can be configured.

Local Configuration

You can override the default database configuration which is in oness-common-model module, by putting in a file called dataSource.properties in your classpath before the oness-common-model jar (check the default dataSource.properties). Then you need to modify web.xml file in the webapp:

  • removing the resource-ref entry
<!-- comment out if not using jndi datasource -->
<resource-ref>
  <description>DB Connection</description>
  <res-ref-name>jdbc/oness</res-ref-name>
  <res-type>javax.sql.DataSource</res-type>
  <res-auth>Container</res-auth>
</resource-ref>
  
  • and changing the line

        classpath:/applicationContext-oness-common-model-dataSource-jndi.xml

    to

        classpath:/applicationContext-oness-common-model-dataSource-dbcp.xml