<html>
  <head>
    <meta content="text/html; charset=utf-8" http-equiv="Content-Type">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    Well, I was curious.<br>
    <br>
    I tried this (and it works, to not just tease you):<br>
    <br>
    1. configured datasource (jdbc/testds1) in Tomcat's server.xml just
    like in
<a class="moz-txt-link-freetext" href="https://wiki.evolveum.com/display/midPoint/Repository+Configuration#RepositoryConfiguration-Datasourceconfiguration">https://wiki.evolveum.com/display/midPoint/Repository+Configuration#RepositoryConfiguration-Datasourceconfiguration</a><br>
    <br>
    2. configured datasource in tomcat's conf/context.xml just like in
    the same page<br>
    <br>
    3. in resource, I used this:<br>
                <icfc:configurationProperties<br>
               
xmlns:icscdbtable=<a class="moz-txt-link-rfc2396E" href="http://midpoint.evolveum.com/xml/ns/public/connector/icf-1/bundle/com.evolveum.polygon.connector-databasetable/org.identityconnectors.databasetable.DatabaseTableConnector">"http://midpoint.evolveum.com/xml/ns/public/connector/icf-1/bundle/com.evolveum.polygon.connector-databasetable/org.identityconnectors.databasetable.DatabaseTableConnector"</a>><br>
    <br>
                   
    <icscdbtable:table>idrepo</icscdbtable:table><br>
                   
    <icscdbtable:keyColumn>userId</icscdbtable:keyColumn><br>
                   
<icscdbtable:passwordColumn>password</icscdbtable:passwordColumn><br>
                   
<icscdbtable:jdbcDriver>com.mysql.jdbc.Driver</icscdbtable:jdbcDriver><br>
                   
<icscdbtable:jdbcUrlTemplate>jdbc:mysql://%h:%p/%d?useUnicode=true&amp;characterEncoding=utf8&amp;connectionCollation=utf8_bin</icscdbtable:jdbcUrlTemplate><br>
                   
<icscdbtable:enableEmptyString>false</icscdbtable:enableEmptyString><br>
                   
<icscdbtable:rethrowAllSQLExceptions>true</icscdbtable:rethrowAllSQLExceptions><br>
                   
<icscdbtable:nativeTimestamps>false</icscdbtable:nativeTimestamps><br>
                   
    <icscdbtable:allNative>false</icscdbtable:allNative><br>
                   
    <icscdbtable:changeLogColumn></icscdbtable:changeLogColumn><br>
                    <icscdbtable:datasource><b>java:comp/env/jdbc/testds1</b></icscdbtable:datasource><br>
                </icfc:configurationProperties><br>
    <br>
    I.e. I used the same notation as when config.xml datasource
    reference is made, prefixed with "java:comp/env/".<br>
    It worked for me. Please try.<br>
    <br>
    Best regards,<br>
    Ivan<br>
    <br>
    <div class="moz-cite-prefix">On 06/17/2016 10:27 AM, Ramón Cahenzli
      wrote:<br>
    </div>
    <blockquote cite="mid:20160617102741.6414522d@zhdk.ch" type="cite">
      <pre wrap="">Hi Ivan,

Thanks for the response.

</pre>
      <blockquote type="cite">
        <pre wrap="">OK so maybe I was reacting too soon. It seems you are doing
provisioning to MySQL/MariaDB using datasource...
</pre>
      </blockquote>
      <pre wrap="">
Yes, that sounds about right (I'm not quite fluent in midPoint lingo
yet) :)

 
</pre>
      <blockquote type="cite">
        <pre wrap="">Could you please share the MySQL resource configuration?
</pre>
      </blockquote>
      <pre wrap="">
I've adapted the config with the first two steps from here:

<a class="moz-txt-link-freetext" href="https://wiki.evolveum.com/display/midPoint/Repository+Configuration#RepositoryConfiguration-Datasourceconfiguration">https://wiki.evolveum.com/display/midPoint/Repository+Configuration#RepositoryConfiguration-Datasourceconfiguration</a>

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:

<a class="moz-txt-link-freetext" href="https://gist.github.com/psy-q/8c0d931ea53eb35bf5098b59dd38a76d">https://gist.github.com/psy-q/8c0d931ea53eb35bf5098b59dd38a76d</a>

Cheers,

</pre>
    </blockquote>
    <br>
    <pre class="moz-signature" cols="72">-- 
  Ing. Ivan Noris
  Senior Identity Management Engineer & IDM Architect
  evolveum.com                     evolveum.com/blog/
  ___________________________________________________
  "Semper ID(e)M Vix."
</pre>
  </body>
</html>