Skip to content
This repository was archived by the owner on Apr 11, 2025. It is now read-only.

Commit de74d28

Browse files
authored
Add Smoke test and fix Micro simple bootstrap (payara#50)
* Modified to use latest Payara 164 version * Removed spurious comments * Incorporate request tracing into parent pom and use version property * Add smoke test * Fix Payara Micro simplest bootstrap
1 parent 4c8715a commit de74d28

27 files changed

Lines changed: 2316 additions & 1 deletion
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<project-shared-configuration>
3+
<!--
4+
This file contains additional configuration written by modules in the NetBeans IDE.
5+
The configuration is intended to be shared among all the users of project and
6+
therefore it is assumed to be part of version control checkout.
7+
Without this configuration present, some functionality in the IDE may be limited or fail altogether.
8+
-->
9+
<properties xmlns="http://www.netbeans.org/ns/maven-properties-data/1">
10+
<!--
11+
Properties that influence various parts of the IDE, especially code formatting and the like.
12+
You can copy and paste the single properties, into the pom.xml file and the IDE will pick them up.
13+
That way multiple projects can share the same settings (useful for formatting rules for example).
14+
Any value defined here will override the pom.xml file value but is only applicable to the current project.
15+
-->
16+
<org-netbeans-modules-maven-j2ee.netbeans_2e_hint_2e_j2eeVersion>1.7-web</org-netbeans-modules-maven-j2ee.netbeans_2e_hint_2e_j2eeVersion>
17+
<org-netbeans-modules-maven-j2ee.netbeans_2e_hint_2e_deploy_2e_server>gfv3ee6</org-netbeans-modules-maven-j2ee.netbeans_2e_hint_2e_deploy_2e_server>
18+
</properties>
19+
</project-shared-configuration>

Java-EE/javaee-smoke-test/pom.xml

Lines changed: 93 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,93 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<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/xsd/maven-4.0.0.xsd">
3+
<modelVersion>4.0.0</modelVersion>
4+
<parent>
5+
<artifactId>Java-EE</artifactId>
6+
<groupId>fish.payara.examples</groupId>
7+
<version>1.0-SNAPSHOT</version>
8+
</parent>
9+
10+
<groupId>fish.payara.examples</groupId>
11+
<artifactId>javaee-smoke-test</artifactId>
12+
<version>1.0-SNAPSHOT</version>
13+
<packaging>war</packaging>
14+
15+
<name>javaee-smoke-test</name>
16+
17+
<properties>
18+
<endorsed.dir>${project.build.directory}/endorsed</endorsed.dir>
19+
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
20+
</properties>
21+
22+
<dependencies>
23+
<dependency>
24+
<groupId>org.eclipse.persistence</groupId>
25+
<artifactId>eclipselink</artifactId>
26+
<version>2.5.2</version>
27+
<scope>provided</scope>
28+
</dependency>
29+
<dependency>
30+
<groupId>org.eclipse.persistence</groupId>
31+
<artifactId>org.eclipse.persistence.jpa.modelgen.processor</artifactId>
32+
<version>2.5.2</version>
33+
<scope>provided</scope>
34+
</dependency>
35+
<dependency>
36+
<groupId>javax</groupId>
37+
<artifactId>javaee-api</artifactId>
38+
<version>7.0</version>
39+
<scope>provided</scope>
40+
</dependency>
41+
</dependencies>
42+
43+
<build>
44+
<plugins>
45+
<plugin>
46+
<groupId>org.apache.maven.plugins</groupId>
47+
<artifactId>maven-compiler-plugin</artifactId>
48+
<version>3.1</version>
49+
<configuration>
50+
<source>1.7</source>
51+
<target>1.7</target>
52+
<compilerArguments>
53+
<endorseddirs>${endorsed.dir}</endorseddirs>
54+
</compilerArguments>
55+
</configuration>
56+
</plugin>
57+
<plugin>
58+
<groupId>org.apache.maven.plugins</groupId>
59+
<artifactId>maven-war-plugin</artifactId>
60+
<version>2.3</version>
61+
<configuration>
62+
<failOnMissingWebXml>false</failOnMissingWebXml>
63+
</configuration>
64+
</plugin>
65+
<plugin>
66+
<groupId>org.apache.maven.plugins</groupId>
67+
<artifactId>maven-dependency-plugin</artifactId>
68+
<version>2.6</version>
69+
<executions>
70+
<execution>
71+
<phase>validate</phase>
72+
<goals>
73+
<goal>copy</goal>
74+
</goals>
75+
<configuration>
76+
<outputDirectory>${endorsed.dir}</outputDirectory>
77+
<silent>true</silent>
78+
<artifactItems>
79+
<artifactItem>
80+
<groupId>javax</groupId>
81+
<artifactId>javaee-endorsed-api</artifactId>
82+
<version>7.0</version>
83+
<type>jar</type>
84+
</artifactItem>
85+
</artifactItems>
86+
</configuration>
87+
</execution>
88+
</executions>
89+
</plugin>
90+
</plugins>
91+
</build>
92+
93+
</project>
Lines changed: 81 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,81 @@
1+
/*
2+
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
3+
*
4+
* Copyright (c) 2016 Payara Foundation and/or its affiliates. All rights reserved.
5+
*
6+
* The contents of this file are subject to the terms of either the GNU
7+
* General Public License Version 2 only ("GPL") or the Common Development
8+
* and Distribution License("CDDL") (collectively, the "License"). You
9+
* may not use this file except in compliance with the License. You can
10+
* obtain a copy of the License at
11+
* https://github.com/payara/Payara/blob/master/LICENSE.txt
12+
* See the License for the specific
13+
* language governing permissions and limitations under the License.
14+
*
15+
* When distributing the software, include this License Header Notice in each
16+
* file and include the License file at glassfish/legal/LICENSE.txt.
17+
*
18+
* GPL Classpath Exception:
19+
* The Payara Foundation designates this particular file as subject to the "Classpath"
20+
* exception as provided by the Payara Foundation in the GPL Version 2 section of the License
21+
* file that accompanied this code.
22+
*
23+
* Modifications:
24+
* If applicable, add the following below the License Header, with the fields
25+
* enclosed by brackets [] replaced by your own identifying information:
26+
* "Portions Copyright [year] [name of copyright owner]"
27+
*
28+
* Contributor(s):
29+
* If you wish your version of this file to be governed by only the CDDL or
30+
* only the GPL Version 2, indicate your decision by adding "[Contributor]
31+
* elects to include this software in this distribution under the [CDDL or GPL
32+
* Version 2] license." If you don't indicate a single choice of license, a
33+
* recipient has the option to distribute your version of this file under
34+
* either the CDDL, the GPL Version 2 or to extend the choice of license to
35+
* its licensees as provided above. However, if you add GPL Version 2 code
36+
* and therefore, elected the GPL Version 2 license, then the option applies
37+
* only if the new code is made subject to such option by the copyright
38+
* holder.
39+
*/
40+
package fish.payara.examples.javaee.smoke.cdi;
41+
42+
import javax.enterprise.context.ApplicationScoped;
43+
import javax.enterprise.event.Observes;
44+
45+
/**
46+
*
47+
* @author Steve Millidge (Payara Foundation)
48+
*/
49+
@ApplicationScoped
50+
public class ApplicationScopedBean {
51+
52+
private int storedValue;
53+
54+
private int eventValue = 0;
55+
56+
public boolean doIExist() {
57+
return true;
58+
}
59+
60+
public int getStoredValue() {
61+
return storedValue;
62+
}
63+
64+
public void setStoredValue(int storedValue) {
65+
this.storedValue = storedValue;
66+
}
67+
68+
@TrueInterceptor
69+
public Boolean returnFalse() {
70+
return false;
71+
}
72+
73+
public int getEventValue() {
74+
return eventValue;
75+
}
76+
77+
public void requestStart(@Observes Integer value) {
78+
eventValue = value;
79+
}
80+
81+
}
Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
/*
2+
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
3+
*
4+
* Copyright (c) 2016 Payara Foundation and/or its affiliates. All rights reserved.
5+
*
6+
* The contents of this file are subject to the terms of either the GNU
7+
* General Public License Version 2 only ("GPL") or the Common Development
8+
* and Distribution License("CDDL") (collectively, the "License"). You
9+
* may not use this file except in compliance with the License. You can
10+
* obtain a copy of the License at
11+
* https://github.com/payara/Payara/blob/master/LICENSE.txt
12+
* See the License for the specific
13+
* language governing permissions and limitations under the License.
14+
*
15+
* When distributing the software, include this License Header Notice in each
16+
* file and include the License file at glassfish/legal/LICENSE.txt.
17+
*
18+
* GPL Classpath Exception:
19+
* The Payara Foundation designates this particular file as subject to the "Classpath"
20+
* exception as provided by the Payara Foundation in the GPL Version 2 section of the License
21+
* file that accompanied this code.
22+
*
23+
* Modifications:
24+
* If applicable, add the following below the License Header, with the fields
25+
* enclosed by brackets [] replaced by your own identifying information:
26+
* "Portions Copyright [year] [name of copyright owner]"
27+
*
28+
* Contributor(s):
29+
* If you wish your version of this file to be governed by only the CDDL or
30+
* only the GPL Version 2, indicate your decision by adding "[Contributor]
31+
* elects to include this software in this distribution under the [CDDL or GPL
32+
* Version 2] license." If you don't indicate a single choice of license, a
33+
* recipient has the option to distribute your version of this file under
34+
* either the CDDL, the GPL Version 2 or to extend the choice of license to
35+
* its licensees as provided above. However, if you add GPL Version 2 code
36+
* and therefore, elected the GPL Version 2 license, then the option applies
37+
* only if the new code is made subject to such option by the copyright
38+
* holder.
39+
*/
40+
package fish.payara.examples.javaee.smoke.cdi;
41+
42+
import javax.enterprise.context.ApplicationScoped;
43+
import javax.enterprise.inject.Default;
44+
import javax.enterprise.inject.Produces;
45+
46+
/**
47+
*
48+
* @author Steve Millidge (Payara Foundation)
49+
*/
50+
@ApplicationScoped
51+
public class BooleanProducer {
52+
53+
@Produces
54+
@Default
55+
Boolean getBoolean() {
56+
return true;
57+
}
58+
59+
}
Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
/*
2+
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
3+
*
4+
* Copyright (c) 2016 Payara Foundation and/or its affiliates. All rights reserved.
5+
*
6+
* The contents of this file are subject to the terms of either the GNU
7+
* General Public License Version 2 only ("GPL") or the Common Development
8+
* and Distribution License("CDDL") (collectively, the "License"). You
9+
* may not use this file except in compliance with the License. You can
10+
* obtain a copy of the License at
11+
* https://github.com/payara/Payara/blob/master/LICENSE.txt
12+
* See the License for the specific
13+
* language governing permissions and limitations under the License.
14+
*
15+
* When distributing the software, include this License Header Notice in each
16+
* file and include the License file at glassfish/legal/LICENSE.txt.
17+
*
18+
* GPL Classpath Exception:
19+
* The Payara Foundation designates this particular file as subject to the "Classpath"
20+
* exception as provided by the Payara Foundation in the GPL Version 2 section of the License
21+
* file that accompanied this code.
22+
*
23+
* Modifications:
24+
* If applicable, add the following below the License Header, with the fields
25+
* enclosed by brackets [] replaced by your own identifying information:
26+
* "Portions Copyright [year] [name of copyright owner]"
27+
*
28+
* Contributor(s):
29+
* If you wish your version of this file to be governed by only the CDDL or
30+
* only the GPL Version 2, indicate your decision by adding "[Contributor]
31+
* elects to include this software in this distribution under the [CDDL or GPL
32+
* Version 2] license." If you don't indicate a single choice of license, a
33+
* recipient has the option to distribute your version of this file under
34+
* either the CDDL, the GPL Version 2 or to extend the choice of license to
35+
* its licensees as provided above. However, if you add GPL Version 2 code
36+
* and therefore, elected the GPL Version 2 license, then the option applies
37+
* only if the new code is made subject to such option by the copyright
38+
* holder.
39+
*/
40+
package fish.payara.examples.javaee.smoke.cdi;
41+
42+
import fish.payara.examples.javaee.smoke.ejb.TestSessionBean;
43+
import javax.ejb.EJB;
44+
import javax.enterprise.context.RequestScoped;
45+
46+
/**
47+
*
48+
* @author Steve Millidge (Payara Foundation)
49+
*/
50+
@RequestScoped
51+
public class EJBInjectionTester {
52+
53+
@EJB
54+
private TestSessionBean bean;
55+
56+
public boolean doesEJBExist() {
57+
return bean.doYouExist();
58+
}
59+
60+
}
Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
/*
2+
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
3+
*
4+
* Copyright (c) 2016 Payara Foundation and/or its affiliates. All rights reserved.
5+
*
6+
* The contents of this file are subject to the terms of either the GNU
7+
* General Public License Version 2 only ("GPL") or the Common Development
8+
* and Distribution License("CDDL") (collectively, the "License"). You
9+
* may not use this file except in compliance with the License. You can
10+
* obtain a copy of the License at
11+
* https://github.com/payara/Payara/blob/master/LICENSE.txt
12+
* See the License for the specific
13+
* language governing permissions and limitations under the License.
14+
*
15+
* When distributing the software, include this License Header Notice in each
16+
* file and include the License file at glassfish/legal/LICENSE.txt.
17+
*
18+
* GPL Classpath Exception:
19+
* The Payara Foundation designates this particular file as subject to the "Classpath"
20+
* exception as provided by the Payara Foundation in the GPL Version 2 section of the License
21+
* file that accompanied this code.
22+
*
23+
* Modifications:
24+
* If applicable, add the following below the License Header, with the fields
25+
* enclosed by brackets [] replaced by your own identifying information:
26+
* "Portions Copyright [year] [name of copyright owner]"
27+
*
28+
* Contributor(s):
29+
* If you wish your version of this file to be governed by only the CDDL or
30+
* only the GPL Version 2, indicate your decision by adding "[Contributor]
31+
* elects to include this software in this distribution under the [CDDL or GPL
32+
* Version 2] license." If you don't indicate a single choice of license, a
33+
* recipient has the option to distribute your version of this file under
34+
* either the CDDL, the GPL Version 2 or to extend the choice of license to
35+
* its licensees as provided above. However, if you add GPL Version 2 code
36+
* and therefore, elected the GPL Version 2 license, then the option applies
37+
* only if the new code is made subject to such option by the copyright
38+
* holder.
39+
*/
40+
package fish.payara.examples.javaee.smoke.cdi;
41+
42+
/**
43+
*
44+
* @author Steve Millidge (Payara Foundation)
45+
*/
46+
public class POJO {
47+
48+
public POJO() {
49+
50+
}
51+
52+
public boolean doIExist() {
53+
return true;
54+
}
55+
56+
}

0 commit comments

Comments
 (0)