cayenne-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ntimof...@apache.org
Subject [1/8] cayenne git commit: CAY-2302 Rename PostCommit module and its content to CommitLog
Date Mon, 22 May 2017 14:03:32 GMT
Repository: cayenne
Updated Branches:
  refs/heads/master 4557c68c7 -> cbfd67830


http://git-wip-us.apache.org/repos/asf/cayenne/blob/cfbe5903/cayenne-postcommit/src/test/java/org/apache/cayenne/lifecycle/postcommit/PostCommitFilter_AllIT.java
----------------------------------------------------------------------
diff --git a/cayenne-postcommit/src/test/java/org/apache/cayenne/lifecycle/postcommit/PostCommitFilter_AllIT.java b/cayenne-postcommit/src/test/java/org/apache/cayenne/lifecycle/postcommit/PostCommitFilter_AllIT.java
deleted file mode 100644
index 62e59a0..0000000
--- a/cayenne-postcommit/src/test/java/org/apache/cayenne/lifecycle/postcommit/PostCommitFilter_AllIT.java
+++ /dev/null
@@ -1,297 +0,0 @@
-/*****************************************************************
- *   Licensed to the Apache Software Foundation (ASF) under one
- *  or more contributor license agreements.  See the NOTICE file
- *  distributed with this work for additional information
- *  regarding copyright ownership.  The ASF licenses this file
- *  to you under the Apache License, Version 2.0 (the
- *  "License"); you may not use this file except in compliance
- *  with the License.  You may obtain a copy of the License at
- *
- *    http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing,
- *  software distributed under the License is distributed on an
- *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- *  KIND, either express or implied.  See the License for the
- *  specific language governing permissions and limitations
- *  under the License.
- ****************************************************************/
-package org.apache.cayenne.lifecycle.postcommit;
-
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertNotEquals;
-import static org.junit.Assert.assertNotNull;
-import static org.junit.Assert.assertNull;
-import static org.junit.Assert.assertSame;
-import static org.junit.Assert.assertTrue;
-import static org.mockito.Matchers.any;
-import static org.mockito.Mockito.doAnswer;
-import static org.mockito.Mockito.mock;
-import static org.mockito.Mockito.verify;
-
-import java.sql.SQLException;
-
-import org.apache.cayenne.ObjectContext;
-import org.apache.cayenne.ObjectId;
-import org.apache.cayenne.configuration.server.ServerRuntimeBuilder;
-import org.apache.cayenne.lifecycle.changemap.AttributeChange;
-import org.apache.cayenne.lifecycle.changemap.ChangeMap;
-import org.apache.cayenne.lifecycle.changemap.ObjectChange;
-import org.apache.cayenne.lifecycle.changemap.ObjectChangeType;
-import org.apache.cayenne.lifecycle.changemap.ToManyRelationshipChange;
-import org.apache.cayenne.lifecycle.changemap.ToOneRelationshipChange;
-import org.apache.cayenne.lifecycle.db.Auditable1;
-import org.apache.cayenne.lifecycle.db.AuditableChild1;
-import org.apache.cayenne.lifecycle.unit.AuditableServerCase;
-import org.apache.cayenne.query.SelectById;
-import org.junit.Before;
-import org.junit.Test;
-import org.mockito.invocation.InvocationOnMock;
-import org.mockito.stubbing.Answer;
-
-public class PostCommitFilter_AllIT extends AuditableServerCase {
-
-	protected ObjectContext context;
-	protected PostCommitListener mockListener;
-
-	@Override
-	protected ServerRuntimeBuilder configureCayenne() {
-		this.mockListener = mock(PostCommitListener.class);
-		return super.configureCayenne().addModule(PostCommitModuleBuilder.builder().listener(mockListener).build());
-	}
-
-	@Before
-	public void before() {
-		context = runtime.newContext();
-	}
-
-	@Test
-	public void testPostCommit_Insert() throws SQLException {
-
-		final Auditable1 a1 = context.newObject(Auditable1.class);
-		a1.setCharProperty1("yy");
-		final ObjectId preCommitId = a1.getObjectId();
-
-		doAnswer(new Answer<Object>() {
-			@Override
-			public Object answer(InvocationOnMock invocation) throws Throwable {
-
-				assertSame(context, invocation.getArguments()[0]);
-
-				ChangeMap changes = (ChangeMap) invocation.getArguments()[1];
-				assertNotNull(changes);
-				assertEquals(2, changes.getChanges().size());
-				assertEquals(1, changes.getUniqueChanges().size());
-
-				ObjectChange c = changes.getUniqueChanges().iterator().next();
-				assertNotNull(c);
-				assertEquals(ObjectChangeType.INSERT, c.getType());
-				assertEquals(1, c.getAttributeChanges().size());
-				assertEquals("yy", c.getAttributeChanges().get(Auditable1.CHAR_PROPERTY1.getName()).getNewValue());
-
-				assertNotEquals(preCommitId, a1.getObjectId());
-				assertEquals(preCommitId, c.getPreCommitId());
-				assertEquals(a1.getObjectId(), c.getPostCommitId());
-
-				return null;
-			}
-		}).when(mockListener).onPostCommit(any(ObjectContext.class), any(ChangeMap.class));
-
-		context.commitChanges();
-
-		verify(mockListener).onPostCommit(any(ObjectContext.class), any(ChangeMap.class));
-	}
-
-	@Test
-	public void testPostCommit_Update() throws SQLException {
-
-		auditable1.insert(1, "xx");
-
-		final Auditable1 a1 = SelectById.query(Auditable1.class, 1).selectOne(context);
-		a1.setCharProperty1("yy");
-
-		final ObjectId preCommitId = a1.getObjectId();
-
-		doAnswer(new Answer<Object>() {
-			@Override
-			public Object answer(InvocationOnMock invocation) throws Throwable {
-
-				assertSame(context, invocation.getArguments()[0]);
-
-				ChangeMap changes = (ChangeMap) invocation.getArguments()[1];
-				assertNotNull(changes);
-				assertEquals(1, changes.getUniqueChanges().size());
-
-				ObjectChange c = changes.getChanges().get(new ObjectId("Auditable1", Auditable1.ID_PK_COLUMN, 1));
-				assertNotNull(c);
-				assertEquals(ObjectChangeType.UPDATE, c.getType());
-				assertEquals(1, c.getAttributeChanges().size());
-				AttributeChange pc = c.getAttributeChanges().get(Auditable1.CHAR_PROPERTY1.getName());
-				assertNotNull(pc);
-				assertEquals("xx", pc.getOldValue());
-				assertEquals("yy", pc.getNewValue());
-
-				assertEquals(preCommitId, a1.getObjectId());
-				assertEquals(preCommitId, c.getPreCommitId());
-				assertEquals(preCommitId, c.getPostCommitId());
-
-				return null;
-			}
-		}).when(mockListener).onPostCommit(any(ObjectContext.class), any(ChangeMap.class));
-
-		context.commitChanges();
-
-		verify(mockListener).onPostCommit(any(ObjectContext.class), any(ChangeMap.class));
-	}
-
-	@Test
-	public void testPostCommit_Delete() throws SQLException {
-		auditable1.insert(1, "xx");
-
-		doAnswer(new Answer<Object>() {
-			@Override
-			public Object answer(InvocationOnMock invocation) throws Throwable {
-
-				assertSame(context, invocation.getArguments()[0]);
-
-				ChangeMap changes = (ChangeMap) invocation.getArguments()[1];
-				assertNotNull(changes);
-				assertEquals(1, changes.getUniqueChanges().size());
-
-				ObjectChange c = changes.getChanges().get(new ObjectId("Auditable1", Auditable1.ID_PK_COLUMN, 1));
-				assertNotNull(c);
-				assertEquals(ObjectChangeType.DELETE, c.getType());
-				assertEquals(1, c.getAttributeChanges().size());
-				assertEquals("xx", c.getAttributeChanges().get(Auditable1.CHAR_PROPERTY1.getName()).getOldValue());
-				assertNull(c.getAttributeChanges().get(Auditable1.CHAR_PROPERTY1.getName()).getNewValue());
-
-				return null;
-			}
-		}).when(mockListener).onPostCommit(any(ObjectContext.class), any(ChangeMap.class));
-
-		Auditable1 a1 = SelectById.query(Auditable1.class, 1).selectOne(context);
-		context.deleteObject(a1);
-		context.commitChanges();
-
-		verify(mockListener).onPostCommit(any(ObjectContext.class), any(ChangeMap.class));
-	}
-
-	@Test
-	public void testPostCommit_UpdateToOne() throws SQLException {
-		auditable1.insert(1, "xx");
-		auditable1.insert(2, "yy");
-
-		auditableChild1.insert(1, 1, "cc1");
-		auditableChild1.insert(2, 2, "cc2");
-		auditableChild1.insert(3, null, "cc3");
-
-		final AuditableChild1 ac1 = SelectById.query(AuditableChild1.class, 1).selectOne(context);
-		final AuditableChild1 ac2 = SelectById.query(AuditableChild1.class, 2).selectOne(context);
-		final AuditableChild1 ac3 = SelectById.query(AuditableChild1.class, 3).selectOne(context);
-
-		final Auditable1 a1 = SelectById.query(Auditable1.class, 1).selectOne(context);
-		final Auditable1 a2 = SelectById.query(Auditable1.class, 2).selectOne(context);
-
-		doAnswer(new Answer<Object>() {
-			@Override
-			public Object answer(InvocationOnMock invocation) throws Throwable {
-
-				assertSame(context, invocation.getArguments()[0]);
-
-				ChangeMap changes = (ChangeMap) invocation.getArguments()[1];
-				assertNotNull(changes);
-				assertEquals(4, changes.getUniqueChanges().size());
-
-				ObjectChange ac1c = changes.getChanges().get(
-						new ObjectId("AuditableChild1", AuditableChild1.ID_PK_COLUMN, 1));
-				assertNotNull(ac1c);
-				assertEquals(ObjectChangeType.UPDATE, ac1c.getType());
-				ToOneRelationshipChange ac1c1 = ac1c.getToOneRelationshipChanges()
-						.get(AuditableChild1.PARENT.getName());
-				assertEquals(a1.getObjectId(), ac1c1.getOldValue());
-				assertEquals(null, ac1c1.getNewValue());
-
-				ObjectChange ac2c = changes.getChanges().get(
-						new ObjectId("AuditableChild1", AuditableChild1.ID_PK_COLUMN, 2));
-				assertNotNull(ac2c);
-				assertEquals(ObjectChangeType.UPDATE, ac2c.getType());
-				ToOneRelationshipChange ac2c1 = ac2c.getToOneRelationshipChanges()
-						.get(AuditableChild1.PARENT.getName());
-				assertEquals(a2.getObjectId(), ac2c1.getOldValue());
-				assertEquals(a1.getObjectId(), ac2c1.getNewValue());
-
-				ObjectChange ac3c = changes.getChanges().get(
-						new ObjectId("AuditableChild1", AuditableChild1.ID_PK_COLUMN, 3));
-				assertNotNull(ac3c);
-				assertEquals(ObjectChangeType.UPDATE, ac3c.getType());
-				ToOneRelationshipChange ac3c1 = ac3c.getToOneRelationshipChanges()
-						.get(AuditableChild1.PARENT.getName());
-				assertEquals(null, ac3c1.getOldValue());
-				assertEquals(a1.getObjectId(), ac3c1.getNewValue());
-
-				return null;
-			}
-		}).when(mockListener).onPostCommit(any(ObjectContext.class), any(ChangeMap.class));
-
-		a1.removeFromChildren1(ac1);
-		a1.addToChildren1(ac2);
-		a1.addToChildren1(ac3);
-
-		context.commitChanges();
-
-		verify(mockListener).onPostCommit(any(ObjectContext.class), any(ChangeMap.class));
-	}
-
-	@Test
-	public void testPostCommit_UpdateToMany() throws SQLException {
-		auditable1.insert(1, "xx");
-		auditableChild1.insert(1, 1, "cc1");
-		auditableChild1.insert(2, null, "cc2");
-		auditableChild1.insert(3, null, "cc3");
-
-		final AuditableChild1 ac1 = SelectById.query(AuditableChild1.class, 1).selectOne(context);
-		final AuditableChild1 ac2 = SelectById.query(AuditableChild1.class, 2).selectOne(context);
-		final AuditableChild1 ac3 = SelectById.query(AuditableChild1.class, 3).selectOne(context);
-
-		final Auditable1 a1 = SelectById.query(Auditable1.class, 1).selectOne(context);
-
-		doAnswer(new Answer<Object>() {
-			@Override
-			public Object answer(InvocationOnMock invocation) throws Throwable {
-
-				assertSame(context, invocation.getArguments()[0]);
-
-				ChangeMap changes = (ChangeMap) invocation.getArguments()[1];
-				assertNotNull(changes);
-				assertEquals(4, changes.getUniqueChanges().size());
-
-				ObjectChange a1c = changes.getChanges().get(new ObjectId("Auditable1", Auditable1.ID_PK_COLUMN, 1));
-				assertNotNull(a1c);
-				assertEquals(ObjectChangeType.UPDATE, a1c.getType());
-				assertEquals(0, a1c.getAttributeChanges().size());
-
-				assertEquals(1, a1c.getToManyRelationshipChanges().size());
-
-				ToManyRelationshipChange a1c1 = a1c.getToManyRelationshipChanges().get(Auditable1.CHILDREN1.getName());
-				assertNotNull(a1c1);
-
-				assertEquals(2, a1c1.getAdded().size());
-				assertTrue(a1c1.getAdded().contains(ac2.getObjectId()));
-				assertTrue(a1c1.getAdded().contains(ac3.getObjectId()));
-
-				assertEquals(1, a1c1.getRemoved().size());
-				assertTrue(a1c1.getRemoved().contains(ac1.getObjectId()));
-
-				return null;
-			}
-		}).when(mockListener).onPostCommit(any(ObjectContext.class), any(ChangeMap.class));
-
-		a1.removeFromChildren1(ac1);
-		a1.addToChildren1(ac2);
-		a1.addToChildren1(ac3);
-
-		context.commitChanges();
-
-		verify(mockListener).onPostCommit(any(ObjectContext.class), any(ChangeMap.class));
-	}
-}

http://git-wip-us.apache.org/repos/asf/cayenne/blob/cfbe5903/cayenne-postcommit/src/test/java/org/apache/cayenne/lifecycle/postcommit/PostCommitFilter_All_FlattenedIT.java
----------------------------------------------------------------------
diff --git a/cayenne-postcommit/src/test/java/org/apache/cayenne/lifecycle/postcommit/PostCommitFilter_All_FlattenedIT.java b/cayenne-postcommit/src/test/java/org/apache/cayenne/lifecycle/postcommit/PostCommitFilter_All_FlattenedIT.java
deleted file mode 100644
index c37991c..0000000
--- a/cayenne-postcommit/src/test/java/org/apache/cayenne/lifecycle/postcommit/PostCommitFilter_All_FlattenedIT.java
+++ /dev/null
@@ -1,140 +0,0 @@
-/*****************************************************************
- *   Licensed to the Apache Software Foundation (ASF) under one
- *  or more contributor license agreements.  See the NOTICE file
- *  distributed with this work for additional information
- *  regarding copyright ownership.  The ASF licenses this file
- *  to you under the Apache License, Version 2.0 (the
- *  "License"); you may not use this file except in compliance
- *  with the License.  You may obtain a copy of the License at
- *
- *    http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing,
- *  software distributed under the License is distributed on an
- *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- *  KIND, either express or implied.  See the License for the
- *  specific language governing permissions and limitations
- *  under the License.
- ****************************************************************/
-package org.apache.cayenne.lifecycle.postcommit;
-
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertNotNull;
-import static org.junit.Assert.assertSame;
-import static org.junit.Assert.assertTrue;
-import static org.mockito.Matchers.any;
-import static org.mockito.Mockito.doAnswer;
-import static org.mockito.Mockito.mock;
-import static org.mockito.Mockito.verify;
-
-import java.sql.SQLException;
-
-import org.apache.cayenne.ObjectContext;
-import org.apache.cayenne.ObjectId;
-import org.apache.cayenne.configuration.server.ServerRuntimeBuilder;
-import org.apache.cayenne.lifecycle.changemap.ChangeMap;
-import org.apache.cayenne.lifecycle.changemap.ObjectChange;
-import org.apache.cayenne.lifecycle.changemap.ObjectChangeType;
-import org.apache.cayenne.lifecycle.changemap.ToManyRelationshipChange;
-import org.apache.cayenne.lifecycle.db.E3;
-import org.apache.cayenne.lifecycle.db.E4;
-import org.apache.cayenne.lifecycle.unit.FlattenedServerCase;
-import org.apache.cayenne.query.SelectById;
-import org.junit.Before;
-import org.junit.Test;
-import org.mockito.invocation.InvocationOnMock;
-import org.mockito.stubbing.Answer;
-
-public class PostCommitFilter_All_FlattenedIT extends FlattenedServerCase {
-
-	protected ObjectContext context;
-	protected PostCommitListener mockListener;
-
-	@Override
-	protected ServerRuntimeBuilder configureCayenne() {
-		this.mockListener = mock(PostCommitListener.class);
-		return super.configureCayenne().addModule(PostCommitModuleBuilder.builder().listener(mockListener).build());
-	}
-
-	@Before
-	public void before() {
-		context = runtime.newContext();
-	}
-
-	@Test
-	public void testPostCommit_UpdateToMany() throws SQLException {
-		e3.insert(1);
-		e4.insert(11);
-		e4.insert(12);
-		e34.insert(1, 11);
-
-		final E3 e3 = SelectById.query(E3.class, 1).selectOne(context);
-		final E4 e4_1 = SelectById.query(E4.class, 11).selectOne(context);
-		final E4 e4_2 = SelectById.query(E4.class, 12).selectOne(context);
-
-		doAnswer(new Answer<Object>() {
-			@Override
-			public Object answer(InvocationOnMock invocation) throws Throwable {
-
-				assertSame(context, invocation.getArguments()[0]);
-
-				ChangeMap changes = (ChangeMap) invocation.getArguments()[1];
-				assertNotNull(changes);
-				assertEquals(3, changes.getUniqueChanges().size());
-
-				ObjectChange e3c = changes.getChanges().get(new ObjectId("E3", E3.ID_PK_COLUMN, 1));
-				assertNotNull(e3c);
-				assertEquals(ObjectChangeType.UPDATE, e3c.getType());
-				assertEquals(0, e3c.getAttributeChanges().size());
-				assertEquals(1, e3c.getToManyRelationshipChanges().size());
-
-				ToManyRelationshipChange e3c1 = e3c.getToManyRelationshipChanges().get(E3.E4S.getName());
-				assertNotNull(e3c1);
-
-				assertEquals(1, e3c1.getAdded().size());
-				assertTrue(e3c1.getAdded().contains(e4_2.getObjectId()));
-
-				assertEquals(1, e3c1.getRemoved().size());
-				assertTrue(e3c1.getRemoved().contains(e4_1.getObjectId()));
-				
-				ObjectChange e41c = changes.getChanges().get(new ObjectId("E4", E4.ID_PK_COLUMN, 11));
-				assertNotNull(e41c);
-				assertEquals(ObjectChangeType.UPDATE, e41c.getType());
-				assertEquals(0, e41c.getAttributeChanges().size());
-				assertEquals(1, e41c.getToManyRelationshipChanges().size());
-
-				ToManyRelationshipChange e41c1 = e41c.getToManyRelationshipChanges().get(E4.E3S.getName());
-				assertNotNull(e41c);
-
-				assertEquals(0, e41c1.getAdded().size());
-
-				assertEquals(1, e41c1.getRemoved().size());
-				assertTrue(e41c1.getRemoved().contains(e3.getObjectId()));
-				
-				ObjectChange e42c = changes.getChanges().get(new ObjectId("E4", E4.ID_PK_COLUMN, 12));
-				assertNotNull(e42c);
-				assertEquals(ObjectChangeType.UPDATE, e42c.getType());
-				assertEquals(0, e42c.getAttributeChanges().size());
-				assertEquals(1, e42c.getToManyRelationshipChanges().size());
-
-				ToManyRelationshipChange e42c1 = e42c.getToManyRelationshipChanges().get(E4.E3S.getName());
-				assertNotNull(e42c);
-
-				assertEquals(0, e42c1.getRemoved().size());
-
-				assertEquals(1, e42c1.getAdded().size());
-				assertTrue(e42c1.getAdded().contains(e3.getObjectId()));
-
-				return null;
-			}
-		}).when(mockListener).onPostCommit(any(ObjectContext.class), any(ChangeMap.class));
-
-		e3.removeFromE4s(e4_1);
-		e3.addToE4s(e4_2);
-
-		context.commitChanges();
-
-		verify(mockListener).onPostCommit(any(ObjectContext.class), any(ChangeMap.class));
-	}
-
-}

http://git-wip-us.apache.org/repos/asf/cayenne/blob/cfbe5903/cayenne-postcommit/src/test/java/org/apache/cayenne/lifecycle/postcommit/PostCommitFilter_FilteredIT.java
----------------------------------------------------------------------
diff --git a/cayenne-postcommit/src/test/java/org/apache/cayenne/lifecycle/postcommit/PostCommitFilter_FilteredIT.java b/cayenne-postcommit/src/test/java/org/apache/cayenne/lifecycle/postcommit/PostCommitFilter_FilteredIT.java
deleted file mode 100644
index 229ab43..0000000
--- a/cayenne-postcommit/src/test/java/org/apache/cayenne/lifecycle/postcommit/PostCommitFilter_FilteredIT.java
+++ /dev/null
@@ -1,314 +0,0 @@
-/*****************************************************************
- *   Licensed to the Apache Software Foundation (ASF) under one
- *  or more contributor license agreements.  See the NOTICE file
- *  distributed with this work for additional information
- *  regarding copyright ownership.  The ASF licenses this file
- *  to you under the Apache License, Version 2.0 (the
- *  "License"); you may not use this file except in compliance
- *  with the License.  You may obtain a copy of the License at
- *
- *    http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing,
- *  software distributed under the License is distributed on an
- *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- *  KIND, either express or implied.  See the License for the
- *  specific language governing permissions and limitations
- *  under the License.
- ****************************************************************/
-package org.apache.cayenne.lifecycle.postcommit;
-
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertNotNull;
-import static org.junit.Assert.assertNull;
-import static org.junit.Assert.assertSame;
-import static org.junit.Assert.assertTrue;
-import static org.mockito.Matchers.any;
-import static org.mockito.Mockito.doAnswer;
-import static org.mockito.Mockito.mock;
-import static org.mockito.Mockito.verify;
-
-import java.sql.SQLException;
-
-import org.apache.cayenne.ObjectContext;
-import org.apache.cayenne.ObjectId;
-import org.apache.cayenne.configuration.server.ServerRuntimeBuilder;
-import org.apache.cayenne.lifecycle.changemap.AttributeChange;
-import org.apache.cayenne.lifecycle.changemap.ChangeMap;
-import org.apache.cayenne.lifecycle.changemap.ObjectChange;
-import org.apache.cayenne.lifecycle.changemap.ObjectChangeType;
-import org.apache.cayenne.lifecycle.changemap.ToManyRelationshipChange;
-import org.apache.cayenne.lifecycle.db.Auditable1;
-import org.apache.cayenne.lifecycle.db.Auditable2;
-import org.apache.cayenne.lifecycle.db.Auditable3;
-import org.apache.cayenne.lifecycle.db.Auditable4;
-import org.apache.cayenne.lifecycle.db.AuditableChild1;
-import org.apache.cayenne.lifecycle.unit.AuditableServerCase;
-import org.apache.cayenne.query.SelectById;
-import org.junit.Before;
-import org.junit.Test;
-import org.mockito.invocation.InvocationOnMock;
-import org.mockito.stubbing.Answer;
-
-public class PostCommitFilter_FilteredIT extends AuditableServerCase {
-
-	protected ObjectContext context;
-	protected PostCommitListener mockListener;
-
-	@Override
-	protected ServerRuntimeBuilder configureCayenne() {
-		this.mockListener = mock(PostCommitListener.class);
-		return super.configureCayenne().addModule(
-				PostCommitModuleBuilder.builder().auditableEntitiesOnly().listener(mockListener).build());
-	}
-
-	@Before
-	public void before() {
-		context = runtime.newContext();
-	}
-
-	@Test
-	public void testPostCommit_Insert() throws SQLException {
-
-		doAnswer(new Answer<Object>() {
-			@Override
-			public Object answer(InvocationOnMock invocation) throws Throwable {
-
-				assertSame(context, invocation.getArguments()[0]);
-
-				ChangeMap changes = (ChangeMap) invocation.getArguments()[1];
-				assertNotNull(changes);
-				assertEquals(2, changes.getChanges().size());
-				assertEquals(1, changes.getUniqueChanges().size());
-
-				ObjectChange c = changes.getUniqueChanges().iterator().next();
-				assertNotNull(c);
-				assertEquals(ObjectChangeType.INSERT, c.getType());
-				assertEquals(1, c.getAttributeChanges().size());
-
-				assertEquals(Confidential.getInstance(),
-						c.getAttributeChanges().get(Auditable2.CHAR_PROPERTY2.getName()).getNewValue());
-
-				return null;
-			}
-		}).when(mockListener).onPostCommit(any(ObjectContext.class), any(ChangeMap.class));
-
-		Auditable2 a1 = context.newObject(Auditable2.class);
-		a1.setCharProperty1("yy");
-		a1.setCharProperty2("zz");
-		context.commitChanges();
-
-		verify(mockListener).onPostCommit(any(ObjectContext.class), any(ChangeMap.class));
-	}
-
-	@Test
-	public void testPostCommit_Update() throws SQLException {
-		auditable2.insert(1, "P1_1", "P2_1");
-
-		doAnswer(new Answer<Object>() {
-			@Override
-			public Object answer(InvocationOnMock invocation) throws Throwable {
-
-				assertSame(context, invocation.getArguments()[0]);
-
-				ChangeMap changes = (ChangeMap) invocation.getArguments()[1];
-				assertNotNull(changes);
-				assertEquals(1, changes.getUniqueChanges().size());
-
-				ObjectChange c = changes.getChanges().get(new ObjectId("Auditable2", Auditable2.ID_PK_COLUMN, 1));
-				assertNotNull(c);
-				assertEquals(ObjectChangeType.UPDATE, c.getType());
-				assertEquals(1, c.getAttributeChanges().size());
-				AttributeChange pc = c.getAttributeChanges().get(Auditable2.CHAR_PROPERTY2.getName());
-				assertNotNull(pc);
-				assertEquals(Confidential.getInstance(), pc.getOldValue());
-				assertEquals(Confidential.getInstance(), pc.getNewValue());
-
-				return null;
-			}
-		}).when(mockListener).onPostCommit(any(ObjectContext.class), any(ChangeMap.class));
-
-		Auditable2 a1 = SelectById.query(Auditable2.class, 1).selectOne(context);
-		a1.setCharProperty1("P1_2");
-		a1.setCharProperty2("P2_2");
-		context.commitChanges();
-
-		verify(mockListener).onPostCommit(any(ObjectContext.class), any(ChangeMap.class));
-	}
-
-	@Test
-	public void testPostCommit_Delete() throws SQLException {
-		auditable2.insert(1, "P1_1", "P2_1");
-
-		doAnswer(new Answer<Object>() {
-			@Override
-			public Object answer(InvocationOnMock invocation) throws Throwable {
-
-				assertSame(context, invocation.getArguments()[0]);
-
-				ChangeMap changes = (ChangeMap) invocation.getArguments()[1];
-				assertNotNull(changes);
-				assertEquals(1, changes.getUniqueChanges().size());
-
-				ObjectChange c = changes.getChanges().get(new ObjectId("Auditable2", Auditable2.ID_PK_COLUMN, 1));
-				assertNotNull(c);
-				assertEquals(ObjectChangeType.DELETE, c.getType());
-				assertEquals(1, c.getAttributeChanges().size());
-				assertEquals(Confidential.getInstance(),
-						c.getAttributeChanges().get(Auditable2.CHAR_PROPERTY2.getName()).getOldValue());
-
-				return null;
-			}
-		}).when(mockListener).onPostCommit(any(ObjectContext.class), any(ChangeMap.class));
-
-		Auditable2 a1 = SelectById.query(Auditable2.class, 1).selectOne(context);
-		context.deleteObject(a1);
-		context.commitChanges();
-
-		verify(mockListener).onPostCommit(any(ObjectContext.class), any(ChangeMap.class));
-	}
-
-	@Test
-	public void testPostCommit_UpdateToMany() throws SQLException {
-		auditable1.insert(1, "xx");
-		auditableChild1.insert(1, 1, "cc1");
-		auditableChild1.insert(2, null, "cc2");
-		auditableChild1.insert(3, null, "cc3");
-
-		final AuditableChild1 ac1 = SelectById.query(AuditableChild1.class, 1).selectOne(context);
-		final AuditableChild1 ac2 = SelectById.query(AuditableChild1.class, 2).selectOne(context);
-		final AuditableChild1 ac3 = SelectById.query(AuditableChild1.class, 3).selectOne(context);
-
-		final Auditable1 a1 = SelectById.query(Auditable1.class, 1).selectOne(context);
-
-		doAnswer(new Answer<Object>() {
-			@Override
-			public Object answer(InvocationOnMock invocation) throws Throwable {
-
-				assertSame(context, invocation.getArguments()[0]);
-
-				ChangeMap changes = (ChangeMap) invocation.getArguments()[1];
-				assertNotNull(changes);
-				assertEquals(1, changes.getUniqueChanges().size());
-
-				ObjectChange a1c = changes.getChanges().get(new ObjectId("Auditable1", Auditable1.ID_PK_COLUMN, 1));
-				assertNotNull(a1c);
-				assertEquals(ObjectChangeType.UPDATE, a1c.getType());
-				assertEquals(0, a1c.getAttributeChanges().size());
-
-				assertEquals(1, a1c.getToManyRelationshipChanges().size());
-
-				ToManyRelationshipChange a1c1 = a1c.getToManyRelationshipChanges().get(Auditable1.CHILDREN1.getName());
-				assertNotNull(a1c1);
-
-				assertEquals(2, a1c1.getAdded().size());
-				assertTrue(a1c1.getAdded().contains(ac2.getObjectId()));
-				assertTrue(a1c1.getAdded().contains(ac3.getObjectId()));
-
-				assertEquals(1, a1c1.getRemoved().size());
-				assertTrue(a1c1.getRemoved().contains(ac1.getObjectId()));
-
-				return null;
-			}
-		}).when(mockListener).onPostCommit(any(ObjectContext.class), any(ChangeMap.class));
-
-		a1.removeFromChildren1(ac1);
-		a1.addToChildren1(ac2);
-		a1.addToChildren1(ac3);
-
-		context.commitChanges();
-
-		verify(mockListener).onPostCommit(any(ObjectContext.class), any(ChangeMap.class));
-	}
-
-	@Test
-	public void testPostCommit_IgnoreAttributes() throws SQLException {
-
-		auditable3.insert(1, "31", "32");
-
-		final Auditable3 a3 = SelectById.query(Auditable3.class, 1).selectOne(context);
-
-		doAnswer(new Answer<Object>() {
-			@Override
-			public Object answer(InvocationOnMock invocation) throws Throwable {
-
-				assertSame(context, invocation.getArguments()[0]);
-
-				ChangeMap changes = (ChangeMap) invocation.getArguments()[1];
-				assertNull(changes.getChanges().get(new ObjectId("Auditable3", Auditable3.ID_PK_COLUMN, 1)));
-
-				return null;
-			}
-		}).when(mockListener).onPostCommit(any(ObjectContext.class), any(ChangeMap.class));
-
-		a3.setCharProperty1("33");
-		a3.setCharProperty2("34");
-
-		context.commitChanges();
-
-		verify(mockListener).onPostCommit(any(ObjectContext.class), any(ChangeMap.class));
-	}
-
-	@Test
-	public void testPostCommit_IgnoreToMany() throws SQLException {
-
-		auditable3.insert(1, "31", "32");
-		auditable4.insert(11, "41", "42", 1);
-		auditable4.insert(12, "43", "44", 1);
-
-		final Auditable3 a3 = SelectById.query(Auditable3.class, 1).selectOne(context);
-		final Auditable4 a41 = SelectById.query(Auditable4.class, 11).selectOne(context);
-		final Auditable4 a42 = SelectById.query(Auditable4.class, 12).selectOne(context);
-
-		doAnswer(new Answer<Object>() {
-			@Override
-			public Object answer(InvocationOnMock invocation) throws Throwable {
-
-				assertSame(context, invocation.getArguments()[0]);
-
-				ChangeMap changes = (ChangeMap) invocation.getArguments()[1];
-				assertNull(changes.getChanges().get(new ObjectId("Auditable3", Auditable3.ID_PK_COLUMN, 1)));
-
-				return null;
-			}
-		}).when(mockListener).onPostCommit(any(ObjectContext.class), any(ChangeMap.class));
-
-		a3.removeFromAuditable4s(a41);
-		a3.addToAuditable4s(a42);
-
-		context.commitChanges();
-
-		verify(mockListener).onPostCommit(any(ObjectContext.class), any(ChangeMap.class));
-	}
-
-	@Test
-	public void testPostCommit_IgnoreToOne() throws SQLException {
-
-		auditable3.insert(1, "31", "32");
-		auditable3.insert(2, "33", "34");
-		auditable4.insert(11, "41", "41", 1);
-
-		final Auditable3 a32 = SelectById.query(Auditable3.class, 2).selectOne(context);
-
-		final Auditable4 a4 = SelectById.query(Auditable4.class, 11).selectOne(context);
-
-		doAnswer(new Answer<Object>() {
-			@Override
-			public Object answer(InvocationOnMock invocation) throws Throwable {
-
-				assertSame(context, invocation.getArguments()[0]);
-
-				ChangeMap changes = (ChangeMap) invocation.getArguments()[1];
-				assertNull(changes.getChanges().get(new ObjectId("Auditable4", Auditable4.ID_PK_COLUMN, 11)));
-
-				return null;
-			}
-		}).when(mockListener).onPostCommit(any(ObjectContext.class), any(ChangeMap.class));
-
-		a4.setAuditable3(a32);
-
-		context.commitChanges();
-
-		verify(mockListener).onPostCommit(any(ObjectContext.class), any(ChangeMap.class));
-	}
-}

http://git-wip-us.apache.org/repos/asf/cayenne/blob/cfbe5903/cayenne-postcommit/src/test/java/org/apache/cayenne/lifecycle/postcommit/PostCommitFilter_ListenerInducedChangesIT.java
----------------------------------------------------------------------
diff --git a/cayenne-postcommit/src/test/java/org/apache/cayenne/lifecycle/postcommit/PostCommitFilter_ListenerInducedChangesIT.java b/cayenne-postcommit/src/test/java/org/apache/cayenne/lifecycle/postcommit/PostCommitFilter_ListenerInducedChangesIT.java
deleted file mode 100644
index 6f162c3..0000000
--- a/cayenne-postcommit/src/test/java/org/apache/cayenne/lifecycle/postcommit/PostCommitFilter_ListenerInducedChangesIT.java
+++ /dev/null
@@ -1,256 +0,0 @@
-/*****************************************************************
- *   Licensed to the Apache Software Foundation (ASF) under one
- *  or more contributor license agreements.  See the NOTICE file
- *  distributed with this work for additional information
- *  regarding copyright ownership.  The ASF licenses this file
- *  to you under the Apache License, Version 2.0 (the
- *  "License"); you may not use this file except in compliance
- *  with the License.  You may obtain a copy of the License at
- *
- *    http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing,
- *  software distributed under the License is distributed on an
- *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- *  KIND, either express or implied.  See the License for the
- *  specific language governing permissions and limitations
- *  under the License.
- ****************************************************************/
-
-package org.apache.cayenne.lifecycle.postcommit;
-
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertNotNull;
-import static org.junit.Assert.assertSame;
-import static org.mockito.Matchers.any;
-import static org.mockito.Mockito.doAnswer;
-import static org.mockito.Mockito.mock;
-import static org.mockito.Mockito.verify;
-
-import java.sql.SQLException;
-import java.util.ArrayList;
-import java.util.Collections;
-import java.util.Comparator;
-import java.util.List;
-
-import org.apache.cayenne.ObjectContext;
-import org.apache.cayenne.annotation.PrePersist;
-import org.apache.cayenne.annotation.PreUpdate;
-import org.apache.cayenne.configuration.server.ServerRuntimeBuilder;
-import org.apache.cayenne.lifecycle.changemap.AttributeChange;
-import org.apache.cayenne.lifecycle.changemap.ChangeMap;
-import org.apache.cayenne.lifecycle.changemap.ObjectChange;
-import org.apache.cayenne.lifecycle.changemap.ObjectChangeType;
-import org.apache.cayenne.lifecycle.db.Auditable1;
-import org.apache.cayenne.lifecycle.db.AuditableChild1;
-import org.apache.cayenne.lifecycle.unit.AuditableServerCase;
-import org.apache.cayenne.query.SelectById;
-import org.junit.Before;
-import org.junit.Test;
-import org.mockito.invocation.InvocationOnMock;
-import org.mockito.stubbing.Answer;
-
-/**
- * Testing capturing changes introduced by the pre-commit listeners.
- */
-public class PostCommitFilter_ListenerInducedChangesIT extends AuditableServerCase {
-
-	protected ObjectContext context;
-	protected PostCommitListener mockListener;
-
-	@Override
-	protected ServerRuntimeBuilder configureCayenne() {
-		this.mockListener = mock(PostCommitListener.class);
-		return super.configureCayenne().addModule(PostCommitModuleBuilder.builder().listener(mockListener).build());
-	}
-
-	@Before
-	public void before() {
-		context = runtime.newContext();
-	}
-
-	@Test
-	public void testPostCommit_Insert() throws SQLException {
-
-		final InsertListener listener = new InsertListener();
-		runtime.getDataDomain().addListener(listener);
-
-		final Auditable1 a1 = context.newObject(Auditable1.class);
-		a1.setCharProperty1("yy");
-
-		doAnswer(new Answer<Object>() {
-			@Override
-			public Object answer(InvocationOnMock invocation) throws Throwable {
-
-				assertNotNull(listener.c);
-
-				List<ObjectChange> sortedChanges = sortedChanges(invocation);
-
-				assertEquals(2, sortedChanges.size());
-
-				assertEquals(a1.getObjectId(), sortedChanges.get(0).getPostCommitId());
-				assertEquals(ObjectChangeType.INSERT, sortedChanges.get(0).getType());
-
-				assertEquals(listener.c.getObjectId(), sortedChanges.get(1).getPostCommitId());
-				assertEquals(ObjectChangeType.INSERT, sortedChanges.get(1).getType());
-
-				AttributeChange listenerInducedChange = sortedChanges.get(1).getAttributeChanges()
-						.get(AuditableChild1.CHAR_PROPERTY1.getName());
-				assertNotNull(listenerInducedChange);
-				assertEquals("c1", listenerInducedChange.getNewValue());
-
-				return null;
-			}
-		}).when(mockListener).onPostCommit(any(ObjectContext.class), any(ChangeMap.class));
-
-		context.commitChanges();
-
-		verify(mockListener).onPostCommit(any(ObjectContext.class), any(ChangeMap.class));
-	}
-
-	@Test
-	public void testPostCommit_Delete() throws SQLException {
-
-		auditable1.insert(1, "yy");
-		auditableChild1.insert(31, 1, "yyc");
-
-		final DeleteListener listener = new DeleteListener();
-		runtime.getDataDomain().addListener(listener);
-
-		final Auditable1 a1 = SelectById.query(Auditable1.class, 1).prefetch(Auditable1.CHILDREN1.joint())
-				.selectFirst(context);
-		a1.setCharProperty1("zz");
-
-		doAnswer(new Answer<Object>() {
-			@Override
-			public Object answer(InvocationOnMock invocation) throws Throwable {
-
-				assertNotNull(listener.toDelete);
-				assertEquals(1, listener.toDelete.size());
-
-				List<ObjectChange> sortedChanges = sortedChanges(invocation);
-
-				assertEquals(2, sortedChanges.size());
-
-				assertEquals(ObjectChangeType.UPDATE, sortedChanges.get(0).getType());
-				assertEquals(a1.getObjectId(), sortedChanges.get(0).getPostCommitId());
-
-				assertEquals(ObjectChangeType.DELETE, sortedChanges.get(1).getType());
-				assertEquals(listener.toDelete.get(0).getObjectId(), sortedChanges.get(1).getPostCommitId());
-
-				AttributeChange listenerInducedChange = sortedChanges.get(1).getAttributeChanges()
-						.get(AuditableChild1.CHAR_PROPERTY1.getName());
-				assertNotNull(listenerInducedChange);
-				assertEquals("yyc", listenerInducedChange.getOldValue());
-
-				return null;
-			}
-		}).when(mockListener).onPostCommit(any(ObjectContext.class), any(ChangeMap.class));
-
-		context.commitChanges();
-
-		verify(mockListener).onPostCommit(any(ObjectContext.class), any(ChangeMap.class));
-	}
-
-	@Test
-	public void testPostCommit_Update() throws SQLException {
-
-		auditable1.insert(1, "yy");
-		auditableChild1.insert(31, 1, "yyc");
-
-		final UpdateListener listener = new UpdateListener();
-		runtime.getDataDomain().addListener(listener);
-
-		final Auditable1 a1 = SelectById.query(Auditable1.class, 1).prefetch(Auditable1.CHILDREN1.joint())
-				.selectFirst(context);
-		a1.setCharProperty1("zz");
-
-		doAnswer(new Answer<Object>() {
-			@Override
-			public Object answer(InvocationOnMock invocation) throws Throwable {
-
-				assertNotNull(listener.toUpdate);
-				assertEquals(1, listener.toUpdate.size());
-
-				List<ObjectChange> sortedChanges = sortedChanges(invocation);
-
-				assertEquals(2, sortedChanges.size());
-
-				assertEquals(ObjectChangeType.UPDATE, sortedChanges.get(0).getType());
-				assertEquals(a1.getObjectId(), sortedChanges.get(0).getPostCommitId());
-
-				assertEquals(ObjectChangeType.UPDATE, sortedChanges.get(1).getType());
-				assertEquals(listener.toUpdate.get(0).getObjectId(), sortedChanges.get(1).getPostCommitId());
-
-				AttributeChange listenerInducedChange = sortedChanges.get(1).getAttributeChanges()
-						.get(AuditableChild1.CHAR_PROPERTY1.getName());
-				assertNotNull(listenerInducedChange);
-				assertEquals("yyc", listenerInducedChange.getOldValue());
-				assertEquals("yyc_", listenerInducedChange.getNewValue());
-
-				return null;
-			}
-		}).when(mockListener).onPostCommit(any(ObjectContext.class), any(ChangeMap.class));
-
-		context.commitChanges();
-
-		verify(mockListener).onPostCommit(any(ObjectContext.class), any(ChangeMap.class));
-	}
-
-	private List<ObjectChange> sortedChanges(InvocationOnMock invocation) {
-		assertSame(context, invocation.getArguments()[0]);
-
-		ChangeMap changes = (ChangeMap) invocation.getArguments()[1];
-
-		List<ObjectChange> sortedChanges = new ArrayList<>(changes.getUniqueChanges());
-		Collections.sort(sortedChanges, new Comparator<ObjectChange>() {
-			public int compare(ObjectChange o1, ObjectChange o2) {
-				return o1.getPostCommitId().getEntityName().compareTo(o2.getPostCommitId().getEntityName());
-			}
-		});
-
-		return sortedChanges;
-	}
-
-	static class InsertListener {
-
-		private AuditableChild1 c;
-
-		@PrePersist(Auditable1.class)
-		public void prePersist(Auditable1 a) {
-
-			c = a.getObjectContext().newObject(AuditableChild1.class);
-			c.setCharProperty1("c1");
-			c.setParent(a);
-		}
-	}
-
-	static class DeleteListener {
-
-		private List<AuditableChild1> toDelete;
-
-		@PreUpdate(Auditable1.class)
-		public void prePersist(Auditable1 a) {
-
-			toDelete = new ArrayList<>(a.getChildren1());
-			for (AuditableChild1 c : toDelete) {
-				c.getObjectContext().deleteObject(c);
-			}
-		}
-	}
-
-	static class UpdateListener {
-
-		private List<AuditableChild1> toUpdate;
-
-		@PreUpdate(Auditable1.class)
-		public void prePersist(Auditable1 a) {
-
-			toUpdate = new ArrayList<>(a.getChildren1());
-			for (AuditableChild1 c : toUpdate) {
-				c.setCharProperty1(c.getCharProperty1() + "_");
-			}
-		}
-	}
-
-}

http://git-wip-us.apache.org/repos/asf/cayenne/blob/cfbe5903/cayenne-postcommit/src/test/java/org/apache/cayenne/lifecycle/postcommit/PostCommitFilter_OutsideTxIT.java
----------------------------------------------------------------------
diff --git a/cayenne-postcommit/src/test/java/org/apache/cayenne/lifecycle/postcommit/PostCommitFilter_OutsideTxIT.java b/cayenne-postcommit/src/test/java/org/apache/cayenne/lifecycle/postcommit/PostCommitFilter_OutsideTxIT.java
deleted file mode 100644
index b9b3278..0000000
--- a/cayenne-postcommit/src/test/java/org/apache/cayenne/lifecycle/postcommit/PostCommitFilter_OutsideTxIT.java
+++ /dev/null
@@ -1,85 +0,0 @@
-/*****************************************************************
- *   Licensed to the Apache Software Foundation (ASF) under one
- *  or more contributor license agreements.  See the NOTICE file
- *  distributed with this work for additional information
- *  regarding copyright ownership.  The ASF licenses this file
- *  to you under the Apache License, Version 2.0 (the
- *  "License"); you may not use this file except in compliance
- *  with the License.  You may obtain a copy of the License at
- *
- *    http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing,
- *  software distributed under the License is distributed on an
- *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- *  KIND, either express or implied.  See the License for the
- *  specific language governing permissions and limitations
- *  under the License.
- ****************************************************************/
-package org.apache.cayenne.lifecycle.postcommit;
-
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertNull;
-
-import java.sql.SQLException;
-import java.util.List;
-
-import org.apache.cayenne.ObjectContext;
-import org.apache.cayenne.configuration.server.ServerRuntimeBuilder;
-import org.apache.cayenne.lifecycle.changemap.ChangeMap;
-import org.apache.cayenne.lifecycle.changemap.ObjectChange;
-import org.apache.cayenne.lifecycle.db.AuditLog;
-import org.apache.cayenne.lifecycle.db.Auditable2;
-import org.apache.cayenne.lifecycle.unit.AuditableServerCase;
-import org.apache.cayenne.tx.BaseTransaction;
-import org.junit.Before;
-import org.junit.Test;
-
-public class PostCommitFilter_OutsideTxIT extends AuditableServerCase {
-
-	protected ObjectContext context;
-	protected PostCommitListener listener;
-
-	@Override
-	protected ServerRuntimeBuilder configureCayenne() {
-		this.listener = new PostCommitListener() {
-
-			@Override
-			public void onPostCommit(ObjectContext originatingContext, ChangeMap changes) {
-
-				// assert we are inside transaction
-				assertNull(BaseTransaction.getThreadTransaction());
-
-				for (ObjectChange c : changes.getUniqueChanges()) {
-					AuditLog log = runtime.newContext().newObject(AuditLog.class);
-					log.setLog("DONE: " + c.getPostCommitId());
-					log.getObjectContext().commitChanges();
-				}
-			}
-		};
-		return super.configureCayenne().addModule(
-				PostCommitModuleBuilder.builder().auditableEntitiesOnly().excludeFromTransaction().listener(listener)
-						.build());
-	}
-
-	@Before
-	public void before() {
-		this.context = runtime.newContext();
-	}
-
-	@Test
-	public void testCommitLog() throws SQLException {
-		Auditable2 a1 = context.newObject(Auditable2.class);
-		a1.setCharProperty1("yy");
-		a1.setCharProperty2("zz");
-
-		Auditable2 a2 = context.newObject(Auditable2.class);
-		a2.setCharProperty1("yy");
-		a2.setCharProperty2("zz");
-		context.commitChanges();
-
-		List<Object[]> logs = auditLog.selectAll();
-		assertEquals(2, logs.size());
-	}
-
-}

http://git-wip-us.apache.org/repos/asf/cayenne/blob/cfbe5903/cayenne-postcommit/src/test/java/org/apache/cayenne/lifecycle/postcommit/PostCommitFilter_TxIT.java
----------------------------------------------------------------------
diff --git a/cayenne-postcommit/src/test/java/org/apache/cayenne/lifecycle/postcommit/PostCommitFilter_TxIT.java b/cayenne-postcommit/src/test/java/org/apache/cayenne/lifecycle/postcommit/PostCommitFilter_TxIT.java
deleted file mode 100644
index 8b62be6..0000000
--- a/cayenne-postcommit/src/test/java/org/apache/cayenne/lifecycle/postcommit/PostCommitFilter_TxIT.java
+++ /dev/null
@@ -1,84 +0,0 @@
-/*****************************************************************
- *   Licensed to the Apache Software Foundation (ASF) under one
- *  or more contributor license agreements.  See the NOTICE file
- *  distributed with this work for additional information
- *  regarding copyright ownership.  The ASF licenses this file
- *  to you under the Apache License, Version 2.0 (the
- *  "License"); you may not use this file except in compliance
- *  with the License.  You may obtain a copy of the License at
- *
- *    http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing,
- *  software distributed under the License is distributed on an
- *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- *  KIND, either express or implied.  See the License for the
- *  specific language governing permissions and limitations
- *  under the License.
- ****************************************************************/
-package org.apache.cayenne.lifecycle.postcommit;
-
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertNotNull;
-
-import java.sql.SQLException;
-import java.util.List;
-
-import org.apache.cayenne.ObjectContext;
-import org.apache.cayenne.configuration.server.ServerRuntimeBuilder;
-import org.apache.cayenne.lifecycle.changemap.ChangeMap;
-import org.apache.cayenne.lifecycle.changemap.ObjectChange;
-import org.apache.cayenne.lifecycle.db.AuditLog;
-import org.apache.cayenne.lifecycle.db.Auditable2;
-import org.apache.cayenne.lifecycle.unit.AuditableServerCase;
-import org.apache.cayenne.tx.BaseTransaction;
-import org.junit.Before;
-import org.junit.Test;
-
-public class PostCommitFilter_TxIT extends AuditableServerCase {
-
-	protected ObjectContext context;
-	protected PostCommitListener listener;
-
-	@Override
-	protected ServerRuntimeBuilder configureCayenne() {
-		this.listener = new PostCommitListener() {
-
-			@Override
-			public void onPostCommit(ObjectContext originatingContext, ChangeMap changes) {
-
-				// assert we are inside transaction
-				assertNotNull(BaseTransaction.getThreadTransaction());
-
-				for (ObjectChange c : changes.getUniqueChanges()) {
-					AuditLog log = runtime.newContext().newObject(AuditLog.class);
-					log.setLog("DONE: " + c.getPostCommitId());
-					log.getObjectContext().commitChanges();
-				}
-			}
-		};
-		return super.configureCayenne().addModule(
-				PostCommitModuleBuilder.builder().auditableEntitiesOnly().listener(listener).build());
-	}
-
-	@Before
-	public void before() {
-		this.context = runtime.newContext();
-	}
-
-	@Test
-	public void testCommitLog() throws SQLException {
-		Auditable2 a1 = context.newObject(Auditable2.class);
-		a1.setCharProperty1("yy");
-		a1.setCharProperty2("zz");
-
-		Auditable2 a2 = context.newObject(Auditable2.class);
-		a2.setCharProperty1("yy");
-		a2.setCharProperty2("zz");
-		context.commitChanges();
-
-		List<Object[]> logs = auditLog.selectAll();
-		assertEquals(2, logs.size());
-	}
-
-}

http://git-wip-us.apache.org/repos/asf/cayenne/blob/cfbe5903/cayenne-postcommit/src/test/java/org/apache/cayenne/lifecycle/postcommit/PostCommitModuleBuilderTest.java
----------------------------------------------------------------------
diff --git a/cayenne-postcommit/src/test/java/org/apache/cayenne/lifecycle/postcommit/PostCommitModuleBuilderTest.java b/cayenne-postcommit/src/test/java/org/apache/cayenne/lifecycle/postcommit/PostCommitModuleBuilderTest.java
deleted file mode 100644
index 48a9d6c..0000000
--- a/cayenne-postcommit/src/test/java/org/apache/cayenne/lifecycle/postcommit/PostCommitModuleBuilderTest.java
+++ /dev/null
@@ -1,67 +0,0 @@
-/*****************************************************************
- *   Licensed to the Apache Software Foundation (ASF) under one
- *  or more contributor license agreements.  See the NOTICE file
- *  distributed with this work for additional information
- *  regarding copyright ownership.  The ASF licenses this file
- *  to you under the Apache License, Version 2.0 (the
- *  "License"); you may not use this file except in compliance
- *  with the License.  You may obtain a copy of the License at
- *
- *    http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing,
- *  software distributed under the License is distributed on an
- *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- *  KIND, either express or implied.  See the License for the
- *  specific language governing permissions and limitations
- *  under the License.
- ****************************************************************/
-package org.apache.cayenne.lifecycle.postcommit;
-
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertTrue;
-
-import java.util.List;
-
-import org.apache.cayenne.ObjectContext;
-import org.apache.cayenne.di.DIBootstrap;
-import org.apache.cayenne.di.Injector;
-import org.apache.cayenne.di.Key;
-import org.apache.cayenne.di.Module;
-import org.apache.cayenne.lifecycle.changemap.ChangeMap;
-import org.junit.Test;
-
-public class PostCommitModuleBuilderTest {
-
-	@Test
-	public void testListener_Object() {
-
-		L listener = new L();
-		Module m = PostCommitModuleBuilder.builder().listener(listener).build();
-
-		Injector i = DIBootstrap.createInjector(m);
-		List<PostCommitListener> listeners = i.getInstance(Key.getListOf(PostCommitListener.class));
-		assertEquals(1, listeners.size());
-		assertTrue(listeners.contains(listener));
-	}
-
-	@Test
-	public void testListener_Class() {
-
-		Module m = PostCommitModuleBuilder.builder().listener(L.class).build();
-
-		Injector i = DIBootstrap.createInjector(m);
-		List<PostCommitListener> listeners = i.getInstance(Key.getListOf(PostCommitListener.class));
-		assertEquals(1, listeners.size());
-		assertTrue(listeners.get(0) instanceof L);
-	}
-
-	public static class L implements PostCommitListener {
-
-		@Override
-		public void onPostCommit(ObjectContext originatingContext, ChangeMap changes) {
-			// do nothing.
-		}
-	}
-
-}

http://git-wip-us.apache.org/repos/asf/cayenne/blob/cfbe5903/cayenne-postcommit/src/test/java/org/apache/cayenne/lifecycle/postcommit/PostCommitModuleProviderTest.java
----------------------------------------------------------------------
diff --git a/cayenne-postcommit/src/test/java/org/apache/cayenne/lifecycle/postcommit/PostCommitModuleProviderTest.java b/cayenne-postcommit/src/test/java/org/apache/cayenne/lifecycle/postcommit/PostCommitModuleProviderTest.java
deleted file mode 100644
index cbf8152..0000000
--- a/cayenne-postcommit/src/test/java/org/apache/cayenne/lifecycle/postcommit/PostCommitModuleProviderTest.java
+++ /dev/null
@@ -1,32 +0,0 @@
-/*****************************************************************
- *   Licensed to the Apache Software Foundation (ASF) under one
- *  or more contributor license agreements.  See the NOTICE file
- *  distributed with this work for additional information
- *  regarding copyright ownership.  The ASF licenses this file
- *  to you under the Apache License, Version 2.0 (the
- *  "License"); you may not use this file except in compliance
- *  with the License.  You may obtain a copy of the License at
- *
- *    http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing,
- *  software distributed under the License is distributed on an
- *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- *  KIND, either express or implied.  See the License for the
- *  specific language governing permissions and limitations
- *  under the License.
- ****************************************************************/
-
-package org.apache.cayenne.lifecycle.postcommit;
-
-import org.apache.cayenne.configuration.server.CayenneServerModuleProvider;
-import org.apache.cayenne.unit.util.ModuleProviderChecker;
-import org.junit.Test;
-
-public class PostCommitModuleProviderTest {
-
-    @Test
-    public void testAutoLoadable() {
-        ModuleProviderChecker.testProviderPresent(PostCommitServerModuleProvider.class, CayenneServerModuleProvider.class);
-    }
-}

http://git-wip-us.apache.org/repos/asf/cayenne/blob/cfbe5903/cayenne-postcommit/src/test/java/org/apache/cayenne/lifecycle/unit/AuditableServerCase.java
----------------------------------------------------------------------
diff --git a/cayenne-postcommit/src/test/java/org/apache/cayenne/lifecycle/unit/AuditableServerCase.java b/cayenne-postcommit/src/test/java/org/apache/cayenne/lifecycle/unit/AuditableServerCase.java
deleted file mode 100644
index 2fb057b..0000000
--- a/cayenne-postcommit/src/test/java/org/apache/cayenne/lifecycle/unit/AuditableServerCase.java
+++ /dev/null
@@ -1,88 +0,0 @@
-/*****************************************************************
- *   Licensed to the Apache Software Foundation (ASF) under one
- *  or more contributor license agreements.  See the NOTICE file
- *  distributed with this work for additional information
- *  regarding copyright ownership.  The ASF licenses this file
- *  to you under the Apache License, Version 2.0 (the
- *  "License"); you may not use this file except in compliance
- *  with the License.  You may obtain a copy of the License at
- *
- *    http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing,
- *  software distributed under the License is distributed on an
- *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- *  KIND, either express or implied.  See the License for the
- *  specific language governing permissions and limitations
- *  under the License.
- ****************************************************************/
-package org.apache.cayenne.lifecycle.unit;
-
-import org.apache.cayenne.configuration.server.ServerRuntime;
-import org.apache.cayenne.configuration.server.ServerRuntimeBuilder;
-import org.apache.cayenne.test.jdbc.DBHelper;
-import org.apache.cayenne.test.jdbc.TableHelper;
-import org.junit.After;
-import org.junit.Before;
-
-/**
- * A superclass of integration tests for cayenne-lifecycle.
- */
-public abstract class AuditableServerCase {
-
-	protected ServerRuntime runtime;
-
-	protected TableHelper auditable1;
-	protected TableHelper auditableChild1;
-
-	protected TableHelper auditable2;
-	protected TableHelper auditableChild3;
-
-	protected TableHelper auditable3;
-	protected TableHelper auditable4;
-
-	protected TableHelper auditLog;
-
-	@Before
-	public void startCayenne() throws Exception {
-		this.runtime = configureCayenne().build();
-
-		DBHelper dbHelper = new DBHelper(runtime.getDataSource());
-
-		this.auditLog = new TableHelper(dbHelper, "AUDIT_LOG").setColumns("ID", "LOG");
-
-		this.auditable1 = new TableHelper(dbHelper, "AUDITABLE1").setColumns("ID", "CHAR_PROPERTY1");
-
-		this.auditableChild1 = new TableHelper(dbHelper, "AUDITABLE_CHILD1").setColumns("ID", "AUDITABLE1_ID",
-				"CHAR_PROPERTY1");
-
-		this.auditable2 = new TableHelper(dbHelper, "AUDITABLE2").setColumns("ID", "CHAR_PROPERTY1", "CHAR_PROPERTY2");
-
-		this.auditableChild3 = new TableHelper(dbHelper, "AUDITABLE_CHILD3").setColumns("ID", "AUDITABLE2_ID",
-				"CHAR_PROPERTY1", "CHAR_PROPERTY2");
-
-		this.auditable3 = new TableHelper(dbHelper, "AUDITABLE3").setColumns("ID", "CHAR_PROPERTY1", "CHAR_PROPERTY2");
-		this.auditable4 = new TableHelper(dbHelper, "AUDITABLE4").setColumns("ID", "CHAR_PROPERTY1", "CHAR_PROPERTY2",
-				"AUDITABLE3_ID");
-
-		this.auditableChild1.deleteAll();
-		this.auditable1.deleteAll();
-		this.auditableChild3.deleteAll();
-		this.auditable2.deleteAll();
-		this.auditable4.deleteAll();
-		this.auditable3.deleteAll();
-
-		this.auditLog.deleteAll();
-	}
-
-	protected ServerRuntimeBuilder configureCayenne() {
-		return ServerRuntime.builder().addConfig("cayenne-lifecycle.xml");
-	}
-
-	@After
-	public void shutdownCayenne() {
-		if (runtime != null) {
-			runtime.shutdown();
-		}
-	}
-}

http://git-wip-us.apache.org/repos/asf/cayenne/blob/cfbe5903/cayenne-postcommit/src/test/java/org/apache/cayenne/lifecycle/unit/FlattenedServerCase.java
----------------------------------------------------------------------
diff --git a/cayenne-postcommit/src/test/java/org/apache/cayenne/lifecycle/unit/FlattenedServerCase.java b/cayenne-postcommit/src/test/java/org/apache/cayenne/lifecycle/unit/FlattenedServerCase.java
deleted file mode 100644
index b9d1b0c..0000000
--- a/cayenne-postcommit/src/test/java/org/apache/cayenne/lifecycle/unit/FlattenedServerCase.java
+++ /dev/null
@@ -1,62 +0,0 @@
-/*****************************************************************
- *   Licensed to the Apache Software Foundation (ASF) under one
- *  or more contributor license agreements.  See the NOTICE file
- *  distributed with this work for additional information
- *  regarding copyright ownership.  The ASF licenses this file
- *  to you under the Apache License, Version 2.0 (the
- *  "License"); you may not use this file except in compliance
- *  with the License.  You may obtain a copy of the License at
- *
- *    http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing,
- *  software distributed under the License is distributed on an
- *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- *  KIND, either express or implied.  See the License for the
- *  specific language governing permissions and limitations
- *  under the License.
- ****************************************************************/
-package org.apache.cayenne.lifecycle.unit;
-
-import org.apache.cayenne.configuration.server.ServerRuntime;
-import org.apache.cayenne.configuration.server.ServerRuntimeBuilder;
-import org.apache.cayenne.test.jdbc.DBHelper;
-import org.apache.cayenne.test.jdbc.TableHelper;
-import org.junit.After;
-import org.junit.Before;
-
-public class FlattenedServerCase {
-
-	protected ServerRuntime runtime;
-
-	protected TableHelper e3;
-	protected TableHelper e4;
-	protected TableHelper e34;
-
-	@Before
-	public void startCayenne() throws Exception {
-		this.runtime = configureCayenne().build();
-
-		DBHelper dbHelper = new DBHelper(runtime.getDataSource());
-
-		this.e3 = new TableHelper(dbHelper, "E3").setColumns("ID");
-		this.e4 = new TableHelper(dbHelper, "E4").setColumns("ID");
-		this.e34 = new TableHelper(dbHelper, "E34").setColumns("E3_ID", "E4_ID");
-
-		this.e34.deleteAll();
-		this.e3.deleteAll();
-
-	}
-
-	protected ServerRuntimeBuilder configureCayenne() {
-		return ServerRuntime.builder().addConfig("cayenne-lifecycle.xml");
-	}
-
-	@After
-	public void shutdownCayenne() {
-		if (runtime != null) {
-			runtime.shutdown();
-		}
-	}
-
-}

http://git-wip-us.apache.org/repos/asf/cayenne/blob/cfbe5903/cayenne-postcommit/src/test/resources/cayenne-lifecycle.xml
----------------------------------------------------------------------
diff --git a/cayenne-postcommit/src/test/resources/cayenne-lifecycle.xml b/cayenne-postcommit/src/test/resources/cayenne-lifecycle.xml
deleted file mode 100644
index 5b9a83e..0000000
--- a/cayenne-postcommit/src/test/resources/cayenne-lifecycle.xml
+++ /dev/null
@@ -1,17 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<domain project-version="9">
-	<map name="lifecycle-map"/>
-
-	<node name="lifecycle-db"
-		 factory="org.apache.cayenne.configuration.server.XMLPoolingDataSourceFactory"
-		 schema-update-strategy="org.apache.cayenne.access.dbsync.CreateIfNoSchemaStrategy"
-		>
-		<map-ref name="lifecycle-map"/>
-		<data-source>
-			<driver value="org.hsqldb.jdbcDriver"/>
-			<url value="jdbc:hsqldb:mem:lifecycle"/>
-			<connectionPool min="1" max="1"/>
-			<login userName="sa"/>
-		</data-source>
-	</node>
-</domain>

http://git-wip-us.apache.org/repos/asf/cayenne/blob/cfbe5903/cayenne-postcommit/src/test/resources/lifecycle-map.map.xml
----------------------------------------------------------------------
diff --git a/cayenne-postcommit/src/test/resources/lifecycle-map.map.xml b/cayenne-postcommit/src/test/resources/lifecycle-map.map.xml
deleted file mode 100644
index d7a4a4a..0000000
--- a/cayenne-postcommit/src/test/resources/lifecycle-map.map.xml
+++ /dev/null
@@ -1,148 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-  ~   Licensed to the Apache Software Foundation (ASF) under one
-  ~  or more contributor license agreements.  See the NOTICE file
-  ~  distributed with this work for additional information
-  ~  regarding copyright ownership.  The ASF licenses this file
-  ~  to you under the Apache License, Version 2.0 (the
-  ~  "License"); you may not use this file except in compliance
-  ~  with the License.  You may obtain a copy of the License at
-  ~
-  ~    http://www.apache.org/licenses/LICENSE-2.0
-  ~
-  ~  Unless required by applicable law or agreed to in writing,
-  ~  software distributed under the License is distributed on an
-  ~  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-  ~  KIND, either express or implied.  See the License for the
-  ~  specific language governing permissions and limitations
-  ~  under the License.
-  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-->
-
-<data-map xmlns="http://cayenne.apache.org/schema/9/modelMap"
-	 xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-	 xsi:schemaLocation="http://cayenne.apache.org/schema/9/modelMap http://cayenne.apache.org/schema/9/modelMap.xsd"
-	 project-version="9">
-	<property name="defaultPackage" value="org.apache.cayenne.lifecycle.db"/>
-	<db-entity name="AUDITABLE1">
-		<db-attribute name="CHAR_PROPERTY1" type="VARCHAR" length="200"/>
-		<db-attribute name="ID" type="INTEGER" isPrimaryKey="true" isMandatory="true"/>
-	</db-entity>
-	<db-entity name="AUDITABLE2">
-		<db-attribute name="CHAR_PROPERTY1" type="VARCHAR" length="200"/>
-		<db-attribute name="CHAR_PROPERTY2" type="VARCHAR" length="200"/>
-		<db-attribute name="ID" type="INTEGER" isPrimaryKey="true" isMandatory="true"/>
-	</db-entity>
-	<db-entity name="AUDITABLE3">
-		<db-attribute name="CHAR_PROPERTY1" type="VARCHAR" length="200"/>
-		<db-attribute name="CHAR_PROPERTY2" type="VARCHAR" length="200"/>
-		<db-attribute name="ID" type="INTEGER" isPrimaryKey="true" isMandatory="true"/>
-	</db-entity>
-	<db-entity name="AUDITABLE4">
-		<db-attribute name="AUDITABLE3_ID" type="INTEGER"/>
-		<db-attribute name="CHAR_PROPERTY1" type="VARCHAR" length="200"/>
-		<db-attribute name="CHAR_PROPERTY2" type="VARCHAR" length="200"/>
-		<db-attribute name="ID" type="INTEGER" isPrimaryKey="true" isMandatory="true"/>
-	</db-entity>
-	<db-entity name="AUDITABLE_CHILD1">
-		<db-attribute name="AUDITABLE1_ID" type="INTEGER"/>
-		<db-attribute name="CHAR_PROPERTY1" type="VARCHAR" length="200"/>
-		<db-attribute name="ID" type="INTEGER" isPrimaryKey="true" isMandatory="true"/>
-	</db-entity>
-	<db-entity name="AUDITABLE_CHILD3">
-		<db-attribute name="AUDITABLE2_ID" type="INTEGER"/>
-		<db-attribute name="CHAR_PROPERTY1" type="VARCHAR" length="200"/>
-		<db-attribute name="CHAR_PROPERTY2" type="VARCHAR" length="200"/>
-		<db-attribute name="ID" type="INTEGER" isPrimaryKey="true" isMandatory="true"/>
-	</db-entity>
-	<db-entity name="AUDIT_LOG">
-		<db-attribute name="ID" type="INTEGER" isPrimaryKey="true" isMandatory="true"/>
-		<db-attribute name="LOG" type="CLOB"/>
-	</db-entity>
-	<db-entity name="E1">
-		<db-attribute name="ID" type="BIGINT" isPrimaryKey="true" isMandatory="true"/>
-	</db-entity>
-	<db-entity name="E2">
-		<db-attribute name="ID" type="BIGINT" isPrimaryKey="true" isMandatory="true"/>
-	</db-entity>
-	<db-entity name="E3">
-		<db-attribute name="ID" type="BIGINT" isPrimaryKey="true" isMandatory="true"/>
-	</db-entity>
-	<db-entity name="E34">
-		<db-attribute name="E3_ID" type="BIGINT" isPrimaryKey="true" isMandatory="true"/>
-		<db-attribute name="E4_ID" type="BIGINT" isPrimaryKey="true" isMandatory="true"/>
-	</db-entity>
-	<db-entity name="E4">
-		<db-attribute name="ID" type="BIGINT" isPrimaryKey="true" isMandatory="true"/>
-	</db-entity>
-	<obj-entity name="AuditLog" className="org.apache.cayenne.lifecycle.db.AuditLog" dbEntityName="AUDIT_LOG">
-		<obj-attribute name="log" type="java.lang.String" db-attribute-path="LOG"/>
-	</obj-entity>
-	<obj-entity name="Auditable1" className="org.apache.cayenne.lifecycle.db.Auditable1" dbEntityName="AUDITABLE1">
-		<obj-attribute name="charProperty1" type="java.lang.String" db-attribute-path="CHAR_PROPERTY1"/>
-	</obj-entity>
-	<obj-entity name="Auditable2" className="org.apache.cayenne.lifecycle.db.Auditable2" dbEntityName="AUDITABLE2">
-		<obj-attribute name="charProperty1" type="java.lang.String" db-attribute-path="CHAR_PROPERTY1"/>
-		<obj-attribute name="charProperty2" type="java.lang.String" db-attribute-path="CHAR_PROPERTY2"/>
-	</obj-entity>
-	<obj-entity name="Auditable3" className="org.apache.cayenne.lifecycle.db.Auditable3" dbEntityName="AUDITABLE3">
-		<obj-attribute name="charProperty1" type="java.lang.String" db-attribute-path="CHAR_PROPERTY1"/>
-		<obj-attribute name="charProperty2" type="java.lang.String" db-attribute-path="CHAR_PROPERTY2"/>
-	</obj-entity>
-	<obj-entity name="Auditable4" className="org.apache.cayenne.lifecycle.db.Auditable4" dbEntityName="AUDITABLE4">
-		<obj-attribute name="charProperty1" type="java.lang.String" db-attribute-path="CHAR_PROPERTY1"/>
-		<obj-attribute name="charProperty2" type="java.lang.String" db-attribute-path="CHAR_PROPERTY2"/>
-	</obj-entity>
-	<obj-entity name="AuditableChild1" className="org.apache.cayenne.lifecycle.db.AuditableChild1" dbEntityName="AUDITABLE_CHILD1">
-		<obj-attribute name="charProperty1" type="java.lang.String" db-attribute-path="CHAR_PROPERTY1"/>
-	</obj-entity>
-	<obj-entity name="AuditableChild3" className="org.apache.cayenne.lifecycle.db.AuditableChild3" dbEntityName="AUDITABLE_CHILD3">
-		<obj-attribute name="charProperty1" type="java.lang.String" db-attribute-path="CHAR_PROPERTY1"/>
-		<obj-attribute name="charProperty2" type="java.lang.String" db-attribute-path="CHAR_PROPERTY2"/>
-	</obj-entity>
-	<obj-entity name="E1" className="org.apache.cayenne.lifecycle.db.E1" dbEntityName="E1">
-	</obj-entity>
-	<obj-entity name="E2" className="org.apache.cayenne.lifecycle.db.E2" dbEntityName="E2">
-	</obj-entity>
-	<obj-entity name="E3" className="org.apache.cayenne.lifecycle.db.E3" dbEntityName="E3">
-	</obj-entity>
-	<obj-entity name="E4" className="org.apache.cayenne.lifecycle.db.E4" dbEntityName="E4">
-	</obj-entity>
-	<db-relationship name="children1" source="AUDITABLE1" target="AUDITABLE_CHILD1" toMany="true">
-		<db-attribute-pair source="ID" target="AUDITABLE1_ID"/>
-	</db-relationship>
-	<db-relationship name="children" source="AUDITABLE2" target="AUDITABLE_CHILD3" toMany="true">
-		<db-attribute-pair source="ID" target="AUDITABLE2_ID"/>
-	</db-relationship>
-	<db-relationship name="auditable4s" source="AUDITABLE3" target="AUDITABLE4" toMany="true">
-		<db-attribute-pair source="ID" target="AUDITABLE3_ID"/>
-	</db-relationship>
-	<db-relationship name="auditable3" source="AUDITABLE4" target="AUDITABLE3" toMany="false">
-		<db-attribute-pair source="AUDITABLE3_ID" target="ID"/>
-	</db-relationship>
-	<db-relationship name="parent" source="AUDITABLE_CHILD1" target="AUDITABLE1" toMany="false">
-		<db-attribute-pair source="AUDITABLE1_ID" target="ID"/>
-	</db-relationship>
-	<db-relationship name="parent" source="AUDITABLE_CHILD3" target="AUDITABLE2" toMany="false">
-		<db-attribute-pair source="AUDITABLE2_ID" target="ID"/>
-	</db-relationship>
-	<db-relationship name="e34s" source="E3" target="E34" toDependentPK="true" toMany="true">
-		<db-attribute-pair source="ID" target="E3_ID"/>
-	</db-relationship>
-	<db-relationship name="e3" source="E34" target="E3" toMany="false">
-		<db-attribute-pair source="E3_ID" target="ID"/>
-	</db-relationship>
-	<db-relationship name="e4" source="E34" target="E4" toMany="false">
-		<db-attribute-pair source="E4_ID" target="ID"/>
-	</db-relationship>
-	<db-relationship name="e34s" source="E4" target="E34" toDependentPK="true" toMany="true">
-		<db-attribute-pair source="ID" target="E4_ID"/>
-	</db-relationship>
-	<obj-relationship name="children1" source="Auditable1" target="AuditableChild1" deleteRule="Deny" db-relationship-path="children1"/>
-	<obj-relationship name="children" source="Auditable2" target="AuditableChild3" deleteRule="Deny" db-relationship-path="children"/>
-	<obj-relationship name="auditable4s" source="Auditable3" target="Auditable4" deleteRule="Deny" db-relationship-path="auditable4s"/>
-	<obj-relationship name="auditable3" source="Auditable4" target="Auditable3" deleteRule="Nullify" db-relationship-path="auditable3"/>
-	<obj-relationship name="parent" source="AuditableChild1" target="Auditable1" deleteRule="Nullify" db-relationship-path="parent"/>
-	<obj-relationship name="parent" source="AuditableChild3" target="Auditable2" deleteRule="Nullify" db-relationship-path="parent"/>
-	<obj-relationship name="e4s" source="E3" target="E4" deleteRule="Deny" db-relationship-path="e34s.e4"/>
-	<obj-relationship name="e3s" source="E4" target="E3" deleteRule="Deny" db-relationship-path="e34s.e3"/>
-</data-map>

http://git-wip-us.apache.org/repos/asf/cayenne/blob/cfbe5903/docs/doc/src/main/resources/RELEASE-NOTES.txt
----------------------------------------------------------------------
diff --git a/docs/doc/src/main/resources/RELEASE-NOTES.txt b/docs/doc/src/main/resources/RELEASE-NOTES.txt
index bea5721..54e8d3e 100644
--- a/docs/doc/src/main/resources/RELEASE-NOTES.txt
+++ b/docs/doc/src/main/resources/RELEASE-NOTES.txt
@@ -38,6 +38,7 @@ CAY-2280 Switch from commons-logging to slf4j
 CAY-2295 "Sync ObjEntity with DbEntity" and "View related DbEntity" buttons aren't disabled, if DbEntity doesn't have ObjEntity
 CAY-2296 cayenne-crypto: Get java type for DbAttribute bound to ObjAttributes with the same type
 CAY-2300 Modeler: New icons and design improvements
+CAY-2302 Rename postcommit module and its content to commitlog
 
 Bug Fixes:
 

http://git-wip-us.apache.org/repos/asf/cayenne/blob/cfbe5903/docs/doc/src/main/resources/UPGRADE.txt
----------------------------------------------------------------------
diff --git a/docs/doc/src/main/resources/UPGRADE.txt b/docs/doc/src/main/resources/UPGRADE.txt
index eb5514f..a1f08f9 100644
--- a/docs/doc/src/main/resources/UPGRADE.txt
+++ b/docs/doc/src/main/resources/UPGRADE.txt
@@ -7,6 +7,24 @@ IMPORTANT: be sure to read all notes for the intermediate releases between your
 
 UPGRADING TO 4.0.M6
 
+* Per CAY-2302 postcommit module and all it's internals renamed to commitlog.
+      Most important change is the new @CommitLog annotation which should be used instead of @Auditable,
+      this change is backward incompatible and most likely for you to miss as IDE won't give you a hint.
+      Please keep in mind that new @CommitLog annotation is used only by commitlog module.
+      Deprecated functionality in lifecycle module still depends on @Auditable annotation.
+
+      Here is list of steps you should do in order to update your code:
+      - include cayenne-commitlog module into your project (i.e. add dependency to your pom.xml)
+      - remove cayenne-lifecycle (and cayenne-postcommit if you have it) module from your project
+      - switch usages of @Auditable to @CommitLog
+      - change usages of renamed classes, here is two classes most likely used by your code:
+             PostCommitListener      -> CommitLogListener
+             PostCommitModuleBuilder -> CommitLogModuleBuilder
+      - fix all imports for renamed packages:
+             org.apache.cayenne.lifecycle.postcommit -> org.apache.cayenne.commitlog
+             org.apache.cayenne.lifecycle.changemap  -> org.apache.cayenne.commitlog.model
+      - change CommitLogModuleBuilder method auditableEntitiesOnly() to commitLogAnnotationEntitiesOnly()
+
 * Per CAY-2280 Cayenne migrated from commons-logging to SLF4J.
       Here is options you have to upgrade your project accordingly:
       1) Migrate your logging to SLF4J. Please see https://www.slf4j.org for documentation about
@@ -21,12 +39,12 @@ UPGRADING TO 4.0.M6
       were renamed to Slf4jJdbcEventLogger and FormattedSlf4jJdbcEventLogger respectively.
       Internally they are using now org.apache.cayenne.log.JdbcEventLogger interface as a logger name.
 
-* Per CAY-2278 The org.apache.cayenne.lifecycle.audit package (with the exception of AuditableChild annotation) and the
-       org.apache.cayenne.lifecycle.changeset package where deprecated.
+* Per CAY-2278 The org.apache.cayenne.lifecycle.audit package (with the exception of Auditable and
+       AuditableChild annotations) and the org.apache.cayenne.lifecycle.changeset package where deprecated.
        Weighted graph sorter moved to cayenne-server into org.apache.cayenne.ashwood package.
-       Packages org.apache.cayenne.lifecycle.changemap, org.apache.cayenne.lifecycle.postcommit and Auditable annotation
-       where moved to the new cayenne-postcommit module.
-       Please change your code accordingly.
+       Packages org.apache.cayenne.lifecycle.changemap, org.apache.cayenne.lifecycle.postcommit
+       where moved to the new cayenne-commitlog module.
+       Please change your code accordingly (see also notes above for CAY-2302).
 
 * Per CAY-2277 ClientRuntime created with ClientRuntimeBuilder, direct instantiation of
        ClientRuntime is deprecated. Also whole ClientLocalRuntime class is deprecated, use instead
@@ -43,7 +61,7 @@ UPGRADING TO 4.0.M6
        Also new modules are extracted from the existing one and should be added to your pom.xml if the corresponding
        functionality is used by your project:
        - cayenne-cache-invalidation (was part of cayenne-lifecycle)
-       - cayenne-postcommit (was part of cayenne-lifecycle)
+       - cayenne-commitlog (was part of cayenne-lifecycle)
 
 * Per CAY-2259 InvalidationFunction returns CacheGroupDescriptor instead of simple String with cache group name,
        change your custom functions accordingly.

http://git-wip-us.apache.org/repos/asf/cayenne/blob/cfbe5903/pom.xml
----------------------------------------------------------------------
diff --git a/pom.xml b/pom.xml
index c4f7aa7..7f957cd 100644
--- a/pom.xml
+++ b/pom.xml
@@ -59,7 +59,7 @@
 		<module>cayenne-ant</module>
 		<module>cayenne-project</module>
 		<module>cayenne-lifecycle</module>
-		<module>cayenne-postcommit</module>
+		<module>cayenne-commitlog</module>
 		<module>cayenne-crypto</module>
 		<module>cayenne-joda</module>
 		<module>cayenne-dbcp2</module>


Mime
View raw message