[seam-dev] Interceptor packaging convention

Shane Bryzak sbryzak at redhat.com
Mon Mar 29 17:48:01 EDT 2010



On 30/03/10 04:56, Gavin King wrote:
>
> And how is this solution easier than just giving people a standard,
> pre-written beans.xml file that they include in their Seam projects as
> a starting point? It can even be added automatically by JBoss Tools or
> the Maven archectype. Then, when they come to add their own
> interceptors, it's easy to just edit this file.
>
> Including a jar in the classpath is actually much more work than
> including a pre-written beans.xml file!
>
>    
 From a usability perspective I think this idea is the most sensible, 
however if we generate a new project from Maven or JBoss Tools and are 
including a beans.xml that contains all interceptors, then we must also 
include all Seam module jars in the project (this is not really a 
problem per se, it just adds extra bulkiness when the user doesn't 
require certain features).  Alternatively the user could select which 
features/modules they require and the interceptors get added just for 
those modules, and the remaining interceptors are added to beans.xml but 
commented out so they can possibly add the other modules in later.

It may also be worth having a module check to see if its interceptors 
are enabled on startup and log a warning message if not (can we do this 
with the CDI SPI?) with instructions on how to enable that interceptor 
in beans.xml.


More information about the seam-dev mailing list