3 Replies Latest reply on Aug 23, 2007 3:28 AM by kalimero

    Can descriptor read system variable?

      Hi,

      I'm wondering whether it's possible put a system variable in descriptor.

      say I have a service.sar which contains jboss-service.xml, I want to define a variable in O.S. (for a full path of a folder), and put the variable in that descriptor.

      Current I use a relative path (ex. ../folderA/B..) inside the descriptor, but it's not enough.

      any one have idea?

      Thanks
      John

        • 1. Re: Can descriptor read system variable?
          kalimero

          You can do something like this:

          in you service xml file use the variable "myvar"

          usage: ${VARNAME}
          
          eg:
           <mbean code=".." name="${myvar}">
           ....
           </mbean>
          


          start jvm:

          -Dmyvar=myvalue
          


          hope this idea will help you.


          • 2. Re: Can descriptor read system variable?

             

            "Kalimero" wrote:
            You can do something like this:

            in you service xml file use the variable "myvar"
            usage: ${VARNAME}
            
            eg:
             <mbean code=".." name="${myvar}">
             ....
             </mbean>
            


            start jvm:

            -Dmyvar=myvalue
            


            hope this idea will help you.


            Thank you. that's it. the syntax in build.xml (windows os) is


            BTW, can you tell the syntax in jboss-service.xml, like I want my service deployed depends on ejb.jar?

            John


            • 3. Re: Can descriptor read system variable?
              kalimero

              Use dependencies on MBeans or EJBs, etc like this:


               <mbean code="MyMBean" name="myMBean:service=MyMBean">
               ..
               <depends>jboss.j2ee:service=EJB,jndiName=MyEJB</depends>
               ..
               <depends>myMBean:service=MyBean2</depends>
               </mbean>