Closed cgokulnath closed 3 years ago
Typically in SpringBoot you use JdbcTemplate
like
@Autowired
JdbcTemplate template;
into your bean and then use it. However, if you want a connection then you need to
((WrappedConnection)template.getDataSource().getConnection()).unwrap()
However, I am not sure if the above is the right level of unwrapping as this will take you away from pooling concepts etc. Direct usage of connection is not suitable for Spring Boot apps.
If you are using a remote client (a separate client app connecting to your teiid spring boot app) then you can just connect using TeiidDriver as you might have done when using Teiid with WildFly. There you can unwrap and use the way you need to.
For reading large blob objects, we like to use WrappedConnection object in Teiid boot framework. Is this support available.