-
1. Re: Seam components as EJBs in the web tier
asookazian Jul 28, 2009 11:18 PM (in response to javanaute)1) as per JSR220, you can override annotations with xml configs in ejb-jar.xml. Or use ejb-jar.xml configs without annotations at all. either way.
2) there is no AOP framework in Seam per se (like AspectJ, etc.); Seam uses interceptors and raiseevent/observe pattern. provide an example or use case.
-
2. Re: Seam components as EJBs in the web tier
javanaute Jul 29, 2009 12:05 AM (in response to javanaute)Thanks David for your reply,
1) as per JSR220, you can override annotations with xml configs in ejb-jar.xml. Or use ejb-jar.xml configs without annotations at all. either way.
Ok about this, at least in the EJB JAR. What about in the web tier (Am deploying to a war). This was my question :
Can i make my seam components which are in the web tier become Session EJBs and can i set this in a configuration file instead of using annotations (Am thinking about ejb-jar.xml) ? What i actually want is to be able to take advantage of the EJB 3 interceptor stuff (with @ArroundInvoke etc)
2) there is no AOP framework in Seam per se (like AspectJ, etc.); Seam uses interceptors and raiseevent/observe pattern. provide an example or use case.
My question was :
Does seam have a mechanism for hooking into components method calls (To do AOP stuff) -Am not talking about lifecycle methods here which works fine-
Am asking about wether there are intercepting mechanisms for method calls such as those of EJBs (Defined with @Interceptors(..)).
-
3. Re: Seam components as EJBs in the web tier
asookazian Jul 29, 2009 12:19 AM (in response to javanaute)1) you can easily convert any JavaBean to a sesison bean. Typically it's just a matter of implementing a local interface and adding @Stateful or @Stateless annotation at the class level. If you don't want to use annotations, you add the appropriate meta-data in ejb-jar.xml (see JSR200 for details).
2) yes, read this section of 6.11. Seam interceptors of Seam 2.1.2 ref doc.
-
4. Re: Seam components as EJBs in the web tier
javanaute Jul 29, 2009 12:33 AM (in response to javanaute)Thanks again Arbi (And not David .. Sorry),
Your answer was really very helpful .. I also had a look at the JSR which contains a lot of helpful informations ..
-
5. Re: Seam components as EJBs in the web tier
asookazian Jul 29, 2009 12:43 AM (in response to javanaute)A helpful alternative to JSR220 (yes, specs are typically dry/tedious to read!) is EJB in Action, very good book...