You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@openjpa.apache.org by Simone Gianni <si...@apache.org> on 2009/05/04 18:30:35 UTC
Stale input streams, take two
Hi all again,
the previous thread on this subject died, so I'm bringing it up again.
The question is still how to close the input stream an application gives
to OpenJPA streaming lob support, since OpenJPA requires that stream to
be open until it flushes it to the database, which potentially happens
outside the application scope.
Which is the listener that should be used to close those streams?
Otherwise how to close it at the right moment to prevent stale streams
and errors in OpenJPA?
Simone
--
Simone Gianni CEO Semeru s.r.l. Apache Committer
http://www.simonegianni.it/
Re: Stale input streams, take two
Posted by Simone Gianni <si...@apache.org>.
Hi Michael, and thanks for your interest.
Yes, flushing it manually works, but seriously restrict the flexibility
of such a good feature as the streaming lobs.
I'm trying to use them as any other type in a form framework, and
unfortunately cannot simply flush when I encounter a stream because the
entity could not be complete yet, causing constraint errors.
Any idea on how to close those streams in an abstract way?
Simone
Michael Dick wrote:
> Hi Simone,
>
> What happens if you flush the change manually and then close the stream? It
> wouldn't be ideal, but it might avoid the other problems you're seeing.
>
> -mike
>
> On Mon, May 4, 2009 at 11:30 AM, Simone Gianni <si...@apache.org> wrote:
>
>
>> Hi all again,
>> the previous thread on this subject died, so I'm bringing it up again. The
>> question is still how to close the input stream an application gives to
>> OpenJPA streaming lob support, since OpenJPA requires that stream to be open
>> until it flushes it to the database, which potentially happens outside the
>> application scope.
>>
>> Which is the listener that should be used to close those streams? Otherwise
>> how to close it at the right moment to prevent stale streams and errors in
>> OpenJPA?
>>
>> Simone
>>
>> --
>> Simone Gianni CEO Semeru s.r.l. Apache Committer
>> http://www.simonegianni.it/
>>
>>
>>
>
>
--
Simone Gianni CEO Semeru s.r.l. Apache Committer
http://www.simonegianni.it/
Re: Stale input streams, take two
Posted by Michael Dick <mi...@gmail.com>.
Hi Simone,
What happens if you flush the change manually and then close the stream? It
wouldn't be ideal, but it might avoid the other problems you're seeing.
-mike
On Mon, May 4, 2009 at 11:30 AM, Simone Gianni <si...@apache.org> wrote:
> Hi all again,
> the previous thread on this subject died, so I'm bringing it up again. The
> question is still how to close the input stream an application gives to
> OpenJPA streaming lob support, since OpenJPA requires that stream to be open
> until it flushes it to the database, which potentially happens outside the
> application scope.
>
> Which is the listener that should be used to close those streams? Otherwise
> how to close it at the right moment to prevent stale streams and errors in
> OpenJPA?
>
> Simone
>
> --
> Simone Gianni CEO Semeru s.r.l. Apache Committer
> http://www.simonegianni.it/
>
>