Oh no, I was just commenting on the applicability of the approach I am pursuing with Hibernate to jOOQ. I suppose jOOQ would rely on the generic Spring JDBC support to obtain connections and demarcate transactions. As the framework is currently set up, the connection is probably released at transaction commit, which is inappropriate if you want to lazily consume the ResutSet within the View layer.
I suggested that you might be interested in exploring what it would take for that approach to work. As you can see on my example, the Spring team is interested in this scenario and they made the necessary improvements to make it work with Hibernate. On Monday, November 24, 2014 10:59:12 AM UTC+1, Lukas Eder wrote: > > I feel that I've misunderstood something, here... :-) > > Are you suggesting that we add Spring MVC examples to the Spring > integration example (because of a different semantics of the JDBC > Connection)? Note: I have no experience with Spring MVC whatsoever, so I > really might not be understanding you correctly... > > 2014-11-22 23:33 GMT+01:00 Marko Topolnik <[email protected] > <javascript:>>: > >> Thanks Lukas, I truly value your opinion :) >> >> As for the subject of jOOQ with Spring MVC, I think you would run into >> trouble with the scope of validity of the database connection, which is >> probably the same as that of the transaction. It seems to me that an >> equivalent of the OpenSessionInViewInterceptor would be needed. All this is >> probably not your immediate focus, but having support for it in Spring does >> bear importance on the penetration of these concepts into real-world >> projects. >> >> On Thursday, November 20, 2014 2:41:59 PM UTC+1, Lukas Eder wrote: >>> >>> Hi Marko, >>> >>> Thanks for sharing, and off to Reddit with the article - this is very >>> interesting! >>> >>> I do believe that such streams are very easy to achieve if the jOOQ API >>> were allowed to make use of the JDK 8 libraries. JDBC's ResultSet really is >>> a Stream, apart from the fact that they're not formally integrated, and >>> that ResultSet doesn't provide any type information for Stream elements. >>> But jOOQ provides that type information bridge and is capable of streaming >>> the ResultSet. So, we're very close :-) >>> >>> 2014-11-20 11:03 GMT+01:00 Marko Topolnik <[email protected]>: >>> >>> I wrote a piece on exploiting lazy streams in REST responses with Spring >>>> MVC. You may be interested in similar ideas with respect to the >>>> integration >>>> of jOOQ with Spring JDBC. The most sensitive aspect are holdable cursors, >>>> I >>>> haven't explored how to achieve them without Hibernate sessions. Could >>>> turn >>>> out to be easier than with Hibernate. >>>> >>>> https://www.airpair.com/java/posts/spring-streams-memory-efficiency >>>> >>> -- You received this message because you are subscribed to the Google Groups "jOOQ User Group" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/d/optout.
