From 708e3c7eacb563bfe029719bc7f4c7d0c6d233b7 Mon Sep 17 00:00:00 2001 From: wangyaoguang Date: Tue, 5 Apr 2016 15:25:46 +0800 Subject: add puppet manifests and conf files for rubbos tomcat module Change-Id: Ieff7000004a3f228731f4c35a519a9634a70a702 JIRA: BOTTLENECK-53 --- .../rubbos_tomcat/files/tomcat_sl/Config.java | 68 +++++++ .../rubbos_tomcat/files/tomcat_sl/build.properties | 7 + .../rubbos_tomcat/files/tomcat_sl/build.xml | 82 +++++++++ .../rubbos_tomcat/files/tomcat_sl/mysql.properties | 17 ++ .../files/tomcat_sl/rubbos_files/Makefile | 79 ++++++++ .../files/tomcat_sl/rubbos_files/config.mk | 32 ++++ .../modules/rubbos_tomcat/files/tomcat_sl/web.xml | 199 +++++++++++++++++++++ 7 files changed, 484 insertions(+) create mode 100644 testsuites/rubbos/puppet_manifests/modules/rubbos_tomcat/files/tomcat_sl/Config.java create mode 100644 testsuites/rubbos/puppet_manifests/modules/rubbos_tomcat/files/tomcat_sl/build.properties create mode 100644 testsuites/rubbos/puppet_manifests/modules/rubbos_tomcat/files/tomcat_sl/build.xml create mode 100644 testsuites/rubbos/puppet_manifests/modules/rubbos_tomcat/files/tomcat_sl/mysql.properties create mode 100755 testsuites/rubbos/puppet_manifests/modules/rubbos_tomcat/files/tomcat_sl/rubbos_files/Makefile create mode 100644 testsuites/rubbos/puppet_manifests/modules/rubbos_tomcat/files/tomcat_sl/rubbos_files/config.mk create mode 100644 testsuites/rubbos/puppet_manifests/modules/rubbos_tomcat/files/tomcat_sl/web.xml (limited to 'testsuites/rubbos/puppet_manifests/modules/rubbos_tomcat/files/tomcat_sl') diff --git a/testsuites/rubbos/puppet_manifests/modules/rubbos_tomcat/files/tomcat_sl/Config.java b/testsuites/rubbos/puppet_manifests/modules/rubbos_tomcat/files/tomcat_sl/Config.java new file mode 100644 index 00000000..b415ba4b --- /dev/null +++ b/testsuites/rubbos/puppet_manifests/modules/rubbos_tomcat/files/tomcat_sl/Config.java @@ -0,0 +1,68 @@ + +/** + * RUBBoS: Rice University Bulletin Board System. + * Copyright (C) 2001-2004 Rice University and French National Institute For + * Research In Computer Science And Control (INRIA). + * Contact: jmob@objectweb.org + * + * This library is free software; you can redistribute it and/or modify it + * under the terms of the GNU Lesser General Public License as published by the + * Free Software Foundation; either version 2.1 of the License, or any later + * version. + * + * This library is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License + * for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this library; if not, write to the Free Software Foundation, + * Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. + * + * Initial developer(s): Emmanuel Cecchet. + * Contributor(s): ______________________. + */ + +package edu.rice.rubbos.servlets; + +/** + * This class contains the configuration for the servlets like the path of HTML + * files, etc ... + * + * @author Emmanuel Cecchet and Julie Marguerite + * @version 1.0 + */ + +public class Config +{ + + /** + * Creates a new Config instance. + */ + Config() + { + } + + + public static final String HTMLFilesPath = "REPLACED_RUBBOS_HOME/Servlet_HTML"; + public static final String DatabaseProperties = "REPLACED_RUBBOS_HOME/Servlets/mysql.properties"; + public static final int DatabasePropertiesSize = 1; + + public static final int AboutMePoolSize = 10; + public static final int BrowseCategoriesPoolSize = 6; + public static final int BrowseRegionsPoolSize = 6; + public static final int BuyNowPoolSize = 4; + public static final int PutBidPoolSize = 8; + public static final int PutCommentPoolSize = 2; + public static final int RegisterItemPoolSize = 2; + public static final int RegisterUserPoolSize = 2; + public static final int SearchItemsByCategoryPoolSize = 15; + public static final int SearchItemsByRegionPoolSize = 20; + public static final int StoreBidPoolSize = 8; + public static final int StoreBuyNowPoolSize = 4; + public static final int StoreCommentPoolSize = 2; + public static final int ViewBidHistoryPoolSize = 4; + public static final int ViewItemPoolSize = 20; + public static final int ViewUserInfoPoolSize = 4; +} diff --git a/testsuites/rubbos/puppet_manifests/modules/rubbos_tomcat/files/tomcat_sl/build.properties b/testsuites/rubbos/puppet_manifests/modules/rubbos_tomcat/files/tomcat_sl/build.properties new file mode 100644 index 00000000..5c108b45 --- /dev/null +++ b/testsuites/rubbos/puppet_manifests/modules/rubbos_tomcat/files/tomcat_sl/build.properties @@ -0,0 +1,7 @@ +src = . +dist =. +classes.dir = ./build +web.dir = ../Servlet_HTML + +j2ee = REPLACED_RUBBOS_APP_TOOLS/j2sdkee1.3.1 +mysql_connector = ./mysql-connector-java-5.1.7-bin.jar diff --git a/testsuites/rubbos/puppet_manifests/modules/rubbos_tomcat/files/tomcat_sl/build.xml b/testsuites/rubbos/puppet_manifests/modules/rubbos_tomcat/files/tomcat_sl/build.xml new file mode 100644 index 00000000..a248847e --- /dev/null +++ b/testsuites/rubbos/puppet_manifests/modules/rubbos_tomcat/files/tomcat_sl/build.xml @@ -0,0 +1,82 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + RUBBoS API]]> + Copyright © 2004 - ObjectWeb Consortium - All Rights Reserved.]]> + + + + + + + + + + + + + + + + + + + + + diff --git a/testsuites/rubbos/puppet_manifests/modules/rubbos_tomcat/files/tomcat_sl/mysql.properties b/testsuites/rubbos/puppet_manifests/modules/rubbos_tomcat/files/tomcat_sl/mysql.properties new file mode 100644 index 00000000..966cfa59 --- /dev/null +++ b/testsuites/rubbos/puppet_manifests/modules/rubbos_tomcat/files/tomcat_sl/mysql.properties @@ -0,0 +1,17 @@ +## DataSource configuration +datasource.name mysql + +#datasource.url jdbc:mysql://btnks-1:3313/rubbos +datasource.url REPLACED_MYSQL_JDBC_DB_URL +datasource.classname com.mysql.jdbc.Driver + +datasource.username REPLACED_MYSQL_USERNAME +datasource.password REPLACED_MYSQL_PASSWORD + + +## ConnectionManager configuration +jdbc.connchecklevel 1 +jdbc.connmaxage 30 +jdbc.connmaxthreads 4 +jdbc.connexcltimeout 30 +jdbc.connteststmt select 1 diff --git a/testsuites/rubbos/puppet_manifests/modules/rubbos_tomcat/files/tomcat_sl/rubbos_files/Makefile b/testsuites/rubbos/puppet_manifests/modules/rubbos_tomcat/files/tomcat_sl/rubbos_files/Makefile new file mode 100755 index 00000000..e01d4e3e --- /dev/null +++ b/testsuites/rubbos/puppet_manifests/modules/rubbos_tomcat/files/tomcat_sl/rubbos_files/Makefile @@ -0,0 +1,79 @@ + + +########################### +# RUBBoS Makefile # +########################### + +include config.mk + +############################## +# Environment variables # +############################## + +JAVA = $(JAVA_HOME)/bin/java +JAVAC = $(JAVA_HOME)/bin/javac +JAVACOPTS = -deprecation +JAVACC = $(JAVAC) $(JAVACOPTS) +RMIC = $(JAVA_HOME)/bin/rmic +RMIREGISTRY= $(JAVA_HOME)/bin/rmiregistry +CLASSPATH = .:$(J2EE_HOME)/lib/j2ee.jar:$(JAVA_HOME)/jre/lib/rt.jar +JAVADOC = $(JAVA_HOME)/javadoc + + +######################### +# Servlets version # +######################### +#ServletPrinter +Servlets = Config TimeManagement BrowseCategories Auth RegisterUser RubbosHttpServlet BrowseRegions SearchItemsByCategory SearchItemsByRegion ViewItem ViewBidHistory ViewUserInfo SellItemForm RegisterItem PutCommentAuth PutComment StoreComment BuyNowAuth BuyNow StoreBuyNow PutBidAuth PutBid StoreBid AboutMe + +all_servlets_sources = $(addprefix edu/rice/rubbos/servlets/, $(addsuffix .java, $(Servlets))) +all_servlets_obj = $(addprefix edu/rice/rubbos/servlets/, $(addsuffix .class, $(Servlets))) + +servlets: $(all_servlets_obj) + +clean_servlets: + rm -f edu/rice/rubbos/servlets/*.class + +#################### +# Client # +#################### + +ClientFiles = URLGenerator URLGeneratorPHP RUBBoSProperties Stats \ + TransitionTable ClientEmulator UserSession + +all_client_sources = $(addprefix edu/rice/rubbos/client/, $(addsuffix .java, $(ClientFiles))) +all_client_obj = $(addprefix edu/rice/rubbos/client/, $(addsuffix .class, $(ClientFiles))) edu/rice/rubbos/beans/TimeManagement.class + +client: $(all_client_obj) + +initDB: + ${JAVA} -classpath .:./database edu.rice.rubbos.client.InitDB ${PARAM} + +emulator: + ${JAVA} -classpath Client:Client/rubbos_client.jar:. -Xmx1300m -Dhttp.keepAlive=true -Dhttp.maxConnections=1000000 edu.rice.rubbos.client.ClientEmulator + +emulatorDebug: + ${JAVA} -classpath Client:Client/rubbos_client.jar:. -Xdebug -Xrunjdwp:transport=dt_socket,address=8000,server=y,suspend=n -Xmx1300m -Dhttp.keepAlive=true -Dhttp.maxConnections=1000000 edu.rice.rubbos.client.ClientEmulator + + +############################ +# Global rules # +############################ + + +all: beans ejb_servlets client javadoc flush_cache + +world: all servlets + +javadoc : + ${JAVADOC} -d ./doc/api -bootclasspath ${CLASSPATH} -version -author -windowtitle "RUBBoS API" -header "RUBBoS (C)2001 Rice University/INRIA
" edu.rice.rubbos.beans edu.rice.rubbos.beans.servlets edu.rice.rubbos.client + +clean: + rm -f core edu/rice/rubbos/beans/*.class edu/rice/rubbos/beans/JOnAS* edu/rice/rubbos/beans/servlets/*.class edu/rice/rubbos/client/*.class edu/rice/rubbos/servlets/*.class + +%.class: %.java + ${JAVACC} -classpath ${CLASSPATH} $< + +flush_cache: bench/flush_cache.c + gcc bench/flush_cache.c -o bench/flush_cache + diff --git a/testsuites/rubbos/puppet_manifests/modules/rubbos_tomcat/files/tomcat_sl/rubbos_files/config.mk b/testsuites/rubbos/puppet_manifests/modules/rubbos_tomcat/files/tomcat_sl/rubbos_files/config.mk new file mode 100644 index 00000000..9182da4d --- /dev/null +++ b/testsuites/rubbos/puppet_manifests/modules/rubbos_tomcat/files/tomcat_sl/rubbos_files/config.mk @@ -0,0 +1,32 @@ + +############################## +# Environment variables # +############################## + +JAVA = $(JAVA_HOME)/bin/java +JAVAC = $(JAVA_HOME)/bin/javac +JAVACOPTS = -deprecation +JAVACC = $(JAVAC) $(JAVACOPTS) +RMIC = $(JAVA_HOME)/bin/rmic +RMIREGISTRY= $(JAVA_HOME)/bin/rmiregistry +CLASSPATH = .:$(J2EE_HOME)/lib/j2ee.jar:$(JAVA_HOME)/jre/lib/rt.jar:$(SERVLET_API_PATH) +JAVADOC = $(JAVA_HOME)/bin/javadoc +JAR = $(JAVA_HOME)/bin/jar + +GENIC = ${JONAS_ROOT}/bin/unix/GenIC + +MAKE = gmake +CP = /bin/cp +RM = /bin/rm +MKDIR = /bin/mkdir + + +# EJB server: supported values are jonas or jboss +EJB_SERVER = jonas + +# DB server: supported values are MySQL or PostgreSQL +DB_SERVER = MySQL + +%.class: %.java + ${JAVACC} -classpath ${CLASSPATH} $< + diff --git a/testsuites/rubbos/puppet_manifests/modules/rubbos_tomcat/files/tomcat_sl/web.xml b/testsuites/rubbos/puppet_manifests/modules/rubbos_tomcat/files/tomcat_sl/web.xml new file mode 100644 index 00000000..a937286a --- /dev/null +++ b/testsuites/rubbos/puppet_manifests/modules/rubbos_tomcat/files/tomcat_sl/web.xml @@ -0,0 +1,199 @@ + + + + + + + + RUBBos + Rice University Bulletin Board System + + + BrowseCategories + edu.rice.rubbos.servlets.BrowseCategories + + + + BrowseStoriesByCategory + edu.rice.rubbos.servlets.BrowseStoriesByCategory + + + + ViewComment + edu.rice.rubbos.servlets.ViewComment + + + + ModerateComment + edu.rice.rubbos.servlets.ModerateComment + + + + PostComment + edu.rice.rubbos.servlets.PostComment + + + + StoreComment + edu.rice.rubbos.servlets.StoreComment + + + + SubmitStory + edu.rice.rubbos.servlets.SubmitStory + + + + AcceptStory + edu.rice.rubbos.servlets.AcceptStory + + + + RejectStory + edu.rice.rubbos.servlets.RejectStory + + + + ReviewStories + edu.rice.rubbos.servlets.ReviewStories + + + + StoreStory + edu.rice.rubbos.servlets.StoreStory + + + + ViewStory + edu.rice.rubbos.servlets.ViewStory + + + + StoriesOfTheDay + edu.rice.rubbos.servlets.StoriesOfTheDay + + + + Search + edu.rice.rubbos.servlets.Search + + + + StoreModeratorLog + edu.rice.rubbos.servlets.StoreModeratorLog + + + + RegisterUser + edu.rice.rubbos.servlets.RegisterUser + + + + Author + edu.rice.rubbos.servlets.Author + + + + OlderStories + edu.rice.rubbos.servlets.OlderStories + + + + + BrowseCategories + /servlet/edu.rice.rubbos.servlets.BrowseCategories + + + + BrowseStoriesByCategory + /servlet/edu.rice.rubbos.servlets.BrowseStoriesByCategory + + + + ViewComment + /servlet/edu.rice.rubbos.servlets.ViewComment + + + + ModerateComment + /servlet/edu.rice.rubbos.servlets.ModerateComment + + + + PostComment + /servlet/edu.rice.rubbos.servlets.PostComment + + + + StoreComment + /servlet/edu.rice.rubbos.servlets.StoreComment + + + + SubmitStory + /servlet/edu.rice.rubbos.servlets.SubmitStory + + + + AcceptStory + /servlet/edu.rice.rubbos.servlets.AcceptStory + + + + RejectStory + /servlet/edu.rice.rubbos.servlets.RejectStory + + + + ReviewStories + /servlet/edu.rice.rubbos.servlets.ReviewStories + + + + StoreStory + /servlet/edu.rice.rubbos.servlets.StoreStory + + + + ViewStory + /servlet/edu.rice.rubbos.servlets.ViewStory + + + + StoriesOfTheDay + /servlet/edu.rice.rubbos.servlets.StoriesOfTheDay + + + + + Search + /servlet/edu.rice.rubbos.servlets.Search + + + + StoreModeratorLog + /servlet/edu.rice.rubbos.servlets.StoreModeratorLog + + + + RegisterUser + /servlet/edu.rice.rubbos.servlets.RegisterUser + + + + Author + /servlet/edu.rice.rubbos.servlets.Author + + + + OlderStories + /servlet/edu.rice.rubbos.servlets.OlderStories + + + + 30 + + + -- cgit 1.2.3-korg