[midPoint] MySQL/MariaDB resource can't be reached by its DataSource name
Ivan Noris
ivan.noris at evolveum.com
Fri Jun 17 13:27:59 CEST 2016
Well, I was curious.
I tried this (and it works, to not just tease you):
1. configured datasource (jdbc/testds1) in Tomcat's server.xml just like
in
https://wiki.evolveum.com/display/midPoint/Repository+Configuration#RepositoryConfiguration-Datasourceconfiguration
2. configured datasource in tomcat's conf/context.xml just like in the
same page
3. in resource, I used this:
<icfc:configurationProperties
xmlns:icscdbtable="http://midpoint.evolveum.com/xml/ns/public/connector/icf-1/bundle/com.evolveum.polygon.connector-databasetable/org.identityconnectors.databasetable.DatabaseTableConnector">
<icscdbtable:table>idrepo</icscdbtable:table>
<icscdbtable:keyColumn>userId</icscdbtable:keyColumn>
<icscdbtable:passwordColumn>password</icscdbtable:passwordColumn>
<icscdbtable:jdbcDriver>com.mysql.jdbc.Driver</icscdbtable:jdbcDriver>
<icscdbtable:jdbcUrlTemplate>jdbc:mysql://%h:%p/%d?useUnicode=true&characterEncoding=utf8&connectionCollation=utf8_bin</icscdbtable:jdbcUrlTemplate>
<icscdbtable:enableEmptyString>false</icscdbtable:enableEmptyString>
<icscdbtable:rethrowAllSQLExceptions>true</icscdbtable:rethrowAllSQLExceptions>
<icscdbtable:nativeTimestamps>false</icscdbtable:nativeTimestamps>
<icscdbtable:allNative>false</icscdbtable:allNative>
<icscdbtable:changeLogColumn></icscdbtable:changeLogColumn>
<icscdbtable:datasource>*java:comp/env/jdbc/testds1*</icscdbtable:datasource>
</icfc:configurationProperties>
I.e. I used the same notation as when config.xml datasource reference is
made, prefixed with "java:comp/env/".
It worked for me. Please try.
Best regards,
Ivan
On 06/17/2016 10:27 AM, Ramón Cahenzli wrote:
> Hi Ivan,
>
> Thanks for the response.
>
>> OK so maybe I was reacting too soon. It seems you are doing
>> provisioning to MySQL/MariaDB using datasource...
> Yes, that sounds about right (I'm not quite fluent in midPoint lingo
> yet) :)
>
>
>> Could you please share the MySQL resource configuration?
> I've adapted the config with the first two steps from here:
>
> https://wiki.evolveum.com/display/midPoint/Repository+Configuration#RepositoryConfiguration-Datasourceconfiguration
>
> The last step isn't necessary because I don't want to keep using H2 for
> now in midPoint, but it can't hurt to set up the data sources this way,
> correct? The source still works under the name jdbc/peeps when used
> from my test JSP.
>
> The config files are in this gist:
>
> https://gist.github.com/psy-q/8c0d931ea53eb35bf5098b59dd38a76d
>
> Cheers,
>
--
Ing. Ivan Noris
Senior Identity Management Engineer & IDM Architect
evolveum.com evolveum.com/blog/
___________________________________________________
"Semper ID(e)M Vix."
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.evolveum.com/pipermail/midpoint/attachments/20160617/4863e1ba/attachment.htm>
More information about the midPoint
mailing list