1 2 Previous Next 16 Replies Latest reply on Feb 5, 2013 12:26 PM by shawkins Go to original post
      • 15. Re: Ideas stemming from TEIID-196: support parameters and loopback connections
        markaddleman

        While our production deployment is JBoss, we use Embedded Server extensively in our unit tests (probably a typical scenario).  I'd rather not drag in a bunch of JBoss dependencies for our unit testing. 

         

        It's not clear to me what issue I should file in Jira, though.

        • 16. Re: Ideas stemming from TEIID-196: support parameters and loopback connections
          shawkins

          I'm not sure you would need an issue just yet.  In your Translator instance you would set a reference to a TeiidDriver to the TeiidDriver returned from the EmbeddedServer when you register the Translator via addTranslator(String, ExecutionFactory).  This will not require additional dependencies. To make the code work in a server deployment you would simply default the TeiidDriver to TeiidDriver.getInstance() (and set the appropriate module dependencies for org.jboss.teiid.client as mentioned earlier) so that the standard local connection would be used by default.

           

          This Connection can propogate the security context, but it will not use the same session and for server deployments the Teiid engine will not be aware of any currently thread bound transaction (although Teiid Embedded will be aware by default) since you are not obtaining the connection via a pool.  An issue could be logged around those considerations.

           

          Steve

          1 2 Previous Next