IBM webMethods Hybrid Integration

IBM webMethods Hybrid Integration

Join this online group to communicate across IBM product users and experts by sharing advice and best practices with peers and staying up to date regarding product enhancements.

 View Only
  • 1.  Static Properties File

    Posted Wed March 24, 2004 04:30 AM

    I am loading a properties file into a static variable in the start up service in my package.

    However, once in a while, when I try to run the other services in the package, the static variable seems to lose its content.

    Any ideas ?


    #webMethods
    #Flow-and-Java-services
    #Integration-Server-and-ESB


  • 2.  RE: Static Properties File

    Posted Wed March 24, 2004 02:46 PM

    Hi Stephen,
    I had this problem too.
    Actually I got no idea how to solve this issue, but I changed the way I load the static file content.
    Instead of load it into JVM memory, I created a storage and now the static file content is loaded there at startup.

    HTH,
    Maldonado


    #webMethods
    #Integration-Server-and-ESB
    #Flow-and-Java-services


  • 3.  RE: Static Properties File

    Posted Wed March 24, 2004 04:41 PM

    I believe that each package in IS has it’s own class loader, so your properties file will be loaded with the same class loader for whatever package it’s in. So if you reload a package or reimport a new version you will probably lose the value. How are you getting the value initiated? manually running the java service? You might want to add a startup service to the package so it runs your code when the package is reloaded/enabled or when the server starts up.

    However it’s been a while since I’ve used those properties files. We used the extended settings or TN for all our properties.


    #Integration-Server-and-ESB
    #webMethods
    #Flow-and-Java-services


  • 4.  RE: Static Properties File

    Posted Wed January 31, 2007 03:19 PM

    I had the same problem and I tried to fix it with a startup service that reloads the properties file with every startup. But it did not work. From time to time the properties vanished. wkriski’s posting brought me to the idea to load the properties into a static variable that resides at a class into the “jars/static” folder. I.e. the classes from the jars/static folder are loaded with the server classloader. Since then the variables are accessible.


    #Flow-and-Java-services
    #webMethods
    #Integration-Server-and-ESB