cayenne-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ntimof...@apache.org
Subject [1/2] cayenne git commit: CAY-2262: Make cayenne-client and related auto loaded CAY-2277: Create ClientRuntime with ClientRuntimeBuilder just like ServerRuntime
Date Fri, 07 Apr 2017 11:29:02 GMT
Repository: cayenne
Updated Branches:
  refs/heads/master 5008dcee2 -> 6888884af


http://git-wip-us.apache.org/repos/asf/cayenne/blob/6888884a/cayenne-jcache/src/main/java/org/apache/cayenne/jcache/JCacheModuleProvider.java
----------------------------------------------------------------------
diff --git a/cayenne-jcache/src/main/java/org/apache/cayenne/jcache/JCacheModuleProvider.java b/cayenne-jcache/src/main/java/org/apache/cayenne/jcache/JCacheModuleProvider.java
deleted file mode 100644
index f1f9d40..0000000
--- a/cayenne-jcache/src/main/java/org/apache/cayenne/jcache/JCacheModuleProvider.java
+++ /dev/null
@@ -1,50 +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.jcache;
-
-import java.util.Collection;
-import java.util.Collections;
-
-import org.apache.cayenne.configuration.server.ServerModule;
-import org.apache.cayenne.di.Module;
-import org.apache.cayenne.di.spi.ModuleProvider;
-
-/**
- * @since 4.0
- */
-public class JCacheModuleProvider implements ModuleProvider {
-
-    @Override
-    public Module module() {
-        return new JCacheModule();
-    }
-
-    @Override
-    public Class<? extends Module> moduleType() {
-        return JCacheModule.class;
-    }
-
-    @SuppressWarnings("unchecked")
-    @Override
-    public Collection<Class<? extends Module>> overrides() {
-        Collection modules = Collections.singletonList(ServerModule.class);
-        return modules;
-    }
-}

http://git-wip-us.apache.org/repos/asf/cayenne/blob/6888884a/cayenne-jcache/src/main/java/org/apache/cayenne/jcache/JCacheServerModuleProvider.java
----------------------------------------------------------------------
diff --git a/cayenne-jcache/src/main/java/org/apache/cayenne/jcache/JCacheServerModuleProvider.java b/cayenne-jcache/src/main/java/org/apache/cayenne/jcache/JCacheServerModuleProvider.java
new file mode 100644
index 0000000..375f896
--- /dev/null
+++ b/cayenne-jcache/src/main/java/org/apache/cayenne/jcache/JCacheServerModuleProvider.java
@@ -0,0 +1,50 @@
+/*****************************************************************
+ *   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.jcache;
+
+import java.util.Collection;
+import java.util.Collections;
+
+import org.apache.cayenne.configuration.server.CayenneServerModuleProvider;
+import org.apache.cayenne.configuration.server.ServerModule;
+import org.apache.cayenne.di.Module;
+
+/**
+ * @since 4.0
+ */
+public class JCacheServerModuleProvider implements CayenneServerModuleProvider {
+
+    @Override
+    public Module module() {
+        return new JCacheModule();
+    }
+
+    @Override
+    public Class<? extends Module> moduleType() {
+        return JCacheModule.class;
+    }
+
+    @SuppressWarnings("unchecked")
+    @Override
+    public Collection<Class<? extends Module>> overrides() {
+        Collection modules = Collections.singletonList(ServerModule.class);
+        return modules;
+    }
+}

http://git-wip-us.apache.org/repos/asf/cayenne/blob/6888884a/cayenne-jcache/src/main/resources/META-INF/services/org.apache.cayenne.configuration.server.CayenneServerModuleProvider
----------------------------------------------------------------------
diff --git a/cayenne-jcache/src/main/resources/META-INF/services/org.apache.cayenne.configuration.server.CayenneServerModuleProvider b/cayenne-jcache/src/main/resources/META-INF/services/org.apache.cayenne.configuration.server.CayenneServerModuleProvider
new file mode 100644
index 0000000..0575711
--- /dev/null
+++ b/cayenne-jcache/src/main/resources/META-INF/services/org.apache.cayenne.configuration.server.CayenneServerModuleProvider
@@ -0,0 +1,20 @@
+##################################################################
+#   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.
+##################################################################
+
+org.apache.cayenne.jcache.JCacheServerModuleProvider
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/cayenne/blob/6888884a/cayenne-jcache/src/main/resources/META-INF/services/org.apache.cayenne.di.spi.ModuleProvider
----------------------------------------------------------------------
diff --git a/cayenne-jcache/src/main/resources/META-INF/services/org.apache.cayenne.di.spi.ModuleProvider b/cayenne-jcache/src/main/resources/META-INF/services/org.apache.cayenne.di.spi.ModuleProvider
deleted file mode 100644
index 352b8ff..0000000
--- a/cayenne-jcache/src/main/resources/META-INF/services/org.apache.cayenne.di.spi.ModuleProvider
+++ /dev/null
@@ -1,20 +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.
-##################################################################
-
-org.apache.cayenne.jcache.JCacheModuleProvider
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/cayenne/blob/6888884a/cayenne-jcache/src/test/java/org/apache/cayenne/jcache/CayenneJCacheModuleProviderTest.java
----------------------------------------------------------------------
diff --git a/cayenne-jcache/src/test/java/org/apache/cayenne/jcache/CayenneJCacheModuleProviderTest.java b/cayenne-jcache/src/test/java/org/apache/cayenne/jcache/CayenneJCacheModuleProviderTest.java
index 10b9388..3c39141 100644
--- a/cayenne-jcache/src/test/java/org/apache/cayenne/jcache/CayenneJCacheModuleProviderTest.java
+++ b/cayenne-jcache/src/test/java/org/apache/cayenne/jcache/CayenneJCacheModuleProviderTest.java
@@ -19,6 +19,7 @@
 
 package org.apache.cayenne.jcache;
 
+import org.apache.cayenne.configuration.server.CayenneServerModuleProvider;
 import org.apache.cayenne.unit.util.ModuleProviderChecker;
 import org.junit.Test;
 
@@ -26,6 +27,6 @@ public class CayenneJCacheModuleProviderTest {
 
     @Test
     public void testAutoLoadable() {
-        ModuleProviderChecker.testProviderPresent(JCacheModuleProvider.class);
+        ModuleProviderChecker.testProviderPresent(JCacheServerModuleProvider.class, CayenneServerModuleProvider.class);
     }
 }

http://git-wip-us.apache.org/repos/asf/cayenne/blob/6888884a/cayenne-joda/src/main/java/org/apache/cayenne/joda/JodaModuleProvider.java
----------------------------------------------------------------------
diff --git a/cayenne-joda/src/main/java/org/apache/cayenne/joda/JodaModuleProvider.java b/cayenne-joda/src/main/java/org/apache/cayenne/joda/JodaModuleProvider.java
deleted file mode 100644
index d390937..0000000
--- a/cayenne-joda/src/main/java/org/apache/cayenne/joda/JodaModuleProvider.java
+++ /dev/null
@@ -1,46 +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.joda;
-
-import org.apache.cayenne.di.Module;
-import org.apache.cayenne.di.spi.ModuleProvider;
-
-import java.util.Collection;
-import java.util.Collections;
-
-/**
- * @since 4.0
- */
-public class JodaModuleProvider implements ModuleProvider {
-
-    @Override
-    public Module module() {
-        return new JodaModule();
-    }
-
-    @Override
-    public Class<? extends Module> moduleType() {
-        return JodaModule.class;
-    }
-
-    @Override
-    public Collection<Class<? extends Module>> overrides() {
-        return Collections.emptyList();
-    }
-}

http://git-wip-us.apache.org/repos/asf/cayenne/blob/6888884a/cayenne-joda/src/main/java/org/apache/cayenne/joda/JodaServerModuleProvider.java
----------------------------------------------------------------------
diff --git a/cayenne-joda/src/main/java/org/apache/cayenne/joda/JodaServerModuleProvider.java b/cayenne-joda/src/main/java/org/apache/cayenne/joda/JodaServerModuleProvider.java
new file mode 100644
index 0000000..1f3845c
--- /dev/null
+++ b/cayenne-joda/src/main/java/org/apache/cayenne/joda/JodaServerModuleProvider.java
@@ -0,0 +1,46 @@
+/*
+ *    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.joda;
+
+import org.apache.cayenne.configuration.server.CayenneServerModuleProvider;
+import org.apache.cayenne.di.Module;
+
+import java.util.Collection;
+import java.util.Collections;
+
+/**
+ * @since 4.0
+ */
+public class JodaServerModuleProvider implements CayenneServerModuleProvider {
+
+    @Override
+    public Module module() {
+        return new JodaModule();
+    }
+
+    @Override
+    public Class<? extends Module> moduleType() {
+        return JodaModule.class;
+    }
+
+    @Override
+    public Collection<Class<? extends Module>> overrides() {
+        return Collections.emptyList();
+    }
+}

http://git-wip-us.apache.org/repos/asf/cayenne/blob/6888884a/cayenne-joda/src/main/resources/META-INF/services/org.apache.cayenne.configuration.server.CayenneServerModuleProvider
----------------------------------------------------------------------
diff --git a/cayenne-joda/src/main/resources/META-INF/services/org.apache.cayenne.configuration.server.CayenneServerModuleProvider b/cayenne-joda/src/main/resources/META-INF/services/org.apache.cayenne.configuration.server.CayenneServerModuleProvider
new file mode 100644
index 0000000..197007a
--- /dev/null
+++ b/cayenne-joda/src/main/resources/META-INF/services/org.apache.cayenne.configuration.server.CayenneServerModuleProvider
@@ -0,0 +1,20 @@
+##################################################################
+#   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.
+##################################################################
+
+org.apache.cayenne.joda.JodaServerModuleProvider
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/cayenne/blob/6888884a/cayenne-joda/src/main/resources/META-INF/services/org.apache.cayenne.di.spi.ModuleProvider
----------------------------------------------------------------------
diff --git a/cayenne-joda/src/main/resources/META-INF/services/org.apache.cayenne.di.spi.ModuleProvider b/cayenne-joda/src/main/resources/META-INF/services/org.apache.cayenne.di.spi.ModuleProvider
deleted file mode 100644
index 6839f25..0000000
--- a/cayenne-joda/src/main/resources/META-INF/services/org.apache.cayenne.di.spi.ModuleProvider
+++ /dev/null
@@ -1,20 +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.
-##################################################################
-
-org.apache.cayenne.joda.JodaModuleProvider
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/cayenne/blob/6888884a/cayenne-joda/src/test/java/org/apache/cayenne/joda/JodaModuleProviderTest.java
----------------------------------------------------------------------
diff --git a/cayenne-joda/src/test/java/org/apache/cayenne/joda/JodaModuleProviderTest.java b/cayenne-joda/src/test/java/org/apache/cayenne/joda/JodaModuleProviderTest.java
index a0cd1e5..187fc33 100644
--- a/cayenne-joda/src/test/java/org/apache/cayenne/joda/JodaModuleProviderTest.java
+++ b/cayenne-joda/src/test/java/org/apache/cayenne/joda/JodaModuleProviderTest.java
@@ -18,6 +18,7 @@
  */
 package org.apache.cayenne.joda;
 
+import org.apache.cayenne.configuration.server.CayenneServerModuleProvider;
 import org.apache.cayenne.unit.util.ModuleProviderChecker;
 import org.junit.Test;
 
@@ -25,6 +26,6 @@ public class JodaModuleProviderTest {
 
     @Test
     public void testProviderPresent() {
-        ModuleProviderChecker.testProviderPresent(JodaModuleProvider.class);
+        ModuleProviderChecker.testProviderPresent(JodaServerModuleProvider.class, CayenneServerModuleProvider.class);
     }
 }

http://git-wip-us.apache.org/repos/asf/cayenne/blob/6888884a/cayenne-project/src/main/java/org/apache/cayenne/project/ProjectModuleProvider.java
----------------------------------------------------------------------
diff --git a/cayenne-project/src/main/java/org/apache/cayenne/project/ProjectModuleProvider.java b/cayenne-project/src/main/java/org/apache/cayenne/project/ProjectModuleProvider.java
deleted file mode 100644
index b5ae42b..0000000
--- a/cayenne-project/src/main/java/org/apache/cayenne/project/ProjectModuleProvider.java
+++ /dev/null
@@ -1,46 +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.project;
-
-import org.apache.cayenne.di.Module;
-import org.apache.cayenne.di.spi.ModuleProvider;
-
-import java.util.Collection;
-import java.util.Collections;
-
-/**
- * @since 4.0
- */
-public class ProjectModuleProvider implements ModuleProvider {
-
-    @Override
-    public Module module() {
-        return new ProjectModule();
-    }
-
-    @Override
-    public Class<? extends Module> moduleType() {
-        return ProjectModule.class;
-    }
-
-    @Override
-    public Collection<Class<? extends Module>> overrides() {
-        return Collections.emptyList();
-    }
-}

http://git-wip-us.apache.org/repos/asf/cayenne/blob/6888884a/cayenne-project/src/main/java/org/apache/cayenne/project/ProjectServerModuleProvider.java
----------------------------------------------------------------------
diff --git a/cayenne-project/src/main/java/org/apache/cayenne/project/ProjectServerModuleProvider.java b/cayenne-project/src/main/java/org/apache/cayenne/project/ProjectServerModuleProvider.java
new file mode 100644
index 0000000..c88448b
--- /dev/null
+++ b/cayenne-project/src/main/java/org/apache/cayenne/project/ProjectServerModuleProvider.java
@@ -0,0 +1,46 @@
+/*
+ *    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.project;
+
+import org.apache.cayenne.configuration.server.CayenneServerModuleProvider;
+import org.apache.cayenne.di.Module;
+
+import java.util.Collection;
+import java.util.Collections;
+
+/**
+ * @since 4.0
+ */
+public class ProjectServerModuleProvider implements CayenneServerModuleProvider {
+
+    @Override
+    public Module module() {
+        return new ProjectModule();
+    }
+
+    @Override
+    public Class<? extends Module> moduleType() {
+        return ProjectModule.class;
+    }
+
+    @Override
+    public Collection<Class<? extends Module>> overrides() {
+        return Collections.emptyList();
+    }
+}

http://git-wip-us.apache.org/repos/asf/cayenne/blob/6888884a/cayenne-project/src/main/resources/META-INF/services/org.apache.cayenne.configuration.server.CayenneServerModuleProvider
----------------------------------------------------------------------
diff --git a/cayenne-project/src/main/resources/META-INF/services/org.apache.cayenne.configuration.server.CayenneServerModuleProvider b/cayenne-project/src/main/resources/META-INF/services/org.apache.cayenne.configuration.server.CayenneServerModuleProvider
new file mode 100644
index 0000000..c4ef6c5
--- /dev/null
+++ b/cayenne-project/src/main/resources/META-INF/services/org.apache.cayenne.configuration.server.CayenneServerModuleProvider
@@ -0,0 +1,20 @@
+##################################################################
+#   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.
+##################################################################
+
+org.apache.cayenne.project.ProjectServerModuleProvider
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/cayenne/blob/6888884a/cayenne-project/src/main/resources/META-INF/services/org.apache.cayenne.di.spi.ModuleProvider
----------------------------------------------------------------------
diff --git a/cayenne-project/src/main/resources/META-INF/services/org.apache.cayenne.di.spi.ModuleProvider b/cayenne-project/src/main/resources/META-INF/services/org.apache.cayenne.di.spi.ModuleProvider
deleted file mode 100644
index 03e731d..0000000
--- a/cayenne-project/src/main/resources/META-INF/services/org.apache.cayenne.di.spi.ModuleProvider
+++ /dev/null
@@ -1,20 +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.
-##################################################################
-
-org.apache.cayenne.project.ProjectModuleProvider
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/cayenne/blob/6888884a/cayenne-project/src/test/java/org/apache/cayenne/project/ProjectModuleProviderTest.java
----------------------------------------------------------------------
diff --git a/cayenne-project/src/test/java/org/apache/cayenne/project/ProjectModuleProviderTest.java b/cayenne-project/src/test/java/org/apache/cayenne/project/ProjectModuleProviderTest.java
index 957e14c..b683195 100644
--- a/cayenne-project/src/test/java/org/apache/cayenne/project/ProjectModuleProviderTest.java
+++ b/cayenne-project/src/test/java/org/apache/cayenne/project/ProjectModuleProviderTest.java
@@ -18,6 +18,7 @@
  */
 package org.apache.cayenne.project;
 
+import org.apache.cayenne.configuration.server.CayenneServerModuleProvider;
 import org.apache.cayenne.unit.util.ModuleProviderChecker;
 import org.junit.Test;
 
@@ -25,6 +26,6 @@ public class ProjectModuleProviderTest {
 
     @Test
     public void testProviderPresent() {
-        ModuleProviderChecker.testProviderPresent(ProjectModuleProvider.class);
+        ModuleProviderChecker.testProviderPresent(ProjectServerModuleProvider.class, CayenneServerModuleProvider.class);
     }
 }

http://git-wip-us.apache.org/repos/asf/cayenne/blob/6888884a/cayenne-protostuff/pom.xml
----------------------------------------------------------------------
diff --git a/cayenne-protostuff/pom.xml b/cayenne-protostuff/pom.xml
index 6ea8a67..a7326c8 100644
--- a/cayenne-protostuff/pom.xml
+++ b/cayenne-protostuff/pom.xml
@@ -47,7 +47,7 @@
     <dependencies>
         <dependency>
             <groupId>org.apache.cayenne</groupId>
-            <artifactId>cayenne-server</artifactId>
+            <artifactId>cayenne-client</artifactId>
             <version>${project.version}</version>
         </dependency>
 
@@ -66,12 +66,6 @@
 
         <dependency>
             <groupId>org.apache.cayenne</groupId>
-            <artifactId>cayenne-client</artifactId>
-            <version>${project.version}</version>
-            <scope>test</scope>
-        </dependency>
-        <dependency>
-            <groupId>org.apache.cayenne</groupId>
             <artifactId>cayenne-java8</artifactId>
             <version>${project.version}</version>
             <scope>test</scope>
@@ -86,6 +80,13 @@
             <artifactId>hsqldb</artifactId>
             <scope>test</scope>
         </dependency>
+        <dependency>
+            <groupId>org.apache.cayenne</groupId>
+            <artifactId>cayenne-server</artifactId>
+            <version>${project.version}</version>
+            <type>test-jar</type>
+            <scope>test</scope>
+        </dependency>
     </dependencies>
 
     <build>

http://git-wip-us.apache.org/repos/asf/cayenne/blob/6888884a/cayenne-protostuff/src/main/java/org/apache/cayenne/configuration/ProtostuffServerModuleProvider.java
----------------------------------------------------------------------
diff --git a/cayenne-protostuff/src/main/java/org/apache/cayenne/configuration/ProtostuffServerModuleProvider.java b/cayenne-protostuff/src/main/java/org/apache/cayenne/configuration/ProtostuffServerModuleProvider.java
new file mode 100644
index 0000000..e256ae6
--- /dev/null
+++ b/cayenne-protostuff/src/main/java/org/apache/cayenne/configuration/ProtostuffServerModuleProvider.java
@@ -0,0 +1,51 @@
+/*****************************************************************
+ *   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.configuration;
+
+import java.util.Collection;
+import java.util.Collections;
+
+import org.apache.cayenne.configuration.rop.client.ProtostuffModule;
+import org.apache.cayenne.configuration.server.CayenneServerModuleProvider;
+import org.apache.cayenne.configuration.server.ServerModule;
+import org.apache.cayenne.di.Module;
+
+/**
+ * @since 4.0
+ */
+public class ProtostuffServerModuleProvider implements CayenneServerModuleProvider {
+
+    @Override
+    public Module module() {
+        return new ProtostuffModule();
+    }
+
+    @Override
+    public Class<? extends Module> moduleType() {
+        return ProtostuffModule.class;
+    }
+
+    @SuppressWarnings("unchecked")
+    @Override
+    public Collection<Class<? extends Module>> overrides() {
+        Collection modules = Collections.singletonList(ServerModule.class);
+        return modules;
+    }
+}

http://git-wip-us.apache.org/repos/asf/cayenne/blob/6888884a/cayenne-protostuff/src/main/java/org/apache/cayenne/configuration/rop/client/ProtostuffClientModuleProvider.java
----------------------------------------------------------------------
diff --git a/cayenne-protostuff/src/main/java/org/apache/cayenne/configuration/rop/client/ProtostuffClientModuleProvider.java b/cayenne-protostuff/src/main/java/org/apache/cayenne/configuration/rop/client/ProtostuffClientModuleProvider.java
new file mode 100644
index 0000000..ebfafbc
--- /dev/null
+++ b/cayenne-protostuff/src/main/java/org/apache/cayenne/configuration/rop/client/ProtostuffClientModuleProvider.java
@@ -0,0 +1,48 @@
+/*****************************************************************
+ *   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.configuration.rop.client;
+
+import java.util.Collection;
+import java.util.Collections;
+
+import org.apache.cayenne.di.Module;
+
+/**
+ * @since 4.0
+ */
+public class ProtostuffClientModuleProvider implements CayenneClientModuleProvider {
+
+    @Override
+    public Module module() {
+        return new ProtostuffModule();
+    }
+
+    @Override
+    public Class<? extends Module> moduleType() {
+        return ProtostuffModule.class;
+    }
+
+    @SuppressWarnings("unchecked")
+    @Override
+    public Collection<Class<? extends Module>> overrides() {
+        Collection modules = Collections.singletonList(ClientModule.class);
+        return modules;
+    }
+}

http://git-wip-us.apache.org/repos/asf/cayenne/blob/6888884a/cayenne-protostuff/src/main/resources/META-INF/services/org.apache.cayenne.configuration.rop.client.CayenneClientModuleProvider
----------------------------------------------------------------------
diff --git a/cayenne-protostuff/src/main/resources/META-INF/services/org.apache.cayenne.configuration.rop.client.CayenneClientModuleProvider b/cayenne-protostuff/src/main/resources/META-INF/services/org.apache.cayenne.configuration.rop.client.CayenneClientModuleProvider
new file mode 100644
index 0000000..951c458
--- /dev/null
+++ b/cayenne-protostuff/src/main/resources/META-INF/services/org.apache.cayenne.configuration.rop.client.CayenneClientModuleProvider
@@ -0,0 +1,20 @@
+##################################################################
+#   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.
+##################################################################
+
+org.apache.cayenne.configuration.rop.client.ProtostuffClientModuleProvider
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/cayenne/blob/6888884a/cayenne-protostuff/src/main/resources/META-INF/services/org.apache.cayenne.configuration.server.CayenneServerModuleProvider
----------------------------------------------------------------------
diff --git a/cayenne-protostuff/src/main/resources/META-INF/services/org.apache.cayenne.configuration.server.CayenneServerModuleProvider b/cayenne-protostuff/src/main/resources/META-INF/services/org.apache.cayenne.configuration.server.CayenneServerModuleProvider
new file mode 100644
index 0000000..6f69d0d
--- /dev/null
+++ b/cayenne-protostuff/src/main/resources/META-INF/services/org.apache.cayenne.configuration.server.CayenneServerModuleProvider
@@ -0,0 +1,20 @@
+##################################################################
+#   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.
+##################################################################
+
+org.apache.cayenne.configuration.ProtostuffServerModuleProvider
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/cayenne/blob/6888884a/cayenne-protostuff/src/test/java/org/apache/cayenne/configuration/rop/client/ProtostuffModuleProviderTest.java
----------------------------------------------------------------------
diff --git a/cayenne-protostuff/src/test/java/org/apache/cayenne/configuration/rop/client/ProtostuffModuleProviderTest.java b/cayenne-protostuff/src/test/java/org/apache/cayenne/configuration/rop/client/ProtostuffModuleProviderTest.java
new file mode 100644
index 0000000..d3765c2
--- /dev/null
+++ b/cayenne-protostuff/src/test/java/org/apache/cayenne/configuration/rop/client/ProtostuffModuleProviderTest.java
@@ -0,0 +1,42 @@
+/*****************************************************************
+ *   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.configuration.rop.client;
+
+import org.apache.cayenne.configuration.ProtostuffServerModuleProvider;
+import org.apache.cayenne.configuration.server.CayenneServerModuleProvider;
+import org.apache.cayenne.unit.util.ModuleProviderChecker;
+import org.junit.Test;
+
+/**
+ * @since 4.0
+ */
+public class ProtostuffModuleProviderTest {
+
+    @Test
+    public void testClientAutoLoadable() {
+        ModuleProviderChecker.testProviderPresent(ProtostuffClientModuleProvider.class, CayenneClientModuleProvider.class);
+    }
+
+    @Test
+    public void testServerAutoLoadable() {
+        ModuleProviderChecker.testProviderPresent(ProtostuffServerModuleProvider.class, CayenneServerModuleProvider.class);
+    }
+
+}

http://git-wip-us.apache.org/repos/asf/cayenne/blob/6888884a/cayenne-protostuff/src/test/java/org/apache/cayenne/remote/service/ProtostuffLocalConnectionProvider.java
----------------------------------------------------------------------
diff --git a/cayenne-protostuff/src/test/java/org/apache/cayenne/remote/service/ProtostuffLocalConnectionProvider.java b/cayenne-protostuff/src/test/java/org/apache/cayenne/remote/service/ProtostuffLocalConnectionProvider.java
index 9cae2d1..7837fb8 100644
--- a/cayenne-protostuff/src/test/java/org/apache/cayenne/remote/service/ProtostuffLocalConnectionProvider.java
+++ b/cayenne-protostuff/src/test/java/org/apache/cayenne/remote/service/ProtostuffLocalConnectionProvider.java
@@ -21,14 +21,14 @@ package org.apache.cayenne.remote.service;
 
 import org.apache.cayenne.ConfigurationException;
 import org.apache.cayenne.DataChannel;
-import org.apache.cayenne.configuration.rop.client.ClientLocalRuntime;
+import org.apache.cayenne.configuration.rop.client.ClientRuntime;
 import org.apache.cayenne.di.Inject;
 import org.apache.cayenne.di.Provider;
 import org.apache.cayenne.remote.ClientConnection;
 
 public class ProtostuffLocalConnectionProvider implements Provider<ClientConnection> {
 
-    @Inject(ClientLocalRuntime.CLIENT_SERVER_CHANNEL_KEY)
+    @Inject(ClientRuntime.CLIENT_SERVER_CHANNEL_KEY)
     protected Provider<DataChannel> clientServerChannelProvider;
 
     @Override

http://git-wip-us.apache.org/repos/asf/cayenne/blob/6888884a/cayenne-protostuff/src/test/java/org/apache/cayenne/rop/protostuff/RuntimeBase.java
----------------------------------------------------------------------
diff --git a/cayenne-protostuff/src/test/java/org/apache/cayenne/rop/protostuff/RuntimeBase.java b/cayenne-protostuff/src/test/java/org/apache/cayenne/rop/protostuff/RuntimeBase.java
index 3867862..d80bf98 100644
--- a/cayenne-protostuff/src/test/java/org/apache/cayenne/rop/protostuff/RuntimeBase.java
+++ b/cayenne-protostuff/src/test/java/org/apache/cayenne/rop/protostuff/RuntimeBase.java
@@ -19,18 +19,20 @@
 
 package org.apache.cayenne.rop.protostuff;
 
+import org.apache.cayenne.DataChannel;
 import org.apache.cayenne.ObjectContext;
 import org.apache.cayenne.configuration.rop.client.ClientConstants;
-import org.apache.cayenne.configuration.rop.client.ClientLocalRuntime;
 import org.apache.cayenne.configuration.rop.client.ClientRuntime;
+import org.apache.cayenne.configuration.rop.client.LocalClientServerChannelProvider;
 import org.apache.cayenne.configuration.rop.client.ProtostuffModule;
 import org.apache.cayenne.configuration.server.ServerRuntime;
+import org.apache.cayenne.di.Key;
 import org.apache.cayenne.di.Module;
-import org.apache.cayenne.java8.Java8Module;
 import org.apache.cayenne.remote.ClientConnection;
 import org.apache.cayenne.remote.service.ProtostuffLocalConnectionProvider;
 import org.junit.Before;
 
+import java.util.Collections;
 import java.util.HashMap;
 import java.util.Map;
 
@@ -42,24 +44,21 @@ public class RuntimeBase extends ProtostuffProperties {
 
     @Before
     public void setUpRuntimes() throws Exception {
-        this.serverRuntime = ServerRuntime
-                .builder()
+        this.serverRuntime = ServerRuntime.builder()
                 .addConfig("cayenne-protostuff.xml")
-                .addModule(new ProtostuffModule())
                 .build();
 
-        Map<String, String> properties = new HashMap<>();
-        properties.put(ClientConstants.ROP_CHANNEL_EVENTS_PROPERTY, Boolean.TRUE.toString());
+        Module module = binder -> {
+            binder.bind(ClientConnection.class)
+                    .toProviderInstance(new ProtostuffLocalConnectionProvider());
+            binder.bind(Key.get(DataChannel.class, ClientRuntime.CLIENT_SERVER_CHANNEL_KEY))
+                    .toProviderInstance(new LocalClientServerChannelProvider(serverRuntime.getInjector()));
+        };
 
-        Module module = binder -> binder.bind(ClientConnection.class)
-                .toProviderInstance(new ProtostuffLocalConnectionProvider());
-
-        this.clientRuntime = new ClientLocalRuntime(
-                serverRuntime.getInjector(),
-                properties,
-                new ProtostuffModule(),
-                new Java8Module(),
-                module);
+        this.clientRuntime = ClientRuntime.builder()
+                .properties(Collections.singletonMap(ClientConstants.ROP_CHANNEL_EVENTS_PROPERTY, "true"))
+                .addModule(module)
+                .build();
 
         this.context = clientRuntime.newContext();
     }

http://git-wip-us.apache.org/repos/asf/cayenne/blob/6888884a/cayenne-server/src/main/java/org/apache/cayenne/configuration/server/CayenneServerModuleProvider.java
----------------------------------------------------------------------
diff --git a/cayenne-server/src/main/java/org/apache/cayenne/configuration/server/CayenneServerModuleProvider.java b/cayenne-server/src/main/java/org/apache/cayenne/configuration/server/CayenneServerModuleProvider.java
new file mode 100644
index 0000000..6be5695
--- /dev/null
+++ b/cayenne-server/src/main/java/org/apache/cayenne/configuration/server/CayenneServerModuleProvider.java
@@ -0,0 +1,29 @@
+/*****************************************************************
+ *   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.configuration.server;
+
+import org.apache.cayenne.di.spi.ModuleProvider;
+
+/**
+ * This interface implementations will be used by {@link ServerRuntimeBuilder} to auto-load server modules.
+ * @since 4.0
+ */
+public interface CayenneServerModuleProvider extends ModuleProvider {
+}

http://git-wip-us.apache.org/repos/asf/cayenne/blob/6888884a/cayenne-server/src/main/java/org/apache/cayenne/configuration/server/MainCayenneServerModuleProvider.java
----------------------------------------------------------------------
diff --git a/cayenne-server/src/main/java/org/apache/cayenne/configuration/server/MainCayenneServerModuleProvider.java b/cayenne-server/src/main/java/org/apache/cayenne/configuration/server/MainCayenneServerModuleProvider.java
new file mode 100644
index 0000000..60aea6d
--- /dev/null
+++ b/cayenne-server/src/main/java/org/apache/cayenne/configuration/server/MainCayenneServerModuleProvider.java
@@ -0,0 +1,48 @@
+/*
+ *    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.configuration.server;
+
+import org.apache.cayenne.di.Module;
+import org.apache.cayenne.di.spi.ModuleProvider;
+
+import java.util.Collection;
+import java.util.Collections;
+
+/**
+ * ServerModule auto-loading facility.
+ *
+ * @since 4.0
+ */
+public class MainCayenneServerModuleProvider implements CayenneServerModuleProvider {
+
+    @Override
+    public Module module() {
+        return new ServerModule();
+    }
+
+    @Override
+    public Class<? extends Module> moduleType() {
+        return ServerModule.class;
+    }
+
+    @Override
+    public Collection<Class<? extends Module>> overrides() {
+        return Collections.emptyList();
+    }
+}

http://git-wip-us.apache.org/repos/asf/cayenne/blob/6888884a/cayenne-server/src/main/java/org/apache/cayenne/configuration/server/ServerModuleProvider.java
----------------------------------------------------------------------
diff --git a/cayenne-server/src/main/java/org/apache/cayenne/configuration/server/ServerModuleProvider.java b/cayenne-server/src/main/java/org/apache/cayenne/configuration/server/ServerModuleProvider.java
deleted file mode 100644
index e8e126d..0000000
--- a/cayenne-server/src/main/java/org/apache/cayenne/configuration/server/ServerModuleProvider.java
+++ /dev/null
@@ -1,48 +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.configuration.server;
-
-import org.apache.cayenne.di.Module;
-import org.apache.cayenne.di.spi.ModuleProvider;
-
-import java.util.Collection;
-import java.util.Collections;
-
-/**
- * ServerModule auto-loading facility.
- *
- * @since 4.0
- */
-public class ServerModuleProvider implements ModuleProvider {
-
-    @Override
-    public Module module() {
-        return new ServerModule();
-    }
-
-    @Override
-    public Class<? extends Module> moduleType() {
-        return ServerModule.class;
-    }
-
-    @Override
-    public Collection<Class<? extends Module>> overrides() {
-        return Collections.emptyList();
-    }
-}

http://git-wip-us.apache.org/repos/asf/cayenne/blob/6888884a/cayenne-server/src/main/java/org/apache/cayenne/configuration/server/ServerRuntimeBuilder.java
----------------------------------------------------------------------
diff --git a/cayenne-server/src/main/java/org/apache/cayenne/configuration/server/ServerRuntimeBuilder.java b/cayenne-server/src/main/java/org/apache/cayenne/configuration/server/ServerRuntimeBuilder.java
index 8c60206..acf1245 100644
--- a/cayenne-server/src/main/java/org/apache/cayenne/configuration/server/ServerRuntimeBuilder.java
+++ b/cayenne-server/src/main/java/org/apache/cayenne/configuration/server/ServerRuntimeBuilder.java
@@ -235,7 +235,7 @@ public class ServerRuntimeBuilder {
     }
 
     private Collection<? extends Module> autoLoadedModules() {
-        return new ModuleLoader().load();
+        return new ModuleLoader().load(CayenneServerModuleProvider.class);
     }
 
     private Collection<? extends Module> defaultModules() {

http://git-wip-us.apache.org/repos/asf/cayenne/blob/6888884a/cayenne-server/src/main/resources/META-INF/services/org.apache.cayenne.configuration.server.CayenneServerModuleProvider
----------------------------------------------------------------------
diff --git a/cayenne-server/src/main/resources/META-INF/services/org.apache.cayenne.configuration.server.CayenneServerModuleProvider b/cayenne-server/src/main/resources/META-INF/services/org.apache.cayenne.configuration.server.CayenneServerModuleProvider
new file mode 100644
index 0000000..1393dab
--- /dev/null
+++ b/cayenne-server/src/main/resources/META-INF/services/org.apache.cayenne.configuration.server.CayenneServerModuleProvider
@@ -0,0 +1,20 @@
+##################################################################
+#   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.
+##################################################################
+
+org.apache.cayenne.configuration.server.MainCayenneServerModuleProvider
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/cayenne/blob/6888884a/cayenne-server/src/main/resources/META-INF/services/org.apache.cayenne.di.spi.ModuleProvider
----------------------------------------------------------------------
diff --git a/cayenne-server/src/main/resources/META-INF/services/org.apache.cayenne.di.spi.ModuleProvider b/cayenne-server/src/main/resources/META-INF/services/org.apache.cayenne.di.spi.ModuleProvider
deleted file mode 100644
index 9c385c4..0000000
--- a/cayenne-server/src/main/resources/META-INF/services/org.apache.cayenne.di.spi.ModuleProvider
+++ /dev/null
@@ -1,20 +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.
-##################################################################
-
-org.apache.cayenne.configuration.server.ServerModuleProvider
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/cayenne/blob/6888884a/cayenne-server/src/test/java/org/apache/cayenne/configuration/server/ServerModuleProviderTest.java
----------------------------------------------------------------------
diff --git a/cayenne-server/src/test/java/org/apache/cayenne/configuration/server/ServerModuleProviderTest.java b/cayenne-server/src/test/java/org/apache/cayenne/configuration/server/ServerModuleProviderTest.java
index 6f30ec0..e1f288d 100644
--- a/cayenne-server/src/test/java/org/apache/cayenne/configuration/server/ServerModuleProviderTest.java
+++ b/cayenne-server/src/test/java/org/apache/cayenne/configuration/server/ServerModuleProviderTest.java
@@ -25,6 +25,6 @@ public class ServerModuleProviderTest {
 
     @Test
     public void testProviderPresent() {
-        ModuleProviderChecker.testProviderPresent(ServerModuleProvider.class);
+        ModuleProviderChecker.testProviderPresent(MainCayenneServerModuleProvider.class, CayenneServerModuleProvider.class);
     }
 }

http://git-wip-us.apache.org/repos/asf/cayenne/blob/6888884a/cayenne-server/src/test/java/org/apache/cayenne/unit/util/ModuleProviderChecker.java
----------------------------------------------------------------------
diff --git a/cayenne-server/src/test/java/org/apache/cayenne/unit/util/ModuleProviderChecker.java b/cayenne-server/src/test/java/org/apache/cayenne/unit/util/ModuleProviderChecker.java
index 43770a5..556e4d0 100644
--- a/cayenne-server/src/test/java/org/apache/cayenne/unit/util/ModuleProviderChecker.java
+++ b/cayenne-server/src/test/java/org/apache/cayenne/unit/util/ModuleProviderChecker.java
@@ -25,24 +25,33 @@ import java.util.List;
 import java.util.Objects;
 import java.util.ServiceLoader;
 
+import static org.junit.Assert.assertTrue;
 import static org.junit.Assert.fail;
 
 public class ModuleProviderChecker {
 
     private Class<? extends ModuleProvider> expectedProvider;
+    private Class<? extends ModuleProvider> providerInterface;
 
-    public static void testProviderPresent(Class<? extends ModuleProvider> expectedProvider) {
-        new ModuleProviderChecker(expectedProvider).testProviderPresent();
+    public static void testProviderPresent(Class<? extends ModuleProvider> expectedProvider,
+                                           Class<? extends ModuleProvider> providerInterface) {
+        new ModuleProviderChecker(expectedProvider, providerInterface).testProviderPresent();
     }
 
-    protected ModuleProviderChecker(Class<? extends ModuleProvider> expectedProvider) {
+    protected ModuleProviderChecker(Class<? extends ModuleProvider> expectedProvider,
+                                    Class<? extends ModuleProvider> providerInterface) {
         this.expectedProvider = Objects.requireNonNull(expectedProvider);
+        this.providerInterface = Objects.requireNonNull(providerInterface);
+        assertTrue("Provider interface expected", providerInterface.isInterface());
+        if(expectedProvider.equals(providerInterface)) {
+            fail("Expected provider class and required interface should be different.");
+        }
     }
 
     protected void testProviderPresent() {
 
         List<ModuleProvider> providers = new ArrayList<>();
-        for (ModuleProvider p : ServiceLoader.load(ModuleProvider.class)) {
+        for (ModuleProvider p : ServiceLoader.load(providerInterface)) {
             if (expectedProvider.equals(p.getClass())) {
                 providers.add(p);
             }

http://git-wip-us.apache.org/repos/asf/cayenne/blob/6888884a/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 c5b1c56..143f18e 100644
--- a/docs/doc/src/main/resources/RELEASE-NOTES.txt
+++ b/docs/doc/src/main/resources/RELEASE-NOTES.txt
@@ -27,6 +27,7 @@ CAY-2269 Add support for date/time components extraction in expression functions
 CAY-2270 Update function support in expression parser
 CAY-2271 ColumnSelect: support for prefetch and limit
 CAY-2272 ColumnSelect: methods to manually control DISTINCT clause
+CAY-2277 Create ClientRuntime with ClientRuntimeBuilder just like ServerRuntime
 
 Bug Fixes:
 

http://git-wip-us.apache.org/repos/asf/cayenne/blob/6888884a/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 9011802..d73c353 100644
--- a/docs/doc/src/main/resources/UPGRADE.txt
+++ b/docs/doc/src/main/resources/UPGRADE.txt
@@ -7,9 +7,21 @@ IMPORTANT: be sure to read all notes for the intermediate releases between your
 
 UPGRADING TO 4.0.M6
 
-* Per CAY-2262 new modules moved out from cayenne-lifecycle and should be added to pom.xml if the corresponding
-        functionality is used by your project:
-       - cayenne-cache-invalidation module
+* Per CAY-2277 ClientRuntime created with ClientRuntimeBuilder, direct instantiation of
+       ClientRuntime is deprecated. Also whole ClientLocalRuntime class is deprecated, use instead
+       ClientRuntimeBuilder.local() method.
+
+* Per CAY-2262 Client modules are now auto-loaded by default to turn off auto-loading use
+       ClientRuntimeBuilder.disableModulesAutoLoading() method.
+
+       List of client modules:
+       - cayenne-client
+       - cayenne-client-jetty
+       - cayenne-protostuff (it also supports auto-loading by ServerRuntimeBuilder)
+
+       Also new modules are introduced and should be added to your pom.xml if the corresponding
+       functionality is used by your project:
+       - cayenne-cache-invalidation (moved from cayenne-lifecycle)
 
 * Per CAY-2259 InvalidationFunction returns CacheGroupDescriptor instead of simple String with cache group name,
        change your custom functions accordingly.
@@ -408,7 +420,10 @@ UPGRADING TO 3.0M3
 
 * Java 5 is now required as a minimum for Cayenne Modeler and the Cayenne libraries.
 
-* After the move to Java 5, generics have been implemented in many of the Cayenne APIs. If you don't use generics in your project this should not affect you, but if you do you will need to review any new compiler errors or warnings. The effect of generics is at compile time only, so their introduction will not change the runtime behaviour of your application once compiled.
+* After the move to Java 5, generics have been implemented in many of the Cayenne APIs. If you don't use generics
+in your project this should not affect you, but if you do you will need to review any new compiler errors or warnings.
+The effect of generics is at compile time only, so their introduction will not change the runtime behaviour of
+your application once compiled.
 
 UPGRADING TO 3.0M2
 

http://git-wip-us.apache.org/repos/asf/cayenne/blob/6888884a/eventbridges/cayenne-jgroups/src/main/java/org/apache/cayenne/event/JGroupsModuleProvider.java
----------------------------------------------------------------------
diff --git a/eventbridges/cayenne-jgroups/src/main/java/org/apache/cayenne/event/JGroupsModuleProvider.java b/eventbridges/cayenne-jgroups/src/main/java/org/apache/cayenne/event/JGroupsModuleProvider.java
deleted file mode 100644
index 00e9555..0000000
--- a/eventbridges/cayenne-jgroups/src/main/java/org/apache/cayenne/event/JGroupsModuleProvider.java
+++ /dev/null
@@ -1,50 +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.event;
-
-import java.util.Collection;
-import java.util.Collections;
-
-import org.apache.cayenne.configuration.server.ServerModule;
-import org.apache.cayenne.di.Module;
-import org.apache.cayenne.di.spi.ModuleProvider;
-
-/**
- * @since 4.0
- */
-public class JGroupsModuleProvider implements ModuleProvider {
-
-    @Override
-    public Module module() {
-        return new JGroupsModule();
-    }
-
-    @Override
-    public Class<? extends Module> moduleType() {
-        return JGroupsModule.class;
-    }
-
-    @SuppressWarnings("unchecked")
-    @Override
-    public Collection<Class<? extends Module>> overrides() {
-        Collection modules = Collections.singletonList(ServerModule.class);
-        return modules;
-    }
-}

http://git-wip-us.apache.org/repos/asf/cayenne/blob/6888884a/eventbridges/cayenne-jgroups/src/main/java/org/apache/cayenne/event/JGroupsServerModuleProvider.java
----------------------------------------------------------------------
diff --git a/eventbridges/cayenne-jgroups/src/main/java/org/apache/cayenne/event/JGroupsServerModuleProvider.java b/eventbridges/cayenne-jgroups/src/main/java/org/apache/cayenne/event/JGroupsServerModuleProvider.java
new file mode 100644
index 0000000..60c5bcd
--- /dev/null
+++ b/eventbridges/cayenne-jgroups/src/main/java/org/apache/cayenne/event/JGroupsServerModuleProvider.java
@@ -0,0 +1,50 @@
+/*****************************************************************
+ *   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.event;
+
+import java.util.Collection;
+import java.util.Collections;
+
+import org.apache.cayenne.configuration.server.CayenneServerModuleProvider;
+import org.apache.cayenne.configuration.server.ServerModule;
+import org.apache.cayenne.di.Module;
+
+/**
+ * @since 4.0
+ */
+public class JGroupsServerModuleProvider implements CayenneServerModuleProvider {
+
+    @Override
+    public Module module() {
+        return new JGroupsModule();
+    }
+
+    @Override
+    public Class<? extends Module> moduleType() {
+        return JGroupsModule.class;
+    }
+
+    @SuppressWarnings("unchecked")
+    @Override
+    public Collection<Class<? extends Module>> overrides() {
+        Collection modules = Collections.singletonList(ServerModule.class);
+        return modules;
+    }
+}

http://git-wip-us.apache.org/repos/asf/cayenne/blob/6888884a/eventbridges/cayenne-jgroups/src/main/resources/META-INF/services/org.apache.cayenne.configuration.server.CayenneServerModuleProvider
----------------------------------------------------------------------
diff --git a/eventbridges/cayenne-jgroups/src/main/resources/META-INF/services/org.apache.cayenne.configuration.server.CayenneServerModuleProvider b/eventbridges/cayenne-jgroups/src/main/resources/META-INF/services/org.apache.cayenne.configuration.server.CayenneServerModuleProvider
new file mode 100644
index 0000000..b6c6632
--- /dev/null
+++ b/eventbridges/cayenne-jgroups/src/main/resources/META-INF/services/org.apache.cayenne.configuration.server.CayenneServerModuleProvider
@@ -0,0 +1,20 @@
+##################################################################
+#   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.
+##################################################################
+
+org.apache.cayenne.event.JGroupsServerModuleProvider
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/cayenne/blob/6888884a/eventbridges/cayenne-jgroups/src/main/resources/META-INF/services/org.apache.cayenne.di.spi.ModuleProvider
----------------------------------------------------------------------
diff --git a/eventbridges/cayenne-jgroups/src/main/resources/META-INF/services/org.apache.cayenne.di.spi.ModuleProvider b/eventbridges/cayenne-jgroups/src/main/resources/META-INF/services/org.apache.cayenne.di.spi.ModuleProvider
deleted file mode 100644
index 1153bdb..0000000
--- a/eventbridges/cayenne-jgroups/src/main/resources/META-INF/services/org.apache.cayenne.di.spi.ModuleProvider
+++ /dev/null
@@ -1,20 +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.
-##################################################################
-
-org.apache.cayenne.event.JGroupsModuleProvider
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/cayenne/blob/6888884a/eventbridges/cayenne-jgroups/src/test/java/org/apache/cayenne/event/CayenneJGroupsModuleProviderTest.java
----------------------------------------------------------------------
diff --git a/eventbridges/cayenne-jgroups/src/test/java/org/apache/cayenne/event/CayenneJGroupsModuleProviderTest.java b/eventbridges/cayenne-jgroups/src/test/java/org/apache/cayenne/event/CayenneJGroupsModuleProviderTest.java
index c639fcb..320d490 100644
--- a/eventbridges/cayenne-jgroups/src/test/java/org/apache/cayenne/event/CayenneJGroupsModuleProviderTest.java
+++ b/eventbridges/cayenne-jgroups/src/test/java/org/apache/cayenne/event/CayenneJGroupsModuleProviderTest.java
@@ -19,6 +19,7 @@
 
 package org.apache.cayenne.event;
 
+import org.apache.cayenne.configuration.server.CayenneServerModuleProvider;
 import org.apache.cayenne.unit.util.ModuleProviderChecker;
 import org.junit.Test;
 
@@ -29,7 +30,7 @@ public class CayenneJGroupsModuleProviderTest {
 
     @Test
     public void testAutoLoadable() {
-        ModuleProviderChecker.testProviderPresent(JGroupsModuleProvider.class);
+        ModuleProviderChecker.testProviderPresent(JGroupsServerModuleProvider.class, CayenneServerModuleProvider.class);
     }
 
 }

http://git-wip-us.apache.org/repos/asf/cayenne/blob/6888884a/eventbridges/cayenne-jms/src/main/java/org/apache/cayenne/event/JMSModuleProvider.java
----------------------------------------------------------------------
diff --git a/eventbridges/cayenne-jms/src/main/java/org/apache/cayenne/event/JMSModuleProvider.java b/eventbridges/cayenne-jms/src/main/java/org/apache/cayenne/event/JMSModuleProvider.java
deleted file mode 100644
index 58d5442..0000000
--- a/eventbridges/cayenne-jms/src/main/java/org/apache/cayenne/event/JMSModuleProvider.java
+++ /dev/null
@@ -1,50 +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.event;
-
-import java.util.Collection;
-import java.util.Collections;
-
-import org.apache.cayenne.configuration.server.ServerModule;
-import org.apache.cayenne.di.Module;
-import org.apache.cayenne.di.spi.ModuleProvider;
-
-/**
- * @since 4.0
- */
-public class JMSModuleProvider implements ModuleProvider {
-
-    @Override
-    public Module module() {
-        return new JMSModule();
-    }
-
-    @Override
-    public Class<? extends Module> moduleType() {
-        return JMSModule.class;
-    }
-
-    @SuppressWarnings("unchecked")
-    @Override
-    public Collection<Class<? extends Module>> overrides() {
-        Collection modules = Collections.singletonList(ServerModule.class);
-        return modules;
-    }
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/cayenne/blob/6888884a/eventbridges/cayenne-jms/src/main/java/org/apache/cayenne/event/JMSServerModuleProvider.java
----------------------------------------------------------------------
diff --git a/eventbridges/cayenne-jms/src/main/java/org/apache/cayenne/event/JMSServerModuleProvider.java b/eventbridges/cayenne-jms/src/main/java/org/apache/cayenne/event/JMSServerModuleProvider.java
new file mode 100644
index 0000000..6979d21
--- /dev/null
+++ b/eventbridges/cayenne-jms/src/main/java/org/apache/cayenne/event/JMSServerModuleProvider.java
@@ -0,0 +1,50 @@
+/*****************************************************************
+ *   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.event;
+
+import java.util.Collection;
+import java.util.Collections;
+
+import org.apache.cayenne.configuration.server.CayenneServerModuleProvider;
+import org.apache.cayenne.configuration.server.ServerModule;
+import org.apache.cayenne.di.Module;
+
+/**
+ * @since 4.0
+ */
+public class JMSServerModuleProvider implements CayenneServerModuleProvider {
+
+    @Override
+    public Module module() {
+        return new JMSModule();
+    }
+
+    @Override
+    public Class<? extends Module> moduleType() {
+        return JMSModule.class;
+    }
+
+    @SuppressWarnings("unchecked")
+    @Override
+    public Collection<Class<? extends Module>> overrides() {
+        Collection modules = Collections.singletonList(ServerModule.class);
+        return modules;
+    }
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/cayenne/blob/6888884a/eventbridges/cayenne-jms/src/main/resources/META-INF/services/org.apache.cayenne.configuration.server.CayenneServerModuleProvider
----------------------------------------------------------------------
diff --git a/eventbridges/cayenne-jms/src/main/resources/META-INF/services/org.apache.cayenne.configuration.server.CayenneServerModuleProvider b/eventbridges/cayenne-jms/src/main/resources/META-INF/services/org.apache.cayenne.configuration.server.CayenneServerModuleProvider
new file mode 100644
index 0000000..7c54e3f
--- /dev/null
+++ b/eventbridges/cayenne-jms/src/main/resources/META-INF/services/org.apache.cayenne.configuration.server.CayenneServerModuleProvider
@@ -0,0 +1,20 @@
+##################################################################
+#   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.
+##################################################################
+
+org.apache.cayenne.event.JMSServerModuleProvider
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/cayenne/blob/6888884a/eventbridges/cayenne-jms/src/main/resources/META-INF/services/org.apache.cayenne.di.spi.ModuleProvider
----------------------------------------------------------------------
diff --git a/eventbridges/cayenne-jms/src/main/resources/META-INF/services/org.apache.cayenne.di.spi.ModuleProvider b/eventbridges/cayenne-jms/src/main/resources/META-INF/services/org.apache.cayenne.di.spi.ModuleProvider
deleted file mode 100644
index d25aa6a..0000000
--- a/eventbridges/cayenne-jms/src/main/resources/META-INF/services/org.apache.cayenne.di.spi.ModuleProvider
+++ /dev/null
@@ -1,20 +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.
-##################################################################
-
-org.apache.cayenne.event.JMSModuleProvider
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/cayenne/blob/6888884a/eventbridges/cayenne-jms/src/test/java/org/apache/cayenne/event/CayenneJMSModuleProviderTest.java
----------------------------------------------------------------------
diff --git a/eventbridges/cayenne-jms/src/test/java/org/apache/cayenne/event/CayenneJMSModuleProviderTest.java b/eventbridges/cayenne-jms/src/test/java/org/apache/cayenne/event/CayenneJMSModuleProviderTest.java
index d690e9a..3b3e87a 100644
--- a/eventbridges/cayenne-jms/src/test/java/org/apache/cayenne/event/CayenneJMSModuleProviderTest.java
+++ b/eventbridges/cayenne-jms/src/test/java/org/apache/cayenne/event/CayenneJMSModuleProviderTest.java
@@ -19,6 +19,7 @@
 
 package org.apache.cayenne.event;
 
+import org.apache.cayenne.configuration.server.CayenneServerModuleProvider;
 import org.apache.cayenne.unit.util.ModuleProviderChecker;
 import org.junit.Test;
 
@@ -29,7 +30,7 @@ public class CayenneJMSModuleProviderTest {
 
     @Test
     public void testAutoLoadable() {
-        ModuleProviderChecker.testProviderPresent(JMSModuleProvider.class);
+        ModuleProviderChecker.testProviderPresent(JMSServerModuleProvider.class, CayenneServerModuleProvider.class);
     }
 
 }

http://git-wip-us.apache.org/repos/asf/cayenne/blob/6888884a/eventbridges/cayenne-xmpp/src/main/java/org/apache/cayenne/event/XMPPModuleProvider.java
----------------------------------------------------------------------
diff --git a/eventbridges/cayenne-xmpp/src/main/java/org/apache/cayenne/event/XMPPModuleProvider.java b/eventbridges/cayenne-xmpp/src/main/java/org/apache/cayenne/event/XMPPModuleProvider.java
deleted file mode 100644
index 852cedb..0000000
--- a/eventbridges/cayenne-xmpp/src/main/java/org/apache/cayenne/event/XMPPModuleProvider.java
+++ /dev/null
@@ -1,50 +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.event;
-
-import java.util.Collection;
-import java.util.Collections;
-
-import org.apache.cayenne.configuration.server.ServerModule;
-import org.apache.cayenne.di.Module;
-import org.apache.cayenne.di.spi.ModuleProvider;
-
-/**
- * @since 4.0
- */
-public class XMPPModuleProvider implements ModuleProvider {
-
-    @Override
-    public Module module() {
-        return new XMPPModule();
-    }
-
-    @Override
-    public Class<? extends Module> moduleType() {
-        return XMPPModule.class;
-    }
-
-    @SuppressWarnings("unchecked")
-    @Override
-    public Collection<Class<? extends Module>> overrides() {
-        Collection modules = Collections.singletonList(ServerModule.class);
-        return modules;
-    }
-}

http://git-wip-us.apache.org/repos/asf/cayenne/blob/6888884a/eventbridges/cayenne-xmpp/src/main/java/org/apache/cayenne/event/XMPPServerModuleProvider.java
----------------------------------------------------------------------
diff --git a/eventbridges/cayenne-xmpp/src/main/java/org/apache/cayenne/event/XMPPServerModuleProvider.java b/eventbridges/cayenne-xmpp/src/main/java/org/apache/cayenne/event/XMPPServerModuleProvider.java
new file mode 100644
index 0000000..e8cf3da
--- /dev/null
+++ b/eventbridges/cayenne-xmpp/src/main/java/org/apache/cayenne/event/XMPPServerModuleProvider.java
@@ -0,0 +1,50 @@
+/*****************************************************************
+ *   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.event;
+
+import java.util.Collection;
+import java.util.Collections;
+
+import org.apache.cayenne.configuration.server.CayenneServerModuleProvider;
+import org.apache.cayenne.configuration.server.ServerModule;
+import org.apache.cayenne.di.Module;
+
+/**
+ * @since 4.0
+ */
+public class XMPPServerModuleProvider implements CayenneServerModuleProvider {
+
+    @Override
+    public Module module() {
+        return new XMPPModule();
+    }
+
+    @Override
+    public Class<? extends Module> moduleType() {
+        return XMPPModule.class;
+    }
+
+    @SuppressWarnings("unchecked")
+    @Override
+    public Collection<Class<? extends Module>> overrides() {
+        Collection modules = Collections.singletonList(ServerModule.class);
+        return modules;
+    }
+}

http://git-wip-us.apache.org/repos/asf/cayenne/blob/6888884a/eventbridges/cayenne-xmpp/src/main/resources/META-INF/services/org.apache.cayenne.configuration.server.CayenneServerModuleProvider
----------------------------------------------------------------------
diff --git a/eventbridges/cayenne-xmpp/src/main/resources/META-INF/services/org.apache.cayenne.configuration.server.CayenneServerModuleProvider b/eventbridges/cayenne-xmpp/src/main/resources/META-INF/services/org.apache.cayenne.configuration.server.CayenneServerModuleProvider
new file mode 100644
index 0000000..00bce56
--- /dev/null
+++ b/eventbridges/cayenne-xmpp/src/main/resources/META-INF/services/org.apache.cayenne.configuration.server.CayenneServerModuleProvider
@@ -0,0 +1,20 @@
+##################################################################
+#   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.
+##################################################################
+
+org.apache.cayenne.event.XMPPServerModuleProvider
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/cayenne/blob/6888884a/eventbridges/cayenne-xmpp/src/main/resources/META-INF/services/org.apache.cayenne.di.spi.ModuleProvider
----------------------------------------------------------------------
diff --git a/eventbridges/cayenne-xmpp/src/main/resources/META-INF/services/org.apache.cayenne.di.spi.ModuleProvider b/eventbridges/cayenne-xmpp/src/main/resources/META-INF/services/org.apache.cayenne.di.spi.ModuleProvider
deleted file mode 100644
index c1730ce..0000000
--- a/eventbridges/cayenne-xmpp/src/main/resources/META-INF/services/org.apache.cayenne.di.spi.ModuleProvider
+++ /dev/null
@@ -1,20 +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.
-##################################################################
-
-org.apache.cayenne.event.XMPPModuleProvider
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/cayenne/blob/6888884a/eventbridges/cayenne-xmpp/src/test/java/org/apache/cayenne/event/CayenneXMPPModuleProviderTest.java
----------------------------------------------------------------------
diff --git a/eventbridges/cayenne-xmpp/src/test/java/org/apache/cayenne/event/CayenneXMPPModuleProviderTest.java b/eventbridges/cayenne-xmpp/src/test/java/org/apache/cayenne/event/CayenneXMPPModuleProviderTest.java
index 3adf631..0826f7c 100644
--- a/eventbridges/cayenne-xmpp/src/test/java/org/apache/cayenne/event/CayenneXMPPModuleProviderTest.java
+++ b/eventbridges/cayenne-xmpp/src/test/java/org/apache/cayenne/event/CayenneXMPPModuleProviderTest.java
@@ -19,6 +19,7 @@
 
 package org.apache.cayenne.event;
 
+import org.apache.cayenne.configuration.server.CayenneServerModuleProvider;
 import org.apache.cayenne.unit.util.ModuleProviderChecker;
 import org.junit.Test;
 
@@ -29,7 +30,7 @@ public class CayenneXMPPModuleProviderTest {
 
     @Test
     public void testAutoLoadable() {
-        ModuleProviderChecker.testProviderPresent(XMPPModuleProvider.class);
+        ModuleProviderChecker.testProviderPresent(XMPPServerModuleProvider.class, CayenneServerModuleProvider.class);
     }
 
 }


Mime
View raw message