You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cayenne.apache.org by aa...@apache.org on 2026/09/26 13:58:09 UTC
(cayenne) branch master updated: CAY-3034 Remove "cayenne-osgi" module
This is an automated email from the ASF dual-hosted git repository.
asf-gitbox-commits pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/cayenne.git
The following commit(s) were added to refs/heads/master by this push:
new c0cb4fb38 CAY-3034 Remove "cayenne-osgi" module
c0cb4fb38 is described below
commit c0cb4fb3826fb753c7c64febfdd4de3ada30c98d
Author: Andrus Adamchik <an...@objectstyle.com>
AuthorDate: Sat Sep 26 09:56:54 2026 -0400
CAY-3034 Remove "cayenne-osgi" module
---
RELEASE-NOTES.txt | 1 +
UPGRADE.md | 6 ++
cayenne-assembly/pom.xml | 6 --
.../assemblies/generic/assembly-generic.xml | 1 -
.../main/resources/assemblies/mac/assembly-mac.xml | 1 -
.../assemblies/windows/assembly-windows.xml | 1 -
cayenne-osgi/pom.xml | 90 ----------------------
.../configuration/osgi/OsgiClassLoaderManager.java | 75 ------------------
.../configuration/osgi/OsgiDataDomainProvider.java | 78 -------------------
.../cayenne/configuration/osgi/OsgiModule.java | 60 ---------------
.../configuration/osgi/OsgiModuleBuilder.java | 85 --------------------
.../osgi/OsgiClassLoaderManagerTest.java | 59 --------------
.../_cayenne-guide/additional-modules.adoc | 2 -
.../additional-modules/cayenne-osgi.adoc | 40 ----------
pom.xml | 1 -
15 files changed, 7 insertions(+), 499 deletions(-)
diff --git a/RELEASE-NOTES.txt b/RELEASE-NOTES.txt
index 6b46c9675..f11975e87 100644
--- a/RELEASE-NOTES.txt
+++ b/RELEASE-NOTES.txt
@@ -35,6 +35,7 @@ CAY-3025 ObjectContext to require/return Persistent for all object ops
CAY-3026 Parseable ObjectSelect / ColumnSelect
CAY-3027 Replace StringIdQuery with StringIdFetcher
CAY-3028 Im-memory evaluation of ASTSum
+CAY-3034 Remove "cayenne-osgi" module
Bug Fixes:
diff --git a/UPGRADE.md b/UPGRADE.md
index 722255055..2d35856ca 100644
--- a/UPGRADE.md
+++ b/UPGRADE.md
@@ -360,6 +360,12 @@ List<Artist> withExpensivePaintings = ObjectSelect
`org.apache.cayenne.util.Invocation` class and the `SnapshotEventListener` interface (which was only ever a
naming convention for the reflective lookup) were removed.
+* Per [CAY-3034](https://issues.apache.org/jira/browse/CAY-3034) the `cayenne-osgi` module was removed, following
+ the general direction of focusing on the Cayenne core and dropping external integrations. Users running Cayenne in
+ an OSGi container are welcome to copy the module's code into their own project: it consisted of a few small classes
+ that provide an OSGi-aware `ClassLoaderManager` and a `Provider<DataDomain>` that swaps the thread context
+ ClassLoader while the `DataDomain` is created, bound via a `CayenneRuntime` module.
+
## Upgrading to 5.0-M3
diff --git a/cayenne-assembly/pom.xml b/cayenne-assembly/pom.xml
index e16cb29db..a3904fe40 100644
--- a/cayenne-assembly/pom.xml
+++ b/cayenne-assembly/pom.xml
@@ -106,12 +106,6 @@
<version>${project.version}</version>
</dependency>
- <dependency>
- <groupId>org.apache.cayenne</groupId>
- <artifactId>cayenne-osgi</artifactId>
- <version>${project.version}</version>
- </dependency>
-
<dependency>
<groupId>org.apache.cayenne</groupId>
<artifactId>cayenne-mcp-server</artifactId>
diff --git a/cayenne-assembly/src/main/resources/assemblies/generic/assembly-generic.xml b/cayenne-assembly/src/main/resources/assemblies/generic/assembly-generic.xml
index 010a9f1f7..3caa0f2ed 100644
--- a/cayenne-assembly/src/main/resources/assemblies/generic/assembly-generic.xml
+++ b/cayenne-assembly/src/main/resources/assemblies/generic/assembly-generic.xml
@@ -74,7 +74,6 @@
<include>org.apache.cayenne:cayenne-di</include>
<include>org.apache.cayenne:cayenne-jcache</include>
<include>org.apache.cayenne:cayenne-lifecycle</include>
- <include>org.apache.cayenne:cayenne-osgi</include>
<include>org.apache.cayenne:cayenne-project</include>
<include>org.apache.cayenne:cayenne-project-compatibility</include>
<include>org.apache.cayenne:cayenne-velocity</include>
diff --git a/cayenne-assembly/src/main/resources/assemblies/mac/assembly-mac.xml b/cayenne-assembly/src/main/resources/assemblies/mac/assembly-mac.xml
index 6622f6578..229527719 100644
--- a/cayenne-assembly/src/main/resources/assemblies/mac/assembly-mac.xml
+++ b/cayenne-assembly/src/main/resources/assemblies/mac/assembly-mac.xml
@@ -81,7 +81,6 @@
<include>org.apache.cayenne:cayenne-di</include>
<include>org.apache.cayenne:cayenne-jcache</include>
<include>org.apache.cayenne:cayenne-lifecycle</include>
- <include>org.apache.cayenne:cayenne-osgi</include>
<include>org.apache.cayenne:cayenne-project</include>
<include>org.apache.cayenne:cayenne-project-compatibility</include>
<include>org.apache.cayenne:cayenne-velocity</include>
diff --git a/cayenne-assembly/src/main/resources/assemblies/windows/assembly-windows.xml b/cayenne-assembly/src/main/resources/assemblies/windows/assembly-windows.xml
index 1d53effac..1335ab2ce 100644
--- a/cayenne-assembly/src/main/resources/assemblies/windows/assembly-windows.xml
+++ b/cayenne-assembly/src/main/resources/assemblies/windows/assembly-windows.xml
@@ -74,7 +74,6 @@
<include>org.apache.cayenne:cayenne-di</include>
<include>org.apache.cayenne:cayenne-jcache</include>
<include>org.apache.cayenne:cayenne-lifecycle</include>
- <include>org.apache.cayenne:cayenne-osgi</include>
<include>org.apache.cayenne:cayenne-project</include>
<include>org.apache.cayenne:cayenne-project-compatibility</include>
<include>org.apache.cayenne:cayenne-velocity</include>
diff --git a/cayenne-osgi/pom.xml b/cayenne-osgi/pom.xml
deleted file mode 100644
index debe3e03c..000000000
--- a/cayenne-osgi/pom.xml
+++ /dev/null
@@ -1,90 +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
-
- https://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.
--->
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
- <parent>
- <artifactId>cayenne-parent</artifactId>
- <groupId>org.apache.cayenne</groupId>
- <version>5.0-SNAPSHOT</version>
- </parent>
- <modelVersion>4.0.0</modelVersion>
-
- <artifactId>cayenne-osgi</artifactId>
-
- <dependencies>
- <dependency>
- <groupId>org.apache.cayenne</groupId>
- <artifactId>cayenne</artifactId>
- <version>${project.version}</version>
- </dependency>
-
- <!-- TEST DEPENDENCIES -->
- <dependency>
- <groupId>org.mockito</groupId>
- <artifactId>mockito-core</artifactId>
- <scope>test</scope>
- </dependency>
- <dependency>
- <groupId>org.junit.jupiter</groupId>
- <artifactId>junit-jupiter</artifactId>
- <scope>test</scope>
- </dependency>
- </dependencies>
-
- <build>
- <plugins>
- <plugin>
- <artifactId>maven-jar-plugin</artifactId>
- <!-- include OSGi stuff -->
- <configuration>
- <archive>
- <manifestFile>${project.build.outputDirectory}/META-INF/MANIFEST.MF</manifestFile>
- </archive>
- </configuration>
- <!-- share tests with downstream modules -->
- <executions>
- <execution>
- <goals>
- <goal>test-jar</goal>
- </goals>
- </execution>
- </executions>
- </plugin>
- <plugin>
- <groupId>org.apache.felix</groupId>
- <artifactId>maven-bundle-plugin</artifactId>
- <executions>
- <execution>
- <id>bundle-manifest</id>
- <phase>process-classes</phase>
- <goals>
- <goal>manifest</goal>
- </goals>
- <!-- TODO: export package filters. -->
- <configuration>
- <instructions>
- <Require-Bundle>org.apache.cayenne</Require-Bundle>
- </instructions>
- </configuration>
- </execution>
- </executions>
- </plugin>
- </plugins>
- </build>
-</project>
\ No newline at end of file
diff --git a/cayenne-osgi/src/main/java/org/apache/cayenne/configuration/osgi/OsgiClassLoaderManager.java b/cayenne-osgi/src/main/java/org/apache/cayenne/configuration/osgi/OsgiClassLoaderManager.java
deleted file mode 100644
index 902e2a07c..000000000
--- a/cayenne-osgi/src/main/java/org/apache/cayenne/configuration/osgi/OsgiClassLoaderManager.java
+++ /dev/null
@@ -1,75 +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
- *
- * https://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.osgi;
-
-import java.util.Map;
-
-import org.apache.cayenne.di.ClassLoaderManager;
-import org.apache.cayenne.di.Injector;
-
-/**
- * @since 4.0
- */
-public class OsgiClassLoaderManager implements ClassLoaderManager {
-
- private static final String CAYENNE_PACKAGE = "org/apache/cayenne";
- private static final String CAYENNE_DI_PACKAGE_SUFFIX = "/di";
-
- private ClassLoader applicationClassLoader;
- private ClassLoader cayenneRuntimeClassLoader;
- private ClassLoader cayenneDiClassLoader;
- private Map<String, ClassLoader> perResourceClassLoaders;
-
- public OsgiClassLoaderManager(ClassLoader applicationClassLoader, Map<String, ClassLoader> perResourceClassLoaders) {
- this.applicationClassLoader = applicationClassLoader;
- this.cayenneDiClassLoader = Injector.class.getClassLoader();
- this.cayenneRuntimeClassLoader = OsgiClassLoaderManager.class.getClassLoader();
- this.perResourceClassLoaders = perResourceClassLoaders;
- }
-
- @Override
- public ClassLoader getClassLoader(String resourceName) {
- if (resourceName == null || resourceName.length() < 2) {
- return resourceClassLoader(resourceName);
- }
-
- String normalizedName = resourceName.charAt(0) == '/' ? resourceName.substring(1) : resourceName;
- if (normalizedName.startsWith(CAYENNE_PACKAGE)) {
-
- return (normalizedName.substring(CAYENNE_PACKAGE.length()).startsWith(CAYENNE_DI_PACKAGE_SUFFIX))
- ? cayenneDiClassLoader()
- : cayenneRuntimeClassLoader();
- }
-
- return resourceClassLoader(resourceName);
- }
-
- protected ClassLoader resourceClassLoader(String resourceName) {
- ClassLoader cl = perResourceClassLoaders.get(resourceName);
- return cl != null ? cl : applicationClassLoader;
- }
-
- protected ClassLoader cayenneDiClassLoader() {
- return cayenneDiClassLoader;
- }
-
- protected ClassLoader cayenneRuntimeClassLoader() {
- return cayenneRuntimeClassLoader;
- }
-}
diff --git a/cayenne-osgi/src/main/java/org/apache/cayenne/configuration/osgi/OsgiDataDomainProvider.java b/cayenne-osgi/src/main/java/org/apache/cayenne/configuration/osgi/OsgiDataDomainProvider.java
deleted file mode 100644
index 9a6ca11f6..000000000
--- a/cayenne-osgi/src/main/java/org/apache/cayenne/configuration/osgi/OsgiDataDomainProvider.java
+++ /dev/null
@@ -1,78 +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
- *
- * https://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.osgi;
-
-import org.apache.cayenne.ConfigurationException;
-import org.apache.cayenne.access.DataDomain;
-import org.apache.cayenne.configuration.runtime.DataDomainProvider;
-import org.apache.cayenne.di.ClassLoaderManager;
-import org.apache.cayenne.di.Inject;
-import org.apache.cayenne.map.EntityResolver;
-import org.apache.cayenne.map.ObjEntity;
-
-/**
- * @since 4.0
- */
-// TODO: this is really a hack until we can have fully injectable class loading
-// at the EntityResolver level per CAY-1887
-public class OsgiDataDomainProvider extends DataDomainProvider {
-
- private ClassLoaderManager classLoaderManager;
-
- public OsgiDataDomainProvider(@Inject ClassLoaderManager classLoaderManager) {
- this.classLoaderManager = classLoaderManager;
- }
-
- @Override
- public DataDomain get() throws ConfigurationException {
-
- // here goes the class loading hack, temporarily setting application
- // bundle ClassLoader to be a thread ClassLoader for runtime to start.
-
- Thread thread = Thread.currentThread();
- ClassLoader activeCl = thread.getContextClassLoader();
- try {
-
- // using fake package name... as long as it is not
- // org.apache.cayenne, this do the right trick
- thread.setContextClassLoader(classLoaderManager.getClassLoader("com/"));
-
- DataDomain domain = super.get();
- EntityResolver entityResolver = domain.getEntityResolver();
- for (ObjEntity e : entityResolver.getObjEntities()) {
-
- // it is not enough to just call 'getObjectClass()' on
- // ClassDescriptor - there's an optimization that prevents full
- // descriptor resolving... so calling some other method...
- entityResolver.getClassDescriptor(e.getName()).getProperty("__dummy__");
- entityResolver.getCallbackRegistry();
- }
-
- // this triggers callbacks initialization using thread class loader
- entityResolver.getCallbackRegistry();
-
- return domain;
-
- } finally {
- thread.setContextClassLoader(activeCl);
- }
- }
-
-}
diff --git a/cayenne-osgi/src/main/java/org/apache/cayenne/configuration/osgi/OsgiModule.java b/cayenne-osgi/src/main/java/org/apache/cayenne/configuration/osgi/OsgiModule.java
deleted file mode 100644
index f7cf9f8d4..000000000
--- a/cayenne-osgi/src/main/java/org/apache/cayenne/configuration/osgi/OsgiModule.java
+++ /dev/null
@@ -1,60 +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
- *
- * https://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.osgi;
-
-import java.util.HashMap;
-import java.util.Map;
-
-import org.apache.cayenne.access.DataDomain;
-import org.apache.cayenne.di.Binder;
-import org.apache.cayenne.di.ClassLoaderManager;
-import org.apache.cayenne.di.Module;
-
-/**
- * A DI module that helps to bootstrap Cayenne in OSGi environment.
- *
- * @since 4.0
- */
-public class OsgiModule implements Module {
-
- private Class<?> typeFromProjectBundle;
- private Map<String, ClassLoader> perTypeClassLoaders;
-
- OsgiModule() {
- this.perTypeClassLoaders = new HashMap<>();
- }
-
- void setTypeFromProjectBundle(Class<?> typeFromProjectBundle) {
- this.typeFromProjectBundle = typeFromProjectBundle;
- }
-
- void putClassLoader(String type, ClassLoader classLoader) {
- perTypeClassLoaders.put(type, classLoader);
- }
-
- @Override
- public void configure(Binder binder) {
- binder.bind(ClassLoaderManager.class).toInstance(createClassLoaderManager());
- binder.bind(DataDomain.class).toProvider(OsgiDataDomainProvider.class);
- }
-
- private ClassLoaderManager createClassLoaderManager() {
- return new OsgiClassLoaderManager(typeFromProjectBundle.getClassLoader(), perTypeClassLoaders);
- }
-}
diff --git a/cayenne-osgi/src/main/java/org/apache/cayenne/configuration/osgi/OsgiModuleBuilder.java b/cayenne-osgi/src/main/java/org/apache/cayenne/configuration/osgi/OsgiModuleBuilder.java
deleted file mode 100644
index 368d4291e..000000000
--- a/cayenne-osgi/src/main/java/org/apache/cayenne/configuration/osgi/OsgiModuleBuilder.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
- *
- * https://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.osgi;
-
-import java.sql.Driver;
-
-import org.apache.cayenne.di.Module;
-
-/**
- * A builder of a DI module that helps to bootstrap Cayenne in OSGi environment.
- *
- * @since 4.0
- */
-public class OsgiModuleBuilder {
-
- private OsgiModule module;
-
- public static OsgiModuleBuilder forProject(Class<?> typeFromProjectBundle) {
-
- if (typeFromProjectBundle == null) {
- throw new NullPointerException("Null 'typeFromProjectBundle'");
- }
-
- return new OsgiModuleBuilder(typeFromProjectBundle);
- }
-
- private OsgiModuleBuilder(Class<?> typeFromProjectBundle) {
- this.module = new OsgiModule();
- module.setTypeFromProjectBundle(typeFromProjectBundle);
- }
-
- /**
- * Registers a JDBC driver class used by Cayenne. This is an optional piece
- * of information used by Cayenne to find JDBC driver in case of Cayenne
- * managed DataSource. E.g. don't use this when you are using a JNDI
- * DataSource.
- */
- public OsgiModuleBuilder withDriver(Class<? extends Driver> driverType) {
- return withType(driverType);
- }
-
- /**
- * Registers an arbitrary Java class. If Cayenne tries to load it via
- * reflection later on, it will be using ClassLoader attached to the class
- * passed to this method.
- */
- public OsgiModuleBuilder withType(Class<?> type) {
- module.putClassLoader(type.getName(), type.getClassLoader());
- return this;
- }
-
- /**
- * Registers an arbitrary Java class. If Cayenne tries to load it via
- * reflection later on, it will be using ClassLoader attached to the class
- * passed to this method.
- */
- public OsgiModuleBuilder withTypes(Class<?>... types) {
- if (types != null) {
- for (Class<?> type : types) {
- module.putClassLoader(type.getName(), type.getClassLoader());
- }
- }
- return this;
- }
-
- public Module module() {
- return module;
- }
-}
diff --git a/cayenne-osgi/src/test/java/org/apache/cayenne/configuration/osgi/OsgiClassLoaderManagerTest.java b/cayenne-osgi/src/test/java/org/apache/cayenne/configuration/osgi/OsgiClassLoaderManagerTest.java
deleted file mode 100644
index 92b2ed333..000000000
--- a/cayenne-osgi/src/test/java/org/apache/cayenne/configuration/osgi/OsgiClassLoaderManagerTest.java
+++ /dev/null
@@ -1,59 +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
- *
- * https://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.osgi;
-
-import org.junit.jupiter.api.Test;
-
-import java.util.Collections;
-
-import static org.junit.jupiter.api.Assertions.assertSame;
-import static org.mockito.Mockito.mock;
-
-public class OsgiClassLoaderManagerTest {
-
- @Test
- public void getClassLoader() {
-
- final ClassLoader appCl = mock(ClassLoader.class);
- final ClassLoader diCl = mock(ClassLoader.class);
- final ClassLoader serverCl = mock(ClassLoader.class);
-
- OsgiClassLoaderManager manager = new OsgiClassLoaderManager(appCl, Collections.<String, ClassLoader> emptyMap()) {
- @Override
- protected ClassLoader cayenneDiClassLoader() {
- return diCl;
- }
-
- @Override
- protected ClassLoader cayenneRuntimeClassLoader() {
- return serverCl;
- }
- };
-
- assertSame(appCl, manager.getClassLoader(null));
- assertSame(appCl, manager.getClassLoader(""));
- assertSame(appCl, manager.getClassLoader("org/example/test"));
- assertSame(appCl, manager.getClassLoader("/org/example/test"));
- assertSame(serverCl, manager.getClassLoader("/org/apache/cayenne/access/DataContext.class"));
- assertSame(diCl, manager.getClassLoader("/org/apache/cayenne/di/Injector.class"));
- assertSame(diCl, manager.getClassLoader("org/apache/cayenne/di/Injector.class"));
-
- }
-
-}
diff --git a/docs/cayenne-guide/src/docs/asciidoc/_cayenne-guide/additional-modules.adoc b/docs/cayenne-guide/src/docs/asciidoc/_cayenne-guide/additional-modules.adoc
index 7430ef015..87a8ed8fa 100644
--- a/docs/cayenne-guide/src/docs/asciidoc/_cayenne-guide/additional-modules.adoc
+++ b/docs/cayenne-guide/src/docs/asciidoc/_cayenne-guide/additional-modules.adoc
@@ -23,5 +23,3 @@ include::additional-modules/jcache.adoc[]
include::additional-modules/project-compatibility.adoc[]
include::additional-modules/apache-velocity.adoc[]
-
-include::additional-modules/cayenne-osgi.adoc[]
diff --git a/docs/cayenne-guide/src/docs/asciidoc/_cayenne-guide/additional-modules/cayenne-osgi.adoc b/docs/cayenne-guide/src/docs/asciidoc/_cayenne-guide/additional-modules/cayenne-osgi.adoc
deleted file mode 100644
index 042a87ac7..000000000
--- a/docs/cayenne-guide/src/docs/asciidoc/_cayenne-guide/additional-modules/cayenne-osgi.adoc
+++ /dev/null
@@ -1,40 +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
-//
-// https://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.
-
-include::../var.adoc[]
-
-[#ext-osgi]
-=== Cayenne OSGI extension
-
-Helps to bootstrap Cayenne in OSGi environment.
-
-==== Maven
-
-[source, XML,subs="verbatim,attributes"]
-----
-<dependency>
- <groupId>org.apache.cayenne</groupId>
- <artifactId>cayenne-osgi</artifactId>
- <version>{version}</version>
-</dependency>
-----
-
-==== Gradle
-
-[source, Groovy,subs="verbatim,attributes"]
-----
-compile 'org.apache.cayenne:cayenne-osgi:{version}'
-----
-
-
diff --git a/pom.xml b/pom.xml
index d2b272150..6b9a49cd1 100644
--- a/pom.xml
+++ b/pom.xml
@@ -122,7 +122,6 @@
<module>cayenne-project</module>
<module>cayenne-project-compatibility</module>
<module>cayenne-velocity</module>
- <module>cayenne-osgi</module>
<module>cayenne-maven-plugin</module>
<module>cayenne-wocompat</module>
<module>docs</module>