-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit fcabf81
Showing
10 changed files
with
525 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
# ignore .svn metadata files | ||
.svn | ||
# ignore Maven generated target folders | ||
~ | ||
target*/ | ||
# ignore eclipse files | ||
.project | ||
.classpath | ||
.settings | ||
.metadata | ||
.checkstyle | ||
# ignore IDEA files | ||
*.iml | ||
*.ipr | ||
*.iws | ||
.idea | ||
# ignore NetBeans files | ||
nbactions.xml | ||
nb-configuration.xml | ||
catalog.xml | ||
# | ||
maven-ant-tasks.jar | ||
test-output | ||
# vim files | ||
*.swp | ||
/.gitk-tmp.* | ||
atlassian-ide-plugin.xml | ||
# temp files | ||
*~ | ||
# maven versions plugin | ||
pom.xml.versionsBackup | ||
# hprof dumps | ||
/*.hprof | ||
# ignore 'randomly' strewn around logs | ||
*.log | ||
# ignore java crashes | ||
hs_err_pid* | ||
# H2 databases produced by tests | ||
*.h2.db | ||
# JBoss transaction generated files | ||
PutObjectStoreDirHere | ||
CosServices.cfg | ||
ObjectStore | ||
# ignore mvn-rpmbuild repo | ||
/.m2 | ||
# ignore default (empty) properties file which defines connections to databases | ||
ds.properties | ||
# ignore btm script defined by each user by himself | ||
global.script.btm |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,275 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> | ||
<modelVersion>4.0.0</modelVersion> | ||
|
||
<groupId>com.redhat.xpaas.eap.deployments</groupId> | ||
<artifactId>parent-eap</artifactId> | ||
<version>1.0.0-SNAPSHOT</version> | ||
<packaging>pom</packaging> | ||
<name>Parent for CE EAP Test applications</name> | ||
|
||
<properties> | ||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> | ||
<version.war.plugin>2.1.1</version.war.plugin> | ||
<version.rar.plugin>2.4</version.rar.plugin> | ||
<version.surefire.plugin>2.10</version.surefire.plugin> | ||
<maven.compiler.target>1.8</maven.compiler.target> | ||
<maven.compiler.source>1.8</maven.compiler.source> | ||
<version.plugin.ejb>2.5.1</version.plugin.ejb> | ||
<version.plugin.ear>2.10.1</version.plugin.ear> | ||
<version.plugin.surefire>2.19.1</version.plugin.surefire> | ||
<version.plugin.compiler>3.3</version.plugin.compiler> | ||
<version.plugin.dependency>2.10</version.plugin.dependency> | ||
<version.org.jboss.byteman>3.0.4</version.org.jboss.byteman> | ||
<jaxrs.scope>provided</jaxrs.scope> | ||
</properties> | ||
|
||
<repositories> | ||
<repository> | ||
<id>jboss.ea</id> | ||
<name>JBoss Community Early Access Release Repository</name> | ||
<url>http://origin-repository.jboss.org/nexus/content/groups/ea</url> | ||
<releases> | ||
<enabled>true</enabled> | ||
</releases> | ||
<snapshots> | ||
<enabled>false</enabled> | ||
</snapshots> | ||
</repository> | ||
|
||
<repository> | ||
<id>jboss-earlyaccess-repository</id> | ||
<name>JBoss EA repository group</name> | ||
<url>http://maven.repository.redhat.com/earlyaccess/all</url> | ||
<snapshots> | ||
<enabled>true</enabled> | ||
</snapshots> | ||
<releases> | ||
<enabled>true</enabled> | ||
</releases> | ||
</repository> | ||
|
||
<repository> | ||
<id>jboss-ga-repository</id> | ||
<name>JBoss GA repository group</name> | ||
<url>http://maven.repository.redhat.com/techpreview/all</url> | ||
<snapshots> | ||
<enabled>true</enabled> | ||
</snapshots> | ||
<releases> | ||
<enabled>true</enabled> | ||
</releases> | ||
</repository> | ||
|
||
<repository> | ||
<id>jboss-qa-releases</id> | ||
<name>JBoss QA releases</name> | ||
<url>http://repository.engineering.redhat.com/nexus/content/repositories/jboss-qa-releases/</url> | ||
<snapshots> | ||
<enabled>false</enabled> | ||
</snapshots> | ||
<releases> | ||
<enabled>true</enabled> | ||
</releases> | ||
</repository> | ||
</repositories> | ||
|
||
|
||
<profiles> | ||
<profile> | ||
<id>eap-6</id> | ||
<activation> | ||
<activeByDefault>false</activeByDefault> | ||
</activation> | ||
<properties> | ||
<spec.version.ejb>3.1</spec.version.ejb> | ||
<version.jboss.bom.eap>6.4.4.GA</version.jboss.bom.eap> | ||
<version.jboss.as>7.5.0.Final-redhat-21</version.jboss.as> | ||
</properties> | ||
<dependencyManagement> | ||
<dependencies> | ||
<dependency> | ||
<groupId>org.jboss.bom.eap</groupId> | ||
<artifactId>jboss-javaee-6.0-with-tools</artifactId> | ||
<version>${version.jboss.bom.eap}</version> | ||
<type>pom</type> | ||
<scope>import</scope> | ||
</dependency> | ||
<dependency> | ||
<groupId>org.jboss.as</groupId> | ||
<artifactId>jboss-as-ejb-client-bom</artifactId> | ||
<version>${version.jboss.as}</version> | ||
<scope>import</scope> | ||
<type>pom</type> | ||
</dependency> | ||
<dependency> | ||
<groupId>org.mongodb</groupId> | ||
<artifactId>mongo-java-driver</artifactId> | ||
<version>3.2.1</version> | ||
</dependency> | ||
</dependencies> | ||
</dependencyManagement> | ||
|
||
<dependencies> | ||
<dependency> | ||
<groupId>javax.enterprise</groupId> | ||
<artifactId>cdi-api</artifactId> | ||
<scope>provided</scope> | ||
</dependency> | ||
<dependency> | ||
<groupId>org.jboss.spec.javax.servlet</groupId> | ||
<artifactId>jboss-servlet-api_3.0_spec</artifactId> | ||
<scope>provided</scope> | ||
</dependency> | ||
<dependency> | ||
<groupId>org.jboss.spec.javax.annotation</groupId> | ||
<artifactId>jboss-annotations-api_1.1_spec</artifactId> | ||
<scope>provided</scope> | ||
</dependency> | ||
<dependency> | ||
<groupId>org.hibernate.javax.persistence</groupId> | ||
<artifactId>hibernate-jpa-2.0-api</artifactId> | ||
<scope>provided</scope> | ||
</dependency> | ||
<dependency> | ||
<groupId>org.jboss.spec.javax.ws.rs</groupId> | ||
<artifactId>jboss-jaxrs-api_1.1_spec</artifactId> | ||
<scope>${jaxrs.scope}</scope> | ||
</dependency> | ||
<dependency> | ||
<groupId>org.jboss.spec.javax.transaction</groupId> | ||
<artifactId>jboss-transaction-api_1.1_spec</artifactId> | ||
<scope>provided</scope> | ||
</dependency> | ||
<dependency> | ||
<groupId>org.jboss.spec.javax.ejb</groupId> | ||
<artifactId>jboss-ejb-api_3.1_spec</artifactId> | ||
<scope>provided</scope> | ||
</dependency> | ||
<dependency> | ||
<groupId>org.jboss.spec.javax.jms</groupId> | ||
<artifactId>jboss-jms-api_1.1_spec</artifactId> | ||
<scope>provided</scope> | ||
</dependency> | ||
<dependency> | ||
<groupId>org.jboss.spec.javax.faces</groupId> | ||
<artifactId>jboss-jsf-api_2.1_spec</artifactId> | ||
<scope>provided</scope> | ||
</dependency> | ||
<dependency> | ||
<groupId>org.jboss.spec.javax.resource</groupId> | ||
<artifactId>jboss-connector-api_1.6_spec</artifactId> | ||
<scope>provided</scope> | ||
</dependency> | ||
<dependency> | ||
<groupId>org.jboss.msc</groupId> | ||
<artifactId>jboss-msc</artifactId> | ||
<scope>provided</scope> | ||
</dependency> | ||
<dependency> | ||
<groupId>org.jboss.as</groupId> | ||
<artifactId>jboss-as-clustering-singleton</artifactId> | ||
<scope>provided</scope> | ||
</dependency> | ||
<dependency> | ||
<groupId>org.jboss.spec.javax.websocket</groupId> | ||
<artifactId>jboss-websocket-api_1.0_spec</artifactId> | ||
<version>1.0.0.Final</version> | ||
<scope>provided</scope> | ||
</dependency> | ||
</dependencies> | ||
</profile> | ||
<profile> | ||
<id>eap-7</id> | ||
<activation> | ||
<activeByDefault>true</activeByDefault> | ||
</activation> | ||
<properties> | ||
<version.jboss.bom.eap>7.0.0.GA</version.jboss.bom.eap> | ||
<version.jboss.as.cli>7.5.0.Final-redhat-17</version.jboss.as.cli> | ||
</properties> | ||
|
||
<dependencyManagement> | ||
<dependencies> | ||
<dependency> | ||
<groupId>org.jboss.bom</groupId> | ||
<artifactId>jboss-eap-javaee7</artifactId> | ||
<version>${version.jboss.bom.eap}</version> | ||
<type>pom</type> | ||
<scope>import</scope> | ||
</dependency> | ||
<dependency> | ||
<groupId>org.mongodb</groupId> | ||
<artifactId>mongo-java-driver</artifactId> | ||
<version>3.2.1</version> | ||
</dependency> | ||
</dependencies> | ||
</dependencyManagement> | ||
|
||
<dependencies> | ||
<dependency> | ||
<groupId>javax.enterprise</groupId> | ||
<artifactId>cdi-api</artifactId> | ||
<scope>provided</scope> | ||
</dependency> | ||
<dependency> | ||
<groupId>org.jboss.spec.javax.servlet</groupId> | ||
<artifactId>jboss-servlet-api_3.1_spec</artifactId> | ||
<scope>provided</scope> | ||
</dependency> | ||
<dependency> | ||
<groupId>org.jboss.spec.javax.annotation</groupId> | ||
<artifactId>jboss-annotations-api_1.2_spec</artifactId> | ||
<scope>provided</scope> | ||
</dependency> | ||
<dependency> | ||
<groupId>org.hibernate.javax.persistence</groupId> | ||
<artifactId>hibernate-jpa-2.1-api</artifactId> | ||
<scope>provided</scope> | ||
</dependency> | ||
<dependency> | ||
<groupId>org.jboss.spec.javax.ws.rs</groupId> | ||
<artifactId>jboss-jaxrs-api_2.0_spec</artifactId> | ||
<scope>provided</scope> | ||
</dependency> | ||
<dependency> | ||
<groupId>org.jboss.spec.javax.transaction</groupId> | ||
<artifactId>jboss-transaction-api_1.2_spec</artifactId> | ||
<scope>provided</scope> | ||
</dependency> | ||
<dependency> | ||
<groupId>org.jboss.spec.javax.ejb</groupId> | ||
<artifactId>jboss-ejb-api_3.2_spec</artifactId> | ||
<scope>provided</scope> | ||
</dependency> | ||
<dependency> | ||
<groupId>org.jboss.spec.javax.jms</groupId> | ||
<artifactId>jboss-jms-api_2.0_spec</artifactId> | ||
<scope>provided</scope> | ||
</dependency> | ||
<dependency> | ||
<groupId>org.jboss.spec.javax.resource</groupId> | ||
<artifactId>jboss-connector-api_1.7_spec</artifactId> | ||
<scope>provided</scope> | ||
</dependency> | ||
<dependency> | ||
<groupId>org.jboss.logging</groupId> | ||
<artifactId>jboss-logging</artifactId> | ||
<scope>provided</scope> | ||
</dependency> | ||
<dependency> | ||
<groupId>org.jboss.eap</groupId> | ||
<artifactId>wildfly-clustering-singleton-api</artifactId> | ||
<scope>provided</scope> | ||
</dependency> | ||
<dependency> | ||
<groupId>org.jboss.spec.javax.websocket</groupId> | ||
<artifactId>jboss-websocket-api_1.0_spec</artifactId> | ||
<version>1.0.0.Final</version> | ||
<scope>provided</scope> | ||
</dependency> | ||
</dependencies> | ||
</profile> | ||
</profiles> | ||
</project> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
<?xml version="1.0"?> | ||
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> | ||
<modelVersion>4.0.0</modelVersion> | ||
|
||
<parent> | ||
<groupId>com.redhat.xpaas.eap.deployments</groupId> | ||
<artifactId>parent-eap</artifactId> | ||
<version>1.0.0-SNAPSHOT</version> | ||
<relativePath>parent-eap</relativePath> | ||
</parent> | ||
<artifactId>ha-servlet-counter</artifactId> | ||
<packaging>war</packaging> | ||
<name>HA Servlet Counter</name> | ||
<description>HA Servlet Counter</description> | ||
|
||
<build> | ||
<finalName>${project.artifactId}</finalName> | ||
<plugins> | ||
<plugin> | ||
<artifactId>maven-war-plugin</artifactId> | ||
<version>${version.war.plugin}</version> | ||
<configuration> | ||
<failOnMissingWebXml>false</failOnMissingWebXml> | ||
<warName>ROOT</warName> | ||
</configuration> | ||
</plugin> | ||
</plugins> | ||
</build> | ||
<profiles> | ||
<profile> | ||
<id>openshift</id> | ||
</profile> | ||
</profiles> | ||
</project> |
35 changes: 35 additions & 0 deletions
35
src/main/java/com/redhat/xpaas/eap/deployments/servlet/DelayServletListener.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
package com.redhat.xpaas.eap.deployments.servlet; | ||
|
||
import javax.servlet.ServletContextEvent; | ||
import javax.servlet.ServletContextListener; | ||
import javax.servlet.annotation.WebListener; | ||
|
||
/** | ||
* Simulates a deployment delay | ||
* @author maschmid | ||
* | ||
*/ | ||
@WebListener | ||
public class DelayServletListener implements ServletContextListener { | ||
|
||
@Override | ||
public void contextDestroyed(ServletContextEvent event) { | ||
|
||
} | ||
|
||
@Override | ||
public void contextInitialized(ServletContextEvent event) { | ||
String delayEnv = System.getenv("XPAAS_QE_DEPLOYMENT_DELAY"); | ||
if (delayEnv != null && !delayEnv.trim().isEmpty()) { | ||
int delay = Integer.parseInt(delayEnv); | ||
|
||
try { | ||
Thread.sleep(1000 * delay); | ||
} | ||
catch (InterruptedException x) { | ||
// ignore | ||
} | ||
} | ||
} | ||
|
||
} |
Oops, something went wrong.