View Source

{toc:type=flat|maxLevel=2}


h2. Database

On your mysql database instance, create a new database and a user:


bash: mysql \-u root \-p
mysql> CREATE DATABASE ceq CHARACTER SET utf8 COLLATE utf8_general_ci;
mysql> CREATE USER 'ceq'@'localhost' IDENTIFIED BY '$ceq';
mysql> GRANT ALL PRIVILEGES ON ceq.\* TO 'ceq'@'localhost';
mysql> FLUSH PRIVILEGES;
mysql> exit




h2. Application Server

1. We are using Glassfish 2.1. Download from [https://glassfish.dev.java.net/downloads/v2.1-b60e.html] and follow the setup instructions on that page.
{noformat}
Note: Please check asenv.conf if AS_JAVA="/System/Library/Frameworks/JavaVM.framework/Versions/1.6.0/Home" is set to Java 1.6.x

{noformat}
2. After setup is complete, install the JDBC driver for MySQL. Download the driver from [http://dev.mysql.com/downloads/connector/j/5.1.html] and copy it to <glassfish-root>/domains/domain1/lib/ext - assuming that you intend to use domain1 as your development domain.

3. Log in to the admin console. The console is normally running on port 4848, i.e. [http://localhost:4848]. The default user is admin with a password of adminadmin.

3.1 Under Resources, add a new JDBC Connection Pool for MySQL. The name of the connection pool is arbitrary, for example, you can name it ceqm for CEQ-MySQL. Chosse a resource type of javax.sql.datasource, accept the default settings and provide information on the connection URL, database name, user name and password for your MySQL database, so the updated resources are:
* Url (like: jdbc:mysql://localhost:3306/ceq?useUnicode=true&characterEncoding=UTF-8)
* User (like: ceq)
* Password (like: $ceq)

3.2 Ping the database to test if the connection pool has been set up correctly.

3.3 Create a new JDBC Ressource named jdbc/ceq using the connection pool you have defined in the previous step.

3.4 Create JNDI CEQ Config Resource

{tip} just use the default configuration {tip}
{include:JNDI Configuration}


h2. Download/Install CeQ Application

# Download the Community Equity ear [file |http://kenai.com/projects/community-equity/downloads/download/ceq_1.1.ear]
# unzip file

# Deploy the ceq EAR project onto the configured application server.
# Start the application server
# Create database schema
## Download database initialization [script|http://kenai.com/projects/community-equity/downloads/download/mysql_5.sql] for MySQL 5
## bash: mysql \-u ceq \-p <passwd> <../mysql_5.sql
# launch the overview page&nbsp; [http://localhost:8080/ceq-docs|http://localhost:8080/ceq-docs]
# Create demo data by clicking on the menu item under the *Testing* menu

h2. Launch the Community Equity application

# following the instruction on the overview page

The individuals who post here are part of the extended Sun Microsystems community and they might not be employed or in any way formally affiliated with Sun Microsystems. The opinions expressed here are their own, are not necessarily reviewed in advance by anyone but the individual authors, and neither Sun nor any other party necessarily agrees with them.

Copyright 1994-2009 Sun Microsystems, Inc.
Powered by Atlassian Confluence
Sun Guidelines on Public Discourse Privacy Policy Terms of Use Trademarks Site Map Employment Investor Relations Contact