|
Vauban is at |
Vauban implements the CDI 4.1 Lite profile. Migrating therefore implies dropping Full-profile features when used (runtime portable extensions, @ConversationScoped, passivation, application-level EL).
From Quarkus ArC
ArC shares Vauban’s build-time philosophy. The port is conceptually direct; gaps are mostly tooling.
| ArC | Vauban | Note |
|---|---|---|
Full build-time CDI |
Full build-time CDI |
Identical model. No paradigm shift on the application side. |
Bytecode generation via Gizmo |
Bytecode generation via Class-File API (JEP 484) |
No ASM. Output is compatible with any JVM 25+. |
|
No direct equivalent |
Vauban currently only removes unreferenced beans. // TODO@user: confirm whether a similar annotation is planned. |
|
No equivalent |
Build-time profiling is the responsibility of the Vidocq Runtime layer. |
Quarkus Dev Mode |
|
Vauban has no dedicated Dev Mode. |
|
|
Standard CDI pattern. |
From Weld
Weld implements the Full profile; some features used by historical applications have no Lite equivalent.
Key differences:
-
No runtime
AnnotatedTypelookup — Vauban resolves everything at compile time. Code that callsBeanManager.createAnnotatedType(Class)must be rewritten as a Build Compatible Extension. -
No runtime
BeforeBeanDiscovery/AfterBeanDiscovery— replaced by the BCE phases@Discovery/@Enhancement/@Registration/@Synthesis/@Validation. -
No portable extensions — the
Extensioninterface is not loaded viaServiceLoaderat runtime. Migrate every extension to a compile-time BCE. -
No
@ConversationScoped— refactor to@SessionScoped(// TODO@user: confirm support) or to an explicit application mechanism.
Exhaustive Weld → Vauban table of supported / unsupported features. // TODO@user
From OpenWebBeans
OpenWebBeans is very close to Weld in API. The Weld table mostly applies. OWB-specific traits (deferred bean resolution, custom BeanArchive) are not supported: Vauban has a single, static discovery mode.
CDI 4.1 Lite pitfalls
Lite-profile specifics worth knowing before migrating:
-
@Decorator— supported in Lite, validate against your code. // TODO@user: confirm exact coverage. -
@Specializes— not supported. Refactor as composition or a prioritised@Alternative. -
@Alternative+@Priority— supported; check existing priorities. -
Producer methods with
@Disposes— supported. -
@Injectfield on a normal scope — correctly resolves the client proxy (see fix VAU-INJ-001 in BUG.md). -
InjectionPointmetadata — supported.
Recommended strategy
-
Run the existing code on Vauban in a dedicated branch.
-
Run
vauban:analyzeto detect split packages and missing JPMS exports. -
Execute a
vauban-test-suiteadapted to your domain. -
Activate the CDI 4.1 Lite TCK on the application itself via
vauban-junit. -
Iterate on BCEs to replace portable extensions.
-
Run on GraalVM
native-imageto confirm no residual reflection.