Skip to content

Commit

Permalink
Merge pull request #178 from SeqWare/feature/java_7_tomcat_7
Browse files Browse the repository at this point in the history
Attempt target and source as 1.7

Former-commit-id: aecb10b
  • Loading branch information
denis-yuen committed Feb 18, 2014
2 parents 4376781 + 5e4214d commit a23ad0c
Show file tree
Hide file tree
Showing 7 changed files with 19 additions and 19 deletions.
14 changes: 7 additions & 7 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -199,8 +199,8 @@
</dependency>
<dependency>
<groupId>org.apache.tomcat</groupId>
<artifactId>dbcp</artifactId>
<version>6.0.29</version>
<artifactId>tomcat-dbcp</artifactId>
<version>7.0.50</version>
</dependency>
<!-- while moving to HubFlow, the combination of HubFlow and maven:prepare is causing problems.
release:update-versions seems to have an easier time with versions defined here -->
Expand Down Expand Up @@ -620,8 +620,8 @@

<plugin>
<groupId>org.apache.tomcat.maven</groupId>
<artifactId>tomcat6-maven-plugin</artifactId>
<version>2.1</version>
<artifactId>tomcat7-maven-plugin</artifactId>
<version>2.2</version>
<configuration>
<port>8889</port>
<useNaming>true</useNaming>
Expand Down Expand Up @@ -660,8 +660,8 @@
<artifactId>maven-compiler-plugin</artifactId>
<version>${maven-compiler-plugin.version}</version>
<configuration>
<source>1.6</source>
<target>1.6</target>
<source>1.7</source>
<target>1.7</target>
<showDeprecation>true</showDeprecation>
<!-- added forkMode, the full GitHub mvn compile seems to blow up with an OutOfMemoryError -->
<!-- Moved forkMode setting to Properties section, so it can be overriden on command line -->
Expand Down Expand Up @@ -703,7 +703,7 @@
<artifactId>maven-pmd-plugin</artifactId>
<version>${maven-pmd-plugin.version}</version>
<configuration>
<targetJdk>1.6</targetJdk>
<targetJdk>1.7</targetJdk>
</configuration>
</plugin>
<plugin>
Expand Down
4 changes: 2 additions & 2 deletions seqware-admin-webservice/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -170,8 +170,8 @@
<artifactId>maven-compiler-plugin</artifactId>
<version>2.3.2</version>
<configuration>
<source>1.6</source>
<target>1.6</target>
<source>1.7</source>
<target>1.7</target>
<compilerArguments>
<endorseddirs>${endorsed.dir}</endorseddirs>
</compilerArguments>
Expand Down
2 changes: 1 addition & 1 deletion seqware-common/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -299,7 +299,7 @@
</dependency>
<dependency>
<groupId>org.apache.tomcat</groupId>
<artifactId>dbcp</artifactId>
<artifactId>tomcat-dbcp</artifactId>
</dependency>
<dependency>
<groupId>commons-dbutils</groupId>
Expand Down
2 changes: 1 addition & 1 deletion seqware-ext-testing/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@
<plugins>
<plugin>
<groupId>org.apache.tomcat.maven</groupId>
<artifactId>tomcat6-maven-plugin</artifactId>
<artifactId>tomcat7-maven-plugin</artifactId>
<configuration>
<contextFile>../seqware-webservice/target/seqware-webservice-${project.version}/META-INF/context.xml</contextFile>
<webapps>
Expand Down
12 changes: 6 additions & 6 deletions seqware-webservice/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ If you've setup your seqware user with createdb privileges and the plpgsql langu

If you want to startup the Tomcat server for interactive testing you can simply do:

mvn tomcat6:run
mvn tomcat7:run

You will need to make sure that your ~/.seqware/settings file includes the line

Expand All @@ -49,23 +49,23 @@ Three variables need to be changed in each file to reflect your local setup:
The url, username and password need to be changed to reflect the local database. ''The username and password are the PostgreSQL database username and password.''

## Installation
In order to deploy the Web service into Tomcat, drop the WAR from seqware-webservice/target into the webapps directory, and the XML into TOMCAT_HOME/conf/Catalina/localhost (maps to /etc/tomcat6/Catalina/localhost/ on many Linux distributions). On the SeqWare VM, these directories are /var/lib/tomcat6/webapps and /etc/tomcat6/Catalina/localhost.
In order to deploy the Web service into Tomcat, drop the WAR from seqware-webservice/target into the webapps directory, and the XML into TOMCAT_HOME/conf/Catalina/localhost (maps to /etc/tomcat7/Catalina/localhost/ on many Linux distributions). On the SeqWare VM, these directories are /var/lib/tomcat7/webapps and /etc/tomcat7/Catalina/localhost.

SeqWare WebService consumes quite a bit of memory, so configure your Tomcat instance with the following attributes:

JAVA_OPTS= -server -Xss1024K -Xms1G -Xmx2G -XX:MaxPermSize=128M -XX:NewSize=512m

This environment variable should either be set on your command line or in the conf/tomcat6.conf file, depending on your setup. On our production machines, these memory values are all doubled.
This environment variable should either be set on your command line or in the conf/tomcat7.conf file, depending on your setup. On our production machines, these memory values are all doubled.

Restart Tomcat with <tt>bin/shutdown.sh;bin/startup.sh</tt> (<tt>/etc/init.d/tomcat6 restart</tt> for Tomcat 6).
Restart Tomcat with <tt>bin/shutdown.sh;bin/startup.sh</tt> (<tt>/etc/init.d/tomcat7 restart</tt> for Tomcat 7).

You can double-check whether this setting was successfully set by going to http://localhost:8080/manager/status/all and checking the JVM section. You may need to edit your <tt>/etc/tomcat6/tomcat-users.xml</tt> file and add/enable the following lines in order to enable access to the tomcat manager
You can double-check whether this setting was successfully set by going to http://localhost:8080/manager/status/all and checking the JVM section. You may need to edit your <tt>/etc/tomcat7/tomcat-users.xml</tt> file and add/enable the following lines in order to enable access to the tomcat manager

<role rolename="manager"/>
<role rolename="admin"/>
<user username="admin" password="admin" roles="admin,manager"/>

In some cases, tomcat will ignore configuring the JAVA_OPTS either on command line or in the /etc/init.d/tomcat6 . In these cases, you can try adding a setenv.sh file with the single line
In some cases, tomcat will ignore configuring the JAVA_OPTS either on command line or in the /etc/init.d/tomcat7 . In these cases, you can try adding a setenv.sh file with the single line

export JAVA_OPTS="-server -Xss1024K -Xms1G -Xmx2G -XX:MaxPermSize=128M -XX:NewSize=512m"

Expand Down
2 changes: 1 addition & 1 deletion seqware-webservice/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -522,7 +522,7 @@
<plugins>
<plugin>
<groupId>org.apache.tomcat.maven</groupId>
<artifactId>tomcat6-maven-plugin</artifactId>
<artifactId>tomcat7-maven-plugin</artifactId>
<configuration>
<contextFile>target/seqware-webservice-${project.version}/META-INF/context.xml</contextFile>
<useNaming>true</useNaming>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ public void testDelete() {
rep.exhaust();
rep.release();
} catch (Exception e) {
Assert.fail(e.getMessage());
/** expect an error on the first try */
}
}
}

0 comments on commit a23ad0c

Please sign in to comment.