I think I have something in mind that should enable servlets to access
the blueprint container and blueprint beans to access the servlet
context without oredring issues.
I'll experiment a bit and come back later.


On Friday, November 19, 2010, Guillaume Nodet <[email protected]> wrote:
> Right, creating servelts is not really a good idea...
> I guess the problem of reusing the default blueprint location and
> headers is that you then need to have cooperation between both
> extenders, and you need to oreder both.   I suppose the web extender
> could wait for the blueprint container to be published...
>
> On Friday, November 19, 2010, Timothy Ward <[email protected]> wrote:
>>
>> Hi,
>>
>> I'm not sure I agree with the WEB-INF/ approach. I think we should stick to 
>> the standard blueprint packaging model (OSGi-INF/blueprint or the 
>> Bundle-Blueprint: header) to avoid confusion. The JPA container similarly 
>> still uses the Meta-Persistence header when processing web applications, 
>> only falling back to Java EE behaviour if there is no header specified. 
>> Given that there is no existing Java EE behaviour for this I'm not sure we 
>> should be inventing it.
>>
>> I'm also not convinced that blueprint should be able to create the
>> servlets. The servlet lifecycle is managed by the web container, and I'm
>>  not sure how we could safely break that link without significantly
>> changing the behaviour of web applications. The last thing I want to do
>> is make web applications "different" when in OSGi, the main point of the
>>  original Web Applications specification was that Java EE web applications 
>> are well
>> understood by developers and we want them to have access to the same 
>> programming model in OSGi.
>>
>> I definitely agree with the final point though. I would very much like to 
>> enable injection of blueprint beans from the Web application's blueprint 
>> into servlets. It would be really nice if we could re-use the @Resource 
>> annotation, perhaps with a "blueprint:" URL scheme, but I don't know how 
>> practical that is. Injecting blueprint beans into servlets would be an 
>> excellent way to get dependency wiring and service damping and I'm 100% a +1 
>> for that part.
>>
>>
>> Regards,
>>
>> Tim
>>
>>
>> ----------------------------------------
>>> Date: Fri, 19 Nov 2010 10:24:43 +0100
>>> From: [email protected]
>>> To: [email protected]
>>> Subject: Re: [DISCUSS] WAB and blueprint
>>>
>>> Why don't we follow the same approach as spring-dm
>>>
>>> So all the blueprint.xml files placed in WEB-INF folder of the WAR (=
>>> bundle) will be loaded by the blueprint container at the bundle startup
>>>
>>> On 18/11/10 21:37, Guillaume Nodet wrote:
>>> > I think having a web app packaged as a web application will become
>>> > more and more common in OSGi and we should provide an easy way to
>>> > leverage blueprint to create the servlets, do some injection of osgi
>>> > services into servlets, etc...
>>> > As anyone thought about anything in this area yet ?
>>> >
>>
>
> --
> Cheers,
> Guillaume Nodet
> ------------------------
> Blog: http://gnodet.blogspot.com/
> ------------------------
> Open Source SOA
> http://fusesource.com
>

-- 
Cheers,
Guillaume Nodet
------------------------
Blog: http://gnodet.blogspot.com/
------------------------
Open Source SOA
http://fusesource.com

Reply via email to