jackrabbit-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mario-Leander Reimer <leander.rei...@vva-networks.de>
Subject AW: JNDIDatabaseFileSystem DefaultDS on JBoss
Date Wed, 02 Jul 2008 06:36:00 GMT
Hello,

I have JBoss running with JackRabbit and mySQL 5.0.51

1. The value for you dataSourceLocation needs to be "java:DefaultDS" (no front slash in between)

2. You probably need to add the following line to you Jackrabbit datasource XML file:
<tx-connection-factory>
        ...
        <depends>jboss.jca:service=DataSourceBinding,name=DefaultDS</depends>
</tx-connection-factory>

This will ensure that the Jackrabbit DS will start-up after the mySQL datasource.

Hope it works for you.
Leander


> -----Urspr√ľngliche Nachricht-----
> Von: Richard Huddleston [mailto:rhuddusa@gmail.com]
> Gesendet: Dienstag, 1. Juli 2008 21:49
> An: Jackrabbit - Users
> Betreff: JNDIDatabaseFileSystem DefaultDS on JBoss
>
> I'm trying to get jackrabbit migrated over on JBoss to MySQL (it's
> currently
> using the default config).  I'm having an issue doing the JNDI lookups.
> No
> matter what I put for the dataSourceLocation I can't get the JNDI
> lookup to
> succeed.  I have the DefaultDS working for other things (ex. JBoss
> messaging).  I'm running on JBoss version 4.2.2.GA.  Has anyone had
> success
> with this?
>
> I've tried "java:/DefaultDS", "DefaultDS",
> "java:comp/env/jdbc/DefaultDS",
> and "jndi/DefaultDS" ... no luck.
>
> <Repository>
>   <FileSystem
> class="org.apache.jackrabbit.core.fs.db.JNDIDatabaseFileSystem">
>     <param name="dataSourceLocation" value="java:/DefaultDS" />
>     <param name="schema" value="mysql" />
>     <param name="schemaObjectPrefix" value="jcr_fs_" />
>   </FileSystem>
>   <Security appName="Jackrabbit">
>     <AccessManager
>       class="org.apache.jackrabbit.core.security.SimpleAccessManager">
>     </AccessManager>
>     <LoginModule
> class="org.apache.jackrabbit.core.security.SimpleLoginModule">
>       <param name="anonymousId" value="anonymous" />
>     </LoginModule>
>   </Security>
>   <Workspaces rootPath="${rep.home}/workspaces"
>     defaultWorkspace="default" />
>   <Workspace name="${wsp.name}">
>     <FileSystem
>       class="org.apache.jackrabbit.core.fs.db.JNDIDatabaseFileSystem">
>       <param name="dataSourceLocation" value="java:/DefaultDS" />
>       <param name="schema" value="mysql" />
>       <param name="schemaObjectPrefix" value="jcr_fs_${wsp.name}_" />
>     </FileSystem>
>     <PersistenceManager
>
> class="org.apache.jackrabbit.core.persistence.db.JNDIDatabasePersistenc
> eManager">
>       <param name="dataSourceLocation" value="java:/DefaultDS" />
>       <param name="schema" value="mysql" />
>       <param name="schemaObjectPrefix" value="jcr_pm_${wsp.name}_" />
>     </PersistenceManager>
>   </Workspace>
>   <Versioning rootPath="${rep.home}/version">
>     <FileSystem
>       class="org.apache.jackrabbit.core.fs.db.JNDIDatabaseFileSystem">
>       <param name="dataSourceLocation" value="java:/DefaultDS" />
>       <param name="schema" value="mysql" />
>       <param name="schemaObjectPrefix" value="jcr_fs_version_" />
>     </FileSystem>
>     <PersistenceManager
>
> class="org.apache.jackrabbit.core.persistence.db.JNDIDatabasePersistenc
> eManager">
>       <param name="dataSourceLocation" value="java:/DefaultDS" />
>       <param name="schema" value="mysql" />
>       <param name="schemaObjectPrefix" value="jcr_pm_version_" />
>     </PersistenceManager>
>   </Versioning>
> </Repository>
>
> <datasources>
>   <local-tx-datasource>
>
>     <jndi-name>DefaultDS</jndi-name>
>
>     <connection-url>jdbc:mysql://localhost:3306/jboss</connection-url>
>
>     <driver-class>com.mysql.jdbc.Driver</driver-class>
>
>     <user-name>jboss</user-name>
>
>     <password>password</password>
>
>     <exception-sorter-class-name>
>         org.jboss.resource.adapter.jdbc.vendor.MySQLExceptionSorter
>     </exception-sorter-class-name>
>
>     <valid-connection-checker-class-name>
>
> org.jboss.resource.adapter.jdbc.vendor.MySQLValidConnectionChecker
>     </valid-connection-checker-class-name>
>
>     <transaction-isolation>
>         TRANSACTION_READ_COMMITTED
>     </transaction-isolation>
>
>     <metadata>
>        <type-mapping>mySQL</type-mapping>
>     </metadata>
>
>   </local-tx-datasource>
> </datasources>

Mime
View raw message