Version 12

    Here is a framework to assist with using Teiid Embedded.  It provides the following:

    -  provides a framework for data driving the configuration of components (i.e., translators, connectors, transaction mgr, buffer service, and others that could be added)

    -  provides out-of-the-box use of the translators supported by teiid (no coding of adding translators to the embedded server) by specifying them in the xml configuration

    -  provides re-use- of configurations for portability

    -  enables tuning and configuration changes without having to recompile your code to make configuration changes

    -  you can create your own components (i.e., a different transaction mgr) and include those for reuse.  

    that helps explain using the framework.

    Example (this is the portfolio example):




            <embedded name="teiidEmbeddedInstance">








                <property name="NodeIdentifier">1</property>

                <property name="SocketProcessIdPort">0</property>

                <property name="SocketProcessIdMaxPorts">10</property>


                <property name="EnableStatistics">false</property>

                <property name="DefaultTimeout">300</property>

                <property name="TransactionStatusManagerEnable">false</property>

                <property name="TxReaperTimeout">120000</property>





                    <translator name="file-translator">






                    <translator name="translator-h2">



                                    <property name="SupportsDirectQueryProcedure">true</property>






                    <connector name="file-connector">




                                    <property name="ParentDirectory">data</property>







    The basic process for using the driver is the following:



                      TeiidEmbeddedDriver driver = new TeiidEmbeddedDriver();

                      String configFileName = ...



                      {optional, configure data source(s), see next example}





                      driver.getConnection(teiidJdbcURL, properties);



    (This is the more on the connectors) If you create a data source on your own, like the H2 data source in the portfolio example, you would still need to make the following call:



                      DataSource ds = .....

                      driver.getEmbeddedServer().addConnectionFactory("jndi-name", ds);




    Where can you find the code:

    How to use it:

    run:   mvn clean install

    will produce a in the target directory, unzip that into an existing Teiid Embedded unzipped location.

    There is a new examples directory, examples_driver.    In this directory is the embedded-portfolio, which should be similar to the original example, except for the how the interacts with TeiidEmbeddedDriver.


    This is just an initial prototype to prove out that the use of Teiid Embedded could be simplified.  Your comments and feedback will help me determine if this is something that should move forward.


    Thanks in advance for reading, hope you take it for a drive and let me know how it went.

    Examples that have been added:

    -  embedded portfolio

    -  excel as a data source

    -  cassandra as a data source

    -  webservices as a data source

    -  mongodb as a data source

    Which currently includes support for:

    Translators:  file, h2, excel, cassandra, ws, mongodb

    Connectors:  file, cassandra, jdbc (must call addConnectionFactory("jndi-name", ds), ws, mongodb