Java Reference
In-Depth Information
enhance our example using ConversationScoped beans, which are a peculi-
ar scope of CDI Beans. Providing a detailed explanation example of all named
beans' scopes is beyond the scope of this topic. However, you can quench your
thirst for knowledge by having a look at JBoss CDI implementation docs at ht-
tp://docs.jboss.org/weld/reference/latest/en-US/html/scopescontexts.html .
JBoss AS CDI implementation
Weld is the JBoss CDI implementation and is actually being developed as part of the
Seam project ( http://www.seamframework.org/ ). Weld provides a complete CDI im-
plementation, which can be safely run on a Java EE 6 container such as JBoss AS
or Oracle WebLogic.
Therefore, in order to run CDI-based applications on JBoss AS 7, you don't need to
download any extra libraries as Weld is part of the JBoss AS 7 modules and it is in-
cluded in all server configurations, as stated by the following extension:
<extension module="org.jboss.as.weld"/>
Having your module installed, however, does not mean that you can blindly use it in
your applications. The general rule is that on JBoss AS 7, every application module
is isolated from other modules; this means, by default, it does not have visibility on
the AS modules, nor do the AS modules have visibility on the application.
To be accurate we should state that all JBoss AS 7 modules fall into the following
three categories:
Modules which are implicitly added to your applications : This cat-
egory includes the most common API such as javax.activation ,
javax.annotation , javax.jms , javax.security ,
javax.transaction , javax.jms , and javax.xml . Using these mod-
ules does not require any extra effort as JBoss AS 7 will add them for you
if you are referencing them in your application.
Modules which are added on condition : This category includes
javax.ejb , org.jboss.resteasy , javax.persistence and
org.hibernate , org.jboss.as.web , and finally
org.jboss.as.weld . All these modules will be added on the condition
Search WWH ::




Custom Search