You are viewing a plain text version of this content. The canonical link for it is here.
Posted to olio-commits@incubator.apache.org by kl...@apache.org on 2009/12/02 07:00:19 UTC

svn commit: r886062 - in /incubator/olio: docs/java_setup.html docs/java_setup_kit.html webapp/java/trunk/etc/config_glassfish.sh

Author: klichong
Date: Wed Dec  2 07:00:14 2009
New Revision: 886062

URL: http://svn.apache.org/viewvc?rev=886062&view=rev
Log:
adding sample CLI script to configure GlassFish, and modified docs to reflect the presence of such script.

Added:
    incubator/olio/webapp/java/trunk/etc/config_glassfish.sh
Modified:
    incubator/olio/docs/java_setup.html
    incubator/olio/docs/java_setup_kit.html

Modified: incubator/olio/docs/java_setup.html
URL: http://svn.apache.org/viewvc/incubator/olio/docs/java_setup.html?rev=886062&r1=886061&r2=886062&view=diff
==============================================================================
--- incubator/olio/docs/java_setup.html (original)
+++ incubator/olio/docs/java_setup.html Wed Dec  2 07:00:14 2009
@@ -438,7 +438,7 @@
 <ol>
   <li>Java EE compliant application server (eg. <a
  href="https://glassfish.dev.java.net/public/downloadsindex.html">GlassFish
-v2.1</a>)</li>
+v2.1.1</a>)</li>
   <li>JPA provider &nbsp;( eg. <a
  href="http://www.eclipse.org/eclipselink/">Eclipselink</a>)</li>
 </ol>
@@ -449,7 +449,7 @@
 Installation and Configuration</font></h2>
 <ol>
   <li>
-    <p>Install Glassfish application server V2.1 from <a
+    <p>Install Glassfish application server V2.1.1 from <a
  href="https://glassfish.dev.java.net/public/downloadsindex.html"><span
  style="text-decoration: underline;">https://glassfish.dev.java.net/public/downloadsindex.html.</span></a>
     <br>
@@ -473,7 +473,17 @@
 and &nbsp;put this in $GLASSFISH_HOME/lib directory.<br>
   </li>
   <br>
-  <li>Instructions on how to use the Glassfish admin
+  <li>For ease of use, a sample script, config_glassfish.sh, is
+provided in the $WEBAPP/etc directory.&nbsp; You can use this CLI
+script to create the JDBC pool and resources as well as configure basic
+JVM environment variables necessary to run the application in the event
+you do not want to edit the web.xml.&nbsp; Please look at the script
+carefully before running it since you have to modify the values to fit
+your setup.<br>
+    <br>
+  </li>
+  <li>You may also use the admin interface to configure
+GlassFish.&nbsp; Instructions on how to use the Glassfish admin
 interface is <a
  href="https://glassfish.dev.java.net/javaee5/admin-gui/admin-gui.html#Usage">https://glassfish.dev.java.net/javaee5/admin-gui/admin-gui.html#Usage</a>.
 &nbsp;To edit the classpath prefix, please consult&nbsp; <a

Modified: incubator/olio/docs/java_setup_kit.html
URL: http://svn.apache.org/viewvc/incubator/olio/docs/java_setup_kit.html?rev=886062&r1=886061&r2=886062&view=diff
==============================================================================
--- incubator/olio/docs/java_setup_kit.html (original)
+++ incubator/olio/docs/java_setup_kit.html Wed Dec  2 07:00:14 2009
@@ -423,7 +423,7 @@
 <ol>
   <li>Java EE compliant application server (eg. <a
  href="https://glassfish.dev.java.net/public/downloadsindex.html">GlassFish
-v2.1</a>)</li>
+v2.1.1</a>)</li>
   <li>JPA provider &nbsp;( eg. <a
  href="http://www.eclipse.org/eclipselink/">Eclipselink</a>)</li>
 </ol>
@@ -434,7 +434,7 @@
 Installation and Configuration</font></h2>
 <ol>
   <li>
-    <p>Install Glassfish application server V2.1 from <a
+    <p>Install Glassfish application server V2.1.1 from <a
  href="https://glassfish.dev.java.net/public/downloadsindex.html"><span
  style="text-decoration: underline;">https://glassfish.dev.java.net/public/downloadsindex.html.</span></a>
     <br>
@@ -451,13 +451,24 @@
   </li>
   <li>The benchmark utilizes JPA (Java Persistence API) and has been
 benchmarked
-with the EclipseLink implementation. &nbsp;GlassFish v2
+with the EclipseLink implementation. &nbsp;GlassFish v2.1.1
 uses TopLink as the default JPA implementation so you will have to <a
  href="http://www.eclipse.org/eclipselink/downloads/previous_releases.php">download</a>
 the eclipselink.jar,
 and &nbsp;put this in $GLASSFISH_HOME/lib directory. An issue was found
 with the latest EclipseLink (1.1.2), so you will need to
-get EclipseLink 1.1.0. </li>
+get EclipseLink 1.1.0.<br>
+    <br>
+  </li>
+  <li>For ease of use, a sample script, config_glassfish.sh, is
+provided in
+the $WEBAPP/etc directory.&nbsp; You can use this CLI script to create
+the
+JDBC pool and resources as well as configure basic JVM environment
+variables necessary to run the application in the event you do not want
+to edit the web.xml.&nbsp; Please look at the script carefully before
+running it since you have to modify the values to fit your setup.<br>
+  </li>
   <br>
   <li>Instructions on how to use the Glassfish admin
 interface is <a

Added: incubator/olio/webapp/java/trunk/etc/config_glassfish.sh
URL: http://svn.apache.org/viewvc/incubator/olio/webapp/java/trunk/etc/config_glassfish.sh?rev=886062&view=auto
==============================================================================
--- incubator/olio/webapp/java/trunk/etc/config_glassfish.sh (added)
+++ incubator/olio/webapp/java/trunk/etc/config_glassfish.sh Wed Dec  2 07:00:14 2009
@@ -0,0 +1,44 @@
+#!/bin/sh
+#
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+#
+########
+##Sample CLI script for GlassFish configuration for JDBC pool and resource and basic JVM options
+##You must edit the appropriate values for your setup.
+##It assumes that you are executing this script on the machine with your GlassFish instance,
+##although it can be modified to be executed remotely assuming you have the asadmin binary somewhere on your local machine.
+########
+# Edit GLASSFISH_HOME to point to your installation of GlassFish
+GLASSFISH_HOME=/disk_array/web20perf/java/glassfishv2_1_1/glassfish
+########
+##Create JDBC connection pool and resource
+# Edit URL property and ServerName property to point to your machine with the mySQL database installation
+# Pool properties are passed in the form of name:value, hence need an escape character for the ":" character for the URL property.
+# i.e. --property User=olio:Password=olio:name:value:name2:value2 etc.
+# This script assumes default ports with typical installation.
+#######
+$GLASSFISH_HOME/bin/asadmin create-jdbc-connection-pool --datasourceclassname com.mysql.jdbc.jdbc2.optional.MysqlDataSource --host localhost --port 4848 --user admin --property DatabaseName=bpwebapp:User=olio:Password=olio:URL="jdbc\:mysql\://jes-x4100-6\:3306/bpwebapp:ServerName=jes-x4100-6:port=3306" --restype javax.sql.DataSource BPwebappPool
+$GLASSFISH_HOME/bin/asadmin create-jdbc-resource --connectionpoolid BPwebappPool --host localhost --port 4848 --user admin jdbc/BPWebappDB
+## Create JVM options
+# Edit image directory property to point to your filestore i.e. where you have loaded the images
+$GLASSFISH_HOME/bin/asadmin create-jvm-options --host localhost --port 4848 --user admin "-Dwebapp.image.directory=/Users/klichong/downloads/filestore"
+# Edit geocode property to point to your deployment of the geocoder
+$GLASSFISH_HOME/bin/asadmin create-jvm-options --host localhost --port 4848 --user admin "-DgeocoderURL=http\://jes-x4600-1\:8080/Web20Emulator/geocode"
+#####
+# Example asadmin delete-jvm-options command in case of typographical errors:
+# asadmin delete-jvm-options --host localhost --port 4848 --user admin -DcacheOlio=false