10 Replies Latest reply on Jan 14, 2009 8:44 AM by jaikiran

    JBoss 5 question to PrefixDeploymentSorter

    svenbutz

      Hello,

      I need help at the JBoss 5 configuration.

      How can I configurate the Deployment in JBoss 5 similar the activation of

      org.jboss.deployment.scanner.PrefixDeploymentSorter

      in the jboss-service.xml of JBoss4.x?

      THX

        • 1. Re: JBoss 5 question to PrefixDeploymentSorter
          jaikiran

          Can you please provide more details about what you are trying to do?

          • 2. Re: JBoss 5 question to PrefixDeploymentSorter
            svenbutz

            Hello,

            first a short description.

            We have a JBoss 4.x with more than one deploy directory.
            deploy_system (JBoss)
            deploy_standard (add libs)
            deploy_ds (datasources)
            deploy_application (applications)

            follow is set in the jboss-service.xml

            <!-- org.jboss.deployment.DeploymentSorter
            -->
            org.jboss.deployment.scanner.PrefixDeploymentSorter

            deploy_system/,deploy_sbs_standards/,deploy_sbs_ds/,deploy_sbs_appl/


            I need the information who can I do the same in JBoss 5.x.

            I hope, anybody can help me.

            • 3. Re: JBoss 5 question to PrefixDeploymentSorter
              peterj

              In 5.0 CR2, the URILIst has been moved to server/xxx/conf/profile.xml (it's on the VFSDeploymentScanner bean)

              • 4. Re: JBoss 5 question to PrefixDeploymentSorter
                svenbutz

                OK I found it.

                At moment work the JBoss similar the DeploymentSorter (JBoss 4.x). The JBoss mix all the deployment directories and archives.
                How can I set the PrefixDeploymentSorter or similar sorter.
                I need e deployment priority for the directories.

                Thats the config now.

                <!-- Scan for applications -->





                ${jboss.server.home.url}deploy_system/
                ${jboss.server.home.url}deploy_sbs_standards/
                ${jboss.server.home.url}deploy_sbs_ds/
                ${jboss.server.home.url}deploy_sbs_appl/




                • 5. Re: JBoss 5 question to PrefixDeploymentSorter
                  peterj

                  As far as I know, there is no equivalent to the PrefixDeploymentSorter in 5.0.

                  Also, use the 'code' tag when posting XML text, and use the Preview button to ensure proper formatting before posting.

                  • 6. Re: JBoss 5 question to PrefixDeploymentSorter
                    svenbutz

                    Ok this is not so nice.

                    I have some ear files with dependencies.

                    For example in one of this ears is a ejb this ejb is used by a session bean in an other ear file.

                    What I need is a deploy priority for ears and war files.
                    It is necessary to deploy the ear file with the ejb befor the application deployment.

                    I hope anybody can help.

                    • 7. Re: JBoss 5 question to PrefixDeploymentSorter
                      peterj

                      Each EJB that gets deployed gets a corresponding mbean. You can add mbean dependencies to the META-INF/jboss.xml file so that the EJBs are deployed in the correct order. Here is an example for EJB3 (the mbean name is different for EJB2.x, but should be easily locatable in jmx console):

                      <enterprise-beans>
                       <session>
                       <ejb-name>SomeEjb</ejb-name>
                       <depends>jboss.j2ee:ear=xxx.ear,jar=yyy.jar,name=EjbName,serevice=EJB3</depends>
                       </session>
                       </enterprise-beans>
                      


                      You can have a similar entry in the jboss-web.xml file if a WAR depends on any EJBs.

                      • 8. Re: JBoss 5 question to PrefixDeploymentSorter
                        samportstone

                        This will work for EJB / Web components. Our problem is that we have to define dependencies for service components.

                        According to the documentation availabla on the net, this should work the same way. But when I use this dependency definition with JBoss 5, it doesn't work for me.

                        First possibility: Dependency definition without attribute

                        <mbean code="com.foo.bar.ConfigInformation" name="user:service=ESConfigInformation"
                         <depends>jboss.jca:name=es/jdbc/Login_DS,service=DataSourceBinding</depends>
                        </mbean>
                        


                        -> There is still an error during the initialization of the ESConfigInformation mbean because the datasource cannot be retrieved. When the sar-file is deployed after the datasource deployment, it works.

                        Second possibility:
                        <mbean code="com.foo.bar.ConfigInformation"
                         name="user:service=ESConfigInformation"
                         <depends><depends optional-attribute-name="DataSource">jboss.jca:service=DataSourceBinding,name=es/jdbc/Login_DS</depends></depends>
                        </mbean>
                        


                        -> The error occurs earlier, during the interpretation of the deployment metadata, because the dependency can't be resolved (the Login_DS is not available).

                        Does anyone have an idea, why the server reacts like that?

                        • 9. Re: JBoss 5 question to PrefixDeploymentSorter
                          jaikiran

                           

                          <depends>jboss.jca:name=es/jdbc/Login_DS,service=DataSourceBinding</depends>
                          


                          I believe, this should have worked assuming the jndi-name in your -ds.xml is es/jdbc/Login_DS. Please post the entire console logs including the exception stacktrace. Also post the contents of your -ds.xml.

                          While posting logs or xml content or code, please remember to wrap it in a code block by using the Code button in the message editor window. Please use the Preview button to ensure that your post is correctly formatted.

                          • 10. Re: JBoss 5 question to PrefixDeploymentSorter
                            jaikiran

                             

                            "samportstone" wrote:
                            But when I use this dependency definition with JBoss 5


                            Which exact version of JBossAS5 do you use?