This content has been marked as final.
Show 1 reply
-
1. Re: newbie: stateless component
mars1412 Oct 30, 2007 5:47 AM (in response to mars1412)ok - I just found out why this does not work
when you use the @Stateless or @Stateful annotation:
* the class must implement a method with the @Remove annotation.
from the seam reference manual:In addition, stateful session bean components must define a method with no parameters annotated @Remove.
This method is called by Seam when the context ends
* the class must implement an interface with all its public methods
However, I do not really understand what the difference is:
When I omit the @Stateless annotation I can access all fields and everything works just fine, so why should I bother adding the @Stateless annotaion, an empty (!) @Remove function and an interface?
It's just way more work for me, without benefit (?).