Here is my experience, it's ugly, but it work for me so far.<div>1、Implement an action to process the huge file uploading, store it anywhere you like.</div><div>2、Create a binary file in OC with a specific content, call symbol file ? </div>
<div>3、Extend CmsDumpLoader to process the specific content, read the real file from the filesystem and write to the browser.</div><div>4、Modify org.opencms.db.CmsDriverManager, org.opencms.db.generic.CmsVfsDriver and org.opencms.file.CmsFile, to set the actual size to db, and delete the real file from the filesystem when symbol file is delete</div>
<div>5、Copy ,replace and import/export is not supported for these files.</div><div><div><br></div><div><br><div class="gmail_quote">2012/4/19 Rüdiger Kurz <span dir="ltr"><<a href="mailto:r.kurz@alkacon.com">r.kurz@alkacon.com</a>></span><br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi Nick,<br>
<br>
now we are getting in a more "consulting" task that is not part of my scope of action. But anyway 'decoupled DB' is not a concept of OpenCms. Moreover I was thinking about putting all the huge files (don't know how much you have and if they are hierarchically ordered) in a folder inside tomcat (e.g. <TOMCAT_HOME>\webapps\opencms\<u></u>myVideos) and define a custom XML resource type (XSD Schema) for OpenCms that stores a reference on one or more binary files (e.g. videos). That would enable you to use the power of OpenCms (JSP/Servlet-Tech, Templating, Navigation builder, Properties, Search, Content-Relation-Engine, ...) and providing/referring the huge files that will be delivered directly from the real file system.<br>
<br>
I don't know your application in detail and it would go beyond the scope of this discussion. But the point I want to make is: You have a Linux/SQL/Apache/Tomcat/<u></u>OpenCms architecture and it should be possible to store the files in the real file system and refer them from the OpenCms context.<br>
<br>
Consider to:<br>
- use apache rewrite rules that will deliver the files or<br>
- make use of /system/shared/linkexcludes<br>
- create a custom XSD that represents a file on the RFS<br>
- develop a OpenCms widget to link a files outside OpenCms<br>
<br>
-Rüdiger<br>
<br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Thanks for following up with this issue Rüdiger, it's much appreciated! At least this finally resolves for me the problem in as far as I now know that it's not the Apache/Tomcat configs that are causing it.<br>
Your suggestion to use a 'decoupled DB', Apologies for being hard of thinking but is this something that can be transparently coded within OpenCMS or will the byte array limitation you mentioned require this functionality to be completely separated from the website we host in it?<br>
--<br>
np<br>
<br>
Hi Nick,<br>
<br>
I did some research with the following results:<br>
<br>
OpenCms internally handles content as byte array. A byte[] with size of<br>
the maximum 32-bit signed integer would require 2GB of contiguous<br>
address space. So with a byte[] the maximum memory you can address is<br>
2G. For this reason files larger than 2G can not be uploaded.<br>
<br>
For those files, that are smaller than 2G but larger than the heap space<br>
of your JVM a out of memory exception will be thrown and the upload<br>
hangs up. So if you want to upload a 2G file the heap space of the<br>
tomcat's JVM has to be large enough.<br>
<br>
In general you should consider to use a decoupled data storage<br>
(catchword: Multimedia Databases) for huge files. Typically you store<br>
the binary data on the real file system and the meta data inside the<br>
database.<br>
<br>
- Rüdiger<br>
</blockquote>
<br>
-- <br>
Kind Regards,<br>
Rüdiger.<br>
<br>
-------------------<br>
<br>
Visit OpenCms Days 2012 Conference and Expo September 24 to 25, 2012 in Cologne, Germany <a href="http://www.opencms-days.org" target="_blank">http://www.opencms-days.org</a><br>
<br>
Rüdiger Kurz<br>
<br>
Alkacon Software GmbH - The OpenCms Experts<br>
<a href="http://www.alkacon.com" target="_blank">http://www.alkacon.com</a> - <a href="http://www.opencms.org" target="_blank">http://www.opencms.org</a><br>
______________________________<u></u>_________________<br>
This mail is sent to you from the opencms-dev mailing list<br>
To change your list options, or to unsubscribe from the list, please visit<br>
<a href="http://lists.opencms.org/cgi-bin/mailman/listinfo/opencms-dev" target="_blank">http://lists.opencms.org/cgi-<u></u>bin/mailman/listinfo/opencms-<u></u>dev</a><br>
<br>
<br>
<br>
</blockquote></div><br></div></div>