10 Replies Latest reply on Sep 20, 2010 8:03 AM by Roelof K

    Hot deploy problem with properties file

    Pratik Surti Newbie

      Hey,

       

      I  am using jboss application server 5.1.0.GA on windows machine and  facing the hot deployment issue with re-deploy of properties file. My Flex UI doen't reflect, If I  make some changes to property file and try to re-deploy the ear file containing the properties file and other java classes. It hot deploys  the other portion of EAR file like class file, xml file.

       

      Even I have  the problem with hot-deploy but it is not the major issue right now. I  am updating the EAR file from admin console. But replacing the EAR file  from admin console redeploys other portions excepting the properties  file. No exception is generated.

       

      Could  you please let me know if the problem is already resolved and How ?

       

      Regards,

      Pratik

        • 1. Re: Hot deploy problem with properties file
          jaikiran pai Master

          What exactly do you mean by property file not hot deployed? How and who is reading the properties file? Can you post relevant code?

          • 2. Re: Hot deploy problem with properties file
            Pratik Surti Newbie

            Let's put it in this way:

             

            Properties file which contains key/value pairs for labeling and internationalization of your application. We can say Resource bundle file.

             

            EAR file which contains my application jar files, war files, configuration files which is currently deployed on JBoss AS.

             

            For e.g. my application server is up and running and for displaying a text box label (e.g. User Name) in Flex UI, accepts the value from properties file (Resouce Bundle file).

             

            Now I am making changes to the value present in the property file for any corresponding key (e.g. Your Name instead of User Name) and building the ear file and it is getting hot deployed in JBoss AS.

             

            Now according to the changes made in property file, it should be reflected on Flex UI for the particular text box after hot deploy in JBoss AS which is not happening at my end.

             

            I hope you understand the above scenario.

             

            Also the ref code:

             

            private static final ResourceBundle RESOURCE_BUNDLE = ResourceBundle.getBundle(BUNDLE_NAME,
                        new Locale(MYEnvironment.getValue("MYUtil", "PART_LOCALE"),localeCountry),Thread.currentThread().getContextClassLoader());

            Consider "MYEnvironment.getValue()" part my own dynamic implementation.

            • 3. Re: Hot deploy problem with properties file
              Pratik Surti Newbie

              Can I raise the JIRA for the same ?

               

              No tips or suggestion.

              • 4. Re: Hot deploy problem with properties file
                jaikiran pai Master

                Pratik Surti wrote:

                 

                Can I raise the JIRA for the same ?

                 

                 

                I don't yet see anything that makes this look like a bug in AS. Have you attached a debugger and checked your application to see where those property values are being picked up from?

                • 5. Re: Hot deploy problem with properties file
                  Pratik Surti Newbie

                  If I make any changes to Java Class file and do hot deploy, it will work out but it is not picking up the updated properties file values from the debug perspective.

                   

                  I am replacing my application ear file from admin console to make it redeploy. Because already hot deployment is not working in my current JBAS version.

                   

                  Possibilities are:

                   

                  JBAS is not clearing the cache and picking up the old values from the available cache.

                   

                  JVM behaviour on Windows machine may have their own set of rules of locking or unlocking an object while hot deployment and also clearing the cache (Duplicate tmp folder in JBAS).

                   

                  May be in later versions of JBAS versions the issue is already resolved. I think there was JIRA pertaining to hot deployment but not sure it also involves property file issue as well.

                   

                  Let me know your assumption about it.

                  • 6. Re: Hot deploy problem with properties file
                    Pratik Surti Newbie

                    Hi,

                     

                    Can any one look into this issue ?

                     

                    Let me know if any additional information required.

                     

                    Regards

                    Pratik

                    • 7. Re: Hot deploy problem with properties file
                      Roelof K Newbie

                      Hi,

                       

                      I'm facing the same problem.

                      (i18n + hot deployment on dev  works, i18n + farming/clustering + hot deployment on prod does not)

                      Any developments?

                       

                      Is there a workaround?

                       

                      Any hints or tips would be appreciated.

                       

                      Thanks,

                      Roelof

                      • 8. Re: Hot deploy problem with properties file
                        Pratik Surti Newbie

                        Hi,

                         

                        At last we manually cleared the cacheList using class loader inside the static block and could able to resolve this issue.

                         

                        You will also required to do the same thing unless JBAS Dev team provides the solutions .

                         

                        Another way to let them know about the issue is to raise the JIRA and they will look into it.

                         

                        Regards

                        Pratik

                        • 9. Re: Hot deploy problem with properties file
                          jaikiran pai Master

                          Pratik Surti wrote:

                           

                          Hi,

                           

                          At last we manually cleared the cacheList


                          Which cacheList was that? Any relevant code?

                          • 10. Re: Hot deploy problem with properties file
                            Roelof K Newbie

                            My problem is solved. It was an error in my code. (A static method jeopardized i18n)