buildbot failure in on tomee-1.7.x-ubuntu

2017-11-01 Thread buildbot
The Buildbot has detected a new failure on builder tomee-1.7.x-ubuntu while 
building tomee. Full details are available at:
https://ci.apache.org/builders/tomee-1.7.x-ubuntu/builds/227

Buildbot URL: https://ci.apache.org/

Buildslave for this Build: bb_qnode5_ubuntu

Build Reason: The SingleBranchScheduler scheduler named 
'on-tomee-1.7.x-ubuntu-commit' triggered this build
Build Source Stamp: [branch tomee-1.7.x] 
4b11c31b714e8093ae18d5638a5c0b07cb2e7097
Blamelist: Jonathan Gallimore 

BUILD FAILED: failed check-pmd

Sincerely,
 -The Buildbot





[jira] [Resolved] (TOMEE-2146) AMQ internal broker should support system usage configuration

2017-11-01 Thread Romain Manni-Bucau (JIRA)

 [ 
https://issues.apache.org/jira/browse/TOMEE-2146?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Romain Manni-Bucau resolved TOMEE-2146.
---
Resolution: Fixed

> AMQ internal broker should support system usage configuration
> -
>
> Key: TOMEE-2146
> URL: https://issues.apache.org/jira/browse/TOMEE-2146
> Project: TomEE
>  Issue Type: New Feature
>Reporter: Romain Manni-Bucau
>Assignee: Romain Manni-Bucau
> Fix For: 7.0.5
>
>
> Syntax is to add in the broker url:
> - systemUsage=true to activate the configuration
> - systemUsage.[configurable].limit=limit in bytes with configurable either 
> memory, storage, scheduler or temp for the corresponding system usages
> Ex:
> {code}
> broker:(tcp://localhost:61616)systemUsage=true=1024
> {code}



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


tomee git commit: TOMEE-2146 system usage configuration for AMQ broker

2017-11-01 Thread rmannibucau
Repository: tomee
Updated Branches:
  refs/heads/master 108abf0ff -> 118060ddc


TOMEE-2146 system usage configuration for AMQ broker


Project: http://git-wip-us.apache.org/repos/asf/tomee/repo
Commit: http://git-wip-us.apache.org/repos/asf/tomee/commit/118060dd
Tree: http://git-wip-us.apache.org/repos/asf/tomee/tree/118060dd
Diff: http://git-wip-us.apache.org/repos/asf/tomee/diff/118060dd

Branch: refs/heads/master
Commit: 118060ddc20ae38dbfd5695ef1eb8ecf29abedcb
Parents: 108abf0
Author: Romain Manni-Bucau 
Authored: Wed Nov 1 18:53:55 2017 +0100
Committer: Romain Manni-Bucau 
Committed: Wed Nov 1 18:53:55 2017 +0100

--
 .../resource/activemq/ActiveMQ5Factory.java | 52 
 .../resource/activemq/ActiveMQ5FactoryTest.java | 27 ++
 2 files changed, 70 insertions(+), 9 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/tomee/blob/118060dd/container/openejb-core/src/main/java/org/apache/openejb/resource/activemq/ActiveMQ5Factory.java
--
diff --git 
a/container/openejb-core/src/main/java/org/apache/openejb/resource/activemq/ActiveMQ5Factory.java
 
b/container/openejb-core/src/main/java/org/apache/openejb/resource/activemq/ActiveMQ5Factory.java
index ffcd8cb..ae5fc43 100644
--- 
a/container/openejb-core/src/main/java/org/apache/openejb/resource/activemq/ActiveMQ5Factory.java
+++ 
b/container/openejb-core/src/main/java/org/apache/openejb/resource/activemq/ActiveMQ5Factory.java
@@ -28,6 +28,7 @@ import org.apache.activemq.store.PersistenceAdapter;
 import org.apache.activemq.store.PersistenceAdapterFactory;
 import org.apache.activemq.store.jdbc.JDBCPersistenceAdapter;
 import org.apache.activemq.store.memory.MemoryPersistenceAdapter;
+import org.apache.activemq.usage.SystemUsage;
 import org.apache.activemq.util.IntrospectionSupport;
 import org.apache.activemq.util.URISupport;
 import org.apache.openejb.loader.SystemInstance;
@@ -94,12 +95,24 @@ public class ActiveMQ5Factory implements 
BrokerFactoryHandler {
 persistenceAdapter = null;
 }
 
+final String systemUsage = params.remove("systemUsage");
+final SystemUsage systemUsageInstance;
+if ("true".equalsIgnoreCase(systemUsage)) {
+systemUsageInstance = newSystemUsage(params);
+} else {
+systemUsageInstance = null;
+}
+
 final BrokerPlugin[] plugins = createPlugins(params);
 final URI uri = new 
URI(cleanUpUri(brokerURI.getRawSchemeSpecificPart(), 
compositeData.getParameters(), params));
 broker = "broker".equals(uri.getScheme()) ? newDefaultBroker(uri) 
: BrokerFactory.createBroker(uri);
 if (plugins != null) {
 broker.setPlugins(plugins);
 }
+
+if (systemUsageInstance != null) {
+broker.setSystemUsage(systemUsageInstance);
+}
 brokers.put(brokerURI, broker);
 
 if (persistenceAdapter != null) {
@@ -259,6 +272,45 @@ public class ActiveMQ5Factory implements 
BrokerFactoryHandler {
 return broker;
 }
 
+private SystemUsage newSystemUsage(final Map params) {
+final SystemUsage systemUsage = new SystemUsage();
+
+{
+final String memory = params.remove("systemUsage.memory.limit");
+if (memory != null) {
+
systemUsage.getMemoryUsage().setLimit(Integer.parseInt(memory.trim()));
+} else {
+systemUsage.getMemoryUsage().setLimit(1024L * 1024 * 1024);
+}
+}
+{
+final String memory = params.remove("systemUsage.temp.limit");
+if (memory != null) {
+
systemUsage.getTempUsage().setLimit(Integer.parseInt(memory.trim()));
+} else {
+systemUsage.getTempUsage().setLimit(1024L * 1024 * 1024 * 50);
+}
+}
+{
+final String memory = params.remove("systemUsage.store.limit");
+if (memory != null) {
+
systemUsage.getStoreUsage().setLimit(Integer.parseInt(memory.trim()));
+} else {
+systemUsage.getStoreUsage().setLimit(1024L * 1024 * 1024 * 
100);
+}
+}
+{
+final String memory = params.remove("systemUsage.scheduler.limit");
+if (memory != null) {
+
systemUsage.getJobSchedulerUsage().setLimit(Integer.parseInt(memory.trim()));
+} else {
+systemUsage.getJobSchedulerUsage().setLimit(1024L * 1024 * 
1024);
+}
+}
+
+return systemUsage;
+}
+
 // forking org.apache.activemq.broker.DefaultBrokerFactory.createBroker() 
to 

[jira] [Created] (TOMEE-2146) AMQ internal broker should support system usage configuration

2017-11-01 Thread Romain Manni-Bucau (JIRA)
Romain Manni-Bucau created TOMEE-2146:
-

 Summary: AMQ internal broker should support system usage 
configuration
 Key: TOMEE-2146
 URL: https://issues.apache.org/jira/browse/TOMEE-2146
 Project: TomEE
  Issue Type: New Feature
Reporter: Romain Manni-Bucau
Assignee: Romain Manni-Bucau
 Fix For: 7.0.5


Syntax is to add in the broker url:

- systemUsage=true to activate the configuration
- systemUsage.[configurable].limit=limit in bytes with configurable either 
memory, storage, scheduler or temp for the corresponding system usages

Ex:

{code}
broker:(tcp://localhost:61616)systemUsage=true=1024
{code}



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Resolved] (TOMEE-2145) EAR file deployed in webapps/ deploys multiple times

2017-11-01 Thread Jonathan Gallimore (JIRA)

 [ 
https://issues.apache.org/jira/browse/TOMEE-2145?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Jonathan Gallimore resolved TOMEE-2145.
---
Resolution: Fixed

> EAR file deployed in webapps/ deploys multiple times
> 
>
> Key: TOMEE-2145
> URL: https://issues.apache.org/jira/browse/TOMEE-2145
> Project: TomEE
>  Issue Type: Bug
>Affects Versions: 1.7.5, 7.0.4
>Reporter: Jonathan Gallimore
>Assignee: Jonathan Gallimore
>Priority: Normal
>
> TomEE supports the ability to deploy EAR files in the webapps folder, but a 
> bug in TomcatWebappDeployer means these artifacts get deployed twice - once 
> for the artifact, and once for the exploded directory. The exploded directory 
> usually fails.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[1/2] tomee git commit: TOMEE-2145 fix double deploy issue when deploying an EAR from the webapps directory

2017-11-01 Thread jgallimore
Repository: tomee
Updated Branches:
  refs/heads/tomee-1.7.x bfdd20c77 -> 4b11c31b7


TOMEE-2145 fix double deploy issue when deploying an EAR from the webapps 
directory


Project: http://git-wip-us.apache.org/repos/asf/tomee/repo
Commit: http://git-wip-us.apache.org/repos/asf/tomee/commit/a3150bb3
Tree: http://git-wip-us.apache.org/repos/asf/tomee/tree/a3150bb3
Diff: http://git-wip-us.apache.org/repos/asf/tomee/diff/a3150bb3

Branch: refs/heads/tomee-1.7.x
Commit: a3150bb3bc53b3dba31598ef3d71fe5b558c6412
Parents: bfdd20c
Author: Jonathan Gallimore 
Authored: Wed Nov 1 17:09:07 2017 +
Committer: Jonathan Gallimore 
Committed: Wed Nov 1 17:16:46 2017 +

--
 .../tomee/catalina/TomcatWebAppBuilder.java | 25 
 1 file changed, 25 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/tomee/blob/a3150bb3/tomee/tomee-catalina/src/main/java/org/apache/tomee/catalina/TomcatWebAppBuilder.java
--
diff --git 
a/tomee/tomee-catalina/src/main/java/org/apache/tomee/catalina/TomcatWebAppBuilder.java
 
b/tomee/tomee-catalina/src/main/java/org/apache/tomee/catalina/TomcatWebAppBuilder.java
index 9a05ce3..0ba0c30 100644
--- 
a/tomee/tomee-catalina/src/main/java/org/apache/tomee/catalina/TomcatWebAppBuilder.java
+++ 
b/tomee/tomee-catalina/src/main/java/org/apache/tomee/catalina/TomcatWebAppBuilder.java
@@ -1130,6 +1130,10 @@ public class TomcatWebAppBuilder implements 
WebAppBuilder, ContextListener, Pare
 return;
 }
 
+if (shouldNotDeploy(standardContext)) {
+return;
+}
+
 final CoreContainerSystem cs = getContainerSystem();
 
 final Assembler a = getAssembler();
@@ -1422,6 +1426,23 @@ public class TomcatWebAppBuilder implements 
WebAppBuilder, ContextListener, Pare
 realms.put(standardContext.getName(), realm);
 }
 
+private static boolean shouldNotDeploy(StandardContext standardContext) {
+if (StandardHost.class.isInstance(standardContext.getParent())) {
+final StandardHost host = 
StandardHost.class.cast(standardContext.getParent());
+if (host.getAutoDeploy() && new File(host.getAppBaseFile(), 
standardContext.getPath()).isDirectory() && (
+new File(host.getAppBaseFile(), standardContext.getPath() 
+ ".ear").exists() ||
+new File(host.getAppBaseFile(), standardContext.getPath() 
+ ".rar").exists())
+) {
+
+logger.info(String.format("Not deploying exploded directory %s 
as Java EE artifact exists which will be deployed.",
+new File(host.getAppBaseFile(), 
standardContext.getPath()).getAbsolutePath()));
+
+return true;
+}
+}
+return false;
+}
+
 private static File rootPath(final File file) {
 if (file.isDirectory() && file.getName().equals("classes") && 
file.getParentFile() != null && 
file.getParentFile().getName().equals("WEB-INF")) {
 return file.getParentFile().getParentFile();
@@ -1572,6 +1593,10 @@ public class TomcatWebAppBuilder implements 
WebAppBuilder, ContextListener, Pare
 return;
 }
 
+if (shouldNotDeploy(standardContext)) {
+return;
+}
+
 final Realm realm = standardContext.getRealm();
 final ClassLoader classLoader = 
standardContext.getLoader().getClassLoader();
 final Thread thread = Thread.currentThread();



[2/2] tomee git commit: TOMEE-2145 fix compile error

2017-11-01 Thread jgallimore
TOMEE-2145 fix compile error


Project: http://git-wip-us.apache.org/repos/asf/tomee/repo
Commit: http://git-wip-us.apache.org/repos/asf/tomee/commit/4b11c31b
Tree: http://git-wip-us.apache.org/repos/asf/tomee/tree/4b11c31b
Diff: http://git-wip-us.apache.org/repos/asf/tomee/diff/4b11c31b

Branch: refs/heads/tomee-1.7.x
Commit: 4b11c31b714e8093ae18d5638a5c0b07cb2e7097
Parents: a3150bb
Author: Jonathan Gallimore 
Authored: Wed Nov 1 17:24:39 2017 +
Committer: Jonathan Gallimore 
Committed: Wed Nov 1 17:24:39 2017 +

--
 .../java/org/apache/tomee/catalina/TomcatWebAppBuilder.java  | 8 
 1 file changed, 4 insertions(+), 4 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/tomee/blob/4b11c31b/tomee/tomee-catalina/src/main/java/org/apache/tomee/catalina/TomcatWebAppBuilder.java
--
diff --git 
a/tomee/tomee-catalina/src/main/java/org/apache/tomee/catalina/TomcatWebAppBuilder.java
 
b/tomee/tomee-catalina/src/main/java/org/apache/tomee/catalina/TomcatWebAppBuilder.java
index 0ba0c30..647cc5b 100644
--- 
a/tomee/tomee-catalina/src/main/java/org/apache/tomee/catalina/TomcatWebAppBuilder.java
+++ 
b/tomee/tomee-catalina/src/main/java/org/apache/tomee/catalina/TomcatWebAppBuilder.java
@@ -1429,13 +1429,13 @@ public class TomcatWebAppBuilder implements 
WebAppBuilder, ContextListener, Pare
 private static boolean shouldNotDeploy(StandardContext standardContext) {
 if (StandardHost.class.isInstance(standardContext.getParent())) {
 final StandardHost host = 
StandardHost.class.cast(standardContext.getParent());
-if (host.getAutoDeploy() && new File(host.getAppBaseFile(), 
standardContext.getPath()).isDirectory() && (
-new File(host.getAppBaseFile(), standardContext.getPath() 
+ ".ear").exists() ||
-new File(host.getAppBaseFile(), standardContext.getPath() 
+ ".rar").exists())
+if (host.getAutoDeploy() && new File(host.getAppBase(), 
standardContext.getPath()).isDirectory() && (
+new File(host.getAppBase(), standardContext.getPath() + 
".ear").exists() ||
+new File(host.getAppBase(), standardContext.getPath() + 
".rar").exists())
 ) {
 
 logger.info(String.format("Not deploying exploded directory %s 
as Java EE artifact exists which will be deployed.",
-new File(host.getAppBaseFile(), 
standardContext.getPath()).getAbsolutePath()));
+new File(host.getAppBase(), 
standardContext.getPath()).getAbsolutePath()));
 
 return true;
 }



tomee git commit: TOMEE-2145 fix double deploy issue when deploying an EAR from the webapps directory

2017-11-01 Thread jgallimore
Repository: tomee
Updated Branches:
  refs/heads/master 63a43a5aa -> 108abf0ff


TOMEE-2145 fix double deploy issue when deploying an EAR from the webapps 
directory


Project: http://git-wip-us.apache.org/repos/asf/tomee/repo
Commit: http://git-wip-us.apache.org/repos/asf/tomee/commit/108abf0f
Tree: http://git-wip-us.apache.org/repos/asf/tomee/tree/108abf0f
Diff: http://git-wip-us.apache.org/repos/asf/tomee/diff/108abf0f

Branch: refs/heads/master
Commit: 108abf0ff4f046238531129fb21a99f2ef76a433
Parents: 63a43a5
Author: Jonathan Gallimore 
Authored: Wed Nov 1 17:09:07 2017 +
Committer: Jonathan Gallimore 
Committed: Wed Nov 1 17:09:07 2017 +

--
 .../tomee/catalina/TomcatWebAppBuilder.java | 25 
 1 file changed, 25 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/tomee/blob/108abf0f/tomee/tomee-catalina/src/main/java/org/apache/tomee/catalina/TomcatWebAppBuilder.java
--
diff --git 
a/tomee/tomee-catalina/src/main/java/org/apache/tomee/catalina/TomcatWebAppBuilder.java
 
b/tomee/tomee-catalina/src/main/java/org/apache/tomee/catalina/TomcatWebAppBuilder.java
index 882f40a..760bea4 100644
--- 
a/tomee/tomee-catalina/src/main/java/org/apache/tomee/catalina/TomcatWebAppBuilder.java
+++ 
b/tomee/tomee-catalina/src/main/java/org/apache/tomee/catalina/TomcatWebAppBuilder.java
@@ -1147,6 +1147,10 @@ public class TomcatWebAppBuilder implements 
WebAppBuilder, ContextListener, Pare
 return;
 }
 
+if (shouldNotDeploy(standardContext)) {
+return;
+}
+
 final CoreContainerSystem cs = getContainerSystem();
 
 final Assembler a = getAssembler();
@@ -1480,6 +1484,23 @@ public class TomcatWebAppBuilder implements 
WebAppBuilder, ContextListener, Pare
 realms.put(standardContext.getName(), realm);
 }
 
+private static boolean shouldNotDeploy(StandardContext standardContext) {
+if (StandardHost.class.isInstance(standardContext.getParent())) {
+final StandardHost host = 
StandardHost.class.cast(standardContext.getParent());
+if (host.getAutoDeploy() && new File(host.getAppBaseFile(), 
standardContext.getPath()).isDirectory() && (
+new File(host.getAppBaseFile(), standardContext.getPath() 
+ ".ear").exists() ||
+new File(host.getAppBaseFile(), standardContext.getPath() 
+ ".rar").exists())
+) {
+
+logger.info(String.format("Not deploying exploded directory %s 
as Java EE artifact exists which will be deployed.",
+new File(host.getAppBaseFile(), 
standardContext.getPath()).getAbsolutePath()));
+
+return true;
+}
+}
+return false;
+}
+
 public void setFinderOnContextConfig(final StandardContext 
standardContext, final AppModule appModule) {
 final OpenEJBContextConfig openEJBContextConfig = 
findOpenEJBContextConfig(standardContext);
 if (openEJBContextConfig != null) {
@@ -1662,6 +1683,10 @@ public class TomcatWebAppBuilder implements 
WebAppBuilder, ContextListener, Pare
 return;
 }
 
+if (shouldNotDeploy(standardContext)) {
+return;
+}
+
 final Realm realm = standardContext.getRealm();
 final ClassLoader classLoader = 
standardContext.getLoader().getClassLoader();
 final Thread thread = Thread.currentThread();



[jira] [Work started] (TOMEE-2145) EAR file deployed in webapps/ deploys multiple times

2017-11-01 Thread Jonathan Gallimore (JIRA)

 [ 
https://issues.apache.org/jira/browse/TOMEE-2145?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Work on TOMEE-2145 started by Jonathan Gallimore.
-
> EAR file deployed in webapps/ deploys multiple times
> 
>
> Key: TOMEE-2145
> URL: https://issues.apache.org/jira/browse/TOMEE-2145
> Project: TomEE
>  Issue Type: Bug
>Affects Versions: 1.7.5, 7.0.4
>Reporter: Jonathan Gallimore
>Assignee: Jonathan Gallimore
>Priority: Normal
>
> TomEE supports the ability to deploy EAR files in the webapps folder, but a 
> bug in TomcatWebappDeployer means these artifacts get deployed twice - once 
> for the artifact, and once for the exploded directory. The exploded directory 
> usually fails.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Created] (TOMEE-2145) EAR file deployed in webapps/ deploys multiple times

2017-11-01 Thread Jonathan Gallimore (JIRA)
Jonathan Gallimore created TOMEE-2145:
-

 Summary: EAR file deployed in webapps/ deploys multiple times
 Key: TOMEE-2145
 URL: https://issues.apache.org/jira/browse/TOMEE-2145
 Project: TomEE
  Issue Type: Bug
Affects Versions: 7.0.4, 1.7.5
Reporter: Jonathan Gallimore
Assignee: Jonathan Gallimore
Priority: Normal


TomEE supports the ability to deploy EAR files in the webapps folder, but a bug 
in TomcatWebappDeployer means these artifacts get deployed twice - once for the 
artifact, and once for the exploded directory. The exploded directory usually 
fails.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)