-
1. Re: Correct way of creating Seam Non-EJB pojo
gonorrhea Mar 17, 2009 4:44 PM (in response to sodium)Seam Pojo is simply a JavaBean with @Name annotation applied at the class level.
Default scope is EVENT (think HttpServletRequest scope in the Servlet API) so if you need to use it as a backing bean for xhtml actions in a multi-request/response use case, for example, then you will need to annotate as such:
@Scope(ScopeType.CONVERSATION)
then you should
implement java.io.Serializable
as well b/c the conversation context is a Seam-managed area in the HttpSession object.You obviously don't need to implement a local/remote interface as you do with EJB3 SFSB/SLSB.
getters, setters, and properties in a class with @Name, that's about it.
read Seam in Action or the new Yuan book, they will answer most of your questions there...
-
2. Re: Correct way of creating Seam Non-EJB pojo
gonorrhea Mar 17, 2009 4:46 PM (in response to sodium)btw, check out the @AutoCreate Seam annotation, in case you will be injecting your JavaBean into other Seam components (so you use @In instead of @In(create=true)). less code.
-
3. Re: Correct way of creating Seam Non-EJB pojo
sodium Mar 24, 2009 9:27 AM (in response to sodium)Finally Seam in Action book arrived ....and yea it did answered most of my questions. Thanks for the help Ron.