<html>
  <head>
    <meta content="text/html; charset=windows-1252"
      http-equiv="Content-Type">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    <div>Right, I think this makes sense. We might need to add more
      tests under these conditions. This area sure needs a bit of
      improvement.<br>
    </div>
    <div><br>
    </div>
    <div>It looks like SAPHanaCloudPlatformContainer shouldn't be
      extending JavaEEDefaultContainer, afaik that is only meant to be
      extended by implementations of JavaEE servers (TomEE, Wildfly,
      EAP, Weblogic, GlassFish).<br>
      <br>
    </div>
    <div class="moz-cite-prefix">On 11/24/2014 10:39 AM, Ivan St. Ivanov
      wrote:<br>
    </div>
    <blockquote
cite="mid:CACYLA9EsxV7WtckAwNKz1v8e5V+aSdOAsrMPWDbQSexGv=_iMw@mail.gmail.com"
      type="cite">
      <div dir="ltr">Hi George,
        <div><br>
        </div>
        <div>I was thinking of something general in the area of tying up
          somehow (not coupling) the JPA containers and providers. The
          containers know very well whether they have JPA support at all
          or, if they have, what is their native provider (e.g.
          Hibernate for Wildfly). So IMHO whenever the user specifies a
          container with a provider the setup command should do the
          following:</div>
        <div><br>
        </div>
        <div>1) Validate whether this combination is possible at all
          (e.g. not sure what will happen if we specify Wildfly with
          EclipseLink, at the moment it fails)</div>
        <div>2) If the current container does not have built-in support
          for JPA (i.e. it is based on Tomcat, like SAP HCP) or it
          supports natively different JPA provider, then add the
          listDependencies() content to the pom.xml in the appropriate
          scope</div>
        <div><br>
        </div>
        <div>Something like this. Not sure though how was this whole
          thing intended to work: do we need to fully decouple providers
          and containers in the JPA addon?</div>
        <div><br>
        </div>
        <div>Cheers,</div>
        <div>Ivan</div>
      </div>
      <div class="gmail_extra"><br>
        <div class="gmail_quote">On Mon, Nov 24, 2014 at 1:11 PM, George
          Gastaldi <span dir="ltr">&lt;<a moz-do-not-send="true"
              href="mailto:ggastald@redhat.com" target="_blank">ggastald@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">Hi Ivan,<br>
            <br>
            Yes, that's the idea. It's strange that this method is not
            being called. I'll investigate further.<br>
            <br>
            Another solution would be to create a new Forge's
            PersistenceProvider implementation in a separate addon and
            select that instead when running Jpa:Setup.<br>
            <br>
            Best Regards,<br>
            <br>
            George Gastaldi<br>
            <br>
            <br>
            &gt; Em 24/11/2014, ās 08:25, Ivan St. Ivanov &lt;<a
              moz-do-not-send="true"
              href="mailto:ivan.st.ivanov@gmail.com">ivan.st.ivanov@gmail.com</a>&gt;
            escreveu:<br>
            <div>
              <div class="h5">&gt;<br>
                &gt; Hi everybody,<br>
                &gt;<br>
                &gt; I have the following usecase. I am developing a web
                application that uses JPA with Eclipse Link and will be
                deployed on SAP HANA Cloud Platform (think of it as
                Tomcat). Which means that I need the Eclipse Link
                dependencies in the pom.xml in the compile scope. When I
                generated the project and set up Eclipse Link, I got
                this in the pom:<br>
                &gt;<br>
                &gt;   &lt;dependencies&gt;<br>
                &gt;     &lt;dependency&gt;<br>
                &gt;     
                 &lt;groupId&gt;org.hibernate.javax.persistence&lt;/groupId&gt;<br>
                &gt;     
                 &lt;artifactId&gt;hibernate-jpa-2.0-api&lt;/artifactId&gt;<br>
                &gt;       &lt;scope&gt;provided&lt;/scope&gt;<br>
                &gt;     &lt;/dependency&gt;<br>
                &gt;   &lt;/dependencies&gt;<br>
                &gt;<br>
                &gt; However, I rather need something like:<br>
                &gt;<br>
                &gt;         &lt;dependency&gt;<br>
                &gt;           
                 &lt;groupId&gt;org.eclipse.persistence&lt;/groupId&gt;<br>
                &gt;           
                 &lt;artifactId&gt;javax.persistence&lt;/artifactId&gt;<br>
                &gt;         &lt;/dependency&gt;<br>
                &gt;         &lt;dependency&gt;<br>
                &gt;           
                 &lt;groupId&gt;org.eclipse.persistence&lt;/groupId&gt;<br>
                &gt;           
                 &lt;artifactId&gt;eclipselink&lt;/artifactId&gt;<br>
                &gt;         &lt;/dependency&gt;<br>
                &gt;<br>
                &gt; I see in
                org.jboss.forge.addon.javaee.jpa.providers.EclipseLinkProvider:<br>
                &gt;<br>
                &gt;<br>
                &gt;    @Override<br>
                &gt;    public List&lt;Dependency&gt; listDependencies()<br>
                &gt;    {<br>
                &gt;       return Arrays.asList((Dependency)
                DependencyBuilder.create("org.eclipse.persistence:eclipselink"),<br>
                &gt;                (Dependency)
                DependencyBuilder.create("org.eclipse.persistence:javax.persistence"));<br>
                &gt;    }<br>
                &gt;<br>
                &gt; So we already have functionality on provider level
                that knows which are the dependencies. However, it seems
                that this method is not called. What was the idea of
                having it? How can I make sure that the dependencies are
                correctly configured?<br>
                &gt;<br>
                &gt; I think that it has something to do with the type
                of the container: if it is SAP HANA Cloud Platform, then
                find the dependencies for the JPA provider and add them
                in the default scope of the pom.xml instead of adding
                hibernate-jpa-2.0-api. If it is a full fledged
                application server, then we can go with the API in
                provided scope. Something like this.<br>
                &gt;<br>
                &gt; WDYT?<br>
                &gt;<br>
                &gt; Thanks,<br>
                &gt; Ivan<br>
              </div>
            </div>
            &gt; _______________________________________________<br>
            &gt; forge-dev mailing list<br>
            &gt; <a moz-do-not-send="true"
              href="mailto:forge-dev@lists.jboss.org">forge-dev@lists.jboss.org</a><br>
            &gt; <a moz-do-not-send="true"
              href="https://lists.jboss.org/mailman/listinfo/forge-dev"
              target="_blank">https://lists.jboss.org/mailman/listinfo/forge-dev</a><br>
            <br>
            _______________________________________________<br>
            forge-dev mailing list<br>
            <a moz-do-not-send="true"
              href="mailto:forge-dev@lists.jboss.org">forge-dev@lists.jboss.org</a><br>
            <a moz-do-not-send="true"
              href="https://lists.jboss.org/mailman/listinfo/forge-dev"
              target="_blank">https://lists.jboss.org/mailman/listinfo/forge-dev</a></blockquote>
        </div>
        <br>
      </div>
      <br>
      <fieldset class="mimeAttachmentHeader"></fieldset>
      <br>
      <pre wrap="">_______________________________________________
forge-dev mailing list
<a class="moz-txt-link-abbreviated" href="mailto:forge-dev@lists.jboss.org">forge-dev@lists.jboss.org</a>
<a class="moz-txt-link-freetext" href="https://lists.jboss.org/mailman/listinfo/forge-dev">https://lists.jboss.org/mailman/listinfo/forge-dev</a></pre>
    </blockquote>
    <br>
  </body>
</html>