1 Reply Latest reply on May 18, 2016 11:46 AM by Steven Hawkins

    Teiid embedded integration in a java application as a separate process

    Hend Amin Novice

      Hello,

       

      I need to use teiid embedded in my application, to be accessed through my web application as a JDBC data-source. I want teiid embedded server to be running all the time as a separate process. I can not use teiid standalone because i do not want to use wildfly server. So i need teiid embedded to be seperately running and my web application can access it as its backend, through JDBC connection. Any idea how i can do that ? I have seen all teiid embedded provided examples, but all the examples were java classes with a main method not a continuously running application the can be accessed from a separate client. I would appreciate if anyone can help me with the best practices to do that.

       

      Thanks

        • 1. Re: Teiid embedded integration in a java application as a separate process
          Steven Hawkins Master

          > Any idea how i can do that ?

           

          Your usage would still effectively look the same, there would be a main that bootstraps the runtime and configures the necessary JDBC socket transport, then you just need to not let that main thread die - any kind of non-tight loop would be fine:

           

          while (true) {

            Thread.sleep(...);

          }

           

          The issue here is effectively that all of our threads are currently marked as daemon, but for your usage you'd like at least the socket listener to be a non-daemon thread to prevent the vm from stopping.  You can log that as a enhancement for the socket configuration if you want.