<!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/thomas.diesler%40jboss.com">Thomas Diesler</a> in <i>JBoss AS7 Development</i> - <a href="http://community.jboss.org/message/572387#572387">View the full discussion</a>
</span>
<hr style="margin: 20px 0; border: none; background-color: #dadada; height: 1px;">

<div class="jive-rendered-content"><p>Ok, lets talk about this in more detail when you have something that runs and are generally happy with.</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>I generally think that this</p><blockquote class="jive-quote">@Dependency("org.jboss.logging"), @Dependency("org.jboss.logmanager")</blockquote><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>is evil because results in jboss proprietary manifest headers that also has an equivalent standard, which is <a class="jive-link-external-small" href="http://www.osgi.org/javadoc/r4v42/org/osgi/framework/Constants.html#REQUIRE_BUNDLE">Require-Bundle</a></p><p>So instead of putting</p><blockquote class="jive-quote"><p>Dependencies: org.jboss.logging, org.jboss.logmanager</p></blockquote><p>we could also add</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><blockquote class="jive-quote"><p>Require-Bundle: org.jboss.logging, org.jboss.logmanager</p></blockquote><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>On the topic on why Require-Bundle is also bad see <a class="jive-link-external-small" href="http://jbossosgi.blogspot.com/2010/11/jboss-as7-osgi-integration.html">JBoss AS7 OSGi Integration</a> half way down the page section</p><p><strong> 3.12.3 Issues With Requiring Bundles</strong></p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>Our demos should show the recommended set of AS7 best practises, so perhaps we need to reach a conclusion on 'Dependencies' vs. 'Require-Bundle' vs. 'Package-Import'</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><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></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/572387#572387">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>