9 Replies Latest reply on Sep 15, 2011 10:48 PM by kennardconsulting

    [JBoss 6.1] How to disable unused stuff

    mlo

      Hello everybody !

       

      We're currently using JBoss 6.1 Snapshot.

       

      Our application uses :

       

      - EJB 2 (Session & Message Driven)

      - HornetQ (Queues & Topics)

      - 2 data sources ( ---> MySQL DB)

       

      We're running JBoss in default configuration. But, JBoss is very slow to start...

       

      So we followed some tutos "Jboss slimming" in order to remove unused aspects of JBoss, but it still not enough.

       

      My question :

       

      - Can we start with the minimal configuration and add the needed jars/config files for our configuration?? We can't find out the config files/jars needed for ONLY ejb2/HornetQ/and data sources...

      - Or, start with default configuration and remove all the not needed jars/config files??

       

      Thanks in advance !

        • 1. [JBoss 6.1] How to disable unused stuff
          mlo

          I turned on debug traces and :

           

          17:19:21,346 DEBUG [BeansDeploymentAopMetaDataDeployer] Finished deploying AbstractVFSDeploymentContext@13547055{vfs:///E:/MLO/Work/applications/jboss-6.0.0.Final/server/default/deploy/transaction-jboss-beans.xml}

          17:19:52,165 DEBUG [MappedReferenceMetaDataResolverDeployer] vfs:///E:/MLO/Work/applications/jboss-6.0.0.Final/server/default/deploy/DS_COTS.jar endpoint mappings:

           

          We can see that there is 31 seconds between these 2 traces...

           

          DS_COTS.jar is an archive which contains all the needed jar for our application...

          • 2. [JBoss 6.1] How to disable unused stuff
            wdfink

            It will be difficult to decide whether you statr with minimal and add Hornet+EJB2 or use default and remove all what you did not need.

             

            I suggest to start with min, add ejb2 deployer (you might look what you can remove from deploy in case of sliming ), after that I think you have to add some libs because of ClassNotFoundExceptions.

            After that add HornetQ deployables and fix similar.

             

            helpful will be

            http://community.jboss.org/wiki/JBoss5xTuningSlimming  and
            http://community.jboss.org/wiki/JBossASTuningSliming

             

             

             

            I'm not sure whether an extreme sliming will have a big benefit of startup time and resource use ...

            • 3. [JBoss 6.1] How to disable unused stuff
              mlo

              Hello, and first, thank you for your answer !

               

              I already visited the 2 links you gave

               

              I launched JBoss with remote debug, and, for 50 seconds~ Jboss is doing this :

               

              jboss_stack.jpg

               

               

              Because we have a JAR archive which contains ~35 Jars (all the needed libs for our application)...

               

              So I don't know what to do...

              • 4. [JBoss 6.1] How to disable unused stuff
                mlo

                I found out a good thing

                 

                In the file JBOSS_HOME/server/default/deployers/scanning-deployers-jboss-beans.xml, we can specify ignored JARs for annotation processing.

                 

                I added to the list of ignored JARs my JAR, and it's Ok !!!

                • 5. [JBoss 6.1] How to disable unused stuff
                  jaikiran

                  You have multiple jar files within some other jar file?

                  • 6. [JBoss 6.1] How to disable unused stuff
                    mlo

                    Yeah you're right !

                    • 7. Re: [JBoss 6.1] How to disable unused stuff
                      kennardconsulting

                      Hi mlo,

                       

                      Could you please explain what you did to "specify ignored JARs" in scanning-deployers-jboss-beans.xml? I believe I'm having the same problem but can't find any documentation on doing this.

                       

                      Regards,

                       

                      Richard.

                      • 8. Re: [JBoss 6.1] How to disable unused stuff
                        mlo

                        Hi !!

                         

                        In scanning-deployers-jboss-beans.xml we just added something like :

                         

                          <bean name="JBossCustomDeployDUFilter" class="org.jboss.deployers.vfs.spi.structure.helpers.VirtualFileDeploymentUnitFilter">

                            <constructor>

                              <parameter>

                                <bean class="org.jboss.vfs.util.FileNameVirtualFileFilter">

                                  <constructor>

                                    <parameter>

                                      <map keyClass="java.lang.String" valueClass="java.util.Set">

                                        <entry>

                                          <key>deployers/</key>

                                          <value><null/></value>

                                        </entry>

                                        <entry>

                                          <key>jbossweb.sar</key>

                                          <value><null/></value>

                                        </entry>

                                        <entry>

                                           <key>OurJar.jar</key>

                                          <value><null/></value>

                                         </entry>

                        • 9. Re: [JBoss 6.1] How to disable unused stuff
                          kennardconsulting

                          Okay great I'll give that a try.

                           

                          Thanks,

                           

                          Richard.