2 Replies Latest reply on Sep 27, 2011 12:02 AM by jaikiran

    Deploy properties-service.xml in JBOSS AS 7

    joydevsingha

      Hi,

       

      This might be a very basic question, I got stuck configuring properties-service.xml in JBOSS AS 7. In JBOSS 4.2 this file exists in /deploy directory. The configuration which I did there (defining key value pair) was working properly. I am not able to figure out where I have to deploy this file in JBOSS AS 7. I copied it in /configuration, /deployments folders but I think it is not able to read the file.

       

      Can you please help.

        • 1. Re: Deploy properties-service.xml in JBOSS AS 7
          joydevsingha

          This is my sample properties-service.xml file

           

            <mbean code="org.jboss.varia.property.PropertyEditorManagerService"

               name="jboss:type=Service,name=PropertyEditorManager">

           

              <!--

                 | Register and editor for each of the type_name=editor_type_name listed

                 | in properties file style convetion.

           

              <attribute name="Editors">

                java.net.URL=my.project.editors.URLPropertyEditor

              </attribute>

           

              -->

           

            </mbean>

           

           

            <!-- ==================================================================== -->

            <!-- System Properties Service                                            -->

            <!-- ==================================================================== -->

           

            <!--

               | Allows rich access to system properties.

             -->

           

            <mbean code="org.jboss.varia.property.SystemPropertiesService"

               name="jboss:type=Service,name=SystemProperties">

           

              <!--

                 | Load properties from each of the given comma seperated URLs

              -->

              <attribute name="URLList">

                ./waproperties/WaPropertyExample.properties

              </attribute>

           

              <!--

                 | Set raw properties file style properties.

           

              -->

              <attribute name="Properties">

                  test.prop1=test property

              </attribute>

             

            </mbean>

           

          </server>

          • 2. Re: Deploy properties-service.xml in JBOSS AS 7
            jaikiran

            AS7 doesn't allow deploying standalone xml files (like this one). You could however package that file as a jboss-service.xml within the META-INF folder of your application and deploy it. But then again, the MBean class that you have in that file isn't available in AS7. So that's going to fail with ClassNotFoundException.

             

            If you just want to setup some system properties, then a better way to do it is mentioned here https://docs.jboss.org/author/display/AS7/Admin+Guide#AdminGuide-SystemProperties