Re: [hibernate-dev] Statements leaks when using JPA StoredProcedureQuery API

2017-10-16 Thread Steve Ebersole
If only. I seriously doubt we can get that approach as the solution through the EG, but we'll see On Mon, Oct 16, 2017, 1:12 PM Robert Marcano wrote: > On 10/16/2017 10:13 AM, Steve Ebersole wrote: > > On Mon, Oct 16, 2017 at 9:00 AM Robert Marcano > > wrote: >

Re: [hibernate-dev] Statements leaks when using JPA StoredProcedureQuery API

2017-10-16 Thread Steve Ebersole
Sweet, thanks On Mon, Oct 16, 2017 at 10:59 AM Robert Marcano wrote: > On 10/11/2017 03:15 PM, Vlad Mihalcea wrote: > > You can open a GitHub issue for JPA. Meanwhile, you can work around it > > as you suggested. > > Opened an issue on JPA spec https://github.com/javaee/jpa-spec/issues/162 > > >

Re: [hibernate-dev] Statements leaks when using JPA StoredProcedureQuery API

2017-10-16 Thread Robert Marcano
On 10/16/2017 10:13 AM, Steve Ebersole wrote: > On Mon, Oct 16, 2017 at 9:00 AM Robert Marcano > wrote: > > No, I know implicitly closing the JDBC statement is not possible with > only the current CallableStatement API. There is no way to know if the >

Re: [hibernate-dev] Statements leaks when using JPA StoredProcedureQuery API

2017-10-16 Thread Steve Ebersole
On Mon, Oct 16, 2017 at 9:00 AM Robert Marcano wrote: > No, I know implicitly closing the JDBC statement is not possible with > only the current CallableStatement API. There is no way to know if the > client code needs or read all possible outputs from the stored > procedure. My previous email me

Re: [hibernate-dev] Statements leaks when using JPA StoredProcedureQuery API

2017-10-16 Thread Robert Marcano
On 10/11/2017 03:15 PM, Vlad Mihalcea wrote: > You can open a GitHub issue for JPA. Meanwhile, you can work around it > as you suggested. Opened an issue on JPA spec https://github.com/javaee/jpa-spec/issues/162 > > On 11 Oct 2017 9:08 pm, "Robert Marcano" > wr

Re: [hibernate-dev] Statements leaks when using JPA StoredProcedureQuery API

2017-10-16 Thread Robert Marcano
On 10/13/2017 03:11 PM, Steve Ebersole wrote: > The conceptualization of a Query for both Hibernate and JPA is that you > execute it and get back the result of that execution: a List, a single > result, a ScrollableResult, a Stream, etc. > > Yet then JPA throws in StoredProcedureQuery which is c

Re: [hibernate-dev] Statements leaks when using JPA StoredProcedureQuery API

2017-10-13 Thread Steve Ebersole
The conceptualization of a Query for both Hibernate and JPA is that you execute it and get back the result of that execution: a List, a single result, a ScrollableResult, a Stream, etc. Yet then JPA throws in StoredProcedureQuery which is completely different conceptually. Here you execute and th

[hibernate-dev] Statements leaks when using JPA StoredProcedureQuery API

2017-10-11 Thread Robert Marcano
Migrating code from the Hibernate API to JPA, I found a stored procedure being called on a loop that was generating DB2 errors [1] on tests. This error is caused in this case for having a lot of not closed statements. The problem didn't happen using ProcedureCall Hibernate API because the metho