1 Reply Latest reply on Nov 5, 2008 9:16 AM by deleted user

    How do I access an external property file from my services deployed in FUSE

    Aishwarya B Newbie

      I have properties like user ids and pwds in a separate property I need to access from my POJO services deployed in FUSE. DOes anyone know how this can be done. Right now I have deployed my project in FUSE but the service is unable to access the property files. Where do i place and how do I access these? These property files are created so at any time the values can be modified.

      everything works well from my eclipse java project fine. But when i put the jar in the hotdeploy folder and run servicemix, the property files cannot be read. please help

        • 1. Re: How do I access an external property file from my services deployed in FUSE
          deleted user Newbie

          Hi,

           

          Have you tried doing something like the following

           

          In your xbean.xml file

           

          Example:

           

           <bean id="propertyConfigurer" class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer">
              <property name="location" value="classpath:passwords.properties"></property>
            </bean> 
          
          <bean id="ExampleId" class="com.iona.fuse.example.processor">   
              <property name="userId" value="${userId.property}"></property>
            </bean>
          
          

           

          So userId.property is defined in your password.properties file

           

          If you put the password.properties file in the resources directory of the SU it should be on the classpath.

           

          Hope this helps, Edell.