Перейти к основному содержанию

ActiveJ 5.0 - New major release

· 2 мин. чтения

ActiveJ v5.0 was released Oct 29, 2021 (see on Maven). This release includes major changes in ActiveJ Inject, ActiveJ Codegen, ActiveJ Serializer promises API. The release also introduced improved type scanning facility and overall minor improvements in other components.

  • ActiveJ Inject
    • Refactored and simplified inner components to speed up dependency injection and provide better support for binding specialization
    • Simplified type resolution in dependency injection
    • Added the ability to transform imported and exported bindings using patterns (see example)
    • Replaced @Optional annotation with an explicit OptionalDependency class
  • ActiveJ Codegen
    • Improved ClassBuilder and DefiningClassLoader classes
    • Class generation may now be 100% lazy
    • Added in-memory ClassBuilder caches
    • Added the ability to use BytecodeStorage as a persistent cache for generated bytecode
    • Added the ability to call super methods as well as protected methods
    • Improved built-in expressions for array/collection/map iteration
  • ActiveJ Serializer
    • Added the ability to specify serializer annotations directly on type use (see example)
    • Automatic class member ordering is now supported within the same JVM
    • Added support for serializer annotation aliases
    • Improved array serialization as well as serialization of booleans
    • Refactored class hierarchy of collection serializers.
    • Abstract collection serializers now support builder pattern
  • Promise
    • Greatly improved exception handling
    • Renamed promise chaining methods thenEx and mapEx to then and map
    • Added new conditional chaining methods as well as dedicated null-handling chaining methods
    • All the changing methods now take "throwing" functions. If a checked exception is thrown in a chaining function, the whole promise is completed exceptionally
  • Miscellaneous improvements
    • Removed codec module. Components that require JSON marshalling now internally use the DSL-JSON library
    • Added new types module which contains various reflection and type utilities, including advanced type scanner
    • Common module has been massively refactored to make common functions and components more consistent
    • Restructured asynchronous exceptions
    • Unchecked exception handling can now be precisely configured using a thread-scoped or global FatalErrorHandler facility
    • Made ActiveJ compatible with Java 17
    • Added various DiscoveryService interfaces for node discovery within server cluster (RPC, FS)
    • Removed AsyncServletDecorator facility
    • Removed StreamCodecRegistry facility
    • Multiple small improvements and fixes