1 2 Previous Next 26 Replies Latest reply on Aug 3, 2012 9:21 PM by ybxiang.china Go to original post
      • 15. Re: Properties files in JBoss 7
        brian.stansberry

        This is a reasonable point worth exploring. Putting this config in the <management> element doesn't feel right; a child of <system-properties> feels more natural. But we'd need to think through the semantics of how this relates to the existing <system-property> elements, and also how it fits into the domain.xml/host.xml configuration.  Also how it fits with the <path> element, as this is logically a <path/>.

         

        I'm just quickly thinking out loud here, as I'm in a meeting.

        • 16. Re: Properties files in JBoss 7
          dlofthouse

          Just to clarify one point raised here.

           

          The management element does NOT support the specification of a properties file to be read for system properties to be read and set from.

           

          The management element support specifying a properties to read for the usernames and passwords of the users that access the exposed management interfaces.

          • 17. Re: Properties files in JBoss 7
            jimdwyer

            Darran,

             

            Correct.  I was using management as an example of where a properties file is read from the standalone.xml file.

            • 18. Re: Properties files in JBoss 7
              jimtitlow

              I like the idea of potentially being able to define in the standalone.xml a reference to an external name=value pair property file that defines custom properties above what are inherent to JBoss.  This approach would eliminate the need for a -P\--properties option for the standalone.sh.  I could potentially see this file being a simple text file in the deployments directory, that is already familar territory for the developers, where custom properties could be defined without having to touch xml or worry about altering the start command.  One point I am unclear on is whether it is possible to define properties in a <system-properties> block in the standalone.xml.  I see an example of that in the domain.xml and the Admin Guide discusses the scope of these properties in the Domain model but I have been unsuccessful in being able to define custom properties in the standalone.xml which I would have thought corresponds to the <server> block in the domain model.

              • 19. Re: Properties files in JBoss 7
                brian.stansberry

                If you are defining a system property in standalone.xml and it isn't available once the server is fully booted, that is a bug.

                • 20. Re: Properties files in JBoss 7
                  jimdwyer

                  Defining one property at a time in standalone.xml works fine.  It would be nice if standalone.xml could handle a properties file.

                  • 21. Re: Properties files in JBoss 7
                    hibernal

                    I'm losing track of what is possible and what has been proposed    I need to support a domain with many profiles which differ pretty much only in a large set of externalized properties ( e.g., a bunch of "private-lables" of the same basic application ).   From the administration point of view, I could have very simple and very similar profiles if i could just tell the servers to load a props file that corresponds to it's profile.   I haven't yet found an element under <jvm/>  that let's me do that.   Is it currently possible or is that an item folks are considering?

                    • 22. Re: Properties files in JBoss 7
                      khensel

                      I have also been using properties files to set various properties that are different between localhost/dev/qa and prod environments. 

                       

                      I am now evaluating setting up jboss 7 and would need this feature as well. 

                       

                      My understanding at this point is that I would need to create different standalone.xml files for each environment.  Correct?    Is there anything in development that would allow properties files in standalone?

                      • 23. Re: Properties files in JBoss 7
                        hibernal

                        Kenneth,

                         

                        For that case you should be fine with one standalone.xml and a per-environement properties file that you passed in with -P on startup.  

                        • 24. Re: Properties files in JBoss 7
                          khensel

                          Yes, that would work as well. 

                           

                          Thanks, Ken

                          • 25. Re: Properties files in JBoss 7
                            sar.the.psyco

                            I have a similar requirement as that of Kenneths. I have been able to load the properties file but is there any way to access the property in java code?

                             

                            basically i have some webservices whos end point urls are going to vary with the environment and i m trying to externalise them so that an admin guy can do it without much trouble.

                             

                            If there is a better way to achieve this then please suggest that also.

                             

                             

                            Thanks

                            Arun

                            • 26. Re: Properties files in JBoss 7
                              ybxiang.china

                              Yes, I need this feature too.

                              I hope all configuraton is done in standalone.xml.

                              I dislike -P=xxx because it will make the start command more complicated.

                              1 2 Previous Next