Manorrock.com / Products / Manorrock Online

Installation

Installing the Manorrock Online Application consists of the following steps below. Note since this is the base application make sure everything works well before you continue on to install other Online applications.

  • Install the database server.
  • Create the database.
  • Run SQL script.
  • Install the application server.
  • Create the JDBC connection pool (pool/online).
  • Create the JDBC resource (jdbc/online).
  • Setup the security realm (online).
  • Deploy the application to your application server.
  • Verify the deploy.

Install the database server

The current version of the Manorrock Online application require you to create and use a PostgreSQL database.

  • Install the PostgreSQL server.
  • Make sure the server is accessible using a TCP/IP port (generally 5432).
  • Verify connectivity to your server using pgAdmin III.

    Note if you cannot use pgAdmin to connect to your server you will need to make sure the server is listening on port 5432. See the PostgreSQL documentation for more information.

Create the database

  • Install your PostgreSQL server (if not already installed, see previous step).
  • Start the PostgreSQL administration application (pgAdmin III).
  • Connect to your PostgreSQL server.
  • Create a login role.
  • Create the database, make the owner the login role you created in the previous step.

Run the SQL script

  • Unzip the Online WAR file to a temporary directory.
  • Start the PostgreSQL administration application (pgAdmin III).
  • Connect to your PostgreSQL server
  • Click on the online database.
  • Click the SQL icon.
  • Click on File | Open.
  • Browse to $WAR_ROOT/WEB-INF/sql/postgres and select the latest SQL script.
  • Click the little green arrow pointing right (Execute Query).

    Note $WAR_ROOT means the location where you unzipped your WAR file.

Install the application server

  • Go to http://glassfish.java.net/.
  • Download the Glassfish Server.
  • Follow the directions in the Installation Guide, see http://glassfish.java.net/docs/3.1.1/installation-guide.pdf

Create the JDBC connection pool

  • Login into the admin console of your application server (http://localhost:4884)
  • Click on JDBC
  • Click on JDBC Connection Pools
  • Click New
  • Enter pool/online for the Pool Name.
  • Select javax.sql.ConnectionPoolDataSource for the Resource Type.
  • Select Postgresql for the Database Driver Vendor.
  • Click Next
  • Enable Ping.
  • Fill in the following properties
    • User - the user you created as owner of the database (online).
    • Password - the password you created for the owner.
    • DatabaseName - the name of the database you created (online).
    • ServerName - the server the DB is hosted on (localhost).
    • PortNumber - the port the DB is hosted on (5432).
  • Click Finish

    Note if you are getting an error that states it cannot find the class name then you need to copy the PostgreSQL JDBC driver into the domain-dir/lib/ext directory (usually domain1/lib/ext) and restart the Glassfish server.

Create the JDBC resource

  • Login into the admin console of your application server (http://localhost:4884)
  • Click on JDBC
  • Click on JDBC Resources
  • Click New
  • Enter jdbc/online for the JNDI Name.
  • Select pool/online for the Pool Name.
  • Click OK.

Setup the security realm

  • Login into the admin console of your application server (http://localhost:4884)
  • Expand server-config.
  • Expand on Security.
  • Click on Realms.
  • Click New.
  • Enter online for the Name.
  • Select com.sun.enterprise.auth.realm.jdbc.JDBCRealm for the Class Name.
  • Fill in the following in the table.
    • JAASContext: JDBCRealm
    • JNDName: jdbc/online
    • User Table: users
    • User Name Column: username
    • Password Column: pwd
    • Group Table: groups
    • Group Name Column: groupname
    • Digest Algorithm: SHA-256
  • Click OK.

Deploy the application

  • Login into the admin console of your application server (http://localhost:4884)
  • Click on Applications.
  • Click Deploy (if you are redeploying the application see Redeploying).
  • Click Choose File.
  • Select the WAR file and click Open.
  • Set the context root to /online
  • Click OK.

Verify the deploy

  • Browse to http://localhost:8080/online
  • Click on Login.
  • Enter demo as username.
  • Enter demo as password.
  • Click Login.
  • Be happy (meaning you successfully logged in), or go back over each step and figure out what went wrong.