Return-Path: X-Original-To: apmail-deltaspike-commits-archive@www.apache.org Delivered-To: apmail-deltaspike-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 49BE1104D4 for ; Fri, 26 Dec 2014 12:53:16 +0000 (UTC) Received: (qmail 66284 invoked by uid 500); 26 Dec 2014 12:53:16 -0000 Delivered-To: apmail-deltaspike-commits-archive@deltaspike.apache.org Received: (qmail 66252 invoked by uid 500); 26 Dec 2014 12:53:16 -0000 Mailing-List: contact commits-help@deltaspike.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@deltaspike.apache.org Delivered-To: mailing list commits@deltaspike.apache.org Received: (qmail 66241 invoked by uid 99); 26 Dec 2014 12:53:16 -0000 Received: from eris.apache.org (HELO hades.apache.org) (140.211.11.105) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 26 Dec 2014 12:53:16 +0000 Received: from hades.apache.org (localhost [127.0.0.1]) by hades.apache.org (ASF Mail Server at hades.apache.org) with ESMTP id 39C69AC0907; Fri, 26 Dec 2014 12:53:16 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r1647970 - in /deltaspike/site/trunk/content/documentation: configure.html container-control.html core.html jsf.html Date: Fri, 26 Dec 2014 12:53:16 -0000 To: commits@deltaspike.apache.org From: rafabene@apache.org X-Mailer: svnmailer-1.0.9 Message-Id: <20141226125316.39C69AC0907@hades.apache.org> Author: rafabene Date: Fri Dec 26 12:53:15 2014 New Revision: 1647970 URL: http://svn.apache.org/r1647970 Log: Site checkin for project Apache DeltaSpike - Documentation Modified: deltaspike/site/trunk/content/documentation/configure.html deltaspike/site/trunk/content/documentation/container-control.html deltaspike/site/trunk/content/documentation/core.html deltaspike/site/trunk/content/documentation/jsf.html Modified: deltaspike/site/trunk/content/documentation/configure.html URL: http://svn.apache.org/viewvc/deltaspike/site/trunk/content/documentation/configure.html?rev=1647970&r1=1647969&r2=1647970&view=diff ============================================================================== --- deltaspike/site/trunk/content/documentation/configure.html (original) +++ deltaspike/site/trunk/content/documentation/configure.html Fri Dec 26 12:53:15 2014 @@ -215,7 +215,7 @@ You can also opt to use the lastest Delt
<properties>
-    <deltaspike.version>1.2.0</deltaspike.version>
+    <deltaspike.version>1.2.1</deltaspike.version>
 </properties>
Modified: deltaspike/site/trunk/content/documentation/container-control.html URL: http://svn.apache.org/viewvc/deltaspike/site/trunk/content/documentation/container-control.html?rev=1647970&r1=1647969&r2=1647970&view=diff ============================================================================== --- deltaspike/site/trunk/content/documentation/container-control.html (original) +++ deltaspike/site/trunk/content/documentation/container-control.html Fri Dec 26 12:53:15 2014 @@ -180,7 +180,8 @@ body {
  • Use the Module Features
    • CdiContainer
    • -
    • ContextControl Usage +
    • ContextControl Usage
    • +
    • Procedure for builing Uber jar
      • Restart the RequestContext in Unit Tests
      • Attach a RequestContext to a New Thread in EE
      • @@ -250,6 +251,34 @@ body {

        The ContextControl interface provides life-cycle control of the CDI container built-in contexts. This includes starting and stoping built-in standard contexts like @RequestScoped, @ConversationScoped, and @SessionScoped. It is provided as an @Dependent bean and can be injected in the classic CDI way. This feature can be used and is helpful in all Java environments, including Java SE, as illustrated here.

        + +
        +

        Procedure for builing Uber jar

        +
        +

        Uber jar or executable jar can created by using the maven shade plugin. Some things you needs to be aware of when you use it.

        +
        +
        +
          +
        • +

          Multiple beans.xml and javax.enterprise.inject.spi.Extension files needs to be merged into the final jar using a transformer.

          +
        • +
        +
        +
        +
        +
        <transformer implementation="org.apache.maven.plugins.shade.resource.ServicesResourceTransformer"/>
        +
        +
        +
        +
          +
        • +

          The asm:asm:3.3.1 transitive dependency of OpenWebBeans isn’t properly included in the Uber jar. Add it as a project dependency if you use OWB. (Only needed for OWB 1.1.8 !)

          +
        • +
        • +

          Some frameworks, like logging frameworks, aren’t CDI compatible. So you need to exclude them from scanning. Use for example the scan feature of Weld to define which packages needs to be excluded.

          +
        • +
        +

        Restart the RequestContext in Unit Tests

        Modified: deltaspike/site/trunk/content/documentation/core.html URL: http://svn.apache.org/viewvc/deltaspike/site/trunk/content/documentation/core.html?rev=1647970&r1=1647969&r2=1647970&view=diff ============================================================================== --- deltaspike/site/trunk/content/documentation/core.html (original) +++ deltaspike/site/trunk/content/documentation/core.html Fri Dec 26 12:53:15 2014 @@ -441,7 +441,7 @@ by CDI even if they are in a CDI enabled
        -
        Excluding a Bean if the pProjectStageis Different from Development
        +
        Excluding a Bean if the ProjectStage is different from Development
        @Exclude(exceptIfProjectStage = ProjectStage.Development.class)
         public class MyDevBean
        @@ -490,8 +490,7 @@ expressions.

        -

        In several cases it is also useful to combine this feature with the -@Alternative annotation provided by CDI.

        +

        In several cases it is also useful to combine this feature with the @Alternative annotation provided by CDI.

        In addition to the following snippet, it is required to configure the @@ -499,11 +498,8 @@ implementation as alternative in the bea will not be changed, for example for different environments, because it just gets active if it is not excluded during the bootstrapping process.

        -
        -
        Excluding an Alternative Implementation if the pProjectStageis
        -

        Different from Development

        -
        +
        Excluding an Alternative implementation if the ProjectStage is different from Development
        @Exclude(exceptIfProjectStage = ProjectStage.Development.class)
         @Alternative
        
        Modified: deltaspike/site/trunk/content/documentation/jsf.html
        URL: http://svn.apache.org/viewvc/deltaspike/site/trunk/content/documentation/jsf.html?rev=1647970&r1=1647969&r2=1647970&view=diff
        ==============================================================================
        --- deltaspike/site/trunk/content/documentation/jsf.html (original)
        +++ deltaspike/site/trunk/content/documentation/jsf.html Fri Dec 26 12:53:15 2014
        @@ -234,7 +234,6 @@ body {
         
      • Referencing Views via @ViewRef
      • Using the (Optional) ViewNavigationHandler
      • Configuring a Default Error-View
      • -
      • Using @Matches
      • Using ViewConfigResolver
    • @@ -268,7 +267,7 @@ body {
    • Sub-Conversation-Groups
  • -
  • Injection in JSF Artifacts (TODO) +
  • Injection in JSF Artifacts
    • Converter and Validator
    • PhaseListener
    • @@ -276,8 +275,8 @@ body {
    • Event broadcasting
    • @@ -1763,12 +1762,6 @@ transformed to a standard (implicit) JSF
      -
      Using @Matches
      -
      -

      This annotation is currently not integrated. [TODO]

      -
      -
      -
      Using ViewConfigResolver

      If you would like to query view-meta-data yourself (for whatever @@ -2465,25 +2458,105 @@ be closed as soon as you close the Impli

      -

      Injection in JSF Artifacts (TODO)

      +

      Injection in JSF Artifacts

      Converter and Validator

      - +
      +

      Per default the JSF module of DeltaSpike handles JSF converters and validators as std. CDI beans and +therefore it’s possible to use injection, lifecycle-callbacks, scope-annotations,…​ +the same way as with any other CDI bean. +The usage is the same as for PhaseListener s.

      +

      PhaseListener

      +
      +

      Once a std. JSF-PhaseListener is annotated with @org.apache.deltaspike.jsf.api.listener.phase.JsfPhaseListener, +that PhaseListener gets active without additional config in faces-config.xml. +Since such PhaseListener s are std. CDI beans, +it’s possible to use injection, lifecycle-callbacks as well as scope-annotations +the same way as with any other CDI bean. +Furthermore, it’s possible to order PhaseListener s via ordinal. +DeltaSpike itself uses it internally e.g. in case of DoubleSubmitAwarePhaseListener which looks like:

      +
      +
      +
      Example
      +
      +
      @JsfPhaseListener(ordinal = 9000)
      +public class DoubleSubmitAwarePhaseListener implements PhaseListener, Deactivatable
      +{
      +    @Inject
      +    private PostRequestTokenManager postRequestTokenManager;
       
      +    @Override
      +    public void beforePhase(PhaseEvent event)
      +    {
      +        //...
      +    }
      +
      +    @Override
      +    public void afterPhase(PhaseEvent event)
      +    {
      +        //...
      +    }
      +
      +    @Override
      +    public PhaseId getPhaseId()
      +    {
      +        return PhaseId.RESTORE_VIEW;
      +    }
      +}
      +
      +

      Event broadcasting

      -

      BeforeJsfRequest / AfterJsfRequest (TODO)

      +

      Observe Faces-Requests

      +
      +

      It is possible to observe JSF-Requests via @Observes in combination with +@org.apache.deltaspike.core.api.lifecycle.Initialized or +@org.apache.deltaspike.core.api.lifecycle.Destroyed as qualifier for javax.faces.context.FacesContext.

      +
      +
      +

      Such observer-methods look e.g. like:

      +
      +
      +
      Example
      +
      +
      public void onBeforeFacesRequest(@Observes @Initialized FacesContext facesContext) {
      +    //...
      +}
       
      +public void onAfterFacesRequest(@Observes @Destroyed FacesContext facesContext) {
      +    //...
      +}
      +
      +
      -

      BeforePhase / AfterPhase (TODO)

      +

      BeforePhase / AfterPhase

      +
      +

      It is possible to observe JSF request-lifecycle phase-events via @Observes in combination with +@org.apache.deltaspike.jsf.api.listener.phase.BeforePhase or +@org.apache.deltaspike.jsf.api.listener.phase.AfterPhase as qualifier for javax.faces.event.PhaseEvent.

      +
      +
      +

      Such observer-methods look e.g. like:

      +
      +
      +
      Example
      +
      +
      public void onPhaseStart(@Observes @BeforePhase(JsfPhaseId.ANY_PHASE) PhaseEvent event) {
      +    //...
      +}
       
      +public void onPhaseEnd(@Observes @AfterPhase(JsfPhaseId.ANY_PHASE) PhaseEvent event) {
      +    //...
      +}
      +
      +

      JSF SystemEvents