Hi all !<br>talking about Classloading docs, I've noticed an issue when defining new deployments with jboss-deployment-structure.xml. <br><br>For example: I'm re-exporting the org.apache.log4j container module into a new module (deployment.mylog4j) excluding the package org/apache/log4j/chainsaw which is loaded somewhere else through a dependency.<br>
<br> <module name="deployment.mylog4j" ><br> <resource-roots><br> <resource-root path="log4j-1.2.16.jar" ><br> <filters><br> <exclude path="org/apache/log4j/chainsaw" /><br>
</filters><br> </resource-root><br> </resource-roots><br> </module><br><br>The AS reports:<br><br>eam.XMLStreamException: ParseError at [row,col]:[34,5]<br>Message: Unexpected content of type 'element start' named 'resource-roots'<br>
at org.jboss.as.server.deployment.module.DeploymentStructureDescriptorParser.unexpectedContent(DeploymentStructureDescriptorParser.java:483)<br> at org.jboss.as.server.deployment.module.DeploymentStructureDescriptorParser.parseModuleStructureSpec(DeploymentStructureDescriptorParser.java:695)<br>
at org.jboss.as.server.deployment.module.DeploymentStructureDescriptorParser.parseModule(DeploymentStructureDescriptorParser.java:660)<br> at org.jboss.as.server.deployment.module.DeploymentStructureDescriptorParser.parseStructureContents(DeploymentStructureDescriptorParser.java:581)<br>
at org.jboss.as.server.deployment.module.DeploymentStructureDescriptorParser.parseDocument(DeploymentStructureDescriptorParser.java:510)<br> at org.jboss.as.server.deployment.module.DeploymentStructureDescriptorParser.parse(DeploymentStructureDescriptorParser.java:396)<br>
<div class="gmail_quote"><br><br>Is it an issue with documentation or with .xsd ?? <br>Thanks<br>kind regards<br>Francesco<br>2011/7/19 Jaikiran Pai <span dir="ltr"><<a href="mailto:jpai@redhat.com">jpai@redhat.com</a>></span><br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">The document has been updated<br>
<a href="https://docs.jboss.org/author/display/AS7/Class+Loading+in+AS7" target="_blank">https://docs.jboss.org/author/display/AS7/Class+Loading+in+AS7</a>. Thanks<br>
for pointing out the discrepancy and let us know if there are any more<br>
changes that you would like to see.<br>
<font color="#888888"><br>
-Jaikiran<br>
</font><div><div></div><div class="h5">On Tuesday 19 July 2011 10:28 AM, Jaikiran Pai wrote:<br>
> Sure, will do.<br>
><br>
> -Jaikiran<br>
> On Tuesday 19 July 2011 10:25 AM, Vimal Kansal wrote:<br>
>> Thanks a lot Jaikiran. Also can you please elaborating/rephrasing the<br>
>> content in doco using the descriprion from .xsd, I think the one in .xsd<br>
>> is more clear.<br>
>><br>
>> On 19/07/2011 2:47 PM, Jaikiran Pai wrote:<br>
>>> That looks like a typo in that Classloading doc. The jboss-ee.xsd is<br>
>>> correct. I'll fix the doc later today when I've fully woken up.<br>
>>><br>
>>> -Jaikiran<br>
>>> On Tuesday 19 July 2011 10:11 AM, Vimal Kansal wrote:<br>
>>>> Hi,<br>
>>>><br>
>>>> It appears that EAR classloading documentation at<br>
>>>> <a href="https://docs.jboss.org/author/display/AS7/Class+Loading+in+AS7" target="_blank">https://docs.jboss.org/author/display/AS7/Class+Loading+in+AS7</a> is in<br>
>>>> contradiction with what "jboss-ee.xsd describes :<br>
>>>><br>
>>>> AS7 Doc version<br>
>>>> ==============<br>
>>>><br>
>>>> <subsystem xmlns="urn:jboss:domain:ee:1.0"><br>
>>>> <ear-subdeployments-isolated>false</ear-subdeployments-isolated><br>
>>>> </subsystem><br>
>>>><br>
>>>> By default this is set to true, which means that sub deployments will be<br>
>>>> able to see other non-war sub-deployments classes by default (i.e. a war<br>
>>>> deployment's module will have a dependency on all other ejb-jar<br>
>>>> sub-deployments, however it will not have a module dependency on any<br>
>>>> other war deployments).<br>
>>>><br>
>>>> If this is set to false then no automatic dependencies are set up, they<br>
>>>> must be setup manually with Class-Path entries, or by setting up<br>
>>>> explicit module dependencies. This means that WARs (and other EJB jars)<br>
>>>> do not have access to classes defined in an EJB jar unless an explicit<br>
>>>> dependency is defined. The Java EE specification says that portable<br>
>>>> applications should not rely on sub deployments having access to other<br>
>>>> sub deployments that they do not have a Class-Path entry on, so portable<br>
>>>> applications should always use Class-Path entry's to explicitly state<br>
>>>> their dependencies.<br>
>>>><br>
>>>> jboss-ee.xsd version<br>
>>>> ==================<br>
>>>> Flag indicating whether each of the subdeployments within a .ear can<br>
>>>> access classes belonging to<br>
>>>> another subdeployment within the same .ear. Setting<br>
>>>> this to false, allows the subdeployments to<br>
>>>> see classes belonging to other subdeployments<br>
>>>> within the .ear.<br>
>>>> For example:<br>
>>>> myapp.ear<br>
>>>> |<br>
>>>> |--- web.war<br>
>>>> |<br>
>>>> |--- ejb1.jar<br>
>>>> |<br>
>>>> |--- ejb2.jar<br>
>>>><br>
>>>> If the ear-subdeployments-isolated is set to false,<br>
>>>> then the classes in web.war can access classes<br>
>>>> belonging to ejb1.jar and ejb2.jar. Similarly,<br>
>>>> classes from ejb1.jar can access classes from ejb2.jar<br>
>>>> (and vice-versa).<br>
>>>><br>
>>>> *Note that this flag, has no effect on the isolated<br>
>>>> classloader of the .war file(s). i.e. irrespective<br>
>>>> of whether this flag is set to true or false, the<br>
>>>> .war within a .ear will have a isolated classloader<br>
>>>> and other subdeployments within that .ear will not<br>
>>>> be able to access classes from that .war. This is<br>
>>>> as per spec*<br>
>>>><br>
>>>> Thx<br>
>>>><br>
>>>> Vimal<br>
>>>><br>
>>>> _______________________________________________<br>
>>>> jboss-as7-dev mailing list<br>
>>>> <a href="mailto:jboss-as7-dev@lists.jboss.org">jboss-as7-dev@lists.jboss.org</a><br>
>>>> <a href="https://lists.jboss.org/mailman/listinfo/jboss-as7-dev" target="_blank">https://lists.jboss.org/mailman/listinfo/jboss-as7-dev</a><br>
>>> _______________________________________________<br>
>>> jboss-as7-dev mailing list<br>
>>> <a href="mailto:jboss-as7-dev@lists.jboss.org">jboss-as7-dev@lists.jboss.org</a><br>
>>> <a href="https://lists.jboss.org/mailman/listinfo/jboss-as7-dev" target="_blank">https://lists.jboss.org/mailman/listinfo/jboss-as7-dev</a><br>
>><br>
>> _______________________________________________<br>
>> jboss-as7-dev mailing list<br>
>> <a href="mailto:jboss-as7-dev@lists.jboss.org">jboss-as7-dev@lists.jboss.org</a><br>
>> <a href="https://lists.jboss.org/mailman/listinfo/jboss-as7-dev" target="_blank">https://lists.jboss.org/mailman/listinfo/jboss-as7-dev</a><br>
><br>
> _______________________________________________<br>
> jboss-as7-dev mailing list<br>
> <a href="mailto:jboss-as7-dev@lists.jboss.org">jboss-as7-dev@lists.jboss.org</a><br>
> <a href="https://lists.jboss.org/mailman/listinfo/jboss-as7-dev" target="_blank">https://lists.jboss.org/mailman/listinfo/jboss-as7-dev</a><br>
<br>
_______________________________________________<br>
jboss-as7-dev mailing list<br>
<a href="mailto:jboss-as7-dev@lists.jboss.org">jboss-as7-dev@lists.jboss.org</a><br>
<a href="https://lists.jboss.org/mailman/listinfo/jboss-as7-dev" target="_blank">https://lists.jboss.org/mailman/listinfo/jboss-as7-dev</a><br>
</div></div></blockquote></div><br>