<div dir="ltr">Thanks for the quick feedback!<div><br></div><div>I removed the typo in persistence.xml and updated the code at <a href="https://github.com/umartin/wfds/">https://github.com/umartin/wfds/</a></div><div><br></div>
<div>But as you say, the deployment still fails.</div><div><br></div><div>Br,</div><div>Martin Andersson</div><div>Java EE developer at <a href="http://www.purplescout.se">www.purplescout.se</a></div></div><div class="gmail_extra">
<br><br><div class="gmail_quote">On Fri, Jan 31, 2014 at 12:25 PM, arjan tijms <span dir="ltr">&lt;<a href="mailto:arjan.tijms@gmail.com" target="_blank">arjan.tijms@gmail.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"><div><div><div><div><div><div>Hi,<br><br></div>I looks like there&#39;s one bug in the example.<br><br></div>jboss-web.xml defines jdbc/MyDS<br><br></div>But persistence.xml references java:comp/env/MyDS<br>

<br></div>Shouldn&#39;t the last one be at least java:comp/env/jdbc/MyDS? Regardless, even with matching names it indeed doesn&#39;t work.<br></div><br></div>Kind regards,<br>Arjan Tijms<br><div><br><br><div><br><div><div>

<br><div><br><br><div><br></div></div></div></div></div></div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Thu, Jan 30, 2014 at 9:52 PM, Scott Marlow <span dir="ltr">&lt;<a href="mailto:smarlow@redhat.com" target="_blank">smarlow@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">WFLY-2841 reports a deployment failure that occurs when a deployments<br>
[1] persistence.xml, tries to use a resource reference [2] for the<br>
datasource [3].  The error [4] mentions an unresolved (DataSource)<br>
service dependency that is added to the persistence unit service [5],<br>
instead of resolving the resource reference (and using the underlying<br>
DataSource).<br>
<br>
How should we handle resource references for this case?  Is there a way<br>
to resolve the resource reference directly from deployers?  Or do we<br>
represent the resource reference as a service?<br>
<br>
Scott<br>
<br>
[1] test app is at <a href="https://github.com/umartin/wfds/" target="_blank">https://github.com/umartin/wfds/</a><br>
<br>
[2] jboss-web.xml<br>
&lt;jboss-web&gt;<br>
         &lt;context-root&gt;/wfds&lt;/context-root&gt;<br>
         &lt;resource-ref&gt;<br>
                 &lt;res-ref-name&gt;jdbc/MyDS&lt;/res-ref-name&gt;<br>
                 &lt;res-type&gt;javax.sql.DataSource&lt;/res-type&gt;<br>
                 &lt;jndi-name&gt;java:jboss/datasources/ExampleDS&lt;/jndi-name&gt;<br>
         &lt;/resource-ref&gt;<br>
&lt;/jboss-web&gt;<br>
<br>
[3] persistence.xml pu def<br>
&lt;persistence-unit name=&quot;wfdsPU&quot; transaction-type=&quot;JTA&quot;&gt;<br>
         &lt;jta-data-source&gt;java:comp/env/MyDS&lt;/jta-data-source&gt;<br>
&lt;/persistence-unit&gt;<br>
<br>
[4] {&quot;JBAS014771: Services with missing/unavailable dependencies&quot; =&gt;<br>
[&quot;jboss.persistenceunit.\&quot;wfds-1.0-SNAPSHOT.war#wfdsPU\&quot;.__FIRST_PHASE__<br>
is missing<br>
[jboss.naming.context.java.module.\&quot;wfds-1.0-SNAPSHOT\&quot;.\&quot;wfds-1.0-SNAPSHOT\&quot;.env.MyDS]&quot;]}<br>
<br>
<br>
[5]<br>
<a href="https://github.com/wildfly/wildfly/blob/master/jpa/core/src/main/java/org/jboss/as/jpa/processor/PersistenceUnitServiceHandler.java#L358" target="_blank">https://github.com/wildfly/wildfly/blob/master/jpa/core/src/main/java/org/jboss/as/jpa/processor/PersistenceUnitServiceHandler.java#L358</a><br>


_______________________________________________<br>
wildfly-dev mailing list<br>
<a href="mailto:wildfly-dev@lists.jboss.org" target="_blank">wildfly-dev@lists.jboss.org</a><br>
<a href="https://lists.jboss.org/mailman/listinfo/wildfly-dev" target="_blank">https://lists.jboss.org/mailman/listinfo/wildfly-dev</a><br>
</blockquote></div><br></div>
<br>_______________________________________________<br>
wildfly-dev mailing list<br>
<a href="mailto:wildfly-dev@lists.jboss.org">wildfly-dev@lists.jboss.org</a><br>
<a href="https://lists.jboss.org/mailman/listinfo/wildfly-dev" target="_blank">https://lists.jboss.org/mailman/listinfo/wildfly-dev</a><br></blockquote></div><br><br clear="all"><div><br></div>-- <br><div dir="ltr">Hälsningar,<div>
Martin Andersson</div><div>Purple Scout AB</div><div>+46 732 05 14 01</div></div>
</div>