3 Replies Latest reply on Nov 9, 2012 5:38 PM by Ramesh Reddy

    Using custom datasource with a single override

    I Leitch Newbie

      I implemented a MyDataSource which extends DataSource  as a Connector for an embedded Teiid server as follows:

       

                                   MyDataSource myDataSource = new MyDataSource(…);

                                      EmbeddedServer.ConnectionFactoryProvider<DataSource> myProvider = new                                                                EmbeddedServer.ConnectionFactoryProvider<DataSource>() {

                                                      @Override

                                                      public DataSource getConnectionFactory() throws TranslatorException {

                                                                      return myDataSource;

                                                      }

                                      };

       

      How do I specify a datasource like this for a Custom Translator in a Dynamic VDB environment?

       

      The idea is to reuse the DataSource for the connector. I do not want to implement a full connector (ManagedConnectionFactory, etc..) as specified in the guide.

       

      Thanks!