AnsweredAssumed Answered

Blob Based Content Store implemented

Question asked by andre on May 21, 2007
Latest reply on Feb 21, 2015 by aliosha79
Hi,

I've just uploaded my imlementation of a database based content store: http://issues.alfresco.com/secure/attachment/10461/DB_Content_Store.zip

All content is streamed - so handling large files is no problem.

streaming content into and out of the db is done by the class BlobFileDAOImpl (JdbcDaoSupport) using springs AbstractLobCreatingPreparedStatementCallback and AbstractLobStreamingResultSetExtractor.

In order to get an OutputStream fromthe DAO connected to an InputStream returned by the ContentReader I use a pair of PipedStreams.
(see BlobFileContentReader.java->getDirectReadableChannel())

For uploading new Content the data is written to a TempFile first to determine the file size. (Maybe this is not necessary???)

BlobFile.hbm.xml, BlobFile.java and BlobFileImpl.java
are only used in order to get the new table created automatically.

Everything works allmost fine (tested with Oracle 10g XE - thin driver) there is only one problem:

In the the web client th file size is always displayed as 0 KB allthought my implementation of getSize provides the correct value.

I would much appreciate your feedback!

Outcomes