buildbot success in on tomee-1.7.x-ubuntu

2016-04-10 Thread buildbot
The Buildbot has detected a restored build 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/113

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

Buildslave for this Build: hemera_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] 
2879bb00e0bc67fccf0b4c198a9b6e8ac49a20b9
Blamelist: Romain Manni-Bucau 

Build succeeded!

Sincerely,
 -The Buildbot





[jira] [Updated] (TOMEE-1645) tomee.sh ignored common.loader

2016-04-10 Thread Jean-Louis MONTEIRO (JIRA)

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

Jean-Louis MONTEIRO updated TOMEE-1645:
---
Fix Version/s: 1.7.5

> tomee.sh ignored common.loader
> --
>
> Key: TOMEE-1645
> URL: https://issues.apache.org/jira/browse/TOMEE-1645
> Project: TomEE
>  Issue Type: Bug
>Reporter: Romain Manni-Bucau
>Assignee: Romain Manni-Bucau
> Fix For: 7.0.0-M2, 1.7.5
>
>




--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Updated] (TOMEE-1646) tomee.sh cipher swallows exceptions

2016-04-10 Thread Jean-Louis MONTEIRO (JIRA)

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

Jean-Louis MONTEIRO updated TOMEE-1646:
---
Fix Version/s: 1.7.5

> tomee.sh cipher swallows exceptions
> ---
>
> Key: TOMEE-1646
> URL: https://issues.apache.org/jira/browse/TOMEE-1646
> Project: TomEE
>  Issue Type: Bug
>Reporter: Romain Manni-Bucau
>Assignee: Romain Manni-Bucau
> Fix For: 7.0.0-M2, 1.7.5
>
>




--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


tomee git commit: TOMEE-1645 TOMEE-1646 use common.loader for tomee.sh and dont swallow exception for Cipher command

2016-04-10 Thread jlmonteiro
Repository: tomee
Updated Branches:
  refs/heads/tomee-1.7.x 4b3a42748 -> 2879bb00e


TOMEE-1645 TOMEE-1646 use common.loader for tomee.sh and dont swallow exception 
for Cipher command

Conflicts:

container/openejb-core/src/main/java/org/apache/openejb/config/Cipher.java
tomee/apache-tomee/src/main/resources/tomee.sh


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

Branch: refs/heads/tomee-1.7.x
Commit: 2879bb00e0bc67fccf0b4c198a9b6e8ac49a20b9
Parents: 4b3a427
Author: Romain Manni-Bucau 
Authored: Sat Oct 24 21:07:14 2015 +0200
Committer: Jean-Louis Monteiro 
Committed: Sun Apr 10 19:54:13 2016 -0700

--
 .../java/org/apache/openejb/cli/Bootstrap.java  | 49 ++--
 .../java/org/apache/openejb/config/Cipher.java  |  6 +--
 tomee/apache-tomee/src/main/resources/tomee.sh  | 31 ++---
 3 files changed, 62 insertions(+), 24 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/tomee/blob/2879bb00/container/openejb-core/src/main/java/org/apache/openejb/cli/Bootstrap.java
--
diff --git 
a/container/openejb-core/src/main/java/org/apache/openejb/cli/Bootstrap.java 
b/container/openejb-core/src/main/java/org/apache/openejb/cli/Bootstrap.java
index e1ca146..4330f90 100644
--- a/container/openejb-core/src/main/java/org/apache/openejb/cli/Bootstrap.java
+++ b/container/openejb-core/src/main/java/org/apache/openejb/cli/Bootstrap.java
@@ -17,12 +17,15 @@
 
 package org.apache.openejb.cli;
 
+import org.apache.openejb.loader.IO;
 import org.apache.openejb.loader.SystemClassPath;
+import org.apache.openejb.util.PropertyPlaceHolderHelper;
 import org.apache.openejb.util.URLs;
 
 import java.io.File;
 import java.net.URI;
 import java.net.URL;
+import java.util.StringTokenizer;
 
 /**
  * @version $Rev$ $Date$
@@ -82,11 +85,51 @@ public class Bootstrap {
 }
 
 private static void setupClasspath() {
+final String base = System.getProperty(OPENEJB_BASE_PROPERTY_NAME, "");
+final String home = System.getProperty("catalina.home", 
System.getProperty(OPENEJB_HOME_PROPERTY_NAME, base));
 try {
-final File lib = new 
File(System.getProperty(OPENEJB_HOME_PROPERTY_NAME) + File.separator + "lib");
+final File lib = new File(home + File.separator + "lib");
 final SystemClassPath systemCP = new SystemClassPath();
-systemCP.addJarsToPath(lib);
-systemCP.addJarToPath(lib.toURI().toURL()); // add dir too like 
Tomcat/TomEE
+File config = new File(base, "conf/catalina.properties");
+if (!config.isFile()) {
+config = new File(home, "conf/catalina.properties");
+}
+if (config.isFile()) { // like 
org.apache.catalina.startup.Bootstrap.createClassLoader()
+String val = 
IO.readProperties(config).getProperty("common.loader", lib.getAbsolutePath());
+val = 
PropertyPlaceHolderHelper.simpleValue(val.replace("${catalina.", 
"${openejb.")); // base/home
+
+final StringTokenizer tokenizer = new StringTokenizer(val, 
",");
+while (tokenizer.hasMoreElements()) {
+String repository = tokenizer.nextToken().trim();
+if (repository.isEmpty()) {
+continue;
+}
+
+if (repository.startsWith("\"") && 
repository.endsWith("\"")) {
+repository = repository.substring(1, 
repository.length() - 1);
+}
+
+if (repository.endsWith("*.jar")) {
+final File dir = new File(repository.substring(0, 
repository.length() - "*.jar".length()));
+if (dir.isDirectory()) {
+systemCP.addJarsToPath(dir);
+}
+} else if (repository.endsWith(".jar")) {
+final File file = new File(repository);
+if (file.isFile()) {
+systemCP.addJarToPath(file.toURI().toURL());
+}
+} else {
+final File dir = new File(repository);
+if (dir.isDirectory()) {
+systemCP.addJarToPath(dir.toURI().toURL());
+}
+}
+}
+} else {
+systemCP.addJarsToPath(lib);
+systemCP.addJarToPath(lib.toURI().toURL());
+}
 } 

[jira] [Work started] (TOMEE-1773) Remove commons-io dependency from tomee-juli

2016-04-10 Thread Jean-Louis MONTEIRO (JIRA)

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

Work on TOMEE-1773 started by Jean-Louis MONTEIRO.
--
> Remove commons-io dependency from tomee-juli
> 
>
> Key: TOMEE-1773
> URL: https://issues.apache.org/jira/browse/TOMEE-1773
> Project: TomEE
>  Issue Type: Improvement
>Reporter: Jean-Louis MONTEIRO
>Assignee: Jean-Louis MONTEIRO
> Fix For: 1.7.5
>
>




--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Resolved] (TOMEE-1773) Remove commons-io dependency from tomee-juli

2016-04-10 Thread Jean-Louis MONTEIRO (JIRA)

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

Jean-Louis MONTEIRO resolved TOMEE-1773.

Resolution: Fixed

> Remove commons-io dependency from tomee-juli
> 
>
> Key: TOMEE-1773
> URL: https://issues.apache.org/jira/browse/TOMEE-1773
> Project: TomEE
>  Issue Type: Improvement
>Reporter: Jean-Louis MONTEIRO
>Assignee: Jean-Louis MONTEIRO
> Fix For: 1.7.5
>
>




--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


tomee git commit: Remove commons-io dep from runtime tomee-juli

2016-04-10 Thread jlmonteiro
Repository: tomee
Updated Branches:
  refs/heads/tomee-1.7.x ac3d551e2 -> 4b3a42748


Remove commons-io dep from runtime tomee-juli


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

Branch: refs/heads/tomee-1.7.x
Commit: 4b3a427487041769c881416b31beb2cf5aee5962
Parents: ac3d551
Author: Jean-Louis Monteiro 
Authored: Sun Apr 10 11:34:16 2016 -0700
Committer: Jean-Louis Monteiro 
Committed: Sun Apr 10 11:34:16 2016 -0700

--
 tomee/tomee-juli/pom.xml|  1 +
 .../jul/handler/rotating/LocalFileHandler.java  | 20 ++--
 2 files changed, 15 insertions(+), 6 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/tomee/blob/4b3a4274/tomee/tomee-juli/pom.xml
--
diff --git a/tomee/tomee-juli/pom.xml b/tomee/tomee-juli/pom.xml
index df7ed85..a2df271 100644
--- a/tomee/tomee-juli/pom.xml
+++ b/tomee/tomee-juli/pom.xml
@@ -39,6 +39,7 @@
 
   commons-io
   commons-io
+  test
 
 
   log4j

http://git-wip-us.apache.org/repos/asf/tomee/blob/4b3a4274/tomee/tomee-juli/src/main/java/org/apache/tomee/jul/handler/rotating/LocalFileHandler.java
--
diff --git 
a/tomee/tomee-juli/src/main/java/org/apache/tomee/jul/handler/rotating/LocalFileHandler.java
 
b/tomee/tomee-juli/src/main/java/org/apache/tomee/jul/handler/rotating/LocalFileHandler.java
index ffa61aa..ea5eed7 100644
--- 
a/tomee/tomee-juli/src/main/java/org/apache/tomee/jul/handler/rotating/LocalFileHandler.java
+++ 
b/tomee/tomee-juli/src/main/java/org/apache/tomee/jul/handler/rotating/LocalFileHandler.java
@@ -16,8 +16,6 @@
  */
 package org.apache.tomee.jul.handler.rotating;
 
-import org.apache.commons.io.FileUtils;
-
 import java.io.BufferedOutputStream;
 import java.io.File;
 import java.io.FileInputStream;
@@ -377,8 +375,18 @@ public class LocalFileHandler extends Handler {
 if (archives != null) {
 for (final File archive : archives) {
 try {
-if (FileUtils.isFileOlder(archive, now - 
purgeExpiryDuration)) {
-if (!FileUtils.deleteQuietly(archive)) {
+/*
+ Java 7 / TomEE 7.x implementation does
+
+ final BasicFileAttributes attr = 
Files.readAttributes(archive.toPath(), BasicFileAttributes.class);
+ if (now - attr.creationTime().toMillis() > 
purgeExpiryDuration) {
+
+ We can't do the creationTime, so using lastModified 
as fallback. For the archive, creation will be close
+ to lastModified, so worth case, we'll miss one cycle
+  */
+final long lastModified = archive.lastModified();
+if (now - lastModified > purgeExpiryDuration) {
+if (!archive.delete()) {
 // Do not try to delete on exit cause we will 
find it again
 reportError("Failed to delete " + 
archive.getAbsolutePath() + ".", null, ErrorManager.GENERIC_FAILURE);
 }
@@ -401,7 +409,7 @@ public class LocalFileHandler extends Handler {
 if (logs != null) {
 for (final File file : logs) {
 try {
-final boolean older = FileUtils.isFileOlder(file, now);
+final boolean older = file.lastModified() < now;
 if (older && now - file.lastModified() > 
archiveExpiryDuration) {
 createArchive(file);
 }
@@ -496,7 +504,7 @@ public class LocalFileHandler extends Handler {
 }
 }
 try {
-if (!FileUtils.deleteQuietly(source)) {
+if (!source.delete()) {
 reportError("Can't delete " + source.getAbsolutePath() + ".", 
null, ErrorManager.GENERIC_FAILURE);
 }
 } catch (final Exception e) {



[jira] [Created] (TOMEE-1773) Remove commons-io dependency from tomee-juli

2016-04-10 Thread Jean-Louis MONTEIRO (JIRA)
Jean-Louis MONTEIRO created TOMEE-1773:
--

 Summary: Remove commons-io dependency from tomee-juli
 Key: TOMEE-1773
 URL: https://issues.apache.org/jira/browse/TOMEE-1773
 Project: TomEE
  Issue Type: Improvement
Reporter: Jean-Louis MONTEIRO
Assignee: Jean-Louis MONTEIRO
 Fix For: 1.7.5






--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (OPENEJB-2127) Jms consumers registered after test is started

2016-04-10 Thread Jacek Obarymski (JIRA)

[ 
https://issues.apache.org/jira/browse/OPENEJB-2127?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15234233#comment-15234233
 ] 

Jacek Obarymski commented on OPENEJB-2127:
--

OK, thanks.

> Jms consumers registered after test is started
> --
>
> Key: OPENEJB-2127
> URL: https://issues.apache.org/jira/browse/OPENEJB-2127
> Project: OpenEJB
>  Issue Type: Bug
>  Components: tests
>Reporter: Jacek Obarymski
>
> Hi,
> W use OpenEJB for integration testing (with use of the ApplicationComposer 
> JUnit runner).
> We've observed that sometimes JMS consumers are registered after the test is 
> started. 
> If the app under test, listens on a JMS topic, then the message is 
> effectively lost (the app never receives it) and the test fails. This happens 
> occasionally on slower machines.
> This is because the test is started before the app is fully deployed with all 
> JMS consumers registered.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (OPENEJB-2127) Jms consumers registered after test is started

2016-04-10 Thread Romain Manni-Bucau (JIRA)

[ 
https://issues.apache.org/jira/browse/OPENEJB-2127?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15234226#comment-15234226
 ] 

Romain Manni-Bucau commented on OPENEJB-2127:
-

@Jacek: before forking please contact AMQ team, they can likely fix it (if a 
patch is provided it would be done for sure). Replacing AMQ is as easy as 
excluding it and adding your fork on openejb side.

> Jms consumers registered after test is started
> --
>
> Key: OPENEJB-2127
> URL: https://issues.apache.org/jira/browse/OPENEJB-2127
> Project: OpenEJB
>  Issue Type: Bug
>  Components: tests
>Reporter: Jacek Obarymski
>
> Hi,
> W use OpenEJB for integration testing (with use of the ApplicationComposer 
> JUnit runner).
> We've observed that sometimes JMS consumers are registered after the test is 
> started. 
> If the app under test, listens on a JMS topic, then the message is 
> effectively lost (the app never receives it) and the test fails. This happens 
> occasionally on slower machines.
> This is because the test is started before the app is fully deployed with all 
> JMS consumers registered.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (OPENEJB-2127) Jms consumers registered after test is started

2016-04-10 Thread Jacek Obarymski (JIRA)

[ 
https://issues.apache.org/jira/browse/OPENEJB-2127?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15234225#comment-15234225
 ] 

Jacek Obarymski commented on OPENEJB-2127:
--

Hi Romain,

Many thanks for the clarifications.
Yes, the custom log appender might be a solution, albeit obviously not ideal. 
If we decided to fork ActiveMQ and patch it to add the synchronous start option 
or investigate alternative JMS implementations, is there an easy way to replace 
ActiveMQ in OpenEJB?

> Jms consumers registered after test is started
> --
>
> Key: OPENEJB-2127
> URL: https://issues.apache.org/jira/browse/OPENEJB-2127
> Project: OpenEJB
>  Issue Type: Bug
>  Components: tests
>Reporter: Jacek Obarymski
>
> Hi,
> W use OpenEJB for integration testing (with use of the ApplicationComposer 
> JUnit runner).
> We've observed that sometimes JMS consumers are registered after the test is 
> started. 
> If the app under test, listens on a JMS topic, then the message is 
> effectively lost (the app never receives it) and the test fails. This happens 
> occasionally on slower machines.
> This is because the test is started before the app is fully deployed with all 
> JMS consumers registered.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)