<div dir="ltr"><br><div class="gmail_extra"><div class="gmail_quote">On Fri, Jan 31, 2014 at 5:11 PM, Eduardo Martins <span dir="ltr"><<a href="mailto:emartins@redhat.com" target="_blank">emartins@redhat.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="word-wrap:break-word"><div>Sure, all you said is correct, I just said that ideally java:app bindings should be done at app level, and provide the reasoning behind that.</div>
</div></blockquote><div><br></div><div>Indeed, but then if there's only ever a war then web.xml is at the app level, and java:app bindings can be set without architectural concerns in web.xml, can't they?<br></div>
<div><br><br><br> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="word-wrap:break-word"><span class="HOEnZb"><font color="#888888"><div><br></div><div>
—E </div></font></span><div><div class="h5"><div><br><div><div>On 31 Jan 2014, at 15:58, arjan tijms <<a href="mailto:arjan.tijms@gmail.com" target="_blank">arjan.tijms@gmail.com</a>> wrote:</div><br><blockquote type="cite">
<div dir="ltr">Hi,<br><div><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Jan 31, 2014 at 4:45 PM, Eduardo Martins <span dir="ltr"><<a href="mailto:emartins@redhat.com" target="_blank">emartins@redhat.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div style="word-wrap:break-word">Yes, but design wise this should be done at EAR level, preventing the mistake of multiple components trying to bind same entry in java:app.</div>
</blockquote><div><br></div><div>Is that really true if there only ever is the .war? E.g. in the sense as mentioned by Adam here: <a href="http://adam-bien.com/roller/abien/entry/is_java_ee_6_war" target="_blank">http://adam-bien.com/roller/abien/entry/is_java_ee_6_war</a><br>
<br></div><div>Also, don't EJBs inside a .war share java:comp with the web module's single java:comp? So the entire concept of EJB beans having their own component namespace just goes away then. I think in the modern usage pattern of EJBs there's not much use for this anyway. If the CDI bean model effectively replaces the EJB component model in some future Java EE release then all of this is surely history.<br>
<br></div><div>Effectively, in a pure web application (.war, no .ear involved) java:comp is effectively java:module, which should be more straightforward to resolve, shouldn't it?<br></div><div><br><br><br></div><div>
<br><br> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div style="word-wrap:break-word"><span><font color="#888888"><div><br></div>
<div>—E</div></font></span><div><div><br><div><div><div>On 31 Jan 2014, at 15:08, arjan tijms <<a href="mailto:arjan.tijms@gmail.com" target="_blank">arjan.tijms@gmail.com</a>> wrote:</div><br><blockquote type="cite">
<div dir="ltr">Hi,<br><div><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Jan 31, 2014 at 3:03 PM, Eduardo Martins <span dir="ltr"><<a href="mailto:emartins@redhat.com" target="_blank">emartins@redhat.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">or use an ear and define a java:app bind at application.xml, to be shared by all modules and components?<br>
</blockquote>
<div><br></div><div>If you have just a .war, you can use java:app just as well, can't you? I don't think there's a specific need to use an ear just for java:app.<br><br></div><div>Kind regards,<br>Arjan<br></div>
<div><br></div><div><br><br><br> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<br>
—E<br>
<div><br>
<br>
On 31 Jan 2014, at 13:13, Scott Marlow <<a href="mailto:smarlow@redhat.com" target="_blank">smarlow@redhat.com</a>> wrote:<br>
<br>
> Great, thanks for reporting the issue Martin! Great to bring more<br>
> awareness of the deployment problem and workaround.<br>
><br>
> Scott<br>
> On 01/31/2014 08:04 AM, Martin Andersson wrote:<br>
>> Thanks a lot!<br>
>><br>
>> I can confirm that the app works now.<br>
>><br>
>> Br,<br>
>> Martin Andersson<br>
>> Java EE developer at <a href="http://www.purplescout.se/" target="_blank">www.purplescout.se</a> <<a href="http://www.purplescout.se/" target="_blank">http://www.purplescout.se</a>><br>
>><br>
>><br>
>> On Fri, Jan 31, 2014 at 1:55 PM, Scott Marlow <<a href="mailto:smarlow@redhat.com" target="_blank">smarlow@redhat.com</a><br>
>> <mailto:<a href="mailto:smarlow@redhat.com" target="_blank">smarlow@redhat.com</a>>> wrote:<br>
>><br>
>> Hi Arjan,<br>
>><br>
>> Great catch! Your change and adding an persistence unit hint that the<br>
>> persistence unit doesn't need to be started early:<br>
>><br>
>> <property name="wildfly.jpa.twophasebootstrap" value="false"/><br>
>><br>
>> Helps the deployment succeed.<br>
>><br>
>> It looks like ResourceReferenceProcessor is running during the<br>
>> Phase.POST_MODULE deployment phase, so we need to add a hint to the<br>
>> persistence.xml, that helps the persistence unit deploy later.<br>
>><br>
>> [6]<br>
>> <a href="https://github.com/wildfly/wildfly/blob/master/ee/src/main/java/org/jboss/as/ee/subsystem/EeSubsystemAdd.java#L194" target="_blank">https://github.com/wildfly/wildfly/blob/master/ee/src/main/java/org/jboss/as/ee/subsystem/EeSubsystemAdd.java#L194</a><br>
>><br>
>> Scott<br>
>><br>
>> On 01/31/2014 06:25 AM, arjan tijms wrote:<br>
>>> Hi,<br>
>>><br>
>>> I looks like there's one bug in the example.<br>
>>><br>
>>> jboss-web.xml defines jdbc/MyDS<br>
>>><br>
>>> But persistence.xml references java:comp/env/MyDS<br>
>>><br>
>>> Shouldn't the last one be at least java:comp/env/jdbc/MyDS?<br>
>> Regardless,<br>
>>> even with matching names it indeed doesn't work.<br>
>>><br>
>>> Kind regards,<br>
>>> Arjan Tijms<br>
>>><br>
>>><br>
>>><br>
>>><br>
>>><br>
>>><br>
>>><br>
>>><br>
>>><br>
>>> On Thu, Jan 30, 2014 at 9:52 PM, Scott Marlow <<a href="mailto:smarlow@redhat.com" target="_blank">smarlow@redhat.com</a><br>
>> <mailto:<a href="mailto:smarlow@redhat.com" target="_blank">smarlow@redhat.com</a>><br>
>>> <mailto:<a href="mailto:smarlow@redhat.com" target="_blank">smarlow@redhat.com</a> <mailto:<a href="mailto:smarlow@redhat.com" target="_blank">smarlow@redhat.com</a>>>> wrote:<br>
>>><br>
>>> WFLY-2841 reports a deployment failure that occurs when a<br>
>> deployments<br>
>>> [1] persistence.xml, tries to use a resource reference [2]<br>
>> for the<br>
>>> datasource [3]. The error [4] mentions an unresolved<br>
>> (DataSource)<br>
>>> service dependency that is added to the persistence unit<br>
>> service [5],<br>
>>> instead of resolving the resource reference (and using the<br>
>> underlying<br>
>>> DataSource).<br>
>>><br>
>>> How should we handle resource references for this case? Is<br>
>> there a way<br>
>>> to resolve the resource reference directly from deployers?<br>
>> 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>
>>> <jboss-web><br>
>>> <context-root>/wfds</context-root><br>
>>> <resource-ref><br>
>>> <res-ref-name>jdbc/MyDS</res-ref-name><br>
>>> <res-type>javax.sql.DataSource</res-type><br>
>>><br>
>>> <jndi-name>java:jboss/datasources/ExampleDS</jndi-name><br>
>>> </resource-ref><br>
>>> </jboss-web><br>
>>><br>
>>> [3] persistence.xml pu def<br>
>>> <persistence-unit name="wfdsPU" transaction-type="JTA"><br>
>>> <jta-data-source>java:comp/env/MyDS</jta-data-source><br>
>>> </persistence-unit><br>
>>><br>
>>> [4] {"JBAS014771: Services with missing/unavailable<br>
>> dependencies" =><br>
>>><br>
>> ["jboss.persistenceunit.\"wfds-1.0-SNAPSHOT.war#wfdsPU\".__FIRST_PHASE__<br>
>>> is missing<br>
>>><br>
>> [jboss.naming.context.java.module.\"wfds-1.0-SNAPSHOT\".\"wfds-1.0-SNAPSHOT\".env.MyDS]"]}<br>
>>><br>
>>><br>
>>> [5]<br>
>>><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> <mailto:<a href="mailto:wildfly-dev@lists.jboss.org" target="_blank">wildfly-dev@lists.jboss.org</a>><br>
>> <mailto:<a href="mailto:wildfly-dev@lists.jboss.org" target="_blank">wildfly-dev@lists.jboss.org</a><br>
>> <mailto:<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>
>>><br>
>>><br>
>><br>
>> _______________________________________________<br>
>> wildfly-dev mailing list<br>
>> <a href="mailto:wildfly-dev@lists.jboss.org" target="_blank">wildfly-dev@lists.jboss.org</a> <mailto:<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>
>><br>
>><br>
>><br>
>><br>
>> --<br>
>> Hälsningar,<br>
>> Martin Andersson<br>
>> Purple Scout AB<br>
>> <a href="tel:%2B46%20732%2005%2014%2001" value="+46732051401" target="_blank">+46 732 05 14 01</a><br>
><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>
<br>
<br>
_______________________________________________<br>
wildfly-dev mailing list<br>
<a href="mailto:wildfly-dev@lists.jboss.org" target="_blank">wildfly-dev@lists.jboss.org</a><br>
</div><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></div></div>
</blockquote></div><br></div></div></div></div></blockquote></div><br></div></div></div>
</blockquote></div><br></div></div></div></div></blockquote></div><br></div></div>