[ 
https://jira.nuxeo.org/browse/NXP-6022?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=84959#action_84959
 ] 

Florent Guillaume commented on NXP-6022:
----------------------------------------

Initial commit:
http://hg.nuxeo.org/addons/nuxeo-core-binarymanager-sql/rev/7af8b46b39a9

Doc:
This addon implements a BinaryManager that stores binaries in a SQL database.
For efficiency, a local disk cache (with limited size) is also used.

To be able to work this addon needs some configuration:
- a table in the SQL database,
- a datasource,
- an activation in the repository configuration file.


1. Create Table

Create the table in the SQL database like follows. The table name is
arbitrary (and specified in the repository configuration file), in
the example below it's "binaries".

PostgreSQL:
  CREATE TABLE binaries (id VARCHAR(256) PRIMARY KEY, bin BYTEA);

MySQL:
  CREATE TABLE binaries (id VARCHAR(256) PRIMARY KEY, bin BLOB);

Oracle:
  CREATE TABLE binaries (id VARCHAR2(250) PRIMARY KEY, bin BLOB);

SQL Server:
  CREATE TABLE binaries (id VARCHAR(256) PRIMARY KEY, bin VARBINARY(MAX));


2. Datasource

Create (or reuse) a datasource pointing to the database containing
the table defined above.


3. Repository Configuration File

Customize the default-repository-config.xml template. To do so copy the one
from the template of your current database to templates/custom/nxserver/config,
and activate the custom templates.
Refer to http://doc.nuxeo.com/display/NXDOC/Configuring+Nuxeo+EP
for more information on customizing templates.

In the custom default-repository-config.xml, in the innermost <repository>
element, add the lines:

        <binaryManager class="org.nuxeo.ecm.core.storage.sql.SQLBinaryManager"
          key="datasource=jdbc/binaries,table=binaries,cachesize=10MB" />

Here you can configure datasource name, the table name, and the maximum on-disk 
cache size.


> Addon for BinaryManager storing binaries in SQL
> -----------------------------------------------
>
>                 Key: NXP-6022
>                 URL: https://jira.nuxeo.org/browse/NXP-6022
>             Project: Nuxeo Enterprise Platform
>          Issue Type: New Feature
>            Reporter: Florent Guillaume
>            Assignee: Florent Guillaume
>            Priority: Major
>             Fix For: 5.4.1
>
>
> Create an addon defining a new BinaryManager implementation that stores the 
> binaries in a SQL database.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
https://jira.nuxeo.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        
_______________________________________________
ECM-tickets mailing list
[email protected]
http://lists.nuxeo.com/mailman/listinfo/ecm-tickets

Reply via email to