Skip to content

HTTP implementation based on Whiteboard Specification for Jakarta#396

Draft
kenwenzel wants to merge 1 commit into
eclipse-rap:mainfrom
kenwenzel:jakarta-whiteboard
Draft

HTTP implementation based on Whiteboard Specification for Jakarta#396
kenwenzel wants to merge 1 commit into
eclipse-rap:mainfrom
kenwenzel:jakarta-whiteboard

Conversation

@kenwenzel

Copy link
Copy Markdown

Uses OSGi Whiteboard Specification for Jakarta instead of a modified HttpService for Jakarta.
This should allow to remove RAP's HTTP bundles and replace them with "standard" OSGi implementations.

Fixes #394

@kenwenzel

kenwenzel commented Jul 15, 2026

Copy link
Copy Markdown
Author

@ifurnadjiev I've created the first changes for Jakarta Whiteboard. I could not test it as my target platform is not fully functional.

Next steps are:

@eclipse-rap-bot

Copy link
Copy Markdown

Can one of the admins verify this patch?

@kenwenzel

Copy link
Copy Markdown
Author

PR #396 Review: HTTP Implementation based on Whiteboard Specification for Jakarta

Summary

This PR modernizes RAP's HTTP servlet registration by migrating from RAP's custom HttpService implementation to the standard OSGi Whiteboard Specification for Jakarta Servlet. This is a significant architectural improvement that enables:

  • Removal or reduction of RAP's custom HTTP bundles
  • Use of standard OSGi implementations (e.g., Apache Felix HTTP)
  • Alignment with current OSGi standards

Fixes: #394


✓ Strengths

  1. Systematic, comprehensive refactoring — All affected files are consistently updated
  2. Proper lifecycle management — Service registrations are stored in maps for proper cleanup during unregistration
  3. Removes obsolete codeHttpContextWrapper.java is deleted rather than left as dead code
  4. Test infrastructure updated — Test bundle (org.eclipse.rap.rwt.jstest) is modernized with Whiteboard pattern
  5. Clear intent — The change directly addresses issue Use Whiteboard Specification for Jakarta Servlet #394 and aligns with OSGi standards

⚠ Concerns & Blockers

1. Draft Status & CI/Test Results

  • Issue: PR is marked as draft; no CI/test results are visible
  • Impact: Unknown if code compiles or existing tests pass
  • Action: Mark as ready for review once you've validated locally. Ensure all tests pass before merge.

2. Breaking API Change

  • Issue: ApplicationLauncher.launch() signature changed — HttpContext parameter removed
  • Impact: Any external code calling this method will break
  • Action: If this is public API, consider a deprecation path or document the breaking change

3. HttpContext Removal May Impact Custom Implementations

  • Issue: HttpContext is completely removed; users with custom implementations will have no migration path
  • Action: Document how to achieve equivalent behavior with Whiteboard pattern (e.g., via ServletContextHelper)

4. Limited Documentation in Code

  • Issue: Whiteboard registration logic in ApplicationReferenceImpl.java lacks JavaDoc
  • Action: Add JavaDoc explaining the pattern and why registrations are stored for cleanup

🔍 Code Quality Observations

1. Boilerplate for Whiteboard Properties

Multiple places repeat the Dictionary/Hashtable pattern. Consider extracting a helper method.

2. Silent Error Handling

catch(IllegalStateException alreadyUnregistered) {
  // Registrierung wurde bereits abgemeldet - ignorieren.
}

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.

Use Whiteboard Specification for Jakarta Servlet

2 participants