You are viewing a plain text version of this content. The canonical link for it is here.
Posted to server-dev@james.apache.org by bt...@apache.org on 2019/01/02 10:34:11 UTC
[01/11] james-project git commit: MAILBOX-370 isNoop should be part
of the Event interface
Repository: james-project
Updated Branches:
refs/heads/master 97edbf904 -> 76374191d
MAILBOX-370 isNoop should be part of the Event interface
Project: http://git-wip-us.apache.org/repos/asf/james-project/repo
Commit: http://git-wip-us.apache.org/repos/asf/james-project/commit/9e6198f2
Tree: http://git-wip-us.apache.org/repos/asf/james-project/tree/9e6198f2
Diff: http://git-wip-us.apache.org/repos/asf/james-project/diff/9e6198f2
Branch: refs/heads/master
Commit: 9e6198f2da704b15038470a74d4fdd5684d5f7e8
Parents: 97edbf9
Author: Benoit Tellier <bt...@linagora.com>
Authored: Fri Dec 28 10:50:16 2018 +0700
Committer: Benoit Tellier <bt...@linagora.com>
Committed: Wed Jan 2 17:27:43 2019 +0700
----------------------------------------------------------------------
.../java/org/apache/james/mailbox/Event.java | 2 +
.../apache/james/mailbox/MailboxListener.java | 40 +++++
.../apache/james/mailbox/MessageMoveEvent.java | 1 +
.../james/mailbox/MailboxListenerTest.java | 145 +++++++++++++++++++
4 files changed, 188 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/james-project/blob/9e6198f2/mailbox/api/src/main/java/org/apache/james/mailbox/Event.java
----------------------------------------------------------------------
diff --git a/mailbox/api/src/main/java/org/apache/james/mailbox/Event.java b/mailbox/api/src/main/java/org/apache/james/mailbox/Event.java
index bd8073d..67ba616 100644
--- a/mailbox/api/src/main/java/org/apache/james/mailbox/Event.java
+++ b/mailbox/api/src/main/java/org/apache/james/mailbox/Event.java
@@ -23,4 +23,6 @@ import org.apache.james.core.User;
public interface Event {
User getUser();
+
+ boolean isNoop();
}
http://git-wip-us.apache.org/repos/asf/james-project/blob/9e6198f2/mailbox/api/src/main/java/org/apache/james/mailbox/MailboxListener.java
----------------------------------------------------------------------
diff --git a/mailbox/api/src/main/java/org/apache/james/mailbox/MailboxListener.java b/mailbox/api/src/main/java/org/apache/james/mailbox/MailboxListener.java
index 3e812c2..9e66023 100644
--- a/mailbox/api/src/main/java/org/apache/james/mailbox/MailboxListener.java
+++ b/mailbox/api/src/main/java/org/apache/james/mailbox/MailboxListener.java
@@ -92,6 +92,11 @@ public interface MailboxListener {
}
@Override
+ public boolean isNoop() {
+ return false;
+ }
+
+ @Override
public User getUser() {
return user;
}
@@ -206,6 +211,11 @@ public interface MailboxListener {
this.totalDeletedSize = totalDeletedSize;
}
+ @Override
+ public boolean isNoop() {
+ return false;
+ }
+
public QuotaRoot getQuotaRoot() {
return quotaRoot;
}
@@ -250,6 +260,11 @@ public interface MailboxListener {
}
@Override
+ public boolean isNoop() {
+ return false;
+ }
+
+ @Override
public final boolean equals(Object o) {
if (o instanceof MailboxAdded) {
MailboxAdded that = (MailboxAdded) o;
@@ -279,6 +294,11 @@ public interface MailboxListener {
this.newPath = newPath;
}
+ @Override
+ public boolean isNoop() {
+ return newPath.equals(path);
+ }
+
/**
* Gets the new name for this mailbox.
*
@@ -325,6 +345,11 @@ public interface MailboxListener {
}
@Override
+ public boolean isNoop() {
+ return aclDiff.getNewACL().equals(aclDiff.getOldACL());
+ }
+
+ @Override
public final boolean equals(Object o) {
if (o instanceof MailboxACLUpdated) {
MailboxACLUpdated that = (MailboxACLUpdated) o;
@@ -405,6 +430,11 @@ public interface MailboxListener {
}
@Override
+ public boolean isNoop() {
+ return expunged.isEmpty();
+ }
+
+ @Override
public final boolean equals(Object o) {
if (o instanceof Expunged) {
Expunged that = (Expunged) o;
@@ -449,6 +479,11 @@ public interface MailboxListener {
}
@Override
+ public boolean isNoop() {
+ return updatedFlags.isEmpty();
+ }
+
+ @Override
public final boolean equals(Object o) {
if (o instanceof FlagsUpdated) {
FlagsUpdated that = (FlagsUpdated) o;
@@ -499,6 +534,11 @@ public interface MailboxListener {
}
@Override
+ public boolean isNoop() {
+ return added.isEmpty();
+ }
+
+ @Override
public final boolean equals(Object o) {
if (o instanceof Added) {
Added that = (Added) o;
http://git-wip-us.apache.org/repos/asf/james-project/blob/9e6198f2/mailbox/api/src/main/java/org/apache/james/mailbox/MessageMoveEvent.java
----------------------------------------------------------------------
diff --git a/mailbox/api/src/main/java/org/apache/james/mailbox/MessageMoveEvent.java b/mailbox/api/src/main/java/org/apache/james/mailbox/MessageMoveEvent.java
index d10058b..e5e8e82 100644
--- a/mailbox/api/src/main/java/org/apache/james/mailbox/MessageMoveEvent.java
+++ b/mailbox/api/src/main/java/org/apache/james/mailbox/MessageMoveEvent.java
@@ -89,6 +89,7 @@ public class MessageMoveEvent implements Event {
this.messageIds = messageIds;
}
+ @Override
public boolean isNoop() {
return messageIds.isEmpty();
}
http://git-wip-us.apache.org/repos/asf/james-project/blob/9e6198f2/mailbox/api/src/test/java/org/apache/james/mailbox/MailboxListenerTest.java
----------------------------------------------------------------------
diff --git a/mailbox/api/src/test/java/org/apache/james/mailbox/MailboxListenerTest.java b/mailbox/api/src/test/java/org/apache/james/mailbox/MailboxListenerTest.java
index 24db57b..b91f5b0 100644
--- a/mailbox/api/src/test/java/org/apache/james/mailbox/MailboxListenerTest.java
+++ b/mailbox/api/src/test/java/org/apache/james/mailbox/MailboxListenerTest.java
@@ -19,11 +19,50 @@
package org.apache.james.mailbox;
+import static org.assertj.core.api.Assertions.assertThat;
+
+import java.time.Instant;
+import java.util.Date;
+import java.util.Optional;
+
+import javax.mail.Flags;
+
+import org.apache.commons.lang3.tuple.Pair;
+import org.apache.james.core.User;
+import org.apache.james.core.quota.QuotaCount;
+import org.apache.james.core.quota.QuotaSize;
+import org.apache.james.mailbox.acl.ACLDiff;
+import org.apache.james.mailbox.model.MailboxACL;
+import org.apache.james.mailbox.model.MailboxPath;
+import org.apache.james.mailbox.model.MessageMetaData;
+import org.apache.james.mailbox.model.Quota;
+import org.apache.james.mailbox.model.QuotaRoot;
+import org.apache.james.mailbox.model.TestId;
+import org.apache.james.mailbox.model.TestMessageId;
+import org.apache.james.mailbox.model.UpdatedFlags;
import org.junit.jupiter.api.Test;
+import com.google.common.collect.ImmutableList;
+import com.google.common.collect.ImmutableSortedMap;
+
import nl.jqno.equalsverifier.EqualsVerifier;
class MailboxListenerTest {
+ private static final MailboxPath PATH = MailboxPath.forUser("bob", "mailbox");
+ private static final MailboxPath OTHER_PATH = MailboxPath.forUser("bob", "mailbox.other");
+ private static final User BOB = User.fromUsername("bob");
+ private static final MailboxSession.SessionId SESSION_ID = MailboxSession.SessionId.of(42);
+ private static final TestId MAILBOX_ID = TestId.of(18);
+ private static final QuotaRoot QUOTA_ROOT = QuotaRoot.quotaRoot("bob", Optional.empty());
+ private static final QuotaCount QUOTA_COUNT = QuotaCount.count(34);
+ private static final QuotaSize QUOTA_SIZE = QuotaSize.size(48);
+ private static final MailboxACL ACL_1 = new MailboxACL(
+ Pair.of(MailboxACL.EntryKey.createUserEntryKey("Bob"), new MailboxACL.Rfc4314Rights(MailboxACL.Right.Administer)));
+ private static final MailboxACL ACL_2 = new MailboxACL(
+ Pair.of(MailboxACL.EntryKey.createUserEntryKey("Bob"), new MailboxACL.Rfc4314Rights(MailboxACL.Right.Read)));
+ private static final MessageUid UID = MessageUid.of(85);
+ private static final MessageMetaData META_DATA = new MessageMetaData(UID, 45, new Flags(), 45, new Date(), TestMessageId.of(75));
+
@Test
void mailboxAddedShouldMatchBeanContract() {
EqualsVerifier.forClass(MailboxListener.MailboxAdded.class).verify();
@@ -58,4 +97,110 @@ class MailboxListenerTest {
void flagUpdatedShouldMatchBeanContract() {
EqualsVerifier.forClass(MailboxListener.FlagsUpdated.class).verify();
}
+
+ @Test
+ void renameWithSameNameShouldBeNoop() {
+ MailboxListener.MailboxRenamed mailboxRenamed = new MailboxListener.MailboxRenamed(SESSION_ID, BOB, PATH, MAILBOX_ID, PATH);
+
+ assertThat(mailboxRenamed.isNoop()).isTrue();
+ }
+
+ @Test
+ void renameWithDifferentNameShouldNotBeNoop() {
+ MailboxListener.MailboxRenamed mailboxRenamed = new MailboxListener.MailboxRenamed(SESSION_ID, BOB, PATH, MAILBOX_ID, OTHER_PATH);
+
+ assertThat(mailboxRenamed.isNoop()).isFalse();
+ }
+
+ @Test
+ void addedShouldNotBeNoop() {
+ MailboxListener.MailboxAdded added = new MailboxListener.MailboxAdded(SESSION_ID, BOB, PATH, MAILBOX_ID);
+
+ assertThat(added.isNoop()).isFalse();
+ }
+
+ @Test
+ void removedShouldNotBeNoop() {
+ MailboxListener.MailboxDeletion deletion = new MailboxListener.MailboxDeletion(SESSION_ID, BOB, PATH, QUOTA_ROOT,
+ QUOTA_COUNT, QUOTA_SIZE, MAILBOX_ID);
+
+ assertThat(deletion.isNoop()).isFalse();
+ }
+
+ @Test
+ void aclDiffWithSameAclShouldBeNoop() {
+ MailboxListener.MailboxACLUpdated aclUpdated = new MailboxListener.MailboxACLUpdated(SESSION_ID, BOB, PATH, ACLDiff.computeDiff(ACL_1, ACL_1), MAILBOX_ID);
+
+ assertThat(aclUpdated.isNoop()).isTrue();
+ }
+
+ @Test
+ void aclDiffWithDifferentAclShouldNotBeNoop() {
+ MailboxListener.MailboxACLUpdated aclUpdated = new MailboxListener.MailboxACLUpdated(SESSION_ID, BOB, PATH, ACLDiff.computeDiff(ACL_1, ACL_2), MAILBOX_ID);
+
+ assertThat(aclUpdated.isNoop()).isFalse();
+ }
+
+ @Test
+ void addedShouldBeNoopWhenEmpty() {
+ MailboxListener.Added added = new MailboxListener.Added(SESSION_ID, BOB, PATH, MAILBOX_ID, ImmutableSortedMap.of());
+
+ assertThat(added.isNoop()).isTrue();
+ }
+
+ @Test
+ void addedShouldNotBeNoopWhenNotEmpty() {
+ MailboxListener.Added added = new MailboxListener.Added(SESSION_ID, BOB, PATH, MAILBOX_ID, ImmutableSortedMap.of(UID, META_DATA));
+
+ assertThat(added.isNoop()).isFalse();
+ }
+
+ @Test
+ void expungedShouldBeNoopWhenEmpty() {
+ MailboxListener.Expunged expunged = new MailboxListener.Expunged(SESSION_ID, BOB, PATH, MAILBOX_ID, ImmutableSortedMap.of());
+
+ assertThat(expunged.isNoop()).isTrue();
+ }
+
+ @Test
+ void expungedShouldNotBeNoopWhenNotEmpty() {
+ MailboxListener.Expunged expunged = new MailboxListener.Expunged(SESSION_ID, BOB, PATH, MAILBOX_ID, ImmutableSortedMap.of(UID, META_DATA));
+
+ assertThat(expunged.isNoop()).isFalse();
+ }
+
+ @Test
+ void flagsUpdatedShouldBeNoopWhenEmpty() {
+ MailboxListener.FlagsUpdated flagsUpdated = new MailboxListener.FlagsUpdated(SESSION_ID, BOB, PATH, MAILBOX_ID, ImmutableList.of());
+
+ assertThat(flagsUpdated.isNoop()).isTrue();
+ }
+
+ @Test
+ void flagsUpdatedShouldNotBeNoopWhenNotEmpty() {
+ MailboxListener.FlagsUpdated flagsUpdated = new MailboxListener.FlagsUpdated(SESSION_ID, BOB, PATH, MAILBOX_ID,
+ ImmutableList.of(UpdatedFlags.builder()
+ .uid(UID)
+ .modSeq(45)
+ .newFlags(new Flags())
+ .oldFlags(new Flags(Flags.Flag.ANSWERED))
+ .build()));
+
+ assertThat(flagsUpdated.isNoop()).isFalse();
+ }
+
+ @Test
+ void quotaUsageUpdatedEventShouldNotBeNoop() {
+ MailboxListener.QuotaUsageUpdatedEvent event = new MailboxListener.QuotaUsageUpdatedEvent(BOB, QUOTA_ROOT,
+ Quota.<QuotaCount>builder()
+ .used(QUOTA_COUNT)
+ .computedLimit(QuotaCount.unlimited())
+ .build(),
+ Quota.<QuotaSize>builder()
+ .used(QUOTA_SIZE)
+ .computedLimit(QuotaSize.unlimited())
+ .build(), Instant.now());
+
+ assertThat(event.isNoop()).isFalse();
+ }
}
\ No newline at end of file
---------------------------------------------------------------------
To unsubscribe, e-mail: server-dev-unsubscribe@james.apache.org
For additional commands, e-mail: server-dev-help@james.apache.org
[11/11] james-project git commit: Upgrade instruction: merge 3.3.0 &
unreleased blocks
Posted by bt...@apache.org.
Upgrade instruction: merge 3.3.0 & unreleased blocks
Project: http://git-wip-us.apache.org/repos/asf/james-project/repo
Commit: http://git-wip-us.apache.org/repos/asf/james-project/commit/e6419359
Tree: http://git-wip-us.apache.org/repos/asf/james-project/tree/e6419359
Diff: http://git-wip-us.apache.org/repos/asf/james-project/diff/e6419359
Branch: refs/heads/master
Commit: e64193596724551373422629c89499b1a30594f1
Parents: 5692d13
Author: Benoit Tellier <bt...@linagora.com>
Authored: Wed Jan 2 11:36:09 2019 +0700
Committer: Benoit Tellier <bt...@linagora.com>
Committed: Wed Jan 2 17:33:22 2019 +0700
----------------------------------------------------------------------
upgrade-instructions.md | 66 ++++++++++++++++++++------------------------
1 file changed, 30 insertions(+), 36 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/james-project/blob/e6419359/upgrade-instructions.md
----------------------------------------------------------------------
diff --git a/upgrade-instructions.md b/upgrade-instructions.md
index 89c10b4..a494d53 100644
--- a/upgrade-instructions.md
+++ b/upgrade-instructions.md
@@ -16,7 +16,9 @@ Changes to apply between 3.2.x and 3.3.x will be reported here.
Change list:
+ - [Changes to the MailboxListener API](#changes-to-the-mailboxlistener-api)
- [Changes in WebAdmin reIndexing API](#changes-in-webadmin-reindexing-api)
+ - [Rename KEY column in JAMES_MAILBOX_ANNOTATION table](#james-mailbox-annotation)
### Changes to the MailboxListener API
@@ -57,6 +59,34 @@ We made this API introduced in James 3.2.0 a bit more REST friendly. If you deve
For more details please refer to [the latest WebAdmin documentation](https://github.com/apache/james-project/blob/master/src/site/markdown/server/manage-webadmin.md#ReIndexing).
+### Rename KEY column in JAMES_MAILBOX_ANNOTATION table
+
+Date: 19/12/2018
+
+SHA-1: e25967664538be18ec29f47e73e661bdf29da41f
+
+JIRA: https://issues.apache.org/jira/projects/MAILBOX/issues/MAILBOX-356
+
+Required: Yes
+
+Concerned products: all JPA related products
+
+#### Upgrade procedure
+
+Rename `KEY` column in `JAMES_MAILBOX_ANNOTATION` table. The syntax is:
+
+##### In MySQL
+```
+ALTER TABLE JAMES_MAILBOX_ANNOTATION CHANGE KEY ANNOTATION_KEY varchar(200);
+```
+
+##### In MariaDB
+```
+ALTER TABLE JAMES_MAILBOX_ANNOTATION CHANGE COLUMN KEY ANNOTATION_KEY varchar(200);
+```
+
+_or the syntax corresponding to your database._
+
## 3.2.0 version
Changes to apply between 3.1.0 and 3.2.0 had been reported here.
@@ -171,39 +201,3 @@ $ nodetool stop
```
$ nodetool upgradesstables apache_james
```
-
-## 3.3.0 version
-
-Changes to apply between 3.2.0 and 3.3.0 had been reported here.
-
-Changelist:
-
- - [Rename KEY column in JAMES_MAILBOX_ANNOTATION table](#james-mailbox-annotation)
-
-### Rename KEY column in JAMES_MAILBOX_ANNOTATION table
-
-Date: 19/12/2018
-
-SHA-1: e25967664538be18ec29f47e73e661bdf29da41f
-
-JIRA: https://issues.apache.org/jira/projects/MAILBOX/issues/MAILBOX-356
-
-Required: Yes
-
-Concerned products: all JPA related products
-
-#### Upgrade procedure
-
-Rename `KEY` column in `JAMES_MAILBOX_ANNOTATION` table. The syntax is:
-
-##### In MySQL
-```
-ALTER TABLE JAMES_MAILBOX_ANNOTATION CHANGE KEY ANNOTATION_KEY varchar(200);
-```
-
-##### In MariaDB
-```
-ALTER TABLE JAMES_MAILBOX_ANNOTATION CHANGE COLUMN KEY ANNOTATION_KEY varchar(200);
-```
-
-_or the syntax corresponding to your database._
---------------------------------------------------------------------
To unsubscribe, e-mail: server-dev-unsubscribe@james.apache.org
For additional commands, e-mail: server-dev-help@james.apache.org
[09/11] james-project git commit: JAMES-2618 Add
CassandraSchemaVersionModule for extension in RabbitMQMailQueueTest
Posted by bt...@apache.org.
JAMES-2618 Add CassandraSchemaVersionModule for extension in RabbitMQMailQueueTest
fix error unconfigured table schemaversion
Project: http://git-wip-us.apache.org/repos/asf/james-project/repo
Commit: http://git-wip-us.apache.org/repos/asf/james-project/commit/76374191
Tree: http://git-wip-us.apache.org/repos/asf/james-project/tree/76374191
Diff: http://git-wip-us.apache.org/repos/asf/james-project/diff/76374191
Branch: refs/heads/master
Commit: 76374191db81372dd710bc59d6f680d3f6eed00e
Parents: 61baf07
Author: datph <dp...@linagora.com>
Authored: Mon Dec 24 17:07:10 2018 +0700
Committer: Benoit Tellier <bt...@linagora.com>
Committed: Wed Jan 2 17:33:22 2019 +0700
----------------------------------------------------------------------
.../org/apache/james/queue/rabbitmq/RabbitMQMailQueueTest.java | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/james-project/blob/76374191/server/queue/queue-rabbitmq/src/test/java/org/apache/james/queue/rabbitmq/RabbitMQMailQueueTest.java
----------------------------------------------------------------------
diff --git a/server/queue/queue-rabbitmq/src/test/java/org/apache/james/queue/rabbitmq/RabbitMQMailQueueTest.java b/server/queue/queue-rabbitmq/src/test/java/org/apache/james/queue/rabbitmq/RabbitMQMailQueueTest.java
index a3b69d9..01cdcbd 100644
--- a/server/queue/queue-rabbitmq/src/test/java/org/apache/james/queue/rabbitmq/RabbitMQMailQueueTest.java
+++ b/server/queue/queue-rabbitmq/src/test/java/org/apache/james/queue/rabbitmq/RabbitMQMailQueueTest.java
@@ -39,6 +39,7 @@ import org.apache.james.backends.cassandra.CassandraCluster;
import org.apache.james.backends.cassandra.CassandraClusterExtension;
import org.apache.james.backends.cassandra.components.CassandraModule;
import org.apache.james.backends.cassandra.init.configuration.CassandraConfiguration;
+import org.apache.james.backends.cassandra.versions.CassandraSchemaVersionModule;
import org.apache.james.blob.api.HashBlobId;
import org.apache.james.blob.cassandra.CassandraBlobModule;
import org.apache.james.blob.cassandra.CassandraBlobsDAO;
@@ -80,7 +81,8 @@ public class RabbitMQMailQueueTest implements ManageableMailQueueContract, MailQ
static CassandraClusterExtension cassandraCluster = new CassandraClusterExtension(CassandraModule.aggregateModules(
CassandraBlobModule.MODULE,
CassandraMailQueueViewModule.MODULE,
- CassandraEventStoreModule.MODULE));
+ CassandraEventStoreModule.MODULE,
+ CassandraSchemaVersionModule.MODULE));
@RegisterExtension
static RabbitMQExtension rabbitMQExtension = new RabbitMQExtension();
---------------------------------------------------------------------
To unsubscribe, e-mail: server-dev-unsubscribe@james.apache.org
For additional commands, e-mail: server-dev-help@james.apache.org
[03/11] james-project git commit: MAILBOX-370 Avoid using anonymous
events
Posted by bt...@apache.org.
MAILBOX-370 Avoid using anonymous events
Project: http://git-wip-us.apache.org/repos/asf/james-project/repo
Commit: http://git-wip-us.apache.org/repos/asf/james-project/commit/df5d4c12
Tree: http://git-wip-us.apache.org/repos/asf/james-project/tree/df5d4c12
Diff: http://git-wip-us.apache.org/repos/asf/james-project/diff/df5d4c12
Branch: refs/heads/master
Commit: df5d4c122c8013c02241bc09504ba83ca56dfba9
Parents: c6af362
Author: Benoit Tellier <bt...@linagora.com>
Authored: Fri Dec 28 11:04:06 2018 +0700
Committer: Benoit Tellier <bt...@linagora.com>
Committed: Wed Jan 2 17:27:55 2019 +0700
----------------------------------------------------------------------
.../DefaultDelegatingMailboxListenerTest.java | 24 ++++++++++----------
.../event/MailboxAnnotationListenerTest.java | 2 +-
.../base/MailboxEventAnalyserTest.java | 4 ++--
3 files changed, 15 insertions(+), 15 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/james-project/blob/df5d4c12/mailbox/store/src/test/java/org/apache/james/mailbox/store/event/DefaultDelegatingMailboxListenerTest.java
----------------------------------------------------------------------
diff --git a/mailbox/store/src/test/java/org/apache/james/mailbox/store/event/DefaultDelegatingMailboxListenerTest.java b/mailbox/store/src/test/java/org/apache/james/mailbox/store/event/DefaultDelegatingMailboxListenerTest.java
index 4f19fe9..6360ce0 100644
--- a/mailbox/store/src/test/java/org/apache/james/mailbox/store/event/DefaultDelegatingMailboxListenerTest.java
+++ b/mailbox/store/src/test/java/org/apache/james/mailbox/store/event/DefaultDelegatingMailboxListenerTest.java
@@ -81,7 +81,7 @@ public class DefaultDelegatingMailboxListenerTest {
@Test
public void eventShouldWork() {
- MailboxListener.MailboxEvent event = new MailboxListener.MailboxEvent(null, null, MAILBOX_PATH, MAILBOX_ID) {};
+ MailboxListener.MailboxEvent event = new MailboxListener.MailboxAdded(null, null, MAILBOX_PATH, MAILBOX_ID);
defaultDelegatingMailboxListener.event(event);
assertThat(mailboxEventCollector.getEvents()).containsExactly(event);
assertThat(eachNodeEventCollector.getEvents()).containsExactly(event);
@@ -90,7 +90,7 @@ public class DefaultDelegatingMailboxListenerTest {
@Test
public void eventShouldOnlyTriggerMAILBOXListenerRelatedToTheEvent() {
- MailboxListener.MailboxEvent event = new MailboxListener.MailboxEvent(null, null, OTHER_MAILBOX_PATH, OTHER_MAILBOX_ID) {};
+ MailboxListener.MailboxEvent event = new MailboxListener.MailboxAdded(null, null, OTHER_MAILBOX_PATH, OTHER_MAILBOX_ID);
defaultDelegatingMailboxListener.event(event);
assertThat(mailboxEventCollector.getEvents()).isEmpty();
assertThat(eachNodeEventCollector.getEvents()).containsExactly(event);
@@ -102,9 +102,9 @@ public class DefaultDelegatingMailboxListenerTest {
QuotaRoot quotaRoot = QuotaRoot.quotaRoot("root", null);
QuotaCount deletedMessageCount = QuotaCount.count(123);
QuotaSize totalDeletedSize = QuotaSize.size(456);
- MailboxListener.MailboxDeletion event = new MailboxListener.MailboxDeletion(null, null, MAILBOX_PATH, quotaRoot, deletedMessageCount, totalDeletedSize, MAILBOX_ID) {};
+ MailboxListener.MailboxDeletion event = new MailboxListener.MailboxDeletion(null, null, MAILBOX_PATH, quotaRoot, deletedMessageCount, totalDeletedSize, MAILBOX_ID);
defaultDelegatingMailboxListener.event(event);
- MailboxListener.MailboxEvent secondEvent = new MailboxListener.MailboxEvent(null, null, MAILBOX_PATH, MAILBOX_ID) {};
+ MailboxListener.MailboxEvent secondEvent = new MailboxListener.MailboxAdded(null, null, MAILBOX_PATH, MAILBOX_ID);
defaultDelegatingMailboxListener.event(secondEvent);
assertThat(mailboxEventCollector.getEvents()).containsExactly(event);
assertThat(eachNodeEventCollector.getEvents()).containsOnly(event, secondEvent);
@@ -116,9 +116,9 @@ public class DefaultDelegatingMailboxListenerTest {
QuotaRoot quotaRoot = QuotaRoot.quotaRoot("root", null);
QuotaCount quotaCount = QuotaCount.count(123);
QuotaSize quotaSize = QuotaSize.size(456);
- MailboxListener.MailboxDeletion event = new MailboxListener.MailboxDeletion(null, null, MAILBOX_PATH, quotaRoot, quotaCount, quotaSize, MAILBOX_ID) {};
+ MailboxListener.MailboxDeletion event = new MailboxListener.MailboxDeletion(null, null, MAILBOX_PATH, quotaRoot, quotaCount, quotaSize, MAILBOX_ID);
defaultDelegatingMailboxListener.event(event);
- MailboxListener.MailboxEvent secondEvent = new MailboxListener.MailboxEvent(null, null, OTHER_MAILBOX_PATH, MAILBOX_ID) {};
+ MailboxListener.MailboxEvent secondEvent = new MailboxListener.MailboxAdded(null, null, OTHER_MAILBOX_PATH, MAILBOX_ID);
defaultDelegatingMailboxListener.event(secondEvent);
assertThat(mailboxEventCollector.getEvents()).containsExactly(event);
assertThat(eachNodeEventCollector.getEvents()).containsOnly(event, secondEvent);
@@ -128,7 +128,7 @@ public class DefaultDelegatingMailboxListenerTest {
@Test
public void removeListenerShouldWork() {
defaultDelegatingMailboxListener.removeListener(MAILBOX_ID, mailboxEventCollector, null);
- MailboxListener.MailboxEvent event = new MailboxListener.MailboxEvent(null, null, MAILBOX_PATH, MAILBOX_ID) {};
+ MailboxListener.MailboxEvent event = new MailboxListener.MailboxAdded(null, null, MAILBOX_PATH, MAILBOX_ID);
defaultDelegatingMailboxListener.event(event);
assertThat(mailboxEventCollector.getEvents()).isEmpty();
assertThat(eachNodeEventCollector.getEvents()).containsExactly(event);
@@ -138,7 +138,7 @@ public class DefaultDelegatingMailboxListenerTest {
@Test
public void removeListenerShouldNotRemoveAListenerFromADifferentPath() {
defaultDelegatingMailboxListener.removeListener(OTHER_MAILBOX_ID, mailboxEventCollector, null);
- MailboxListener.MailboxEvent event = new MailboxListener.MailboxEvent(null, null, MAILBOX_PATH, MAILBOX_ID) {};
+ MailboxListener.MailboxEvent event = new MailboxListener.MailboxAdded(null, null, MAILBOX_PATH, MAILBOX_ID);
defaultDelegatingMailboxListener.event(event);
assertThat(mailboxEventCollector.getEvents()).containsExactly(event);
assertThat(eachNodeEventCollector.getEvents()).containsExactly(event);
@@ -148,7 +148,7 @@ public class DefaultDelegatingMailboxListenerTest {
@Test
public void removeGlobalListenerShouldWorkForONCE() {
defaultDelegatingMailboxListener.removeGlobalListener(eachNodeEventCollector, null);
- MailboxListener.MailboxEvent event = new MailboxListener.MailboxEvent(null, null, MAILBOX_PATH, MAILBOX_ID) {};
+ MailboxListener.MailboxEvent event = new MailboxListener.MailboxAdded(null, null, MAILBOX_PATH, MAILBOX_ID);
defaultDelegatingMailboxListener.event(event);
assertThat(mailboxEventCollector.getEvents()).containsExactly(event);
assertThat(eachNodeEventCollector.getEvents()).isEmpty();
@@ -158,7 +158,7 @@ public class DefaultDelegatingMailboxListenerTest {
@Test
public void removeGlobalListenerShouldWorkForEACH_NODE() throws Exception {
defaultDelegatingMailboxListener.removeGlobalListener(onceEventCollector, null);
- MailboxListener.MailboxEvent event = new MailboxListener.MailboxEvent(null, null, MAILBOX_PATH, MAILBOX_ID) {};
+ MailboxListener.MailboxEvent event = new MailboxListener.MailboxAdded(null, null, MAILBOX_PATH, MAILBOX_ID);
defaultDelegatingMailboxListener.event(event);
assertThat(mailboxEventCollector.getEvents()).containsExactly(event);
assertThat(eachNodeEventCollector.getEvents()).containsExactly(event);
@@ -168,8 +168,8 @@ public class DefaultDelegatingMailboxListenerTest {
@Test
public void listenersErrorsShouldNotBePropageted() throws Exception {
MailboxSession session = MailboxSessionUtil.create("benwa");
- MailboxListener.MailboxEvent event = new MailboxListener.MailboxEvent(session.getSessionId(),
- session.getUser(), MAILBOX_PATH, MAILBOX_ID) {};
+ MailboxListener.MailboxEvent event = new MailboxListener.MailboxAdded(session.getSessionId(),
+ session.getUser(), MAILBOX_PATH, MAILBOX_ID);
MailboxListener mockedListener = mock(MailboxListener.class);
when(mockedListener.getType()).thenReturn(MailboxListener.ListenerType.ONCE);
doThrow(new RuntimeException()).when(mockedListener).event(event);
http://git-wip-us.apache.org/repos/asf/james-project/blob/df5d4c12/mailbox/store/src/test/java/org/apache/james/mailbox/store/event/MailboxAnnotationListenerTest.java
----------------------------------------------------------------------
diff --git a/mailbox/store/src/test/java/org/apache/james/mailbox/store/event/MailboxAnnotationListenerTest.java b/mailbox/store/src/test/java/org/apache/james/mailbox/store/event/MailboxAnnotationListenerTest.java
index f643cf4..1ccca6a 100644
--- a/mailbox/store/src/test/java/org/apache/james/mailbox/store/event/MailboxAnnotationListenerTest.java
+++ b/mailbox/store/src/test/java/org/apache/james/mailbox/store/event/MailboxAnnotationListenerTest.java
@@ -95,7 +95,7 @@ public class MailboxAnnotationListenerTest {
@Test
public void eventShouldDoNothingIfDoNotHaveMailboxDeletionEvent() {
- MailboxListener.MailboxEvent event = new MailboxListener.MailboxEvent(null, null, MAILBOX_PATH, MAILBOX_ID) {};
+ MailboxListener.MailboxEvent event = new MailboxListener.MailboxAdded(null, null, MAILBOX_PATH, MAILBOX_ID);
listener.event(event);
verifyNoMoreInteractions(mailboxSessionMapperFactory);
http://git-wip-us.apache.org/repos/asf/james-project/blob/df5d4c12/protocols/imap/src/test/java/org/apache/james/imap/processor/base/MailboxEventAnalyserTest.java
----------------------------------------------------------------------
diff --git a/protocols/imap/src/test/java/org/apache/james/imap/processor/base/MailboxEventAnalyserTest.java b/protocols/imap/src/test/java/org/apache/james/imap/processor/base/MailboxEventAnalyserTest.java
index 14bab7a..1dc277a 100644
--- a/protocols/imap/src/test/java/org/apache/james/imap/processor/base/MailboxEventAnalyserTest.java
+++ b/protocols/imap/src/test/java/org/apache/james/imap/processor/base/MailboxEventAnalyserTest.java
@@ -135,8 +135,8 @@ public class MailboxEventAnalyserTest {
@Test
public void testShouldBeNoSizeChangeOnOtherEvent() {
- MailboxListener.MailboxEvent event = new MailboxListener.MailboxEvent(MAILBOX_SESSION.getSessionId(),
- MAILBOX_SESSION.getUser(), MAILBOX_PATH, MAILBOX_ID) {};
+ MailboxListener.MailboxEvent event = new MailboxListener.MailboxAdded(MAILBOX_SESSION.getSessionId(),
+ MAILBOX_SESSION.getUser(), MAILBOX_PATH, MAILBOX_ID);
testee.event(event);
---------------------------------------------------------------------
To unsubscribe, e-mail: server-dev-unsubscribe@james.apache.org
For additional commands, e-mail: server-dev-help@james.apache.org
[07/11] james-project git commit: JAMES-2551 Use NIO for RabbitMQ
connections
Posted by bt...@apache.org.
JAMES-2551 Use NIO for RabbitMQ connections
Project: http://git-wip-us.apache.org/repos/asf/james-project/repo
Commit: http://git-wip-us.apache.org/repos/asf/james-project/commit/5692d131
Tree: http://git-wip-us.apache.org/repos/asf/james-project/tree/5692d131
Diff: http://git-wip-us.apache.org/repos/asf/james-project/diff/5692d131
Branch: refs/heads/master
Commit: 5692d1312636c768d06e81dcbce4ca13325b99d1
Parents: 4a9295c
Author: Benoit Tellier <bt...@linagora.com>
Authored: Tue Dec 25 10:48:15 2018 +0700
Committer: Benoit Tellier <bt...@linagora.com>
Committed: Wed Jan 2 17:33:17 2019 +0700
----------------------------------------------------------------------
.../apache/james/backend/rabbitmq/RabbitMQConnectionFactory.java | 1 +
1 file changed, 1 insertion(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/james-project/blob/5692d131/backends-common/rabbitmq/src/main/java/org/apache/james/backend/rabbitmq/RabbitMQConnectionFactory.java
----------------------------------------------------------------------
diff --git a/backends-common/rabbitmq/src/main/java/org/apache/james/backend/rabbitmq/RabbitMQConnectionFactory.java b/backends-common/rabbitmq/src/main/java/org/apache/james/backend/rabbitmq/RabbitMQConnectionFactory.java
index 2f901f4..a6b7631 100644
--- a/backends-common/rabbitmq/src/main/java/org/apache/james/backend/rabbitmq/RabbitMQConnectionFactory.java
+++ b/backends-common/rabbitmq/src/main/java/org/apache/james/backend/rabbitmq/RabbitMQConnectionFactory.java
@@ -48,6 +48,7 @@ public class RabbitMQConnectionFactory {
try {
ConnectionFactory connectionFactory = new ConnectionFactory();
connectionFactory.setUri(rabbitMQConfiguration.getUri());
+ connectionFactory.useNio();
return connectionFactory;
} catch (Exception e) {
throw new RuntimeException(e);
---------------------------------------------------------------------
To unsubscribe, e-mail: server-dev-unsubscribe@james.apache.org
For additional commands, e-mail: server-dev-help@james.apache.org
[08/11] james-project git commit: JAMES-2635 Dead link when
downloading Spring wiring 3.2.0
Posted by bt...@apache.org.
JAMES-2635 Dead link when downloading Spring wiring 3.2.0
Project: http://git-wip-us.apache.org/repos/asf/james-project/repo
Commit: http://git-wip-us.apache.org/repos/asf/james-project/commit/59d791c1
Tree: http://git-wip-us.apache.org/repos/asf/james-project/tree/59d791c1
Diff: http://git-wip-us.apache.org/repos/asf/james-project/diff/59d791c1
Branch: refs/heads/master
Commit: 59d791c16fe547927d28b1ba824e79bea192b6ba
Parents: e641935
Author: Benoit Tellier <bt...@linagora.com>
Authored: Wed Jan 2 15:10:45 2019 +0700
Committer: Benoit Tellier <bt...@linagora.com>
Committed: Wed Jan 2 17:33:22 2019 +0700
----------------------------------------------------------------------
src/site/xdoc/download.xml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/james-project/blob/59d791c1/src/site/xdoc/download.xml
----------------------------------------------------------------------
diff --git a/src/site/xdoc/download.xml b/src/site/xdoc/download.xml
index 4f658a7..a150622 100644
--- a/src/site/xdoc/download.xml
+++ b/src/site/xdoc/download.xml
@@ -164,7 +164,7 @@ is found <a href='https://www.apache.org/licenses/exports/'>here</a>.
[<a href="https://apache.org/dist/james/server/3.2.0/james-server-sources-3.2.0.zip.asc">PGP</a>]</li>
<li>Binary (ZIP Format) for Spring wiring:
- <a href="https://www.apache.org/dyn/closer.lua/james/server/james-server-app-3.2.0-app.zip">apache-james-3.2.0-app.zip</a>
+ <a href="https://www.apache.org/dyn/closer.lua/james/server/3.2.0/james-server-app-3.2.0-app.zip">apache-james-3.2.0-app.zip</a>
[<a href="https://apache.org/dist/james/server/3.2.0/james-server-app-3.2.0-app.zip.sha1">SHA-1</a>]
[<a href="https://apache.org/dist/james/server/3.2.0/james-server-app-3.2.0-app.zip.asc">PGP</a>]
</li>
---------------------------------------------------------------------
To unsubscribe, e-mail: server-dev-unsubscribe@james.apache.org
For additional commands, e-mail: server-dev-help@james.apache.org
[04/11] james-project git commit: MAILBOX-370 EventBus should not
dispatch noop events
Posted by bt...@apache.org.
MAILBOX-370 EventBus should not dispatch noop events
Project: http://git-wip-us.apache.org/repos/asf/james-project/repo
Commit: http://git-wip-us.apache.org/repos/asf/james-project/commit/59996dc0
Tree: http://git-wip-us.apache.org/repos/asf/james-project/tree/59996dc0
Diff: http://git-wip-us.apache.org/repos/asf/james-project/diff/59996dc0
Branch: refs/heads/master
Commit: 59996dc07cd350a5f542b09ac7b983755c2dca80
Parents: df5d4c1
Author: Benoit Tellier <bt...@linagora.com>
Authored: Fri Dec 28 11:39:19 2018 +0700
Committer: Benoit Tellier <bt...@linagora.com>
Committed: Wed Jan 2 17:28:02 2019 +0700
----------------------------------------------------------------------
.../james/mailbox/events/EventBusContract.java | 29 ++++++++++++++++++++
.../james/mailbox/events/InVMEventBus.java | 5 +++-
2 files changed, 33 insertions(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/james-project/blob/59996dc0/mailbox/api/src/test/java/org/apache/james/mailbox/events/EventBusContract.java
----------------------------------------------------------------------
diff --git a/mailbox/api/src/test/java/org/apache/james/mailbox/events/EventBusContract.java b/mailbox/api/src/test/java/org/apache/james/mailbox/events/EventBusContract.java
index d884076..236ee75 100644
--- a/mailbox/api/src/test/java/org/apache/james/mailbox/events/EventBusContract.java
+++ b/mailbox/api/src/test/java/org/apache/james/mailbox/events/EventBusContract.java
@@ -28,18 +28,23 @@ import static org.mockito.Mockito.doThrow;
import static org.mockito.Mockito.mock;
import static org.mockito.Mockito.times;
import static org.mockito.Mockito.verify;
+import static org.mockito.Mockito.verifyNoMoreInteractions;
import static org.mockito.Mockito.verifyZeroInteractions;
import static org.mockito.Mockito.when;
import java.time.Duration;
import java.util.concurrent.CountDownLatch;
+import org.apache.james.core.User;
import org.apache.james.mailbox.MailboxListener;
+import org.apache.james.mailbox.MailboxSession;
import org.apache.james.mailbox.model.MailboxId;
+import org.apache.james.mailbox.model.MailboxPath;
import org.apache.james.mailbox.model.TestId;
import org.junit.jupiter.api.Test;
import com.google.common.collect.ImmutableSet;
+import com.google.common.collect.ImmutableSortedMap;
public interface EventBusContract {
MailboxListener.MailboxEvent event = mock(MailboxListener.MailboxEvent.class);
@@ -74,6 +79,30 @@ public interface EventBusContract {
}
@Test
+ default void groupListenersShouldNotReceiveNoopEvents() {
+ MailboxListener listener = newListener();
+
+ eventBus().register(listener, new GroupA());
+
+ MailboxListener.Added noopEvent = new MailboxListener.Added(MailboxSession.SessionId.of(18), User.fromUsername("bob"), MailboxPath.forUser("bob", "mailbox"), TestId.of(58), ImmutableSortedMap.of());
+ eventBus().dispatch(noopEvent, NO_KEYS).block();
+
+ verifyNoMoreInteractions(listener);
+ }
+
+ @Test
+ default void registeredListenersShouldNotReceiveNoopEvents() {
+ MailboxListener listener = newListener();
+
+ eventBus().register(listener, KEY_1);
+
+ MailboxListener.Added noopEvent = new MailboxListener.Added(MailboxSession.SessionId.of(18), User.fromUsername("bob"), MailboxPath.forUser("bob", "mailbox"), TestId.of(58), ImmutableSortedMap.of());
+ eventBus().dispatch(noopEvent, KEY_1).block();
+
+ verifyNoMoreInteractions(listener);
+ }
+
+ @Test
default void dispatchShouldNotThrowWhenAGroupListenerFails() {
MailboxListener listener = newListener();
doThrow(new RuntimeException()).when(listener).event(any());
http://git-wip-us.apache.org/repos/asf/james-project/blob/59996dc0/mailbox/event/event-memory/src/main/java/org/apache/james/mailbox/events/InVMEventBus.java
----------------------------------------------------------------------
diff --git a/mailbox/event/event-memory/src/main/java/org/apache/james/mailbox/events/InVMEventBus.java b/mailbox/event/event-memory/src/main/java/org/apache/james/mailbox/events/InVMEventBus.java
index fb4aee3..0f452bf 100644
--- a/mailbox/event/event-memory/src/main/java/org/apache/james/mailbox/events/InVMEventBus.java
+++ b/mailbox/event/event-memory/src/main/java/org/apache/james/mailbox/events/InVMEventBus.java
@@ -62,7 +62,10 @@ public class InVMEventBus implements EventBus {
@Override
public Mono<Void> dispatch(Event event, Set<RegistrationKey> keys) {
- return eventDelivery.deliver(registeredListeners(keys), event).synchronousListenerFuture();
+ if (!event.isNoop()) {
+ return eventDelivery.deliver(registeredListeners(keys), event).synchronousListenerFuture();
+ }
+ return Mono.empty();
}
private Set<MailboxListener> registeredListeners(Set<RegistrationKey> keys) {
---------------------------------------------------------------------
To unsubscribe, e-mail: server-dev-unsubscribe@james.apache.org
For additional commands, e-mail: server-dev-help@james.apache.org
[06/11] james-project git commit: MAILBOX-370 Move the responsibility
of Noop filtering from the dispatcher to the Delegating listener
Posted by bt...@apache.org.
MAILBOX-370 Move the responsibility of Noop filtering from the dispatcher to the Delegating listener
Project: http://git-wip-us.apache.org/repos/asf/james-project/repo
Commit: http://git-wip-us.apache.org/repos/asf/james-project/commit/4a9295cb
Tree: http://git-wip-us.apache.org/repos/asf/james-project/tree/4a9295cb
Diff: http://git-wip-us.apache.org/repos/asf/james-project/diff/4a9295cb
Branch: refs/heads/master
Commit: 4a9295cb1c010b65b03bec9d809173b58e634dd6
Parents: dc841af
Author: Benoit Tellier <bt...@linagora.com>
Authored: Fri Dec 28 14:35:10 2018 +0700
Committer: Benoit Tellier <bt...@linagora.com>
Committed: Wed Jan 2 17:28:16 2019 +0700
----------------------------------------------------------------------
.../event/DefaultDelegatingMailboxListener.java | 26 +++++++-------
.../store/event/MailboxEventDispatcher.java | 4 +--
.../store/MailboxEventDispatcherTest.java | 37 +++++++-------------
.../DefaultDelegatingMailboxListenerTest.java | 13 +++++++
4 files changed, 40 insertions(+), 40 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/james-project/blob/4a9295cb/mailbox/store/src/main/java/org/apache/james/mailbox/store/event/DefaultDelegatingMailboxListener.java
----------------------------------------------------------------------
diff --git a/mailbox/store/src/main/java/org/apache/james/mailbox/store/event/DefaultDelegatingMailboxListener.java b/mailbox/store/src/main/java/org/apache/james/mailbox/store/event/DefaultDelegatingMailboxListener.java
index b050369..79167f3 100644
--- a/mailbox/store/src/main/java/org/apache/james/mailbox/store/event/DefaultDelegatingMailboxListener.java
+++ b/mailbox/store/src/main/java/org/apache/james/mailbox/store/event/DefaultDelegatingMailboxListener.java
@@ -91,18 +91,20 @@ public class DefaultDelegatingMailboxListener implements DelegatingMailboxListen
@Override
public void event(Event event) {
- ImmutableList<MailboxListener> listeners = ImmutableList.<MailboxListener>builder()
- .addAll(registry.getGlobalListeners())
- .addAll(registeredMailboxListeners(event))
- .build();
-
- eventDelivery.deliver(listeners, event)
- .synchronousListenerFuture()
- .block();
-
- if (event instanceof MailboxDeletion) {
- MailboxDeletion deletion = (MailboxDeletion) event;
- registry.deleteRegistryFor(deletion.getMailboxId());
+ if (!event.isNoop()) {
+ ImmutableList<MailboxListener> listeners = ImmutableList.<MailboxListener>builder()
+ .addAll(registry.getGlobalListeners())
+ .addAll(registeredMailboxListeners(event))
+ .build();
+
+ eventDelivery.deliver(listeners, event)
+ .synchronousListenerFuture()
+ .block();
+
+ if (event instanceof MailboxDeletion) {
+ MailboxDeletion deletion = (MailboxDeletion) event;
+ registry.deleteRegistryFor(deletion.getMailboxId());
+ }
}
}
http://git-wip-us.apache.org/repos/asf/james-project/blob/4a9295cb/mailbox/store/src/main/java/org/apache/james/mailbox/store/event/MailboxEventDispatcher.java
----------------------------------------------------------------------
diff --git a/mailbox/store/src/main/java/org/apache/james/mailbox/store/event/MailboxEventDispatcher.java b/mailbox/store/src/main/java/org/apache/james/mailbox/store/event/MailboxEventDispatcher.java
index 87bfe86..3a4b113 100644
--- a/mailbox/store/src/main/java/org/apache/james/mailbox/store/event/MailboxEventDispatcher.java
+++ b/mailbox/store/src/main/java/org/apache/james/mailbox/store/event/MailboxEventDispatcher.java
@@ -169,8 +169,6 @@ public class MailboxEventDispatcher {
}
public void event(Event event) {
- if (!event.isNoop()) {
- listener.event(event);
- }
+ listener.event(event);
}
}
http://git-wip-us.apache.org/repos/asf/james-project/blob/4a9295cb/mailbox/store/src/test/java/org/apache/james/mailbox/store/MailboxEventDispatcherTest.java
----------------------------------------------------------------------
diff --git a/mailbox/store/src/test/java/org/apache/james/mailbox/store/MailboxEventDispatcherTest.java b/mailbox/store/src/test/java/org/apache/james/mailbox/store/MailboxEventDispatcherTest.java
index 8b1e92b..955231b 100644
--- a/mailbox/store/src/test/java/org/apache/james/mailbox/store/MailboxEventDispatcherTest.java
+++ b/mailbox/store/src/test/java/org/apache/james/mailbox/store/MailboxEventDispatcherTest.java
@@ -44,7 +44,6 @@ import org.junit.Before;
import org.junit.Test;
import com.google.common.collect.ImmutableList;
-import com.google.common.collect.ImmutableMap;
public class MailboxEventDispatcherTest {
private static final MailboxSession.SessionId SESSION_ID = MailboxSession.SessionId.of(10);
@@ -91,7 +90,7 @@ public class MailboxEventDispatcherTest {
assertThat(collector.getEvents()).hasSize(1)
.are(INSTANCE_OF_EVENT_FLAGS_UPDATED);
MailboxListener.FlagsUpdated event = (MailboxListener.FlagsUpdated) collector.getEvents()
- .get(0);
+ .get(0);
assertThat(event.getUpdatedFlags().get(0).systemFlagIterator()).isEmpty();
}
@@ -110,7 +109,7 @@ public class MailboxEventDispatcherTest {
assertThat(collector.getEvents()).hasSize(1)
.are(INSTANCE_OF_EVENT_FLAGS_UPDATED);
MailboxListener.FlagsUpdated event = (MailboxListener.FlagsUpdated) collector.getEvents()
- .get(0);
+ .get(0);
assertThat(event.getUpdatedFlags().get(0).systemFlagIterator())
.containsOnly(Flags.Flag.ANSWERED);
}
@@ -130,7 +129,7 @@ public class MailboxEventDispatcherTest {
assertThat(collector.getEvents()).hasSize(1)
.are(INSTANCE_OF_EVENT_FLAGS_UPDATED);
MailboxListener.FlagsUpdated event = (MailboxListener.FlagsUpdated) collector.getEvents()
- .get(0);
+ .get(0);
assertThat(event.getUpdatedFlags().get(0).systemFlagIterator())
.containsOnly(Flags.Flag.ANSWERED);
}
@@ -149,7 +148,7 @@ public class MailboxEventDispatcherTest {
assertThat(collector.getEvents()).hasSize(1)
.are(INSTANCE_OF_EVENT_FLAGS_UPDATED);
MailboxListener.FlagsUpdated event = (MailboxListener.FlagsUpdated) collector.getEvents()
- .get(0);
+ .get(0);
assertThat(event.getUpdatedFlags().get(0).systemFlagIterator())
.containsOnly(Flags.Flag.DELETED);
}
@@ -168,7 +167,7 @@ public class MailboxEventDispatcherTest {
assertThat(collector.getEvents()).hasSize(1)
.are(INSTANCE_OF_EVENT_FLAGS_UPDATED);
MailboxListener.FlagsUpdated event = (MailboxListener.FlagsUpdated) collector.getEvents()
- .get(0);
+ .get(0);
assertThat(event.getUpdatedFlags().get(0).systemFlagIterator())
.containsOnly(Flags.Flag.DELETED);
}
@@ -187,7 +186,7 @@ public class MailboxEventDispatcherTest {
assertThat(collector.getEvents()).hasSize(1)
.are(INSTANCE_OF_EVENT_FLAGS_UPDATED);
MailboxListener.FlagsUpdated event = (MailboxListener.FlagsUpdated) collector.getEvents()
- .get(0);
+ .get(0);
assertThat(event.getUpdatedFlags().get(0).systemFlagIterator())
.containsOnly(Flags.Flag.DRAFT);
}
@@ -206,7 +205,7 @@ public class MailboxEventDispatcherTest {
assertThat(collector.getEvents()).hasSize(1)
.are(INSTANCE_OF_EVENT_FLAGS_UPDATED);
MailboxListener.FlagsUpdated event = (MailboxListener.FlagsUpdated) collector.getEvents()
- .get(0);
+ .get(0);
assertThat(event.getUpdatedFlags().get(0).systemFlagIterator())
.containsOnly(Flags.Flag.DRAFT);
}
@@ -225,7 +224,7 @@ public class MailboxEventDispatcherTest {
assertThat(collector.getEvents()).hasSize(1)
.are(INSTANCE_OF_EVENT_FLAGS_UPDATED);
MailboxListener.FlagsUpdated event = (MailboxListener.FlagsUpdated) collector.getEvents()
- .get(0);
+ .get(0);
assertThat(event.getUpdatedFlags().get(0).systemFlagIterator())
.containsOnly(Flags.Flag.FLAGGED);
}
@@ -244,7 +243,7 @@ public class MailboxEventDispatcherTest {
assertThat(collector.getEvents()).hasSize(1)
.are(INSTANCE_OF_EVENT_FLAGS_UPDATED);
MailboxListener.FlagsUpdated event = (MailboxListener.FlagsUpdated) collector.getEvents()
- .get(0);
+ .get(0);
assertThat(event.getUpdatedFlags().get(0).systemFlagIterator())
.containsOnly(Flags.Flag.FLAGGED);
}
@@ -263,7 +262,7 @@ public class MailboxEventDispatcherTest {
assertThat(collector.getEvents()).hasSize(1)
.are(INSTANCE_OF_EVENT_FLAGS_UPDATED);
MailboxListener.FlagsUpdated event = (MailboxListener.FlagsUpdated) collector.getEvents()
- .get(0);
+ .get(0);
assertThat(event.getUpdatedFlags().get(0).systemFlagIterator())
.containsOnly(Flags.Flag.RECENT);
}
@@ -282,7 +281,7 @@ public class MailboxEventDispatcherTest {
assertThat(collector.getEvents()).hasSize(1)
.are(INSTANCE_OF_EVENT_FLAGS_UPDATED);
MailboxListener.FlagsUpdated event = (MailboxListener.FlagsUpdated) collector.getEvents()
- .get(0);
+ .get(0);
assertThat(event.getUpdatedFlags().get(0).systemFlagIterator())
.containsOnly(Flags.Flag.RECENT);
}
@@ -301,7 +300,7 @@ public class MailboxEventDispatcherTest {
assertThat(collector.getEvents()).hasSize(1)
.are(INSTANCE_OF_EVENT_FLAGS_UPDATED);
MailboxListener.FlagsUpdated event = (MailboxListener.FlagsUpdated) collector.getEvents()
- .get(0);
+ .get(0);
assertThat(event.getUpdatedFlags().get(0).systemFlagIterator())
.containsOnly(Flags.Flag.SEEN);
}
@@ -347,16 +346,4 @@ public class MailboxEventDispatcherTest {
assertThat(event.getUpdatedFlags().get(0).systemFlagIterator())
.containsOnly(Flags.Flag.SEEN, Flags.Flag.RECENT, Flags.Flag.ANSWERED);
}
-
- @Test
- public void expungedShouldNotFireEventWhenEmptyMap() {
- dispatcher.expunged(session, ImmutableMap.of(), mailbox);
- assertThat(collector.getEvents()).isEmpty();
- }
-
- @Test
- public void flagsUpdatedShouldNotFireEventWhenEmptyIdList() {
- dispatcher.flagsUpdated(session, mailbox, ImmutableList.of());
- assertThat(collector.getEvents()).isEmpty();
- }
}
http://git-wip-us.apache.org/repos/asf/james-project/blob/4a9295cb/mailbox/store/src/test/java/org/apache/james/mailbox/store/event/DefaultDelegatingMailboxListenerTest.java
----------------------------------------------------------------------
diff --git a/mailbox/store/src/test/java/org/apache/james/mailbox/store/event/DefaultDelegatingMailboxListenerTest.java b/mailbox/store/src/test/java/org/apache/james/mailbox/store/event/DefaultDelegatingMailboxListenerTest.java
index 6360ce0..1bebdd5 100644
--- a/mailbox/store/src/test/java/org/apache/james/mailbox/store/event/DefaultDelegatingMailboxListenerTest.java
+++ b/mailbox/store/src/test/java/org/apache/james/mailbox/store/event/DefaultDelegatingMailboxListenerTest.java
@@ -24,6 +24,7 @@ import static org.mockito.Mockito.doThrow;
import static org.mockito.Mockito.mock;
import static org.mockito.Mockito.when;
+import org.apache.james.core.User;
import org.apache.james.core.quota.QuotaCount;
import org.apache.james.core.quota.QuotaSize;
import org.apache.james.mailbox.MailboxListener;
@@ -38,6 +39,8 @@ import org.apache.james.mailbox.util.EventCollector;
import org.junit.Before;
import org.junit.Test;
+import com.google.common.collect.ImmutableSortedMap;
+
public class DefaultDelegatingMailboxListenerTest {
private static final MailboxPath MAILBOX_PATH = new MailboxPath("namespace", "user", "name");
@@ -179,4 +182,14 @@ public class DefaultDelegatingMailboxListenerTest {
defaultDelegatingMailboxListener.event(event);
}
+
+ @Test
+ public void listenersShouldReceiveEvents() {
+ MailboxListener.Added noopEvent = new MailboxListener.Added(MailboxSession.SessionId.of(18), User.fromUsername("bob"), MailboxPath.forUser("bob", "mailbox"), TestId.of(58), ImmutableSortedMap.of());
+
+ defaultDelegatingMailboxListener.event(noopEvent);
+
+ assertThat(onceEventCollector.getEvents()).isEmpty();
+ }
+
}
---------------------------------------------------------------------
To unsubscribe, e-mail: server-dev-unsubscribe@james.apache.org
For additional commands, e-mail: server-dev-help@james.apache.org
[02/11] james-project git commit: MAILBOX-370 MailboxEventDispatcher
should be agnostic on the event type for filtering noop events
Posted by bt...@apache.org.
MAILBOX-370 MailboxEventDispatcher should be agnostic on the event type for filtering noop events
Project: http://git-wip-us.apache.org/repos/asf/james-project/repo
Commit: http://git-wip-us.apache.org/repos/asf/james-project/commit/c6af362f
Tree: http://git-wip-us.apache.org/repos/asf/james-project/tree/c6af362f
Diff: http://git-wip-us.apache.org/repos/asf/james-project/diff/c6af362f
Branch: refs/heads/master
Commit: c6af362fb811677337ad18331d717c12fd50ef7c
Parents: 9e6198f
Author: Benoit Tellier <bt...@linagora.com>
Authored: Fri Dec 28 10:51:24 2018 +0700
Committer: Benoit Tellier <bt...@linagora.com>
Committed: Wed Jan 2 17:27:48 2019 +0700
----------------------------------------------------------------------
.../store/event/MailboxEventDispatcher.java | 31 ++++++++------------
1 file changed, 12 insertions(+), 19 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/james-project/blob/c6af362f/mailbox/store/src/main/java/org/apache/james/mailbox/store/event/MailboxEventDispatcher.java
----------------------------------------------------------------------
diff --git a/mailbox/store/src/main/java/org/apache/james/mailbox/store/event/MailboxEventDispatcher.java b/mailbox/store/src/main/java/org/apache/james/mailbox/store/event/MailboxEventDispatcher.java
index 812472c..87bfe86 100644
--- a/mailbox/store/src/main/java/org/apache/james/mailbox/store/event/MailboxEventDispatcher.java
+++ b/mailbox/store/src/main/java/org/apache/james/mailbox/store/event/MailboxEventDispatcher.java
@@ -33,7 +33,6 @@ import org.apache.james.core.quota.QuotaSize;
import org.apache.james.mailbox.Event;
import org.apache.james.mailbox.MailboxListener;
import org.apache.james.mailbox.MailboxSession;
-import org.apache.james.mailbox.MessageMoveEvent;
import org.apache.james.mailbox.MessageUid;
import org.apache.james.mailbox.acl.ACLDiff;
import org.apache.james.mailbox.model.MailboxId;
@@ -84,7 +83,7 @@ public class MailboxEventDispatcher {
* @param mailbox The mailbox
*/
public void added(MailboxSession session, SortedMap<MessageUid, MessageMetaData> uids, Mailbox mailbox) {
- listener.event(eventFactory.added(session, uids, mailbox));
+ event(eventFactory.added(session, uids, mailbox));
}
public void added(MailboxSession session, Mailbox mailbox, MailboxMessage mailboxMessage) {
@@ -111,9 +110,7 @@ public class MailboxEventDispatcher {
* @param mailbox The mailbox
*/
public void expunged(MailboxSession session, Map<MessageUid, MessageMetaData> uids, Mailbox mailbox) {
- if (!uids.isEmpty()) {
- listener.event(eventFactory.expunged(session, uids, mailbox));
- }
+ event(eventFactory.expunged(session, uids, mailbox));
}
public void expunged(MailboxSession session, MessageMetaData messageMetaData, Mailbox mailbox) {
@@ -128,9 +125,7 @@ public class MailboxEventDispatcher {
* registered MailboxListener will get triggered then
*/
public void flagsUpdated(MailboxSession session, Mailbox mailbox, List<UpdatedFlags> uflags) {
- if (!uflags.isEmpty()) {
- listener.event(eventFactory.flagsUpdated(session, mailbox, uflags));
- }
+ event(eventFactory.flagsUpdated(session, mailbox, uflags));
}
public void flagsUpdated(MailboxSession session, Mailbox mailbox, UpdatedFlags uflags) {
@@ -142,7 +137,7 @@ public class MailboxEventDispatcher {
* MailboxListener will get triggered then
*/
public void mailboxRenamed(MailboxSession session, MailboxPath from, Mailbox to) {
- listener.event(eventFactory.mailboxRenamed(session, from, to));
+ event(eventFactory.mailboxRenamed(session, from, to));
}
/**
@@ -150,7 +145,7 @@ public class MailboxEventDispatcher {
* MailboxListener will get triggered then
*/
public void mailboxDeleted(MailboxSession session, Mailbox mailbox, QuotaRoot quotaRoot, QuotaCount deletedMessageCount, QuotaSize totalDeletedSize) {
- listener.event(eventFactory.mailboxDeleted(session, mailbox, quotaRoot, deletedMessageCount, totalDeletedSize));
+ event(eventFactory.mailboxDeleted(session, mailbox, quotaRoot, deletedMessageCount, totalDeletedSize));
}
/**
@@ -158,26 +153,24 @@ public class MailboxEventDispatcher {
* MailboxListener will get triggered then
*/
public void mailboxAdded(MailboxSession session, Mailbox mailbox) {
- listener.event(eventFactory.mailboxAdded(session, mailbox));
+ event(eventFactory.mailboxAdded(session, mailbox));
}
public void aclUpdated(MailboxSession session, MailboxPath mailboxPath, ACLDiff aclDiff, MailboxId mailboxId) {
- listener.event(eventFactory.aclUpdated(session, mailboxPath, aclDiff, mailboxId));
+ event(eventFactory.aclUpdated(session, mailboxPath, aclDiff, mailboxId));
}
public void moved(MailboxSession session, MessageMoves messageMoves, Collection<MessageId> messageIds) {
- MessageMoveEvent moveEvent = eventFactory.moved(session, messageMoves, messageIds);
-
- if (!moveEvent.isNoop()) {
- listener.event(moveEvent);
- }
+ event(eventFactory.moved(session, messageMoves, messageIds));
}
public void quota(User user, QuotaRoot quotaRoot, Quota<QuotaCount> countQuota, Quota<QuotaSize> sizeQuota) {
- listener.event(new MailboxListener.QuotaUsageUpdatedEvent(user, quotaRoot, countQuota, sizeQuota, Instant.now()));
+ event(new MailboxListener.QuotaUsageUpdatedEvent(user, quotaRoot, countQuota, sizeQuota, Instant.now()));
}
public void event(Event event) {
- listener.event(event);
+ if (!event.isNoop()) {
+ listener.event(event);
+ }
}
}
---------------------------------------------------------------------
To unsubscribe, e-mail: server-dev-unsubscribe@james.apache.org
For additional commands, e-mail: server-dev-help@james.apache.org
[05/11] james-project git commit: MAILBOX-370 Remove unused methods
fromEventCollector class
Posted by bt...@apache.org.
MAILBOX-370 Remove unused methods fromEventCollector class
Project: http://git-wip-us.apache.org/repos/asf/james-project/repo
Commit: http://git-wip-us.apache.org/repos/asf/james-project/commit/dc841af4
Tree: http://git-wip-us.apache.org/repos/asf/james-project/tree/dc841af4
Diff: http://git-wip-us.apache.org/repos/asf/james-project/diff/dc841af4
Branch: refs/heads/master
Commit: dc841af43be74a670cc391290c926f2beca16dec
Parents: 59996dc
Author: Benoit Tellier <bt...@linagora.com>
Authored: Fri Dec 28 14:34:05 2018 +0700
Committer: Benoit Tellier <bt...@linagora.com>
Committed: Wed Jan 2 17:28:08 2019 +0700
----------------------------------------------------------------------
.../org/apache/james/mailbox/util/EventCollector.java | 10 ----------
1 file changed, 10 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/james-project/blob/dc841af4/mailbox/api/src/test/java/org/apache/james/mailbox/util/EventCollector.java
----------------------------------------------------------------------
diff --git a/mailbox/api/src/test/java/org/apache/james/mailbox/util/EventCollector.java b/mailbox/api/src/test/java/org/apache/james/mailbox/util/EventCollector.java
index 408295f..7152cf3 100644
--- a/mailbox/api/src/test/java/org/apache/james/mailbox/util/EventCollector.java
+++ b/mailbox/api/src/test/java/org/apache/james/mailbox/util/EventCollector.java
@@ -53,14 +53,4 @@ public class EventCollector implements MailboxListener {
events.add(event);
}
- public void mailboxDeleted() {
- }
-
- public void mailboxRenamed(String origName, String newName) {
- }
-
- public boolean isClosed() {
- return false;
- }
-
}
---------------------------------------------------------------------
To unsubscribe, e-mail: server-dev-unsubscribe@james.apache.org
For additional commands, e-mail: server-dev-help@james.apache.org
[10/11] james-project git commit: JAMES-2634 CVE-2018-17197 Recommend
using Tika after version 1.20
Posted by bt...@apache.org.
JAMES-2634 CVE-2018-17197 Recommend using Tika after version 1.20
Project: http://git-wip-us.apache.org/repos/asf/james-project/repo
Commit: http://git-wip-us.apache.org/repos/asf/james-project/commit/61baf077
Tree: http://git-wip-us.apache.org/repos/asf/james-project/tree/61baf077
Diff: http://git-wip-us.apache.org/repos/asf/james-project/diff/61baf077
Branch: refs/heads/master
Commit: 61baf0772417e562b55afc2af64d41d0c66ca370
Parents: 59d791c
Author: Benoit Tellier <bt...@linagora.com>
Authored: Wed Jan 2 11:31:00 2019 +0700
Committer: Benoit Tellier <bt...@linagora.com>
Committed: Wed Jan 2 17:33:22 2019 +0700
----------------------------------------------------------------------
CHANGELOG.md | 3 +++
README.adoc | 8 ++++----
dockerfiles/run/docker-compose.yml | 2 +-
.../src/main/java/org/apache/james/util/docker/Images.java | 2 +-
src/site/xdoc/server/config-elasticsearch.xml | 2 +-
5 files changed, 10 insertions(+), 7 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/james-project/blob/61baf077/CHANGELOG.md
----------------------------------------------------------------------
diff --git a/CHANGELOG.md b/CHANGELOG.md
index cfc2e2d..ba9ceff 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -27,6 +27,9 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)
### Removed
- Drop HBase and JCR components (mailbox and server/data).
+### Third party softwares
+ - Tika prior 1.20 is subject to multiple CVEs. We recommend the upgrade
+
## [3.2.0] - 2018-11-14
### Added
- Mail filtering configured via the JMAP protocol
http://git-wip-us.apache.org/repos/asf/james-project/blob/61baf077/README.adoc
----------------------------------------------------------------------
diff --git a/README.adoc b/README.adoc
index afec2be..23c5b10 100644
--- a/README.adoc
+++ b/README.adoc
@@ -233,7 +233,7 @@ You need a running *ElasticSearch* in docker. To achieve this run:
If you want to use all the JMAP search capabilities, you may also need to start Tika:
- $ docker run -d --name=tika logicalspark/docker-tikaserver:1.19.1
+ $ docker run -d --name=tika logicalspark/docker-tikaserver:1.20
You can find more explanation on the need of Tika in this page http://james.apache.org/server/config-elasticsearch.html
@@ -266,7 +266,7 @@ You can handle attachment text extraction before indexing in ElasticSearch. This
Run tika:
- $ docker run --name tika logicalspark/docker-tikaserver:1.19.1
+ $ docker run --name tika logicalspark/docker-tikaserver:1.20
Add a link for the tika container in the above command line:
@@ -297,7 +297,7 @@ You need a running *ElasticSearch* in docker. To achieve this run:
If you want to use all the JMAP search capabilities, you may also need to start Tika:
- $ docker run -d --name=tika logicalspark/docker-tikaserver:1.19.1
+ $ docker run -d --name=tika logicalspark/docker-tikaserver:1.20
You can find more explanation on the need of Tika in this page http://james.apache.org/server/config-elasticsearch.html
@@ -329,7 +329,7 @@ You can handle attachment text extraction before indexing in ElasticSearch. This
Run tika:
- $ docker run --name tika logicalspark/docker-tikaserver:1.19.1
+ $ docker run --name tika logicalspark/docker-tikaserver:1.20
Add a link for the tika container in the above command line:
http://git-wip-us.apache.org/repos/asf/james-project/blob/61baf077/dockerfiles/run/docker-compose.yml
----------------------------------------------------------------------
diff --git a/dockerfiles/run/docker-compose.yml b/dockerfiles/run/docker-compose.yml
index 9308912..6bdbd07 100644
--- a/dockerfiles/run/docker-compose.yml
+++ b/dockerfiles/run/docker-compose.yml
@@ -30,7 +30,7 @@ services:
ports:
- "9042:9042"
tika:
- image: logicalspark/docker-tikaserver:1.19.1
+ image: logicalspark/docker-tikaserver:1.20
rabbitmq:
image: rabbitmq:3.7.7-management
ports:
http://git-wip-us.apache.org/repos/asf/james-project/blob/61baf077/server/testing/src/main/java/org/apache/james/util/docker/Images.java
----------------------------------------------------------------------
diff --git a/server/testing/src/main/java/org/apache/james/util/docker/Images.java b/server/testing/src/main/java/org/apache/james/util/docker/Images.java
index 5e97e7d..34062f7 100644
--- a/server/testing/src/main/java/org/apache/james/util/docker/Images.java
+++ b/server/testing/src/main/java/org/apache/james/util/docker/Images.java
@@ -25,6 +25,6 @@ public interface Images {
String ELASTICSEARCH_2 = "elasticsearch:2.4.6";
String ELASTICSEARCH_6 = "elasticsearch:6.5.1";
String NGINX = "nginx:1.15.1";
- String TIKA = "logicalspark/docker-tikaserver:1.19.1";
+ String TIKA = "logicalspark/docker-tikaserver:1.20";
String SPAMASSASSIN = "dinkel/spamassassin:3.4.0";
}
http://git-wip-us.apache.org/repos/asf/james-project/blob/61baf077/src/site/xdoc/server/config-elasticsearch.xml
----------------------------------------------------------------------
diff --git a/src/site/xdoc/server/config-elasticsearch.xml b/src/site/xdoc/server/config-elasticsearch.xml
index e8e1373..39fd40f 100644
--- a/src/site/xdoc/server/config-elasticsearch.xml
+++ b/src/site/xdoc/server/config-elasticsearch.xml
@@ -160,7 +160,7 @@
Note: You can launch a tika server using this command line:
- <code><pre>docker run --name tika logicalspark/docker-tikaserver:1.19.1</pre></code>
+ <code><pre>docker run --name tika logicalspark/docker-tikaserver:1.20</pre></code>
</section>
---------------------------------------------------------------------
To unsubscribe, e-mail: server-dev-unsubscribe@james.apache.org
For additional commands, e-mail: server-dev-help@james.apache.org