Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is Seam3 and Weld CDI the same thing?

Maybe this seems like a foolish question but I am really confused. Is Seam 3 and Weld CDI the same things? I am reading some posts which refers to "CDI (Weld) / Seam 3", should I consider them as the same thing?

like image 283
Yashar Avatar asked Mar 25 '23 01:03

Yashar


1 Answers

Seam 3 heavily relies on CDI (JSR-299). Weld is the reference implementation of CDI. Seam on the other hand is a full framework for developing web applications, with plenty of functionality (see list of modules in the link).

Typically, the CDI implementation is provided by a Java EE application server (JBoss/Wildfly, for example, ships with Weld). However, any full implementation of CDI should be suitable for being used with Seam. See this image:

enter image description here

So the answer to your question is no, but Weld (or any CDI implementation) is extensively used by Seam. This is probably why you often see posts refering to "CDI (Weld) / Seam".

Note that implementation of Seam 3 has halted, possibly because of how Java EE has improved during the years.

This is the information about Weld from the Seam project page:

Weld is the reference implementation (RI) for JSR-299: Java Contexts and Dependency Injection for the Java EE platform (CDI). CDI is the Java standard for dependency injection and contextual lifecycle management

Also on the page there is this information:

  • CDI is a JCP specification included in Java EE
  • Weld is the reference implementation of CDI
  • Seam 3 is a set of modules which extend CDI to provide functionality beyond that offered by Java EE 6

And finally, this should make it clear to you:

However, Seam 3 is a superset of JSR-299. Think of JSR-299 as the core of Seam 3 - it's the basic programming model for your application components, and for the built-in components that make up the Seam framework. Weld is our implementation of this programming model.

like image 135
Magnilex Avatar answered Apr 01 '23 16:04

Magnilex