Groups from an external SQL database

Hi,

I would like to to integrate groups from an external SQL database. I tried this configuration (modifications are actually in the related template files, this is what gets generated):

In

nxserver\config\default-sql-directories-bundle.xml

this entry

<dataSource>jdbc/nxsqldirectory</dataSource>

is replaced by

<dataSource>jdbc/examplesqldirectory</dataSource>

In

conf\Catalina\localhost\nuxeo.xml

this entry is added

<ResourceLink name="jdbc/examplesqldirectory" global="jdbc/example" type="javax.sql.DataSource"/>

In

conf\server.xml

this entry is added

<Resource name="jdbc/example" auth="Container" type="javax.sql.DataSource"
    maxActive="100" maxIdle="30" maxWait="10000" driverClassName="com.microsoft.sqlserver.jdbc.SQLServerDriver"
    url="jdbc:sqlserver://localhost:1433;databaseName=EXAMPLE" validationQuery=""
    username="example" password="secret" />

Sadly this setting has no effect, i.e. the groups are not read from the external database. New groups created in nuxeo are also not inserted in the external database table, no idea if this should be the case at all.

When I use the default config and just modify the settings for jdbc/nxsqldirectory in the server.xml (respectively the template file) to the ones for the external database, nuxeo uses the external database for all its (internal) data which also includes the groups. So, the required database driver is in place and the connection settings are correct.

I tried several other things which didn't work either. So, how do I introduce a new datasource and set the config to make nuxeo use the external database for its groups?

Thanks for your help!

2 votes

1 answers

981 views

ANSWER



Solved.

The issue was that we have a plugin which includes the default settings for userDirectory and groupDirectory in its xml config. These settings seem to override the ones which come from the template files, i.e. my changes actually had no effect - also the files are loaded. After adding a datasource declaration to the plugin xml config and setting the groupDirectory accordingly, things work fine.

1 votes



Thanks for your feedback
08/28/2012