<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<body link="#355491" alink="#4262a1" vlink="#355491" style="background: #e2e2e2; margin: 0; padding: 20px;">

<div>
        <table cellpadding="0" bgcolor="#FFFFFF" border="0" cellspacing="0" style="border: 1px solid #dadada; margin-bottom: 30px; width: 100%; -moz-border-radius: 6px; -webkit-border-radius: 6px;">
                <tbody>
                        <tr>

                                <td>

                                        <table border="0" cellpadding="0" cellspacing="0" bgcolor="#FFFFFF" style="border: solid 2px #ccc; background: #dadada; width: 100%; -moz-border-radius: 6px; -webkit-border-radius: 6px;">
                                                <tbody>
                                                        <tr>
                                                                <td bgcolor="#000000" valign="middle" height="58px" style="border-bottom: 1px solid #ccc; padding: 20px; -moz-border-radius-topleft: 3px; -moz-border-radius-topright: 3px; -webkit-border-top-right-radius: 5px; -webkit-border-top-left-radius: 5px;">
                                                                        <h1 style="color: #333333; font: bold 22px Arial, Helvetica, sans-serif; margin: 0; display: block !important;">
                                                                        <!-- To have a header image/logo replace the name below with your img tag -->
                                                                        <!-- Email clients will render the images when the message is read so any image -->
                                                                        <!-- must be made available on a public server, so that all recipients can load the image. -->
                                                                        <a href="http://community.jboss.org/index.jspa" style="text-decoration: none; color: #E1E1E1">JBoss Community</a></h1>
                                                                </td>

                                                        </tr>
                                                        <tr>
                                                                <td bgcolor="#FFFFFF" style="font: normal 12px Arial, Helvetica, sans-serif; color:#333333; padding: 20px;  -moz-border-radius-bottomleft: 4px; -moz-border-radius-bottomright: 4px; -webkit-border-bottom-right-radius: 5px; -webkit-border-bottom-left-radius: 5px;"><h3 style="margin: 10px 0 5px; font-size: 17px; font-weight: normal;">
    Re: Running AS7 embedded in Arquillian
</h3>
<span style="margin-bottom: 10px;">
    created by <a href="http://community.jboss.org/people/kabir.khan%40jboss.com">Kabir Khan</a> in <i>JBoss AS7 Development</i> - <a href="http://community.jboss.org/message/572428#572428">View the full discussion</a>
</span>
<hr style="margin: 20px 0; border: none; background-color: #dadada; height: 1px;">

<div class="jive-rendered-content"><p>I've taken a better look at your solution now, and we are taking two opposite approaches.</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>Most of my work was done before Brian pointed out to me that the -Djava.class.path system property has influence on what is visible to the module system. In my case I am making sure everything runs in modules, both the test itself and the server. This might be overkill and forces a lot of definition of modules etc. which although made simple to set up will still probably be confusing to users new to module classloading.</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>In your case the server is started up using modules with the classpath and with the test itself and its dependencies using the app classpath, the -Djava.class.path system property controls that the app classpath is not visible to the server. I will look more into your solution now, but what you have is a lot simpler to set for the user so I think we should go with something based on that. I would still like a hook in Arquillian to be able to set tccl before starting it so that your logging abstraction is not necessary.</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><blockquote class="jive-quote"><p>For now I would say that 'Dependencies' does exist and gets processed by the DUP, but we should not promote its usage by introducing an annotation for it. How about requiring the user to explicitly put it in the @Deployment artifact manifest like I do in <a class="jive-link-external-small" href="https://github.com/jbosgi/jbosgi/blob/master/testsuite/example/src/test/java/org/jboss/test/osgi/example/xservice/ModuleAccessesBundleServiceTestCase.java">ModuleAccessesBundleServiceTestCase</a></p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><blockquote class="jive-quote"><div class="line" id="LC138">&#160;&#160; private JavaArchive getClientModuleArchive() throws Exception</div><div class="line" id="LC139">&#160;&#160; {</div><div class="line" id="LC140">&#160;&#160;&#160;&#160;&#160; final JavaArchive archive = ShrinkWrap.create(JavaArchive.class, "example-xservice-client-module");</div><div class="line" id="LC141">&#160;&#160;&#160;&#160;&#160; archive.addClasses(EchoInvokerService.class, ClientModuleActivator.class);</div><div class="line" id="LC142">&#160;&#160;&#160;&#160;&#160; String activatorPath = "META-INF/services/" + ServiceActivator.class.getName();</div><div class="line" id="LC143">&#160;&#160;&#160;&#160;&#160; archive.addResource(getResourceFile("xservice/client-module/" + activatorPath), activatorPath);</div><div class="line" id="LC144">&#160;&#160;&#160;&#160;&#160; archive.setManifest(getResourceFile("xservice/client-module/" + JarFile.MANIFEST_NAME));</div><div class="line" id="LC145">&#160;&#160;&#160;&#160;&#160; return archive;</div><div class="line" id="LC146">&#160;&#160; }</div><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p></blockquote></blockquote><p>This is something I was already doing for the demos. I don't really like it though, I think it would be nicer to be able to specify this somehow from within the test itself rather than having loads of manifest files in the resources but we can talk about that later. </p></div>

<div style="background-color: #f4f4f4; padding: 10px; margin-top: 20px;">
    <p style="margin: 0;">Reply to this message by <a href="http://community.jboss.org/message/572428#572428">going to Community</a></p>
        <p style="margin: 0;">Start a new discussion in JBoss AS7 Development at <a href="http://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2225">Community</a></p>
</div></td>
                        </tr>
                    </tbody>
                </table>


                </td>
            </tr>
        </tbody>
    </table>

</div>

</body>
</html>