Skip to content

Conversation

@arunans23
Copy link
Member

@arunans23 arunans23 commented Dec 23, 2025

Purpose

Describe the problems, issues, or needs driving this feature/fix and include links to related issues in the following format: Resolves issue1, issue2, etc.

$subject

Summary by CodeRabbit

  • New Features

    • Enhanced observability with Prometheus metrics support.
  • Improvements

    • Updated Java compatibility to Java 21.
    • Modernized OSGi service architecture for improved module integration.
    • Refined dependency management to reduce conflicts and improve stability.
  • Tests

    • Updated test framework dependencies for better maintainability.

✏️ Tip: You can customize this high-level summary in your review settings.

@coderabbitai
Copy link

coderabbitai bot commented Dec 23, 2025

Walkthrough

Large-scale refactoring transitioning from SCR plugins to OSGi service declarations via Provide-Capability entries, updating Eclipse OSGi dependencies, removing unused servlet dependencies, migrating tests from PowerMock to Mockito, removing Declarative Services annotations, and increasing Java compilation target to version 21 across the codebase.

Changes

Cohort / File(s) Summary
Data Services SCR Plugin Removals
components/data/data-services/org.wso2.micro.integrator.dataservices.capp.deployer/pom.xml, components/data/data-services/org.wso2.micro.integrator.dataservices.core/pom.xml, components/org.wso2.micro.integrator.log4j2.plugins/pom.xml, components/org.wso2.micro.integrator.ndatasource.capp.deployer/pom.xml
Removed maven-scr-plugin (org.apache.felix) from build plugins section across multiple modules; no replacement plugins or configuration added.
Bundle Import-Package Configuration
components/data/data-services/org.wso2.micro.integrator.dataservices.common/pom.xml, components/mediation/mediators/cache-mediator/org.wso2.carbon.mediator.cache/pom.xml, components/org.wso2.micro.integrator.ndatasource.common/pom.xml
Added empty <Import-Package></Import-Package> elements in maven-bundle-plugin instructions alongside existing Export-Package declarations.
Data Services Dependency Updates
components/data/data-services/org.wso2.micro.integrator.dataservices.sql.driver/pom.xml, components/org.wso2.micro.integrator.ndatasource.core/pom.xml, components/mediation/inbound-endpoints/org.wso2.micro.integrator.inbound.endpoint.osgi/pom.xml, components/mediation/inbound-endpoints/org.wso2.micro.integrator.inbound.endpoint.persistence/pom.xml
Updated Eclipse OSGi dependencies: changed org.eclipse.osgi:org.eclipse.osgi.services groupId from org.eclipse.osgi to org.eclipse.platform; added exclusions to remove org.eclipse.jetty.toolchain:jetty-servlet.
Servlet Dependency Removals
components/data/data-services/org.wso2.micro.integrator.dataservices.odata.endpoint/pom.xml
Removed javax.servlet and servlet-api dependencies; removed related imports (javax.servlet, javax.servlet.http) from bundle configuration.
Core Component Import Updates
components/javax.cache/src/main/java/org/wso2/carbon/caching/impl/DataHolder.java, components/javax.cache/src/main/java/org/wso2/carbon/caching/impl/internal/CachingServiceComponent.java
Updated ServerConfigurationService import source from org.wso2.carbon.base.api.ServerConfigurationService to org.wso2.micro.integrator.core.services.ServerConfigurationService.
OSGi Service Capability Declarations
components/org.wso2.micro.integrator.core/pom.xml, components/mediation/tasks/org.wso2.micro.integrator.ntask.core/pom.xml, components/org.wso2.micro.integrator.ndatasource.core/pom.xml, components/org.wso2.micro.integrator.security/pom.xml, components/org.wso2.micro.integrator.initializer/pom.xml
Added <Provide-Capability> entries in maven-bundle-plugin instructions exposing multiple OSGi service objectClasses; removed org.eclipse.osgi and org.eclipse.osgi.services dependencies where applicable.
Transaction Manager Annotation Removal
components/org.wso2.micro.integrator.core/src/main/java/org/wso2/micro/integrator/transaction/manager/TransactionManagerComponent.java
Removed Declarative Services (DS) annotations: @Component, @Activate, @Deactivate, and @Reference from class and methods; converts class to plain Java with decoupled service binding.
Test Framework Migration
components/org.wso2.micro.integrator.extensions/org.wso2.micro.integrator.management.apis/src/test/java/org/wso2/micro/integrator/management/apis/ManagementApiParserTest.java, components/org.wso2.micro.integrator.extensions/org.wso2.micro.integrator.management.apis/pom.xml
Removed PowerMock annotations (@RunWith, @PrepareForTest, @PowerMockIgnore) and imports; removed PowerMock test dependencies; added mockito-core test scope dependency.
Data Services Core Minor Fixes
components/data/data-services/org.wso2.micro.integrator.dataservices.core/src/main/java/org/wso2/micro/integrator/dataservices/core/odata/serializer/ODataImpl.java, components/data/data-services/org.wso2.micro.integrator.dataservices.core/src/test/java/org/wso2/micro/integrator/dataservices/core/test/util/DSComponentExtension.java
Fixed duplicate semicolon in import statement; removed two method overrides (registerService, getServiceObjects) from anonymous BundleContext implementation.
Observability Bundle Configuration
components/mediation/data-publishers/org.wso2.micro.integrator.observability/pom.xml
Added _contract element set to !* inside Axis2Module configuration in maven-bundle-plugin.
Observability Feature Dependency Overhaul
features/mediation-features/data-publisher-features/org.wso2.micro.integrator.observability.feature/pom.xml
Major refactor: replaced WSO2/inbound-oriented Prometheus dependencies with comprehensive io.prometheus metrics instrumentation suite; added jakarta.annotation-api; included commented bundle definitions for Prometheus modules.
Server Feature Expansion
features/org.wso2.micro.integrator.server.feature/pom.xml
Added 14 OSGi service dependencies (component, cm, upnp, device, event, wireadmin, provisioning, useradmin, metatype, permissionadmin, coordinator, promise, function); added javax.xml.soap-api; enabled carbon-p2-plugin extensions; expanded bundleDef entries; fixed version variable typo.
Product & P2 Profile Updates
p2-profile/carbon.product, p2-profile/pom.xml
Updated product and feature versions from 4.9.30 to 4.9.34.SNAPSHOT; removed maven-dependency-plugin Eclipse Equinox unpacking configuration; enabled extensions on carbon-p2-plugin.
Root POM Major Refactoring
pom.xml
Extensive updates: replaced org.eclipse.osgi with org.eclipse.platform for OSGi services; removed maven-scr-plugin from pluginManagement; added 30+ new version properties (OSGi services, Felix SCR, SOAP/annotation APIs); bumped Java compiler from 1.8 to 21; updated numerous artifact versions across Synapse, Carbon, Jacoco, and Maven plugins; added explicit OSGi service dependency declarations.
Integration Version Bump
integration/pom.xml
Updated jacoco.agent.version from 0.8.8 to 0.8.12.

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~60 minutes

Poem

🐰 Hoppy refactors sweep the land,
OSGi services now grandly planned,
SCR plugins fade to yesterday's beat,
Prometheus metrics, oh what a treat!
Java twenty-one, we leap so high,
Configuration flows like carrots piled nigh! 🥕

Pre-merge checks and finishing touches

❌ Failed checks (2 warnings)
Check name Status Explanation Resolution
Description check ⚠️ Warning The PR description is largely incomplete. It contains only the template header 'Purpose' followed by a placeholder variable ($subject) with no actual content, linked issues, or substantive information about the changes, goals, approach, or testing. Complete the description by filling in all required sections: Purpose (with linked issues if applicable), Goals, Approach, User stories, Release note, Documentation, and other relevant sections. At minimum, provide concrete details about JDK21 support changes and testing performed.
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. You can run @coderabbitai generate docstrings to improve docstring coverage.
✅ Passed checks (1 passed)
Check name Status Explanation
Title check ✅ Passed The PR title clearly and concisely describes the main objective: adding JDK21 compilation support. It directly relates to the core changes visible in the changeset, particularly the Java compiler version bump from 1.8 to 21 in the parent pom.xml and related dependency/compatibility updates throughout the codebase.
✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Comment on lines 47 to 51
protected void activate(ComponentContext ctxt) {

bindTransactionManagerWithJNDI();
log.debug("Transaction Manager bundle is activated ");
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Log Improvement Suggestion No: 1

Suggested change
protected void activate(ComponentContext ctxt) {
bindTransactionManagerWithJNDI();
log.debug("Transaction Manager bundle is activated ");
}
protected void activate(ComponentContext ctxt) {
bindTransactionManagerWithJNDI();
log.info("Transaction Manager component activated successfully");
log.debug("Transaction Manager bundle is activated ");

Copy link
Contributor

@wso2-engineering wso2-engineering bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

AI Agent Log Improvement Checklist

⚠️ Warning: AI-Generated Review Comments

  • The log-related comments and suggestions in this review were generated by an AI tool to assist with identifying potential improvements. Purpose of reviewing the code for log improvements is to improve the troubleshooting capabilities of our products.
  • Please make sure to manually review and validate all suggestions before applying any changes. Not every code suggestion would make sense or add value to our purpose. Therefore, you have the freedom to decide which of the suggestions are helpful.

✅ Before merging this pull request:

  • Review all AI-generated comments for accuracy and relevance.
  • Complete and verify the table below. We need your feedback to measure the accuracy of these suggestions and the value they add. If you are rejecting a certain code suggestion, please mention the reason briefly in the suggestion for us to capture it.
Comment Accepted (Y/N) Reason
#### Log Improvement Suggestion No: 1

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 6

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (2)
components/org.wso2.micro.integrator.core/src/main/java/org/wso2/micro/integrator/transaction/manager/TransactionManagerComponent.java (1)

36-135: Critical: Component is completely non-functional—marked as incomplete work in code.

The removal of Declarative Services annotations has left TransactionManagerComponent broken:

  1. Missing all DS annotations: No @Component, @Activate, @Reference, or @Deactivate annotations are present in the class (verified across all 136 lines).

  2. No activation pathway: The activate() method (line 49) is never invoked, so bindTransactionManagerWithJNDI() is never called.

  3. Services never injected: setTransactionManager() and setUserTransaction() methods are never called without @Reference annotations, leaving txManager and userTransaction static fields null.

  4. Dead code: The class retains all lifecycle and binding logic but has no way to execute it. No external code instantiates or calls this component.

  5. Acknowledged as unfinished: The file header contains a TODO comment stating "need a way to solve javax.transaction service dependency"—confirming this is abandoned, incomplete refactoring.

The codebase has moved on to use DBUtils.getContainerTransactionManager() instead, making TransactionManagerComponent entirely superseded and non-functional.

pom.xml (1)

1758-1758: Remove unused PowerMock dependencies from pom.xml.

PowerMock 2.0.7 is incompatible with Mockito 5.3.1 and JDK21, but verification shows PowerMock is not actually used anywhere in the codebase—no imports or test annotations found. The dependencies declared in pom.xml (lines 1364-1367 and 1370-1373) are unused and should be removed.

🧹 Nitpick comments (3)
components/org.wso2.micro.integrator.ndatasource.common/pom.xml (1)

47-48: Consider aligning with related modules by specifying explicit imports.

The empty <Import-Package> element disables automatic import calculation by the Maven Bundle Plugin. While <DynamicImport-Package>*</DynamicImport-Package> on line 49 provides runtime fallback, this skips build-time dependency validation. All related ndatasource modules (core, rdbms, capp.deployer) explicitly declare their imports while also using dynamic imports as fallback. Consider adding explicit imports for known dependencies to this common module for consistency, or document if the intentionally minimal approach is required.

pom.xml (1)

1800-1802: Remove commented-out code.

The commented-out carbon.kernel.version property appears to be leftover from development. Clean this up.

🔎 Proposed fix
-<!--        <carbon.kernel.version>4.10.108-SNAPSHOT</carbon.kernel.version>-->
-        <carbon.kernel.version>4.9.34-SNAPSHOT</carbon.kernel.version>
+        <carbon.kernel.version>4.9.34-SNAPSHOT</carbon.kernel.version>
features/mediation-features/data-publisher-features/org.wso2.micro.integrator.observability.feature/pom.xml (1)

98-102: Use a version property instead of hardcoded version.

The jakarta.annotation-api version is hardcoded as 3.0.0. Define a property in the root POM for consistency and easier maintenance.

🔎 Proposed fix

In root pom.xml, add property:

<jakarta.annotation-api.version>3.0.0</jakarta.annotation-api.version>

Then update this dependency:

 <dependency>
     <groupId>jakarta.annotation</groupId>
     <artifactId>jakarta.annotation-api</artifactId>
-    <version>3.0.0</version>
+    <version>${jakarta.annotation-api.version}</version>
 </dependency>
📜 Review details

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 0093982 and acefa05.

📒 Files selected for processing (30)
  • components/data/data-services/org.wso2.micro.integrator.dataservices.capp.deployer/pom.xml
  • components/data/data-services/org.wso2.micro.integrator.dataservices.common/pom.xml
  • components/data/data-services/org.wso2.micro.integrator.dataservices.core/pom.xml
  • components/data/data-services/org.wso2.micro.integrator.dataservices.core/src/main/java/org/wso2/micro/integrator/dataservices/core/odata/serializer/ODataImpl.java
  • components/data/data-services/org.wso2.micro.integrator.dataservices.core/src/test/java/org/wso2/micro/integrator/dataservices/core/test/util/DSComponentExtension.java
  • components/data/data-services/org.wso2.micro.integrator.dataservices.odata.endpoint/pom.xml
  • components/data/data-services/org.wso2.micro.integrator.dataservices.sql.driver/pom.xml
  • components/javax.cache/src/main/java/org/wso2/carbon/caching/impl/DataHolder.java
  • components/javax.cache/src/main/java/org/wso2/carbon/caching/impl/internal/CachingServiceComponent.java
  • components/mediation/data-publishers/org.wso2.micro.integrator.observability/pom.xml
  • components/mediation/inbound-endpoints/org.wso2.micro.integrator.inbound.endpoint.osgi/pom.xml
  • components/mediation/inbound-endpoints/org.wso2.micro.integrator.inbound.endpoint.persistence/pom.xml
  • components/mediation/mediators/cache-mediator/org.wso2.carbon.mediator.cache/pom.xml
  • components/mediation/tasks/org.wso2.micro.integrator.ntask.core/pom.xml
  • components/org.wso2.micro.integrator.core/pom.xml
  • components/org.wso2.micro.integrator.core/src/main/java/org/wso2/micro/integrator/transaction/manager/TransactionManagerComponent.java
  • components/org.wso2.micro.integrator.extensions/org.wso2.micro.integrator.management.apis/pom.xml
  • components/org.wso2.micro.integrator.extensions/org.wso2.micro.integrator.management.apis/src/test/java/org/wso2/micro/integrator/management/apis/ManagementApiParserTest.java
  • components/org.wso2.micro.integrator.initializer/pom.xml
  • components/org.wso2.micro.integrator.log4j2.plugins/pom.xml
  • components/org.wso2.micro.integrator.ndatasource.capp.deployer/pom.xml
  • components/org.wso2.micro.integrator.ndatasource.common/pom.xml
  • components/org.wso2.micro.integrator.ndatasource.core/pom.xml
  • components/org.wso2.micro.integrator.security/pom.xml
  • features/mediation-features/data-publisher-features/org.wso2.micro.integrator.observability.feature/pom.xml
  • features/org.wso2.micro.integrator.server.feature/pom.xml
  • integration/pom.xml
  • p2-profile/carbon.product
  • p2-profile/pom.xml
  • pom.xml
💤 Files with no reviewable changes (7)
  • components/data/data-services/org.wso2.micro.integrator.dataservices.odata.endpoint/pom.xml
  • components/org.wso2.micro.integrator.extensions/org.wso2.micro.integrator.management.apis/src/test/java/org/wso2/micro/integrator/management/apis/ManagementApiParserTest.java
  • components/data/data-services/org.wso2.micro.integrator.dataservices.capp.deployer/pom.xml
  • components/org.wso2.micro.integrator.log4j2.plugins/pom.xml
  • components/data/data-services/org.wso2.micro.integrator.dataservices.core/pom.xml
  • components/org.wso2.micro.integrator.ndatasource.capp.deployer/pom.xml
  • components/data/data-services/org.wso2.micro.integrator.dataservices.core/src/test/java/org/wso2/micro/integrator/dataservices/core/test/util/DSComponentExtension.java
🔇 Additional comments (25)
components/data/data-services/org.wso2.micro.integrator.dataservices.core/src/main/java/org/wso2/micro/integrator/dataservices/core/odata/serializer/ODataImpl.java (1)

30-30: No syntax error to fix. Line 30 contains correct import syntax with a single semicolon. The UriHelper import is properly declared and used in the file (as a return type in the createUriHelper() method at line 68).

Likely an incorrect or invalid review comment.

components/org.wso2.micro.integrator.extensions/org.wso2.micro.integrator.management.apis/pom.xml (2)

59-63: LGTM: Modern test dependency migration.

Migrating from PowerMock to Mockito is a good practice. PowerMock has limited support for newer Java versions and Mockito provides better Java 21 compatibility.


84-84: Property is properly defined. The osgi.service.cm.version property is defined in the root pom.xml at line 1781 with value 1.6.1. No action required.

p2-profile/pom.xml (1)

40-40: LGTM: Standard extension configuration for P2 plugin.

Adding <extensions>true</extensions> enables the carbon-p2-plugin to properly participate in the Maven lifecycle as an extension, which is standard practice for P2 packaging plugins.

p2-profile/carbon.product (1)

5-5: LGTM: Version alignment with development snapshot.

The version updates from 4.9.30 to 4.9.34.SNAPSHOT correctly align the product descriptor with the current development cycle.

Also applies to: 17-17

components/javax.cache/src/main/java/org/wso2/carbon/caching/impl/DataHolder.java (1)

23-23: Import relocation verified as complete.

The import update from org.wso2.carbon.base.api.ServerConfigurationService to org.wso2.micro.integrator.core.services.ServerConfigurationService is properly isolated with no remaining references to the old package in the codebase.

components/mediation/inbound-endpoints/org.wso2.micro.integrator.inbound.endpoint.osgi/pom.xml (1)

63-71: Dependency migration is consistent across the codebase.

The migration from org.eclipse.osgi:org.eclipse.osgi.services to org.eclipse.platform:org.eclipse.osgi.services with the jetty-servlet exclusion is applied uniformly across all five dependencies in the codebase. No legacy references remain.

components/mediation/inbound-endpoints/org.wso2.micro.integrator.inbound.endpoint.persistence/pom.xml (1)

43-50: LGTM - Dependency migration to Eclipse Platform.

The change from org.eclipse.osgi to org.eclipse.platform groupId with the jetty-servlet exclusion is consistent with the project-wide dependency consolidation for JDK21 compatibility. The exclusion prevents servlet API version conflicts.

components/data/data-services/org.wso2.micro.integrator.dataservices.sql.driver/pom.xml (2)

84-91: LGTM - Dependency migration consistent with project pattern.

The change from org.eclipse.osgi to org.eclipse.platform:org.eclipse.osgi.services with jetty-servlet exclusion is consistent across the codebase for JDK21 compatibility.


113-159: No action required. This module does not provide OSGi services—it only consumes services through @Reference annotations. The SQLDriverDSComponent class lacks a @Component annotation, so it is not registering any services with the OSGi framework. Provide-Capability is only necessary for modules that export/provide OSGi services; since this module provides none, the removal of maven-scr-plugin does not create a discoverability issue.

components/org.wso2.micro.integrator.ndatasource.core/pom.xml (2)

34-41: LGTM - Consistent dependency migration.

The change to org.eclipse.platform:org.eclipse.osgi.services with jetty-servlet exclusion follows the established pattern.


79-81: LGTM - DataSourceService capability declaration.

The Provide-Capability entry properly replaces the removed SCR plugin functionality, ensuring the DataSourceService remains discoverable in the OSGi runtime.

components/org.wso2.micro.integrator.core/pom.xml (2)

151-156: LGTM - Core service capabilities declaration.

The Provide-Capability block declares four essential core services:

  • Axis2ConfigurationContextService
  • UserStoreTemporaryService
  • CarbonServerConfigurationService
  • ServerConfigurationService

This properly exposes these services for OSGi capability-based dependency resolution, replacing SCR-based service registration.


59-61: Verify functional equivalence of javax.servlet as replacement for org.eclipse.equinox.http.helper.

The dependency change from org.eclipse.equinox.http.helper to org.eclipse.equinox:javax.servlet involves a significant semantic shift:

  • http.helper provides OSGi-specific HTTP integration with dynamic servlet/filter registration via HttpService and extension points
  • javax.servlet provides the standard servlet API only, without OSGi extensions

While org.eclipse.equinox:javax.servlet is compatible with JDK21 (Equinox bundles declared for JavaSE-17 run on newer JDKs), ensure this change does not break code that depends on OSGi HttpService registration or Equinox HTTP helpers.

components/org.wso2.micro.integrator.initializer/pom.xml (1)

145-149: LGTM - Synapse service capabilities declaration.

The Provide-Capability block correctly declares the three Synapse-related services. Notably, SynapseEnvironmentService is also referenced in the CAPP_MANAGER-RequiredServices header (line 134), showing good consistency between the capability declarations and service requirements.

components/mediation/tasks/org.wso2.micro.integrator.ntask.core/pom.xml (1)

76-78: OSGi service capability declaration is correct.

The Provide-Capability entry properly declares the TaskService as an OSGi service capability. The service interface exists at the declared location, and the syntax follows OSGi R5+ specification.

components/org.wso2.micro.integrator.security/pom.xml (1)

164-166: The Provide-Capability manifest entry is correctly declared, but review characterization is inaccurate.

The Provide-Capability in pom.xml correctly describes the OSGi service exposed by this bundle. However, the service is not registered via a "SCR-based approach" replacement. The actual registration occurs imperatively in Activator.java through bundleContext.registerService(), maintaining the traditional BundleActivator pattern rather than Declarative Services.

The manifest declaration accurately reflects what Activator.java registers (RealmService and UserRealmService), and the service interface exists with a proper DefaultRealmService implementation. No issues with the manifest entry itself, but clarify that the registration mechanism remains imperative, not declarative.

Likely an incorrect or invalid review comment.

features/org.wso2.micro.integrator.server.feature/pom.xml (1)

40-99: Verify necessity of all OSGi service bundles.

A broad set of OSGi service dependencies is added (upnp, device, wireadmin, provisioning, useradmin, etc.). Some of these appear to be specialized services not typically required for a Micro Integrator. Confirm these are actually needed for JDK21 compatibility or the Felix SCR runtime, as unnecessary bundles increase footprint and startup time.

components/mediation/data-publishers/org.wso2.micro.integrator.observability/pom.xml (1)

103-103: LGTM - Contract suppression for embedded packages.

The <_contract>!*</_contract> directive correctly disables OSGi contract requirements. This is appropriate since the bundle embeds Prometheus packages privately (lines 108-114), avoiding contract conflicts at runtime.

pom.xml (3)

2272-2273: LGTM - Java 21 compilation target.

The source and target are correctly set to 21 for JDK21 support.


1798-1809: Multiple SNAPSHOT dependencies may cause build instability.

Several core dependencies use SNAPSHOT versions:

  • carbon.p2.plugin.version: 5.4.12-SNAPSHOT
  • carbon.kernel.version: 4.9.34-SNAPSHOT
  • synapse.version: 4.0.0-wso2v300-SNAPSHOT
  • carbon.mediation.version: 4.7.269-SNAPSHOT

SNAPSHOT dependencies can change unexpectedly, leading to non-reproducible builds. Ensure these are stabilized before release.


56-68: Verify Jetty exclusions don't break HTTP functionality.

The Jetty servlet exclusions from org.eclipse.osgi.services may impact HTTP-related functionality if any OSGi HTTP services depend on Jetty. Ensure integration tests cover HTTP endpoints.

features/mediation-features/data-publisher-features/org.wso2.micro.integrator.observability.feature/pom.xml (2)

125-134: Clarify intent of commented-out bundleDefs.

All Prometheus and Jakarta annotation bundleDefs are commented out. If these bundles are embedded privately within the observability bundle (via Private-Package in the component POM), this is correct. However, if they should be separate OSGi bundles, this needs to be uncommented.

Please confirm this is intentional based on the embedding strategy in org.wso2.micro.integrator.observability/pom.xml.


45-61: LGTM - Supporting dependencies for observability feature.

The added dependencies provide necessary runtime support for the observability feature.

components/javax.cache/src/main/java/org/wso2/carbon/caching/impl/internal/CachingServiceComponent.java (1)

35-35: Verify interface compatibility and OSGi service availability.

The import has been relocated from org.wso2.carbon.base.api to org.wso2.micro.integrator.core.services. Since this service has MANDATORY cardinality (line 69), ensure that:

  1. The ServerConfigurationService interface is properly defined and exported from the core module (note: only CarbonServerConfigurationService implementation is visible in source code)
  2. The service is correctly registered at runtime as org.wso2.micro.integrator.core.services.ServerConfigurationService and available for injection
  3. The module's POM already depends on the new core module (verified), but confirm the OSGi service wiring is complete

Comment on lines +47 to +48
<Import-Package>
</Import-Package>
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟠 Major

Empty Import-Package may cause missing dependencies.

The empty <Import-Package> block prevents automatic import calculation by the Maven Bundle Plugin. Unlike components/org.wso2.micro.integrator.ndatasource.common/pom.xml, this POM lacks a <DynamicImport-Package> fallback, which may lead to ClassNotFoundException at runtime.

Consider one of the following:

  • Remove the empty Import-Package block to enable automatic calculation
  • Add explicit package imports
  • Add <DynamicImport-Package>*</DynamicImport-Package> as a fallback (though this reduces build-time validation)
#!/bin/bash
# Description: Verify if the exported packages have external dependencies

# Find Java files in the source directory and check their imports
fd -e java . components/data/data-services/org.wso2.micro.integrator.dataservices.common/src/main/java/ \
  --exec grep -h '^import ' {} \; | \
  sort -u | \
  grep -v 'org.wso2.micro.integrator.dataservices.common'
🤖 Prompt for AI Agents
In
components/data/data-services/org.wso2.micro.integrator.dataservices.common/pom.xml
around lines 47-48 there is an empty <Import-Package> block which prevents the
Maven Bundle Plugin from calculating imports and may cause missing dependencies
at runtime; remove the empty <Import-Package> block to let imports be
auto-calculated, or alternatively replace it with explicit package import
entries listing required packages, or add a fallback
<DynamicImport-Package>*</DynamicImport-Package> if you need a broad runtime
import allowance—pick one of these fixes and update the POM accordingly.

Comment on lines +104 to +105
<Import-Package>
</Import-Package>
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
# Check if other fragment bundles in the project use similar patterns
rg -A3 "Fragment-Host" --type xml -g "pom.xml" | rg -B1 -A2 "Import-Package"

Repository: wso2/product-micro-integrator

Length of output: 633


🏁 Script executed:

#!/bin/bash
# First, view the cache-mediator pom.xml around lines 104-105
echo "=== Cache-mediator pom.xml around lines 104-105 ==="
sed -n '100,110p' components/mediation/mediators/cache-mediator/org.wso2.carbon.mediator.cache/pom.xml

# Find all fragment bundles and their Import-Package patterns
echo -e "\n=== All fragment bundles with their instructions sections ==="
rg -B5 -A15 "Fragment-Host" --type xml -g "pom.xml" | grep -A15 "Fragment-Host"

Repository: wso2/product-micro-integrator

Length of output: 14876


Remove the explicitly empty <Import-Package> element or populate it with required packages.

The empty <Import-Package> element is inconsistent with other fragment bundles in the project. Most fragment bundles either omit Import-Package entirely (allowing bnd to auto-generate imports based on bytecode analysis) or explicitly list required packages. Combined with DynamicImport-Package:*, this configuration defers all package resolution to runtime, masking missing dependencies that would normally be caught at build time. Either remove the empty element to allow auto-generation, or explicitly list the packages this fragment actually imports.

🤖 Prompt for AI Agents
In
components/mediation/mediators/cache-mediator/org.wso2.carbon.mediator.cache/pom.xml
around lines 104-105, an explicitly empty <Import-Package> element is present;
remove this empty element (or alternatively replace it with an explicit
comma-separated list of the packages this fragment requires) so bnd can
auto-generate imports or so build-time package resolution is explicit; prefer
removing the empty element to match other fragments unless you know and can list
exact imports required.


@Component(name = "org.wso2.micro.integrator.transaction.manager.TransactionManagerComponent",
immediate = true)
//TODO: need a way to solve javax.transaction service dependency
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🔴 Critical

Critical: TODO indicates incomplete refactoring.

The TODO comment acknowledges an unresolved dependency issue for javax.transaction services. This placeholder suggests the refactoring is incomplete and the transaction manager wiring needs to be addressed before merging.

Comment on lines +92 to +95
<dependency>
<groupId>org.osgi</groupId>
<artifactId>org.osgi.service.cm</artifactId>
</dependency>
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor

Duplicate dependency declaration.

org.osgi:org.osgi.service.cm is already declared at lines 52-55. Remove this duplicate to avoid confusion.

🔎 Proposed fix
-        <dependency>
-            <groupId>org.osgi</groupId>
-            <artifactId>org.osgi.service.cm</artifactId>
-        </dependency>
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
<dependency>
<groupId>org.osgi</groupId>
<artifactId>org.osgi.service.cm</artifactId>
</dependency>
🤖 Prompt for AI Agents
In features/org.wso2.micro.integrator.server.feature/pom.xml around lines 92 to
95, there's a duplicate dependency declaration for org.osgi:org.osgi.service.cm
already declared at lines 52-55; remove the redundant <dependency> block at
lines 92-95 so the artifact is declared only once, then run mvn validate (or
build) to confirm no other references require duplication.

Comment on lines +350 to +365
<bundleDef>org.osgi:org.osgi.service.cm:${osgi.service.cm.version}</bundleDef>
<bundleDef>org.osgi:org.osgi.service.coordinator:${osgi.service.coordinator.version}</bundleDef>
<bundleDef>org.apache.felix:org.apache.felix.scr:${felix.scr.version}</bundleDef>
<bundleDef>org.eclipse.platform:org.eclipse.osgi:${version.equinox.platform.osgi}</bundleDef>
<bundleDef>org.osgi:org.osgi.service.component</bundleDef>
<bundleDef>org.osgi:org.osgi.util.promise</bundleDef>
<bundleDef>org.osgi:org.osgi.util.function</bundleDef>
<bundleDef>org.osgi:org.osgi.service.cm</bundleDef>
<bundleDef>org.osgi:org.osgi.service.upnp</bundleDef>
<bundleDef>org.osgi:org.osgi.service.device</bundleDef>
<bundleDef>org.osgi:org.osgi.service.event</bundleDef>
<bundleDef>org.osgi:org.osgi.service.wireadmin</bundleDef>
<bundleDef>org.osgi:org.osgi.service.provisioning</bundleDef>
<bundleDef>org.osgi:org.osgi.service.useradmin</bundleDef>
<bundleDef>org.osgi:org.osgi.service.metatype</bundleDef>
<bundleDef>org.osgi:org.osgi.service.permissionadmin</bundleDef>
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor

Duplicate bundleDef and inconsistent version specifications.

  1. org.osgi:org.osgi.service.cm is declared twice (lines 350 and 357)
  2. Lines 350-353 specify versions via properties, but lines 354-365 omit versions, relying on dependency management. This inconsistency may cause resolution issues.
🔎 Proposed fix - remove duplicate and add consistent versions
 <bundleDef>org.osgi:org.osgi.service.cm:${osgi.service.cm.version}</bundleDef>
 <bundleDef>org.osgi:org.osgi.service.coordinator:${osgi.service.coordinator.version}</bundleDef>
 <bundleDef>org.apache.felix:org.apache.felix.scr:${felix.scr.version}</bundleDef>
 <bundleDef>org.eclipse.platform:org.eclipse.osgi:${version.equinox.platform.osgi}</bundleDef>
-<bundleDef>org.osgi:org.osgi.service.component</bundleDef>
-<bundleDef>org.osgi:org.osgi.util.promise</bundleDef>
-<bundleDef>org.osgi:org.osgi.util.function</bundleDef>
-<bundleDef>org.osgi:org.osgi.service.cm</bundleDef>
-<bundleDef>org.osgi:org.osgi.service.upnp</bundleDef>
-<bundleDef>org.osgi:org.osgi.service.device</bundleDef>
-<bundleDef>org.osgi:org.osgi.service.event</bundleDef>
-<bundleDef>org.osgi:org.osgi.service.wireadmin</bundleDef>
-<bundleDef>org.osgi:org.osgi.service.provisioning</bundleDef>
-<bundleDef>org.osgi:org.osgi.service.useradmin</bundleDef>
-<bundleDef>org.osgi:org.osgi.service.metatype</bundleDef>
-<bundleDef>org.osgi:org.osgi.service.permissionadmin</bundleDef>
+<bundleDef>org.osgi:org.osgi.service.component:${osgi.service.component.version}</bundleDef>
+<bundleDef>org.osgi:org.osgi.util.promise:${osgi.util.promise.version}</bundleDef>
+<bundleDef>org.osgi:org.osgi.util.function:${osgi.util.function.version}</bundleDef>
+<bundleDef>org.osgi:org.osgi.service.upnp:${osgi.service.upnp.version}</bundleDef>
+<bundleDef>org.osgi:org.osgi.service.device:${osgi.service.device.version}</bundleDef>
+<bundleDef>org.osgi:org.osgi.service.event:${osgi.service.event.version}</bundleDef>
+<bundleDef>org.osgi:org.osgi.service.wireadmin:${osgi.service.wireadmin.version}</bundleDef>
+<bundleDef>org.osgi:org.osgi.service.provisioning:${osgi.service.provisioning.version}</bundleDef>
+<bundleDef>org.osgi:org.osgi.service.useradmin:${osgi.service.useradmin.version}</bundleDef>
+<bundleDef>org.osgi:org.osgi.service.metatype:${osgi.service.metatype.version}</bundleDef>
+<bundleDef>org.osgi:org.osgi.service.permissionadmin:${osgi.service.permissionadmin.version}</bundleDef>
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
<bundleDef>org.osgi:org.osgi.service.cm:${osgi.service.cm.version}</bundleDef>
<bundleDef>org.osgi:org.osgi.service.coordinator:${osgi.service.coordinator.version}</bundleDef>
<bundleDef>org.apache.felix:org.apache.felix.scr:${felix.scr.version}</bundleDef>
<bundleDef>org.eclipse.platform:org.eclipse.osgi:${version.equinox.platform.osgi}</bundleDef>
<bundleDef>org.osgi:org.osgi.service.component</bundleDef>
<bundleDef>org.osgi:org.osgi.util.promise</bundleDef>
<bundleDef>org.osgi:org.osgi.util.function</bundleDef>
<bundleDef>org.osgi:org.osgi.service.cm</bundleDef>
<bundleDef>org.osgi:org.osgi.service.upnp</bundleDef>
<bundleDef>org.osgi:org.osgi.service.device</bundleDef>
<bundleDef>org.osgi:org.osgi.service.event</bundleDef>
<bundleDef>org.osgi:org.osgi.service.wireadmin</bundleDef>
<bundleDef>org.osgi:org.osgi.service.provisioning</bundleDef>
<bundleDef>org.osgi:org.osgi.service.useradmin</bundleDef>
<bundleDef>org.osgi:org.osgi.service.metatype</bundleDef>
<bundleDef>org.osgi:org.osgi.service.permissionadmin</bundleDef>
<bundleDef>org.osgi:org.osgi.service.cm:${osgi.service.cm.version}</bundleDef>
<bundleDef>org.osgi:org.osgi.service.coordinator:${osgi.service.coordinator.version}</bundleDef>
<bundleDef>org.apache.felix:org.apache.felix.scr:${felix.scr.version}</bundleDef>
<bundleDef>org.eclipse.platform:org.eclipse.osgi:${version.equinox.platform.osgi}</bundleDef>
<bundleDef>org.osgi:org.osgi.service.component:${osgi.service.component.version}</bundleDef>
<bundleDef>org.osgi:org.osgi.util.promise:${osgi.util.promise.version}</bundleDef>
<bundleDef>org.osgi:org.osgi.util.function:${osgi.util.function.version}</bundleDef>
<bundleDef>org.osgi:org.osgi.service.upnp:${osgi.service.upnp.version}</bundleDef>
<bundleDef>org.osgi:org.osgi.service.device:${osgi.service.device.version}</bundleDef>
<bundleDef>org.osgi:org.osgi.service.event:${osgi.service.event.version}</bundleDef>
<bundleDef>org.osgi:org.osgi.service.wireadmin:${osgi.service.wireadmin.version}</bundleDef>
<bundleDef>org.osgi:org.osgi.service.provisioning:${osgi.service.provisioning.version}</bundleDef>
<bundleDef>org.osgi:org.osgi.service.useradmin:${osgi.service.useradmin.version}</bundleDef>
<bundleDef>org.osgi:org.osgi.service.metatype:${osgi.service.metatype.version}</bundleDef>
<bundleDef>org.osgi:org.osgi.service.permissionadmin:${osgi.service.permissionadmin.version}</bundleDef>
🤖 Prompt for AI Agents
In features/org.wso2.micro.integrator.server.feature/pom.xml around lines 350 to
365, there's a duplicate bundleDef for org.osgi:org.osgi.service.cm and several
bundleDef entries omit explicit versions while nearby entries use property-based
versions; remove the duplicate org.osgi:org.osgi.service.cm entry (the later
one) and make all bundleDef lines consistent by adding the appropriate version
properties (or the same version strings) used elsewhere (e.g., use the existing
${osgi.*.version} properties) so every bundleDef either consistently references
a version property or intentionally relies on dependencyManagement.

<jersey-client.version>1.8</jersey-client.version>
<awaitility.version>3.1.2</awaitility.version>
<jacoco.agent.version>0.8.8</jacoco.agent.version>
<jacoco.agent.version>0.8.12</jacoco.agent.version>
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor

🧩 Analysis chain

🌐 Web query:

JaCoCo 0.8.12 Java 21 support compatibility

💡 Result:

Short answer: JaCoCo 0.8.12 is nominally compatible with Java 21 (official Java‑21 support was added in 0.8.11 and 0.8.12 continues that support), but there have been user‑reported issues (analysis exceptions and some JVM crashes) when running with certain JDK21 builds. [1][2][3][4]

References:

  • JaCoCo changelog / releases: official Java 21 support added in 0.8.11; 0.8.12 release notes. [1][2]
  • GitHub issue reporting JVM SIGSEGV with JDK 21 + JaCoCo 0.8.12. [3]
  • JaCoCo user group reports of "unsupported class file major version" / analysis errors with JDK21 and 0.8.12. [4]

If you plan to run JaCoCo with Java 21: use 0.8.11+ (0.8.12), but test on your exact JDK build and watch for the linked issues; if you hit problems, try different JDK21 builds or follow the GitHub thread for workarounds/fixes.


🏁 Script executed:

# Check the pom.xml file to verify the context and previous version
cat integration/pom.xml | grep -A 5 -B 5 "jacoco.agent.version"

Repository: wso2/product-micro-integrator

Length of output: 202


JaCoCo 0.8.12 supports Java 21 bytecode instrumentation but requires testing on your specific JDK build.

The version bump to 0.8.12 aligns with the JDK21 compilation support objective. Official Java 21 support was added in version 0.8.11 and is continued in 0.8.12. However, there are user-reported issues including analysis exceptions and JVM crashes (SIGSEGV) with certain JDK21 builds. Verify compatibility by testing this version against your exact JDK21 distribution and monitor for known issues before full deployment.

🤖 Prompt for AI Agents
In integration/pom.xml around line 829 the jacoco.agent.version property was
bumped to 0.8.12; validate this change by running the full test suite (unit,
integration, and any instrumentation tests) on the exact JDK21 distribution(s)
you will use in CI/prod to check for analysis exceptions or JVM crashes, add a
JDK21 CI job that exercises JaCoCo instrumentation, and if failures appear
either pin to the last-known-good version (e.g., 0.8.11) behind a Maven profile
or add a conditional profile/fallback and document the required JDK build(s) for
safe deployment.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant