<div dir="ltr">By the way the custom entities thingy can be used with your new deployer as well. It&#39;s just a simpler way to add one or two custom entities.</div><div class="gmail_extra"><br><div class="gmail_quote">On 19 August 2016 at 15:04, Stian Thorgersen <span dir="ltr">&lt;<a href="mailto:sthorger@redhat.com" target="_blank">sthorger@redhat.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote"><span class="">On 19 August 2016 at 14:57, Bill Burke <span dir="ltr">&lt;<a href="mailto:bburke@redhat.com" target="_blank">bburke@redhat.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
  
    
  
  <div bgcolor="#FFFFFF" text="#000000"><span>
    <p><br>
    </p>
    <br>
    <div>On 8/19/16 2:34 AM, Stian Thorgersen
      wrote:<br>
    </div>
    <blockquote type="cite">
      <div dir="ltr"><br>
        <div class="gmail_extra"><br>
          <div class="gmail_quote">On 18 August 2016 at 19:26, Bill
            Burke <span dir="ltr">&lt;<a href="mailto:bburke@redhat.com" target="_blank">bburke@redhat.com</a>&gt;</span>
            wrote:<br>
            <blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
              <div bgcolor="#FFFFFF" text="#000000"><span>
                  <p><br>
                  </p>
                  <br>
                  <div>On 8/18/16 1:13 AM, Stian Thorgersen wrote:<br>
                  </div>
                  <blockquote type="cite">
                    <div dir="ltr">One problem with this approach is
                      that you end up having a separate JDBC connection
                      and transaction even if it uses the same database
                      the Keycloak server uses.
                      <div><br>
                      </div>
                    </div>
                  </blockquote>
                </span> Something we have to fix anyways.  Its on my
                todo list. </div>
            </blockquote>
            <blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
              <div bgcolor="#FFFFFF" text="#000000"><span><br>
                  <br>
                  <blockquote type="cite">
                    <div dir="ltr">
                      <div>Take a look at <a href="https://github.com/keycloak/keycloak/tree/master/examples/providers/domain-extension/src/main/java/org/keycloak/examples/domainextension/jpa" target="_blank">https://github.com/keycloak/ke<wbr>ycloak/tree/master/examples/pr<wbr>oviders/domain-extension/src/m<wbr>ain/java/org/keycloak/examples<wbr>/domainextension/jpa</a>
                        for example which allows adding custom entities
                        to the main EntityManager.</div>
                    </div>
                    <div class="gmail_extra"><br>
                    </div>
                  </blockquote>
                </span> I&#39;m really not a big fan of this extension and
                this is something I do not want to support for product
                ever.</div>
            </blockquote>
            <div><br>
            </div>
            <div>Why, please elaborate? IMO it&#39;s a really nice and
              simple way to add a few extra entities for custom
              providers.</div>
          </div>
        </div>
      </div>
    </blockquote></span>
    Are you going to make our JPA entity classes public?  If not, what&#39;s
    the point of this extension?  Now that we have real deployers, its
    now easier to write your own persistence unit.  Take a look at the
    example:<br></div></blockquote><div><br></div></span><div>Has nothing to do with our entity classes. It allows users to easily register an extra entity in our persistence unit, so same connection and transaction and no need to create a persistence unit at all. It also has support for Liquibase so schema is update the same way as with our stuff. Users would then get the EntityManager from the JpaConnectionProvider and be able to get their custom entities from there.</div><div><br></div><div>It&#39;s simpler than what you have. Doesn&#39;t work if folks want a different database and such though.</div><span class=""><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div bgcolor="#FFFFFF" text="#000000">
    <br>
<a href="https://github.com/keycloak/keycloak/tree/master/examples/providers/user-storage-jpa/src/main/java/org/keycloak/examples/storage/user" target="_blank">https://github.com/keycloak/ke<wbr>ycloak/tree/master/examples/pr<wbr>oviders/user-storage-jpa/src/<wbr>main/java/org/keycloak/example<wbr>s/storage/user</a><br>
    <br>
    Coding EJB and JPA is really easy, simple and fast.<br></div></blockquote><div><br></div></span><div>For JEE devs yes.</div><span class=""><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div bgcolor="#FFFFFF" text="#000000">
    <br>
    Also, with this extension, you have the possibility of customers
    being dependent on our data model and the data model becomes
    something that needs to be backward compatible.  <br></div></blockquote><div><br></div></span><div>Nah - because our entities is in a private module and they&#39;ll get a warning if they include that in their provider.</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div bgcolor="#FFFFFF" text="#000000"><span><font color="#888888">
    <br>
    Bill<br>
    <br>
  </font></span></div>

</blockquote></div><br></div></div>
</blockquote></div><br></div>