You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@jackrabbit.apache.org by Sanjiv <S....@zensar.in> on 2013/03/04 07:06:22 UTC
RE: Apache Jackrabbit 2.4.3 support for Sybase ASE 15.7
Hi,
Thanks for the useful inputs on getting jackrabbit to work with Sybase ASE
15.7.
What we did -
1.) Create Sybase.ddl under org\apache\jackrabbit\core\fs\db
create table ${schemaObjectPrefix}FSENTRY (FSENTRY_PATH varchar(2048) not
null, FSENTRY_NAME varchar(255) not null, FSENTRY_DATA image null,
FSENTRY_LASTMOD decimal(19,0) not null, FSENTRY_LENGTH decimal(19,0) not
null)
2. ) Create Sybase.ddl under org\apache\jackrabbit\core\journal
create table ${schemaObjectPrefix}JOURNAL (REVISION_ID decimal(19,0) NOT
NULL, JOURNAL_ID varchar(255), PRODUCER_ID varchar(255), REVISION_DATA
IMAGE)
create unique index ${schemaObjectPrefix}JOURNAL_IDX on
${schemaObjectPrefix}JOURNAL (REVISION_ID)
create table ${schemaObjectPrefix}GLOBAL_REVISION (REVISION_ID decimal(19,0)
NOT NULL)
create unique index ${schemaObjectPrefix}GLOBAL_REVISION_IDX on
${schemaObjectPrefix}GLOBAL_REVISION (REVISION_ID)
# Inserting the one and only revision counter record now helps avoiding race
conditions
insert into ${schemaObjectPrefix}GLOBAL_REVISION VALUES(0)
3.) Create sybase.ddl under org\apache\jackrabbit\core\persistence\bundle
create table ${schemaObjectPrefix}BUNDLE (NODE_ID binary(16) not null,
BUNDLE_DATA image not null)
create unique index ${schemaObjectPrefix}BUNDLE_IDX on
${schemaObjectPrefix}BUNDLE (NODE_ID)
create table ${schemaObjectPrefix}REFS (NODE_ID binary(16) not null,
REFS_DATA image not null)
create unique index ${schemaObjectPrefix}REFS_IDX on
${schemaObjectPrefix}REFS (NODE_ID)
create table ${schemaObjectPrefix}BINVAL (BINVAL_ID varchar(64) not null,
BINVAL_DATA image not null)
create unique index ${schemaObjectPrefix}BINVAL_IDX on
${schemaObjectPrefix}BINVAL (BINVAL_ID)
create table ${schemaObjectPrefix}NAMES (ID INTEGER IDENTITY PRIMARY KEY,
NAME varchar(255))
4.) Create sybase.ddl under org\apache\jackrabbit\core\persistence\db
create table ${schemaObjectPrefix}NODE (NODE_ID char(36) not null, NODE_DATA
image not null)
create unique index ${schemaObjectPrefix}NODE_IDX on
${schemaObjectPrefix}NODE (NODE_ID)
create table ${schemaObjectPrefix}PROP (PROP_ID varchar(1024) not null,
PROP_DATA image not null)
create unique index ${schemaObjectPrefix}PROP_IDX on
${schemaObjectPrefix}PROP (PROP_ID)
create table ${schemaObjectPrefix}REFS (NODE_ID char(36) not null, REFS_DATA
image not null)
create unique index ${schemaObjectPrefix}REFS_IDX on
${schemaObjectPrefix}REFS (NODE_ID)
create table ${schemaObjectPrefix}BINVAL (BINVAL_ID varchar(1024) not null,
BINVAL_DATA image not null)
create unique index ${schemaObjectPrefix}BINVAL_IDX on
${schemaObjectPrefix}BINVAL (BINVAL_ID)
A sample repository.xml file for Sybase has been pasted below.
Driver/Url/Username/Password values are environment specific.
Cheers,
Sanjiv
<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
<?xml version="1.0"?>
<!--
Licensed to the Apache Software Foundation (ASF) under one or more
contributor license agreements. See the NOTICE file distributed with
this work for additional information regarding copyright ownership.
The ASF licenses this file to You under the Apache License, Version 2.0
(the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<!DOCTYPE Repository
PUBLIC "-//The Apache Software Foundation//DTD Jackrabbit 2.0//EN"
"http://jackrabbit.apache.org/dtd/repository-2.0.dtd">
<!-- Example Repository Configuration File
Used by
- org.apache.jackrabbit.core.config.RepositoryConfigTest.java
-
-->
<Repository>
<!--
virtual file system where the repository stores global state
(e.g. registered namespaces, custom node types, etc.)
-->
<FileSystem class="org.apache.jackrabbit.core.fs.local.LocalFileSystem">
<param name="path" value="${rep.home}/repository"/>
</FileSystem>
<!--
data store configuration
-->
<DataStore class="org.apache.jackrabbit.core.data.FileDataStore">
<param name="path" value="${rep.home}/repository/datastore" />
<param name="minRecordLength" value="200" />
</DataStore>
<!--
security configuration
-->
<Security appName="Jackrabbit">
<!--
security manager:
class: FQN of class implementing the JackrabbitSecurityManager
interface
-->
<SecurityManager
class="org.apache.jackrabbit.core.DefaultSecurityManager"
workspaceName="security">
<!--
workspace access:
class: FQN of class implementing the WorkspaceAccessManager
interface
-->
<!-- <WorkspaceAccessManager class="..."/> -->
<!-- <param name="config" value="${rep.home}/security.xml"/> -->
</SecurityManager>
<!--
access manager:
class: FQN of class implementing the AccessManager interface
-->
<AccessManager
class="org.apache.jackrabbit.core.security.DefaultAccessManager">
<!-- <param name="config" value="${rep.home}/access.xml"/> -->
</AccessManager>
<LoginModule
class="org.apache.jackrabbit.core.security.authentication.DefaultLoginModule
">
<!--
anonymous user name ('anonymous' is the default value)
-->
<param name="anonymousId" value="anonymous"/>
<!--
administrator user id (default value if param is missing is
'admin')
-->
<param name="adminId" value="admin"/>
</LoginModule>
</Security>
<!--
location of workspaces root directory and name of default workspace
-->
<Workspaces rootPath="${rep.home}/workspaces"
defaultWorkspace="default"/>
<!--
workspace configuration template:
used to create the initial workspace if there's no workspace yet
-->
<Workspace name="${wsp.name}">
<!--
virtual file system of the workspace:
class: FQN of class implementing the FileSystem interface
-->
<FileSystem
class="org.apache.jackrabbit.core.fs.local.LocalFileSystem">
<param name="path" value="${wsp.home}"/>
</FileSystem>
<!--
persistence manager of the workspace:
class: FQN of class implementing the PersistenceManager
interface
-->
<!-- Commented out Derby Persistence Manager
<PersistenceManager
class="org.apache.jackrabbit.core.persistence.pool.DerbyPersistenceManager">
<param name="url"
value="jdbc:derby:${wsp.home}/db;create=true"/>
<param name="schemaObjectPrefix" value="${wsp.name}_"/>
</PersistenceManager>
-->
<PersistenceManager
class="org.apache.jackrabbit.core.persistence.pool.BundleDbPersistenceManage
r">
<param name="bundleCacheSize" value="8"/>
<param name="consistencyCheck" value="false"/>
<param name="consistencyFix" value="false"/>
<param name="minBlobSize" value="4096"/>
<param name="driver" value="net.sourceforge.jtds.jdbc.Driver"/>
<param name="url"
value="jdbc:jtds:sybase://10.42.62.33:5000/jackrabbit"/>
<param name="schema" value="sybase" /><!-- warning, this is not
the schema name, it's the db type -->
<param name="user" value="jrabbit"/>
<param name="password" value="Temp1234"/>
<param name="schemaObjectPrefix" value="${wsp.name}_"/>
<param name="externalBLOBs" value="false"/>
<param name="blockOnConnectionLoss" value="false"/>
<param name="errorHandling" value=""/>
<param name="databaseType" value=""/>
<param name="schemaCheckEnabled" value="true"/>
</PersistenceManager>
<!--
Search index and the file system it uses.
class: FQN of class implementing the QueryHandler interface
-->
<SearchIndex
class="org.apache.jackrabbit.core.query.lucene.SearchIndex">
<param name="path" value="${wsp.home}/index"/>
<param name="supportHighlighting" value="true"/>
</SearchIndex>
</Workspace>
<!--
Configures the versioning
-->
<Versioning rootPath="${rep.home}/version">
<!--
Configures the filesystem to use for versioning for the
respective
persistence manager
-->
<FileSystem
class="org.apache.jackrabbit.core.fs.local.LocalFileSystem">
<param name="path" value="${rep.home}/version" />
</FileSystem>
<!--
Configures the persistence manager to be used for persisting
version state.
Please note that the current versioning implementation is based
on
a 'normal' persistence manager, but this could change in future
implementations.
-->
<!-- Commented out DerbyPersistenceManager
<PersistenceManager
class="org.apache.jackrabbit.core.persistence.pool.DerbyPersistenceManager">
<param name="url"
value="jdbc:derby:${rep.home}/version/db;create=true"/>
<param name="schemaObjectPrefix" value="version_"/>
</PersistenceManager>
-->
<PersistenceManager
class="org.apache.jackrabbit.core.persistence.pool.BundleDbPersistenceManage
r">
<param name="bundleCacheSize" value="8"/>
<param name="consistencyCheck" value="false"/>
<param name="consistencyFix" value="false"/>
<param name="minBlobSize" value="4096"/>
<param name="driver" value="net.sourceforge.jtds.jdbc.Driver"/>
<param name="url"
value="jdbc:jtds:sybase://10.42.62.33:5000/jackrabbit"/>
<param name="schema" value="sybase" /><!-- warning, this is not
the schema name, it's the db type -->
<param name="user" value="jrabbit"/>
<param name="password" value="Temp1234"/>
<param name="schemaObjectPrefix" value="version_"/>
<param name="externalBLOBs" value="false"/>
<param name="blockOnConnectionLoss" value="false"/>
<param name="errorHandling" value=""/>
<param name="databaseType" value=""/>
<param name="schemaCheckEnabled" value="true"/>
</PersistenceManager>
</Versioning>
<!--
Search index for content that is shared repository wide
(/jcr:system tree, contains mainly versions)
-->
<SearchIndex
class="org.apache.jackrabbit.core.query.lucene.SearchIndex">
<param name="path" value="${rep.home}/repository/index"/>
<param name="supportHighlighting" value="true"/>
</SearchIndex>
<!--
Run with a cluster journal
-->
<Cluster id="node1">
<Journal class="org.apache.jackrabbit.core.journal.MemoryJournal"/>
</Cluster>
</Repository>
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>.
-----Original Message-----
From: Seidel. Robert [mailto:Robert.Seidel@aeb.de]
Sent: Tuesday, February 19, 2013 3:16 PM
To: users@jackrabbit.apache.org
Subject: AW: Apache Jackrabbit 2.4.3 support for Sybase ASE 15.7
Hi,
looks, like images are not allowed, so here again in text form:
org.apache.jackrabbit.core.data.db (package)
sqlanywhere.properties
org.apache.jackrabbit.core.fs.db (package)
SQLAnywhereFileSystem.java
sqlanywhere.ddl
org.apache.jackrabbit.core.journal (package)
SQLAnywhereDatabaseJournal.java
sqlanywhere.ddl
org.apache.jackrabbit.core.persistence.bundle (package) sqlanywhere.ddl
org.apache.jackrabbit.core.persistence.pool (package)
SQLAnywherePersistenceManager.java
Regards, Robert
Von: Seidel. Robert [mailto:Robert.Seidel@aeb.de]
Gesendet: Dienstag, 19. Februar 2013 10:40
An: users@jackrabbit.apache.org
Betreff: AW: Apache Jackrabbit 2.4.3 support for Sybase ASE 15.7
Hi,
I don't think there is support for Sybase ASE, but it's easy to write a own
adapter for the database you want to use, because Jackrabbit use a well
defined interface:
Here are the classes and files we needed to write to support Sybase SQL
Anywhere:
[cid:image001.png@01CE0E8D.1158C150]
You can look at the existing packages for examples.
Regards, Robert
-----Ursprüngliche Nachricht-----
Von: Sanjiv [mailto:S.Nagraj@zensar.in]
Gesendet: Dienstag, 19. Februar 2013 10:24
An: users@jackrabbit.apache.org<ma...@jackrabbit.apache.org>
Betreff: Apache Jackrabbit 2.4.3 support for Sybase ASE 15.7
Hi,
We are developing a business application, which uses Sybase Adaptive Server
15.7 as the database. For storing content, Apache Jackrabbit 2.4.3 is
being used.
File content ( binary data ) will be stored by appropriately configuring
DataStore settings. We would like to store Node and Property data through
the Persistence Manager in the Sybase database.
Does Apache Jackrabbit 2.4.3 support Sybase ASE 15.7 ?. If so, then is it
just a matter of configuring the persistence manager in repository.xml
accordingly OR some additional work/effort is required.
Thanks and Regards,
Sanjiv
________________________________
Treffen Sie AEB vom 19.-21. Februar 2013 auf der LogiMAT in Stuttgart. Halle
5, Stand 261.
Vereinbaren Sie jetzt einen Termin und Sie erhalten eine Eintrittskarte.
www.aeb.de/logimat<http://www.aeb.de/logimat>
________________________________
Treffen Sie AEB vom 19.-21. Februar 2013 auf der LogiMAT in Stuttgart. Halle
5, Stand 261.
Vereinbaren Sie jetzt einen Termin und Sie erhalten eine Eintrittskarte.
www.aeb.de/logimat