[jboss-as7-dev] [OSGi WAB support] webbundle: URL handler
David Bosschaert
david at redhat.com
Thu Nov 29 06:29:58 EST 2012
Hi Thomas,
I have the following issues with your suggestion.
1. I don't fully see how the information available to the URL handler
can be associated with the information available to the
DeploymentUnitProcessor. The URL handler has the URL, that's all, while
AFAICS the original URL (or whatever was inside the webbundle: url) is
no longer available when the deploy() method is called.
2. If we find a way to fix 1. this will only work if people use
BundleContext.install(String location). It will fail when people call
url.openStream() on the webbundle: url and does not work with
BundleContext.install(String, InputStream).
Another approach would be to simply let the URL handler do all the work,
i.e. modify the stream being passed through. Then those URLs will work
in any context.
Cheers,
David
On 26/11/2012 17:25, Thomas Diesler wrote:
> Hi David,
>
> here a quick summary of what I suggested today:
>
> The first thing that sees the URL coming from
> BundleContext.install(...) is the Framework, which has a notion of
> pluggable URL handlers.
> In AS7 the URL handler should be an integration plugin and a DUP at
> the same time. The DUP would do nothing as long as the plugin
> is not activated (i.e. the framework is down). When the Framework
> activates the URL handler gets registered with the framework and the
> DUP becomes active.
>
> The DUP would then need to provide OSGiMetaData with a
> Bunde-SymbolicName and Bundle-Classpath. The Bundle-Classpath should
> point to WEB-INF/classes and
> the collection of stuff in WEB-INF/lib. For completeness it could
> generate Package-Import requirements on the javax.servlet.* APIs. The
> DUP should be placed after
> the DUP that normally provides OSGiMetaData and should do nothing if
> the OSGiMetaData is already there.
>
> Hope that helps, cheers
> --thomas
>
>
> On 11/21/2012 05:58 PM, David Bosschaert wrote:
>> Hi all,
>>
>> As part of making the JBoss OSGi Web Application Support compliant with
>> the spec I have started running it through the OSGi TCK.
>> I noticed that the TCK depends heavily on the webbundle: URL protocol
>> which is specified in section 128.4 of the specification - it is not an
>> optional piece. So in order to support this we need to provide such a
>> URL handler.
>>
>> As the webbundle: handler is never part of runtime operation (it only
>> converts a WAR file into a WAB file on the fly) I was looking into
>> possibly using existing implementations of the URL handler instead.
>> However the ones that I found are quite heavy on the dependencies. The
>> implementation in Aries depends on Blueprint being present and the one
>> in Pax has about 10 other dependencies (including junit) - they drag in
>> too much baggage IMHO.
>>
>> So I'm starting to come to the conclusion that we need to provide such
>> an implementation as part of the OSGi webbundle support in AS7. The JIRA
>> is https://issues.jboss.org/browse/AS7-6006
>>
>> Any other ideas?
>>
>> Cheers,
>>
>> David
>> _______________________________________________
>> jboss-as7-dev mailing list
>> jboss-as7-dev at lists.jboss.org
>> https://lists.jboss.org/mailman/listinfo/jboss-as7-dev
>
More information about the jboss-as7-dev
mailing list