[jboss-dev-forums] [JBoss AS7 Development] - Re: Running AS7 embedded in Arquillian
Thomas Diesler
do-not-reply at jboss.com
Tue Nov 23 03:13:07 EST 2010
Thomas Diesler [http://community.jboss.org/people/thomas.diesler%40jboss.com] created the discussion
"Re: Running AS7 embedded in Arquillian"
To view the discussion, visit: http://community.jboss.org/message/572387#572387
--------------------------------------------------------------
Ok, lets talk about this in more detail when you have something that runs and are generally happy with.
I generally think that this
> @Dependency("org.jboss.logging"), @Dependency("org.jboss.logmanager")
is evil because results in jboss proprietary manifest headers that also has an equivalent standard, which is http://www.osgi.org/javadoc/r4v42/org/osgi/framework/Constants.html#REQUIRE_BUNDLE Require-Bundle
So instead of putting
> Dependencies: org.jboss.logging, org.jboss.logmanager
we could also add
> Require-Bundle: org.jboss.logging, org.jboss.logmanager
On the topic on why Require-Bundle is also bad see http://jbossosgi.blogspot.com/2010/11/jboss-as7-osgi-integration.html JBoss AS7 OSGi Integration half way down the page section
*3.12.3 Issues With Requiring Bundles*
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'
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 https://github.com/jbosgi/jbosgi/blob/master/testsuite/example/src/test/java/org/jboss/test/osgi/example/xservice/ModuleAccessesBundleServiceTestCase.java ModuleAccessesBundleServiceTestCase
> private JavaArchive getClientModuleArchive() throws Exception
> {
> final JavaArchive archive = ShrinkWrap.create(JavaArchive.class, "example-xservice-client-module");
> archive.addClasses(EchoInvokerService.class, ClientModuleActivator.class);
> String activatorPath = "META-INF/services/" + ServiceActivator.class.getName();
> archive.addResource(getResourceFile("xservice/client-module/" + activatorPath), activatorPath);
> archive.setManifest(getResourceFile("xservice/client-module/" + JarFile.MANIFEST_NAME));
> return archive;
> }
>
--------------------------------------------------------------
Reply to this message by going to Community
[http://community.jboss.org/message/572387#572387]
Start a new discussion in JBoss AS7 Development at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2225]
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/jboss-dev-forums/attachments/20101123/c3cb5178/attachment.html
More information about the jboss-dev-forums
mailing list