In the weld the contexts(session, conversation, requests) are initialized or restored with WeldListener, in reality, the web apps always contains some js,css,gif,png,jpg and other resources, so for example the default maven created weld project contains 2 pngs and 1 css, so when client open the page, it will initial 4 requests(if you didn't cache them), each time it will create or restore the contexts and destroy at the end of the request. and 3 of them are useless.
So should these operations be moved from the Listener to the Filters? or should the Listener support URL pattern?
Right now I have to wrap the Listener with a URL pattern filter.
Any concerns or ideas about this?
You are right!!! I have to modify weld code to do this.