6 Replies Latest reply on Jun 20, 2006 6:08 PM by Sirajudeen Mohamed

    Problem in deployment order

    Sirajudeen Mohamed Newbie

      I have web application which access the database reading the details from oracle-ds.xml. I want the oracle-ds.xml to be deployed first and the JNDI name be readily available so that when my application gets deployed, it can access it thru the JNDI name, but my app gets deployed first and so i get NameNotFound Exception when try to access that JNDI. I tried changed the deployment order in org.jboss.deployment.MainDeployer-xmbean.xml giving lower value for -ds.xml but still it doesn't work. Anybody has gone thru similar problem, pls help me out.


        • 1. Re: Problem in deployment order
          Sirajudeen Mohamed Newbie

          This is what i use in applicationContext.xml

          And my oracle-ds.xml is


          Also am accessing the JNDI in my ServletContextListener class.

          • 3. Re: Problem in deployment order
            Tamir Efron Newbie

            are you sure that the problem is the order of deployment and not some other jndi configuration problem? you can try to hot deploy your application after the sever is already running...

            • 4. Re: Problem in deployment order
              Sirajudeen Mohamed Newbie

              actually i tried changing the order of deployment after i got the NameNotFoundException. I guess in default, the oracle-ds.xml will be deployed before the web app gets deployed, correct me if am wrong? If so why in my listener class it says NameNotException when i try to lookup the JNDI name(java:/CcpiDS). Pls help me out

              • 5. Re: Problem in deployment order
                Sirajudeen Mohamed Newbie

                This is what am using in the MainDeployer XML so that oracle-ds.xml gets deployed before the web app.

                Also if am not looking the JNDI in my app during the startup(ie in listener), everything is fine and the server gets started and app gets deployed, and if lookup the JNDI at this stage, am able to do it. So i think definitely the problem is with the order of deployment. web app getting deployed even before oracle-ds.xml is deployed.

                • 6. Re: Problem in deployment order
                  Sirajudeen Mohamed Newbie


                  <attribute access='read-write' setMethod='setEnhancedSuffixOrder' getMethod='getEnhancedSuffixOrder'>
                   <description>Allows the override of the suffix order declared by subdeployers, using the syntax [order:]suffix
                   Statically set one or more enhanced suffix orders, independent of the value proposed by subdeployers.
                   Some deployers may also allow the suffixes/orders to be set locally, so that's preferable too.
                   For reference, this is the list of enhanced suffixes likely to be set by deployers (it may not
                   be completely up-to-date, or there can be user-defined deployers).
                   Until we resolve some startup issues, we'll setup some static enhanced suffix orders bellow
                   and leave the rest of the suffixes contributed dynamically by registering deployers.
                   <value value="100:-ds.xml,150:.sar,150:-service.xml,250:.rar,400:.jar,500:.war,650:.ear,800:.bsh,900:.last"/>