Quotero Wiki » Install » Jonas 5.1.6

Jonas 5.1.6

Last modified by Jérôme Ludmann on 2011/03/14 10:45

Jonas 5.1.6

If you need technical support for this product, contact Customer Support by email at support@quotero.com. If you have comments or suggestions about this documentation, contact us at documentation@quotero.com.

This edition applies to version 2.0 of the Quotero solution with Jonas 5.1.6.

Web App Installation

Foremost, copy the Quotero Web App into ~/deploy directory of JOnAS.

JDBC Driver

Copy the JDBC library into ~/lib/ext application server directory. In this tutorial example, we’ll use postgresql-8.x-xxx.jdbc3.jar as JDBC Driver file.

Data Source

To set Data Source parameters, configure the *.properties into conf directory.

For example with PostgreSQL, use PostgreSQL1.properties (this file will be referring by the jonas.properties file in the next step).

JOnAS PostgreSQL Data Source example:

datasource.name         jdbc/quotero
datasource.url          jdbc:postgresql://localhost:45432/quotero-db
datasource.classname    org.postgresql.Driver
datasource.username     postgres
datasource.password     postgres
datasource.mapper        rdb.postgres
jdbc.connchecklevel    0
jdbc.connmaxage        1440
jdbc.maxopentime        60
jdbc.connteststmt    select 1
jdbc.minconpool        2
jdbc.maxconpool        30
jdbc.samplingperiod    30
jdbc.adjustperiod        60
jdbc.maxwaittime        5
jdbc.maxwaiters        100
jdbc.pstmtmax        120

Application Server

Now, update the jonas.properties file into conf directory in order to link your Data Source:

jonas.service.dbm.datasources    PostgreSQL1

The Data Source name refers to another file, located in the same directory.
In this example, the Data Source file corresponding to PostgreSQL1.properties.

Application Context

Here, it's necessary to change the transaction manager in the application context file. This file is located into ~/WEB-INF/conf/applicationContext.xml.

<bean id="transactionManager"
          class="org.springframework.transaction.jta.JtaTransactionManager" >
       <property name="transactionManagerName" value="java:comp/UserTransaction" />
    </bean>
</beans>

Quotero Properties

Edit the file named quotero-conf.properties (into ~/WEB-INF directory) to change the default transaction manager again:

jta.tx.factory=org.hibernate.transaction.JTATransactionFactory
jta.tx.managerlookup=org.hibernate.transaction.JOTMTransactionManagerLookup

Then, specify yours database settings:

jdbc.databasetype=postgresql
jdbc.dialect=org.hibernate.dialect.PostgreSQLDialect
jdbc.schema=public
jdbc.jndids=jdbc/quotero

This is a valid example for PostgreSQL and JOnAS application server.

Web App Context

A file named jonas-web.xml must be added into ~/WEB-INF directory of the web app. It should contain:

<jonas-web-app xmlns="http://www.objectweb.org/jonas/ns"
      xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
      xsi:schemaLocation="http://www.objectweb.org/jonas/ns
      http://jonas.ow2.org/ns/jonas-web-app_5_1.xsd">

  <!-- This is a root contex -->
  <context-root>quotero</context-root>
 
  <!-- Load this application on demand (if enabled in the webcontainer service) -->
  <on-demand>false</on-demand>
</jonas-web-app>

Note: The web app context URL (context-root element) is required at this step.

Server Libraries

Many libraries are already loaded by the application server. Before to run the server, you have to remove them from the Web App library folder.

These files are located into ~/WEB-INF/lib:

  • atomikos-util-x.x.x.jar
  • geronimo-jta-x.x.x.jar
  • jta-x.x.x.jar
  • postgresql-x.x.x.jar
  • transactions-x.x.x.jar
  • transactions-api-x.x.x.jar
  • transactions-hibernate-x.x.x.jar
  • transactions-jdbc-x.x.x.jar
  • transactions-jdbc-deprecated-x.x.x.jar
  • transactions-jms-x.x.x.jar
  • transactions-jms-deprecated-x.x.x.jar
  • transactions-jta-x.x.x.jar
  • xercesImpl-x.x.x.jar
  • xml-apis-x.x.x.jar
  • xmlbeans-x.x.x.jar
  • xmlParserAPIs-x.x.x.jar

More help

Go to http://wiki.quotero.com/bin/view/Install/Quotero+Quick+Install for additional information.

Tags:
Created by Fabien Alin on 2011/03/09 17:10

This wiki is licensed under a Creative Commons 2.0 license
XWiki Enterprise 2.6.1.33884 - Documentation