5 Replies Latest reply on Dec 28, 2014 10:25 PM by arun2arunraj

    How to do Exploded deployment in Domain Mode ?

    arun2arunraj

      Hi,

      I would like to do a exploded deployment in Domain Mode. I failed while I have tried to add "deployment scanner" subsystem in Domain Mode. Also tried to explode a war in the deployed folder ( JBOSS_HOME/domain/data/content/<Hash_Value>/content ), It was working good in that instance alone. But It was failed to propagate the deployed content to next other nodes in another host.

       

      I believe it is possible, But having no idea How to trigger it out. 
      Can anyone help me to learn more interesting things in JBoss EAP6.1 ?

       

      Regards,

      ArunRaj.

        • 1. Re: How to do Exploded deployment in Domain Mode ?
          jaysensharma

          Hello ArunRaj,

           

              Exploded deployments are not recommended for domain mode. You should try to avoid it.

              But it can be done something like following using CLI commands:

           

          /deployment=XYZ.war:add(runtime-name="XYZ.war", content=[{"path"=>"/YOUR/PATH/TO/XYZ.war","archive"=>false}])
          deploy --name=XYZ.war --server-groups=main-server-group
          

           

          Or use the following configuration in your "domain.xml"

           

               <deployments>
                  <deployment name="XYZ.war" runtime-name="XYZ.war">
                      <fs-exploded path="/YOUR/PATH/TO/XYZ.war"/>
                  </deployment>
              </deployments>
          
          • 2. Re: How to do Exploded deployment in Domain Mode ?
            arun2arunraj

            Hi Jay Kumar SenSharma,

             

            Thanks for the quick update. May I know the challenges, Just for curious like why it is not recommended ?  Can you explain it in little bit detail ?

             

            Thanks & Regards,
            ArunRaj. R

            • 3. Re: How to do Exploded deployment in Domain Mode ?
              jaysensharma

              Hello,

                   Exploded deployments are not recommended for domain mode Because domain mode is basically designed for a centralized management perspectives. Means in domain mode oyu want to run your JBoss instances to configure resources from domain controller easily using utilities like CLI/console.

               

                 However when you choose the "fs-exploded" option to deploy your application then you need to make sure that the application XYZ.war Must exist in the same PATH "/YOUR/PATH/TO/"

              in all your Host controller boxes so that the servers which are going to run in those Boxes will be able to access the Application. You will need to SCP / FTP the war file in that location of all the host controllers where the JBoss servers are running which wants to have this application deployed.

               

                  However if you normally deploy the application to your server-group or indvidial remote servers from a remote box Without using the "fs-exploded" technique then you do not need to worry about the application path. 

              1 of 1 people found this helpful
              • 4. Re: How to do Exploded deployment in Domain Mode ?
                arun2arunraj

                Hi Jay Kumar SenSharma,

                 

                Thanks for helping me to learn JBoss EAP.
                I understood the challenges. Thanks again for the simple explanation.

                 

                Regards,
                ArunRaj. R

                • 5. Re: Re: How to do Exploded deployment in Domain Mode ?
                  arun2arunraj

                  Hi Jay

                   

                  How to redeploy the application if we were changed a file / files? It is not getting done automatically. Do we need to start the deployment-scanner manually ?

                   

                  Things we were done is following,

                   

                          <deployment name="application.war" runtime-name="application.war">
                              <fs-exploded path="/opt/JBoss_EAP/Jboss_EAP_Exploded/deployments/application.war"/>
                          </deployment
                  
                  

                   

                   

                  Our Application War Structure,

                   

                  --- /opt/JBoss_EAP/Jboss_EAP_Exploded/deployments/application.war/
                                                 |          ├── index.xhtml
                                                 |          └── WEB-INF
                                                 |              └── web.xml

                                                 |

                                                                                └──application.war.dodeploy

                   

                   

                  In the web.xml

                  <?xml version="1.0" encoding="UTF-8"?>
                  <web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://java.sun.com/xml/ns/javaee" xmlns:web="http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd" id="WebApp_ID" version="3.0">
                    <display-name>application</display-name>
                    <servlet>
                      <servlet-name>Faces Servlet</servlet-name>
                      <servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
                      <load-on-startup>1</load-on-startup>
                    </servlet>
                    <servlet-mapping>
                      <servlet-name>Faces Servlet</servlet-name>
                      <url-pattern>/faces/*</url-pattern>
                      <url-pattern>*.jsf</url-pattern>
                      <url-pattern>*.xhtml</url-pattern>
                    </servlet-mapping>
                    <context-param>  
                     <description>Cache Level</description>  
                     <param-name>Cache-Level</param-name>  
                     <param-value>private</param-value>  
                    </context-param>
                    <context-param>  
                      <description>Pragma level</description>  
                      <param-name>Pragma-Level</param-name>  
                      <param-value>no-cache</param-value>  
                     </context-param>
                     <context-param>
                    <param-name>javax.faces.FACELETS_LIBRARIES</param-name>
                    <param-value>/WEB-INF/solartis.taglib.xml</param-value>
                    </context-param>
                     <context-param>
                         <param-name>javax.servlet.jsp.jstl.fmt.localizationContext</param-name>
                         <param-value>resources.application</param-value>
                     </context-param>
                     <context-param>
                      <param-name>com.sun.faces.numberOfLogicalViews</param-name>
                      <param-value>5</param-value>
                    </context-param>
                    <context-param>
                      <param-name>com.sun.faces.numberOfViewsInSession</param-name>
                      <param-value>5</param-value>
                    </context-param>
                     <context-param>
                         <param-name>javax.faces.PARTIAL_STATE_SAVING</param-name>
                         <param-value>true</param-value>
                      </context-param>
                      <context-param>
                      <param-name>javax.faces.DATETIMECONVERTER_DEFAULT_TIMEZONE_IS_SYSTEM_TIMEZONE</param-name>
                      <param-value>true</param-value>
                    </context-param>
                     <listener>
                       <listener-class>com.sun.faces.config.ConfigureListener</listener-class>
                     </listener>
                  
                    <session-config>
                      <session-timeout>30</session-timeout>
                    </session-config>
                    <error-page>
                      <exception-type>javax.faces.application.ViewExpiredException</exception-type>
                      <location>/login/index.xhtml</location>
                    </error-page>
                  
                  
                    <filter>
                       <filter-name>PrimeFaces FileUpload Filter</filter-name>
                       <filter-class>
                           org.primefaces.webapp.filter.FileUploadFilter
                       </filter-class>
                       <init-param>
                           <param-name>thresholdSize</param-name>
                           <param-value>51200</param-value>
                       </init-param>
                    </filter>
                  
                    <filter-mapping>
                       <filter-name>PrimeFaces FileUpload Filter</filter-name>
                       <servlet-name>Faces Servlet</servlet-name>
                    </filter-mapping>
                    <filter>
                    <filter-name>SessionFilter</filter-name>
                    <filter-class>com.common.web.filter.applicationSessionTimeoutFilter</filter-class>
                    </filter>
                    <filter-mapping>
                    <filter-name>SessionFilter</filter-name>
                    <url-pattern>*.jsf</url-pattern>
                    <url-pattern>*.xhtml</url-pattern>
                    </filter-mapping>
                  
                    <listener>
                    <listener-class>com.common.web.filter.applicationSessionListener</listener-class>
                    </listener>
                    <error-page>
                    <error-code>404</error-code>
                    <location>/error/error_404.xhtml</location>
                    </error-page>
                    <error-page>
                    <error-code>500</error-code>
                    <location>/error/error_500.xhtml</location>
                    </error-page>
                    <welcome-file-list>
                     <welcome-file>login/index.xhtml</welcome-file>
                    </welcome-file-list>
                  </web-app>
                  
                  

                   

                  application.war.dodeploy is a plain and empty text

                   

                  We would like to redeploy applications while the server running. Any Help is much appreciated.

                   

                  Thanks & Regards,
                  ArunRaj. R