Skip to content

Conversation

@rashmiangadi11
Copy link
Collaborator

@rashmiangadi11 rashmiangadi11 commented Oct 13, 2025

This way @ServiceName(value = "", type = ApplicationService.class) of declaring things is the appropriate way. @ServiceName() doesn’t make any sense. We use the same approach for all our built-in handlers in CAP Java itself, e.g. see all handlers here: https://github.wdf.sap.corp/cds-java/cds-services/tree/main/cds-services-impl/src/main/java/com/sap/cds/services/impl/cds

This way just means that you register on all services that are served as APIs by the application. There are many many other types of services in CAP (not only Messaging, but many more), which a plain @ServiceName(*) would all register to. This doesn’t make sense for an action handler.

This approach is also the right way completely independent if an application uses Messaging or not.

Describe your changes

Any documentation

Type of change

Please delete options that are not relevant.

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

Checklist before requesting a review

  • I follow Java Development Guidelines for SAP
  • I have tested the functionality on my cloud environment.
  • I have provided sufficient automated/ unit tests for the code.
  • I have increased or maintained the test coverage.
  • I have ran integration tests on my cloud environment.
  • I have validated blackduck portal for any vulnerability after my commit.

Upload Screenshots/lists of the scenarios tested

  • I have Uploaded Screenshots or added lists of the scenarios tested in description

Ran all the integration tests
Screenshot 2025-10-14 at 1 46 06 PM

This way  @ServiceName(value = "*", type = ApplicationService.class) of declaring things is the appropriate way. @ServiceName(*) doesn’t make any sense.
We use the same approach for all our built-in handlers in CAP Java itself, e.g. see all handlers here:
https://github.wdf.sap.corp/cds-java/cds-services/tree/main/cds-services-impl/src/main/java/com/sap/cds/services/impl/cds

This way just means that you register on all services that are served as APIs by the application.
There are many many other types of services in CAP (not only Messaging, but many more), which a plain @ServiceName(*) would all register to. This doesn’t make sense for an action handler.

This approach is also the right way completely independent if an application uses Messaging or not.
@yashmeet29
Copy link
Collaborator

@rashmiangadi11, please attach the Screenshots of Integration Test

@rashmiangadi11 rashmiangadi11 merged commit 35f48ee into develop Nov 12, 2025
9 checks passed
@rashmiangadi11 rashmiangadi11 deleted the custonActionError branch November 12, 2025 08:21
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.

4 participants