Announcement

Collapse

Mirth Connect 3.12.0 Released!

Mirth Connect 3.12.0 is now available as an appliance update and on our GitHub page. This release includes database performance improvements, improves visual HL7 representation, message pruning, keystore handling, PDF generation, community contributions, and fixes several security vulnerabilities. This release also contains many improvements to commercial extensions. See the release notes for the list of fixes and updates.

Download | See What's New | Upgrade Guide | Release Notes

For discussion on this release, see this thread.
See more
See less

Redundant database connections and adresses

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Redundant database connections and adresses

    Hello all,

    I have many channels with the same database connection (using database reader) and sending to the same destination (LLP Sender) different types of messages. Is there a way to write the connection data to a single configuration file so every channel can read from there? Otherwise it's pretty annoying - everytime I update my many channels I should setup and check the database connection once again and again for every channel...

    Does anyone have an idea how to improve this?

    Thanks and regards!

    Svetlomir

    Post edited by: Svetlomir Kasabov, at: 09/08/2008 13:15

  • #2
    Re:Redundant database connections and adresses

    You could use a javascript SQL reader and have the first thing it does be to open a file (using FileUtil) and read a config.
    Jon Bartels

    Zen is hiring!!!!
    http://consultzen.com/careers/
    Talented healthcare IT professionals wanted. Engineers to sales to management.
    Good benefits, great working environment, genuinely interesting work.

    Comment


    • #3
      Re:Redundant database connections and adresses

      Thanks for the reply,

      I found the function that you mean : FileUtil.read('filename');

      I'll try it tomorrow

      Greets.

      Svetlomir

      Comment


      • #4
        Re:Redundant database connections and adresses

        Mmmmm,

        you can also define some code templates that returns the required parameter, so before each connection the code should call the code template and store the address, then open the connection ...

        In other words, if you define a function in the code templates, like:

        function get_jdbc_address () {
        return "jdbc://...."
        }


        And in a (i.e) JS Writer:
        var jdbc_string = get_jdbc_address() {}
        var dbConn = DatabaseConnectionFactory.createDatabaseConnection ('com.sybase.jdbc3.jdbc.SybDriver',jdbc_address,'u sr','pwd');
        // whatever ...
        dbConn.close();


        It may work as you need.

        Comment

        Working...
        X