Commit f0fc8113 by Andy Gumbrecht Committed by GitHub

Merge pull request #1 from AndyGee/master

Update to 7.0.2
parents 7d6f224d ad6b0b03
...@@ -49,3 +49,4 @@ pom.xml.versionsBackup ...@@ -49,3 +49,4 @@ pom.xml.versionsBackup
release.properties release.properties
target/ target/
tmp/ tmp/
.distribution
...@@ -28,19 +28,19 @@ ...@@ -28,19 +28,19 @@
<dependencies> <dependencies>
<dependency> <dependency>
<groupId>org.apache.openejb</groupId> <groupId>org.apache.tomee</groupId>
<artifactId>javaee-api</artifactId> <artifactId>javaee-api</artifactId>
<version>${openejb.javaee.api}</version> <version>${openejb.javaee.api}</version>
<scope>provided</scope> <scope>provided</scope>
</dependency> </dependency>
<dependency> <dependency>
<groupId>org.apache.openejb</groupId> <groupId>org.apache.tomee</groupId>
<artifactId>arquillian-tomee-embedded</artifactId> <artifactId>arquillian-tomee-embedded</artifactId>
<version>${tomee.version}</version> <version>${tomee.version}</version>
<scope>test</scope> <scope>test</scope>
</dependency> </dependency>
<dependency> <dependency>
<groupId>org.apache.openejb</groupId> <groupId>org.apache.tomee</groupId>
<artifactId>tomee-jaxrs</artifactId> <artifactId>tomee-jaxrs</artifactId>
<version>${tomee.version}</version> <version>${tomee.version}</version>
<scope>test</scope> <scope>test</scope>
...@@ -48,7 +48,7 @@ ...@@ -48,7 +48,7 @@
<dependency> <dependency>
<groupId>junit</groupId> <groupId>junit</groupId>
<artifactId>junit</artifactId> <artifactId>junit</artifactId>
<version>4.11</version> <version>4.12</version>
<scope>test</scope> <scope>test</scope>
</dependency> </dependency>
</dependencies> </dependencies>
...@@ -57,23 +57,22 @@ ...@@ -57,23 +57,22 @@
<finalName>ROOT</finalName> <finalName>ROOT</finalName>
<plugins> <plugins>
<plugin> <plugin>
<groupId>org.apache.openejb.maven</groupId> <groupId>org.apache.tomee.maven</groupId>
<artifactId>tomee-maven-plugin</artifactId> <artifactId>tomee-maven-plugin</artifactId>
<version>${tomee.version}</version> <version>${tomee.version}</version>
<configuration> <configuration>
<tomeeVersion>${tomee.version}</tomeeVersion> <tomeeClassifier>webprofile</tomeeClassifier>
<tomeeClassifier>jaxrs</tomeeClassifier>
</configuration> </configuration>
</plugin> </plugin>
</plugins> </plugins>
</build> </build>
<properties> <properties>
<tomee.version>1.7.1</tomee.version> <tomee.version>7.0.2</tomee.version>
<openejb.javaee.api>6.0-6</openejb.javaee.api> <openejb.javaee.api>7.0</openejb.javaee.api>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<failOnMissingWebXml>false</failOnMissingWebXml> <failOnMissingWebXml>false</failOnMissingWebXml>
<maven.compiler.target>1.7</maven.compiler.target> <maven.compiler.target>1.8</maven.compiler.target>
<maven.compiler.source>1.7</maven.compiler.source> <maven.compiler.source>1.8</maven.compiler.source>
</properties> </properties>
</project> </project>
...@@ -14,7 +14,7 @@ ...@@ -14,7 +14,7 @@
* See the License for the specific language governing permissions and * See the License for the specific language governing permissions and
* limitations under the License. * limitations under the License.
*/ */
package org.supertribe; package org.supertribe.web;
import javax.xml.bind.annotation.XmlRootElement; import javax.xml.bind.annotation.XmlRootElement;
...@@ -31,7 +31,7 @@ public class Phone { ...@@ -31,7 +31,7 @@ public class Phone {
public Phone() { public Phone() {
} }
public Phone(int age, String carrier, String id, String name, String snippet) { public Phone(final int age, final String carrier, final String id, final String name, final String snippet) {
this.age = age; this.age = age;
this.carrier = carrier; this.carrier = carrier;
this.id = id; this.id = id;
...@@ -43,7 +43,7 @@ public class Phone { ...@@ -43,7 +43,7 @@ public class Phone {
return age; return age;
} }
public void setAge(int age) { public void setAge(final int age) {
this.age = age; this.age = age;
} }
...@@ -51,7 +51,7 @@ public class Phone { ...@@ -51,7 +51,7 @@ public class Phone {
return carrier; return carrier;
} }
public void setCarrier(String carrier) { public void setCarrier(final String carrier) {
this.carrier = carrier; this.carrier = carrier;
} }
...@@ -59,7 +59,7 @@ public class Phone { ...@@ -59,7 +59,7 @@ public class Phone {
return id; return id;
} }
public void setId(String id) { public void setId(final String id) {
this.id = id; this.id = id;
} }
...@@ -67,7 +67,7 @@ public class Phone { ...@@ -67,7 +67,7 @@ public class Phone {
return name; return name;
} }
public void setName(String name) { public void setName(final String name) {
this.name = name; this.name = name;
} }
...@@ -75,7 +75,7 @@ public class Phone { ...@@ -75,7 +75,7 @@ public class Phone {
return snippet; return snippet;
} }
public void setSnippet(String snippet) { public void setSnippet(final String snippet) {
this.snippet = snippet; this.snippet = snippet;
} }
......
...@@ -14,7 +14,7 @@ ...@@ -14,7 +14,7 @@
* See the License for the specific language governing permissions and * See the License for the specific language governing permissions and
* limitations under the License. * limitations under the License.
*/ */
package org.supertribe; package org.supertribe.web;
import javax.ejb.Lock; import javax.ejb.Lock;
import javax.ejb.Singleton; import javax.ejb.Singleton;
......
<?xml version='1.0' encoding='utf-8'?>
<!--
~ 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.
-->
<!-- Note: A "Server" is not itself a "Container", so you may not
define subcomponents such as "Valves" at this level.
Documentation at /docs/config/server.html
-->
<Server port="8005" shutdown="SHUTDOWN">
<!-- TomEE plugin for Tomcat -->
<Listener className="org.apache.tomee.catalina.ServerListener" />
<Listener className="org.apache.catalina.startup.VersionLoggerListener" />
<!-- Security listener. Documentation at /docs/config/listeners.html
<Listener className="org.apache.catalina.security.SecurityListener" />
-->
<!--APR library loader. Documentation at /docs/apr.html -->
<Listener className="org.apache.catalina.core.AprLifecycleListener" SSLEngine="on" />
<!-- Prevent memory leaks due to use of particular java/javax APIs-->
<Listener className="org.apache.catalina.core.JreMemoryLeakPreventionListener" />
<Listener className="org.apache.catalina.mbeans.GlobalResourcesLifecycleListener" />
<Listener className="org.apache.catalina.core.ThreadLocalLeakPreventionListener" />
<!-- Global JNDI resources
Documentation at /docs/jndi-resources-howto.html
-->
<GlobalNamingResources>
<!-- Editable user database that can also be used by
UserDatabaseRealm to authenticate users
-->
<Resource name="UserDatabase" auth="Container"
type="org.apache.catalina.UserDatabase"
description="User database that can be updated and saved"
factory="org.apache.catalina.users.MemoryUserDatabaseFactory"
pathname="conf/tomcat-users.xml" />
</GlobalNamingResources>
<!-- A "Service" is a collection of one or more "Connectors" that share
a single "Container" Note: A "Service" is not itself a "Container",
so you may not define subcomponents such as "Valves" at this level.
Documentation at /docs/config/service.html
-->
<Service name="Catalina">
<!--The connectors can use a shared executor, you can define one or more named thread pools-->
<!--
<Executor name="tomcatThreadPool" namePrefix="catalina-exec-"
maxThreads="150" minSpareThreads="4"/>
-->
<!-- A "Connector" represents an endpoint by which requests are received
and responses are returned. Documentation at :
Java HTTP Connector: /docs/config/http.html
Java AJP Connector: /docs/config/ajp.html
APR (HTTP/AJP) Connector: /docs/apr.html
Define a non-SSL/TLS HTTP/1.1 Connector on port 8080
-->
<Connector port="8080" protocol="HTTP/1.1"
connectionTimeout="20000"
redirectPort="8443" xpoweredBy="false" server="Apache TomEE" />
<!-- A "Connector" using the shared thread pool-->
<!--
<Connector executor="tomcatThreadPool"
port="8080" protocol="HTTP/1.1"
connectionTimeout="20000"
redirectPort="8443" />
-->
<!-- Define a SSL/TLS HTTP/1.1 Connector on port 8443
This connector uses the NIO implementation with the JSSE engine. When
using the JSSE engine, the JSSE configuration attributes must be used.
-->
<!--
<Connector port="8443" protocol="org.apache.coyote.http11.Http11NioProtocol"
maxThreads="150" SSLEnabled="true">
<SSLHostConfig>
<Certificate certificateKeystoreFile="conf/localhost-rsa.jks"
type="RSA" xpoweredBy="false" server="Apache TomEE" />
</SSLHostConfig>
</Connector>
-->
<!-- Define a SSL/TLS HTTP/1.1 Connector on port 8443 with HTTP/2
This connector uses the APR/native implementation. When using the
APR/native implementation or the OpenSSL engine with NIO or NIO2 then
the OpenSSL configuration attributes must be used.
-->
<!--
<Connector port="8443" protocol="org.apache.coyote.http11.Http11AprProtocol"
maxThreads="150" SSLEnabled="true" >
<UpgradeProtocol className="org.apache.coyote.http2.Http2Protocol" xpoweredBy="false" server="Apache TomEE" />
<SSLHostConfig>
<Certificate certificateKeyFile="conf/localhost-rsa-key.pem"
certificateFile="conf/localhost-rsa-cert.pem"
certificateChainFile="conf/localhost-rsa-chain.pem"
type="RSA" />
</SSLHostConfig>
</Connector>
-->
<!-- Define an AJP 1.3 Connector on port 8009 -->
<Connector port="8009" protocol="AJP/1.3" redirectPort="8443" />
<!-- An Engine represents the entry point (within Catalina) that processes
every request. The Engine implementation for Tomcat stand alone
analyzes the HTTP headers included with the request, and passes them
on to the appropriate Host (virtual host).
Documentation at /docs/config/engine.html -->
<!-- You should set jvmRoute to support load-balancing via AJP ie :
<Engine name="Catalina" defaultHost="localhost" jvmRoute="jvm1">
-->
<Engine name="Catalina" defaultHost="localhost">
<!--For clustering, please take a look at documentation at:
/docs/cluster-howto.html (simple how to)
/docs/config/cluster.html (reference documentation) -->
<!--
<Cluster className="org.apache.catalina.ha.tcp.SimpleTcpCluster"/>
-->
<!-- Use the LockOutRealm to prevent attempts to guess user passwords
via a brute-force attack -->
<Realm className="org.apache.catalina.realm.LockOutRealm">
<!-- This Realm uses the UserDatabase configured in the global JNDI
resources under the key "UserDatabase". Any edits
that are performed against this UserDatabase are immediately
available for use by the Realm. -->
<Realm className="org.apache.catalina.realm.UserDatabaseRealm"
resourceName="UserDatabase"/>
</Realm>
<Host name="localhost" appBase="webapps"
unpackWARs="true" autoDeploy="true">
<!-- SingleSignOn valve, share authentication between web applications
Documentation at: /docs/config/valve.html -->
<!--
<Valve className="org.apache.catalina.authenticator.SingleSignOn" />
-->
<!-- Access log processes all example.
Documentation at: /docs/config/valve.html
Note: The pattern used is equivalent to using pattern="common" -->
<Valve className="org.apache.catalina.valves.AccessLogValve" directory="logs"
prefix="localhost_access_log" suffix=".txt"
pattern="%h %l %u %t &quot;%r&quot; %s %b" />
</Host>
</Engine>
</Service>
</Server>
...@@ -14,7 +14,7 @@ ...@@ -14,7 +14,7 @@
* See the License for the specific language governing permissions and * See the License for the specific language governing permissions and
* limitations under the License. * limitations under the License.
*/ */
package org.supertribe; package org.supertribe.web;
import org.apache.cxf.jaxrs.client.WebClient; import org.apache.cxf.jaxrs.client.WebClient;
import org.jboss.arquillian.container.test.api.Deployment; import org.jboss.arquillian.container.test.api.Deployment;
...@@ -33,25 +33,24 @@ import java.util.Iterator; ...@@ -33,25 +33,24 @@ import java.util.Iterator;
/** /**
* Arquillian will start the container, deploy all @Deployment bundles, then run all the @Test methods. * Arquillian will start the container, deploy all @Deployment bundles, then run all the @Test methods.
* * <p>
* A strong value-add for Arquillian is that the test is abstracted from the server. * A strong value-add for Arquillian is that the test is abstracted from the server.
* It is possible to rerun the same test against multiple adapters or server configurations. * It is possible to rerun the same test against multiple adapters or server configurations.
* * <p>
* A second value-add is it is possible to build WebArchives that are slim and trim and therefore * A second value-add is it is possible to build WebArchives that are slim and trim and therefore
* isolate the functionality being tested. This also makes it easier to swap out one implementation * isolate the functionality being tested. This also makes it easier to swap out one implementation
* of a class for another allowing for easy mocking. * of a class for another allowing for easy mocking.
*
*/ */
@RunWith(Arquillian.class) @RunWith(Arquillian.class)
public class PhoneServiceTest extends Assert { public class PhoneServiceTest extends Assert {
/** /**
* ShrinkWrap is used to create a war file on the fly. * ShrinkWrap is used to create a war file on the fly.
* * <p>
* The API is quite expressive and can build any possible * The API is quite expressive and can build any possible
* flavor of war file. It can quite easily return a rebuilt * flavor of war file. It can quite easily return a rebuilt
* war file as well. * war file as well.
* * <p>
* More than one @Deployment method is allowed. * More than one @Deployment method is allowed.
*/ */
@Deployment @Deployment
...@@ -61,12 +60,11 @@ public class PhoneServiceTest extends Assert { ...@@ -61,12 +60,11 @@ public class PhoneServiceTest extends Assert {
/** /**
* This URL will contain the following URL data * This URL will contain the following URL data
* * <p>
* - http://<host>:<port>/<webapp>/ * - http://<host>:<port>/<webapp>/
* * <p>
* This allows the test itself to be agnostic of server information or even * This allows the test itself to be agnostic of server information or even
* the name of the webapp * the name of the webapp
*
*/ */
@ArquillianResource @ArquillianResource
private URL webappUrl; private URL webappUrl;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment