AS7/JNDI integration
by Thomas Diesler
Hi David,
I took another look at the AS7/JNDI integration and what we can expect
from aries-jndi-1.0.0. Please take check out these findings.
https://community.jboss.org/message/751138#751138
cheers
--thomas
--
xxxxxxxxxxxxxxxxxxxxxxxxxxxx
Thomas Diesler
JBoss OSGi Lead
JBoss, a division of Red Hat
xxxxxxxxxxxxxxxxxxxxxxxxxxxx
12 years, 4 months
Re: [jboss-osgi-dev] [jboss-osgi-users] How can I start a fragment bundle in JBoss7?
by Thomas Diesler
> Do you mean I can define a fragment bundle as a capability also in
JBoss just as host bundles?
Yes, this should work. We used to do this with our JBoss branding
fragment for the Felix Webconsole.
> make sure fragment bundle be started
By definition, fragments cannot be started. You assign a startlevel to
the host. The fragment attaches when the host gets resolved.
--thomas
On 07/31/2012 09:28 AM, ZHANG Rocky F wrote:
>
> Thomas,
>
> I am using JBoss 7.1.0.final.
>
> Do you mean I can define a fragment bundle as a capability also in
> JBoss just as host bundles?
>
> Can I also assign a startlevel to such a capability to make sure
> fragment bundle be started before its host bundle?
>
> Thanks,
> Rocky
>
> ------------------------------------------------------------------------
>
> *From:*Thomas Diesler [mailto:thomas.diesler@jboss.com]
> *Sent:* 2012年7月31日15:19
> *To:* ZHANG Rocky F
> *Cc:* jboss-osgi-dev(a)lists.jboss.org; jboss-osgi-users(a)lists.jboss.org
> *Subject:* Re: [jboss-osgi-users] How can I start a fragment bundle in
> JBoss7?
>
> Both approaches should work. Which version of AS are we talking about?
> Please create a jira issue <https://issues.jboss.org/browse/AS7> issue
> if you should also see this with 7.1.2.
> The debug log should give detailed enough information to tell whats
> going on.
>
> cheers
> -thomas
>
> On 07/30/2012 10:16 AM, ZHANG Rocky F wrote:
>
>> Hi all,
>>
>> I am using JBoss to manage my OSGi bundles.
>>
>> I have tried to bring my bundles as capabilities in standalone.xml as
>> below:
>>
>> <capability name="com.xxx.logger" startlevel="4"/>
>>
>> No problem.
>>
>> But when I try to deploy a fragment bundle whose host bundle is
>> deployed as capability,
>>
>> I have tried the following two ways, but neither succeed.
>>
>> 1) deploy the fragment bundle also as a capability without a startlevel.
>>
>> 2) put the fragment bundle into deployments directory of standalone.
>>
>> Anyone can instruct me about how to do?
>>
>> Thanks you very much!
>>
>> Thanks,
>>
>> Rocky
>>
>>
>>
>>
>> _______________________________________________
>> jboss-osgi-users mailing list
>> jboss-osgi-users(a)lists.jboss.org <mailto:jboss-osgi-users@lists.jboss.org>
>> https://lists.jboss.org/mailman/listinfo/jboss-osgi-users
>
>
>
> --
> xxxxxxxxxxxxxxxxxxxxxxxxxxxx
> Thomas Diesler
> JBoss OSGi Lead
> JBoss, a division of Red Hat
> xxxxxxxxxxxxxxxxxxxxxxxxxxxx
--
xxxxxxxxxxxxxxxxxxxxxxxxxxxx
Thomas Diesler
JBoss OSGi Lead
JBoss, a division of Red Hat
xxxxxxxxxxxxxxxxxxxxxxxxxxxx
12 years, 4 months
Re: [jboss-osgi-dev] [jboss-osgi-users] How can I start a fragment bundle in JBoss7?
by Thomas Diesler
Both approaches should work. Which version of AS are we talking about?
Please create a jira issue <https://issues.jboss.org/browse/AS7> issue
if you should also see this with 7.1.2.
The debug log should give detailed enough information to tell whats
going on.
cheers
-thomas
On 07/30/2012 10:16 AM, ZHANG Rocky F wrote:
> Hi all,
> I am using JBoss to manage my OSGi bundles.
> I have tried to bring my bundles as capabilities in standalone.xml as
> below:
> <capability name="com.xxx.logger" startlevel="4"/>
> No problem.
> But when I try to deploy a fragment bundle whose host bundle is
> deployed as capability,
> I have tried the following two ways, but neither succeed.
> 1) deploy the fragment bundle also as a capability without a startlevel.
> 2) put the fragment bundle into deployments directory of standalone.
> Anyone can instruct me about how to do?
> Thanks you very much!
> Thanks,
> Rocky
>
>
> _______________________________________________
> jboss-osgi-users mailing list
> jboss-osgi-users(a)lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/jboss-osgi-users
--
xxxxxxxxxxxxxxxxxxxxxxxxxxxx
Thomas Diesler
JBoss OSGi Lead
JBoss, a division of Red Hat
xxxxxxxxxxxxxxxxxxxxxxxxxxxx
12 years, 4 months
Reflection Index for Bundles deployed via BundleContext.installBundle()
by David Bosschaert
Hi all,
I came across the following issue while working on a system test that
deploys a bundles and WABs through BundleContext.installBundle().
Bundles installed this way cause the following error:
> WARN [org.jboss.as.server.deployment] (MSC service thread 1-16)
> JBAS015967: Cannot install reflection index for unresolved bundle:
> eventadmin.jar
In the case of my WAB I end up getting a NPE later on in
org.jboss.as.ee.component.deployers.InterceptorAnnotationProcessor.processComponentConfig()
which expects an Attachments.REFLECTION_INDEX on the deployment.
What's this REFLECTION_INDEX used for and why does it not work for
bundles installed via BundleContext.installBundle()?
Cheers,
David
12 years, 4 months
Re: [jboss-osgi-dev] Running the OSGi TCK with AS7
by Thomas Diesler
Grazie mille.
We already have this issue for it
https://issues.jboss.org/browse/JBOSGI-499
On 07/26/2012 01:43 PM, David Bosschaert wrote:
> On 26/07/2012 11:41, Thomas Diesler wrote:
>
>> It would require to bootstrap AS7 through the framework launch API.
> Yes.
> I don't see any other way to run the WAB support through the CT, so
> I'll have a look at this...
>
> Cheers,
>
> David
--
xxxxxxxxxxxxxxxxxxxxxxxxxxxx
Thomas Diesler
JBoss OSGi Lead
JBoss, a division of Red Hat
xxxxxxxxxxxxxxxxxxxxxxxxxxxx
12 years, 4 months
POST_INSTALL Phase Was: [jboss-as] AS7-5199 Publish ServletContext as OSGi Service (dad273c)
by David Bosschaert
Hi all,
It makes sense to me to add such a POST_INSTALL phase. I'm sure there
are other components that would benefit from something like that.
Would this have a big impact on the AS7 architecture?
Thanks,
David
On 25/07/2012 09:09, David Bosschaert wrote:
> ---------- Forwarded message ----------
> From: Thomas Diesler
> <reply+c-1626321-f97bf8be1fd0a265331a53389e5a9ebf4ae796e6-226514(a)reply.github.com>
> Date: 25 July 2012 08:53
> Subject: Re: [jboss-as] AS7-5199 Publish ServletContext as OSGi
> Service (dad273c)
> To: David Bosschaert <david.bosschaert(a)gmail.com>
>
>
> This currently relies on the BundleActivateProcessor doing its work
> synchronously. Following the design this cannot be assumed. We would
> actually need a new Phase (e.g. POST_INSTALL) to do this properly.
>
> ---
> Reply to this email directly or view it on GitHub:
> https://github.com/bosschaert/jboss-as/commit/dad273c2ecb5ccbbe0afb4f055c...
12 years, 4 months
Request for feedback on AS7-5203
by David Bosschaert
Hi all,
I began completing the OSGi WAB support that Thomas started some time
ago. The first piece I looked at is AS7-5203 which gives Servlets access
to the OSGi BundleContext via the ServletContext.
Before filing a pull I'm looking for some feedback on how I implemented
this. Maybe people have thoughts re how it can be improved or
simplified. It currently works like this:
* I added a DeploymentUnitProcessor in the REGISTER phase that adds a
WebContextFactory.ATTACHMENT to the deployment unit.
* This attachment is picked up by JBoss Web (it already provided this hook).
* When the Bundle representing the WAB is started it calls back into the
WebContextFactory to set the BundleContext in the ServletContext. It
does this via a MSC Service that in turn uses an OSGi BundleListener.
The changes are here:
https://github.com/bosschaert/jboss-as/commit/9ab72ce08a3357a3e6fdb1a68c2...
Thanks,
David
12 years, 4 months
NoClassDefFoundError on ModuleIdentifier in jboss-as-osgi-web
by David Bosschaert
Hi,
I'm getting a little confused about the JBoss Modules dependencies
available in the jboss-as-osgi-web project.
I want to use the ModuleIdentifier class in this module in a
DeploymentUnitProcessor, like the following
public static class WebContextFactoryProcessor implements
DeploymentUnitProcessor {
@Override
public void deploy(DeploymentPhaseContext phaseContext) throws
DeploymentUnitProcessingException {
DeploymentUnit depUnit = phaseContext.getDeploymentUnit();
ModuleIdentifier mid =
depUnit.getAttachment(Attachments.MODULE_IDENTIFIER));
The jboss-as-osgi-web module itself has the dependency on the
org.jboss.modules module:
<module xmlns="urn:jboss:module:1.1" name="org.jboss.as.web">
<properties>
<property name="jboss.api" value="private"/>
</properties>
<dependencies>
<!-- ... -->
<module name="org.jboss.modules"/>
However, I'm getting a NoClassDefFoundError:
java.lang.NoClassDefFoundError: org/jboss/modules/ModuleIdentifier
at
org.jboss.as.osgi.web.WebContextActivationProcessor$WebContextFactoryProcessor.deploy(WebContextActivationProcessor.java:82)
at
org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:116)
[jboss-as-server-7.2.0.Alpha1-SNAPSHOT.jar:7.2.0.Alpha1-SNAPSHOT]
I'm probably missing something obvious, anyone an idea?
Cheers,
David
12 years, 4 months