Unsafe defaults for some webMethods services

Some built-in webMethods services have poor defaults, which must be changed pretty much every time. I don’t recall all services offhand, but these come to mind:

  1. makeArrays=false (service for creating IData structures)
  2. encode=true (service for creating XML documents)
  3. newSession=false (service: pub.client.ftp:login).
    The default is true, which is a poor choice for a stateful protocol like FTP. This is because another instance of the same session may have changed some property of the FTP session - say, the current directory. Interestingly, the pub.client.sftp:login service (which probably came along later) uses the appropriate default (i.e., it does not reuse sessions).
  4. No limit on number of rows by returned JDBC database adapter services

Ideally, the IDE should prompt you, the programmer, to set ‘safe’ values to prevent potential problems later.

great additions to the topic and a great example of a WTH :slight_smile:
If everybody always changes these, the defaults are clearly wrong!

Thanks Dave. My colleagues and I have certainly stumbled on these; plus I’ve heard noise in the forums over the years. Hoping others in this forum pipe up too.s

  1. Default is no timeout on JDBC database adapter services. I’m hard-pressed to identify a case where a DB call should wait forever.

I guess you’re talking about the default @reamon - which is no timeout, but it is possible to set one on both the adapter and globally.

Just to add one of my own similar pet peeves, FTP/SFTP also has no timeout by default, which can result in hanging threads/etc

One of the challenges in changing these btw, is to make sure that we do not affect customer’s existing implementations. We pride ourselves on maintaining backwards compatibility on Flow, with services dating quite some time back still being compatible, which means we have to do these things cautiously and with a focus on maintaining the backwards compatibility :slight_smile:

Yes – I’ve edited my comment to clarify.

1 Like