This release is a major architectural milestone that moves beyond the limitations of the traditional Jakarta Servlet ecosystem, introducing the aspectran-with-netty module for high-performance non-blocking networking combined with Java 21 Virtual Threads, and comprehensively refactoring the web module architecture into aspectran-web and aspectran-web-servlet.
Aspectran 9.7.0 delivers a servlet-less microservice and high-performance REST API runtime powered by Netty 4.2, True Multi-Context isolation on a single port, zero-dependency native multipart parsing (NettyMultipartFormDataParser), kernel-level zero-copy static resource serving (NettyResourceHandler), and native WebSocket (JSR-356) support. In addition, this release features a streamlined aspectran-web module free of third-party servlet dependencies alongside a dedicated aspectran-web-servlet module, declarative @Multipart annotations with Jakarta Servlet 3.0+ standard multipart support, an expanded FileParameter API, RFC 6265 Cookie builder utilities, modernized lifecycle management based on LifeCycle.State, ordered context lifecycle and graceful shutdown improvements for Undertow and Netty, and a wide array of enhancements in performance, security, and developer productivity.
🚀 New Features
- Servlet-less High-Performance Microservice Runtime Module (
aspectran-with-netty)- Introduced the
aspectran-with-nettymodule, providing an embedded web and WebSocket server engine powered by Netty 4.2 and modernMultiThreadIoEventLoopGroup. - Implemented a ‘Post-Reactive’ architecture: Netty’s non-blocking I/O event loops directly accept and process incoming client network sockets without heavyweight servlet containers, dispatching request execution to Java 21 Virtual Threads so that OS carrier threads are instantly yielded during blocking I/O operations.
- True Multi-Context Support: Hosts multiple independent application contexts (e.g.,
/,/admin,/api) on a single server port (e.g., 8080) with completely isolated dependency injection containers (ActivityContext), session managers (NettySessionManager), static resource handlers, and WebSocket endpoints viaNettyContextRouter. - Native Multipart Form Data Parser (
NettyMultipartFormDataParser): Completely eliminated legacycommons-fileuploaddependencies, leveraging Netty’sHttpPostRequestDecoderand direct memory buffers (ByteBuf) to handle large file uploads with high throughput and low memory footprint. Added overloaded string-based data size setters (setMaxHeaderSize,setMaxRequestSize,setMaxFileSize, etc.). - High-Performance Static Resource Handler (
NettyResourceHandler): Delivers OS kernel-level zero-copy file transfer (FileRegion), chunked transfers,If-Modified-SinceHTTP cache validation, automatic directory index resolution, and APON pattern-based protected directory access rules. - Native WebSocket (JSR-356) Support: Implemented
NettyWebSocketServerContainerInitializerandNettyWebSocketSessionto run standard WebSocket endpoints directly on Netty without a servlet container, including WebSocket session binding, session attribute isolation, and graceful connection closure mechanisms. - Server Metrics and Concurrency Tracking: Integrated
TrackingExecutorfor real-time monitoring of thread pools, event loop groups, active requests, and cumulative total requests, along withgetPeakRequests()to track peak concurrent requests.
- Introduced the
- Comprehensive Web Module Architecture Refactoring (
aspectran-web/aspectran-web-servlet)- Refactored
aspectran-webinto a pure, lightweight web abstraction layer completely free of Jakarta Servlet API and external dependencies (commons-fileupload,commons-io). - Separated
aspectran-web-servletas a dedicated module for traditional WAS deployments, JSP view rendering, servlet filter/listener integration, servlet-based multipart parsers, and custom JSP tag libraries. - Guaranteed seamless interoperability across servlet-based runtimes (
aspectran-with-undertow,aspectran-with-jetty,aspectran-web-servlet) and the servlet-less Netty runtime (aspectran-with-netty), allowing the exact same Translet rules (XML, APON, Java Config) and business logic to run without code changes.
- Refactored
- Declarative
@MultipartAnnotation and Standard Servlet Multipart Parser- Introduced the
@Multipartannotation for action methods and classes to declaratively configure multipart request processing. - Added automatic detection and parsing of multipart requests when
FileParameterorFileParameterMapmethod arguments are present in action methods (AnnotatedMethodInvoker). - Extended multipart form data parsing support to POST, PUT, and PATCH HTTP methods.
- Enhanced
WebRequestBodyParserwith flexible parser bean resolution (explicit bean name, aspect setting, default bean, or unique type-based bean). - Added context-startup validation for configured multipart parser beans, reporting missing references clearly via
RuleParsingContextandBeanReferenceInspector. - Introduced
StandardServletMultipartFormDataParserand its factory bean (StandardServletMultipartFormDataParserFactoryBean), utilizing the standard Jakarta Servlet 3.0+jakarta.servlet.http.PartAPI. - Added support for standard servlet
MultipartConfigconfigurations onJettyServlet,JettyWebAppContext, andTowServlet.
- Introduced the
- Enhanced
FileParameterAPI and Automatic Parameter Binding- Added
getSavedPath(),isSaved(),saveAs(File), andmoveTo(File)methods to theFileParameterinterface to provide intuitive, standardized file storage and manipulation capabilities. - Added support for
FileParametermethod argument binding inAnnotatedMethodInvoker, allowing uploaded files to be injected directly into controller action methods.
- Added
- RFC 6265 Standard
CookieBuilder and Utility Enhancements- Implemented a fluent
Cookie.builder()API andtoHeaderValue()adhering to RFC 6265 standards (supportingSameSite,HttpOnly,Secure,Partitionedattributes). - Added overloaded helper methods
WebUtils.setCookie()andWebUtils.removeCookie()acceptingTransletandResponseAdapterfor convenient cookie manipulation.
- Implemented a fluent
- Unified Session Manager Provider and Interactive Shell Session Management Application
- Introduced the
SessionManagerProviderinterface in the core component to unify session manager retrieval across diverse server implementations (Netty, Undertow, etc.). - Added
SessionListenerRegistrationBeanfor declarative registration of web application session lifecycle listeners. - Added
getRemainingInactiveInterval()toSessionandManagedSessionto calculate the remaining time before session expiration. - Added an interactive session management sample application in Aspectran Shell for testing login, logout, and session inspection commands.
- Introduced the
🚀 Improvements
- Unified Reverse Proxy Header Handling and Proxy Address Forwarding Refactoring
- Consolidated
proxyAddressForwardingconfiguration inWebConfigandaspectran-config.apon, ensuringX-Forwarded-*headers (scheme,host,port,remoteAddr) are honored only when explicitly enabled. - Propagated
proxyAddressForwardingsettings fromWebServicetoServletWebActivityandTowActivity. - Conditioned
reverseContextPathparsing onisProxyAddressForwarding()inDefaultServletWebService,DefaultTowService, andDefaultNettyService. - Clarified ambiguous method names in
WebUtilsby renamingparseRemoteAddr()toparseForwardedFor()andgetRemoteAddr(String, String)toresolveRemoteAddr(). - Added
UriUtils.makeAbsoluteUrl()overloaded helper methods, simplified redirect URL construction inResponseAdapterimplementations, and removed legacyproxyProtocolAwareconfigurations andSendRedirectBasedOnXForwardedProtocol.
- Consolidated
- Modernized
LifeCycleInterface withLifeCycle.StateandReentrantLock- Replaced legacy string-based lifecycle states with the type-safe
LifeCycle.Stateenum (STOPPED,STARTING,STARTED,STOPPING,FAILED). - Modernized
AbstractLifeCycleusingReentrantLock,AutoCloseable, and functional listener notification patterns to enhance thread safety and concurrency control. - Updated CLI and daemon control commands (
NettyCommand,TowCommand,JettyCommand) across Netty, Undertow, and Jetty to utilize the newLifeCycle.Stateenum.
- Replaced legacy string-based lifecycle states with the type-safe
- Ordered Context Lifecycle and Graceful Shutdown for Undertow and Netty
- Added the
orderproperty andisRootContext()method toTowServletContextandNettyContext. - Guaranteed that the root context (
order=0) starts first, with remaining contexts starting in ascending order oforder. - Enforced safe shutdown order in reverse startup sequence (LIFO), stopping child contexts before the root context.
- Reordered and documented Netty graceful shutdown steps to drain in-flight requests cleanly before stopping contexts.
- Added the
- Refined Temporary Resident Session (
isTempResident) and Promotion Logic- Fixed
ManagedSessionlogic to ensure temporary resident sessions are properly promoted to resident sessions whenmaxInactiveIntervalis explicitly configured. - Clarified
isTempResidentJavadoc inSessionand improvedSessionDatahandling ofextraInactiveIntervaland expiration time updates. - Consolidated
ManagedSessionManagerTestandSessionManagerTestintoDefaultSessionManagerTestfor unified test coverage.
- Fixed
- Netty Resource Leak Prevention and Windows File Lock Mitigation
- Enforced strict reference counting (
release()) across Netty channel handlers to eliminate direct memory (ByteBuf) leaks. - Ensured safe release of
EmbeddedChanneland resource handler channels in test suites to prevent file locking issues on Windows platforms.
- Enforced strict reference counting (
- Extended DI Container and Bean Rule Registry Inspection
- Extended
containsBeanRuleto verify dynamically configurable bean rules inconfigurableBeanRuleMap. - Enabled
CoreServiceHolderto register and manage multiple service instances mapped to the same service class. - Ensured proper subservice withdrawal from
CoreServiceHolderduringNettyContextteardown.
- Extended
- Improved Web Request Adapter Hierarchy
- Refactored
WebRequestAdapterclass hierarchy and standardized constructor-basedcontextPathinjection. - Unified web application attributes across services and refined Thymeleaf integration.
- Refactored
🐛 Bug Fixes
- Fixed
NullPointerExceptionduring Undertow Shutdown- Added defensive guards for undeployed states and removed redundant deployment list iterations in
ServletRequestHandlerFactory, resolving NPE errors during Undertow server shutdown.
- Added defensive guards for undeployed states and removed redundant deployment list iterations in
- Ensured Null-Safety in
TowSessionAdapter.getSession()- Added null checks when retrieving sessions in
TowSessionAdapterto prevent potentialNullPointerExceptionoccurrences.
- Added null checks when retrieving sessions in
- Fixed Original Activity Detection in
AbstractActivity- Corrected conditional logic for detecting the initial root activity (original activity) in nested activity execution chains.
- Prevented
IOExceptionon Unauthorized WebSocket Closure and Handled Empty Close Frames- Fixed an issue where
IOExceptionwas improperly thrown inAbstractEndpointwhen closing unauthorized WebSocket sessions. - Safely handled empty close frames with missing status codes in Netty WebSocket handlers by defaulting to standard close codes.
- Guarded against exposing WebSocket endpoints when WebSocket support is not explicitly configured.
- Fixed an issue where
- Improved Broken Bean Reference Diagnostics
- Enhanced error reporting to clearly indicate missing bean names and expected types in
BeanReferenceExceptionand startup logs.
- Enhanced error reporting to clearly indicate missing bean names and expected types in
🛠️ Dependency Upgrades
- Networking & Web Servers
- Netty: 4.2.18.Final (Newly introduced)
- Jetty: 12.1.12 → 12.1.13
- Core Utilities & Terminal
- JLine: 4.3.1 → 4.4.3
- FreeMarker: 2.3.34 → 2.3.35
- Logging & Databases
- SLF4J: 2.0.18 → 2.0.19
- H2 Database: 2.4.240 → 2.5.250
- Hibernate ORM: 7.4.5.Final → 7.4.7.Final
- Build & Plugins
- Maven Compiler Plugin: 3.15.0 → 3.16.0
- Maven Bundle Plugin: 6.1.0 → 6.1.2
- Maven Surefire Plugin: 3.5.6 → 3.2.0
- Central Publishing Maven Plugin: 0.11.0
Juho Jeong NEWS
Release