6 Replies Latest reply on Apr 17, 2013 4:03 PM by kchen007

    Need to pass custom properties from JDBC connection to Translator.

    jamit

      Hi,

      We have a requirement to pass some custom properties to be set on the jdbc connection and would be passed to the teiid(8.3 final) layer and all upto the custom translator layer.

      The properties would be then be used by the translator to do some decision making.

      These properties would be set by the jdbc client code and the values may differ from connection to connection.

      for e.g

      Properties object would contain:

      PropKey              PropValue

      1) ScrollLock        TRUE

      2) PrintScreen       FALSE

      and this would be sent to get jdbc connection,using the   final Connection connection = DriverManager.getConnection(url,prop);

      the intention is these custom properties would go all upto the custom translator.


      Did debug through the Teiid code and figured out that a new connection is created by WrappedConnectionFactory within teiid, for the translator, during query execution,and hence the properties dont reach the translator.

       

      I somehow need to have these properties passed on via the executionContect or the BasicConnection or something else:) to the translator.

      I wanted to know if there is an existing way to do this in the current teiid environment?

       

      Thanks

      Amit