jackrabbit-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Thomas Mueller" <thomas.tom.muel...@gmail.com>
Subject Re: Question regarding data store
Date Fri, 04 Apr 2008 12:27:36 GMT

> Why is that in
>  InternalValue.create(InputStream), when USE_DATA_STORE is true, getBLOBFileValue() is
called with
>  null as the data store?
>  This causes the stream to be dumped in a temp file.


>  The code I'm following is in BundleBinding.writeState(). A -2 is written as the size
and the value
>  is stored in the data store

I think you refer to BundleBinding.java line 576:

                    if (InternalValue.USE_DATA_STORE && dataStore != null) {
                        try {
                        } catch (RepositoryException e) {
                            String msg = "Error while storing blob. id="
                                + state.getId() + " idx=" + i + "
size=" + val.getBLOBFileValue().getLength();
                            log.error(msg, e);
                            throw new IOException(msg);

> but then the blob store code follows and dumps it to a file.
Please notice the 'break' at the end if the if statement. That means
the blob is not written to the blob store. A agree the code is not
very clear... It would be good if we don't have 3 possible ways to
store blobs, maybe we can remove the old code (only support reading
from the blob store for compatibility, but not writing).


View raw message