-
1. Re: Instantiation by Seam vs. Component.getInstance
gjeudy Jun 27, 2008 7:53 PM (in response to enda)Tomas, I think javassist proxies are serializable so as long as you implement serialization in your beans you should be fine. (Can be as simple as adding marker Serializable interface).
How do you trigger implicit instantiation in your case?
If your object is a seam managed component it should always be wrapped in a proxy. If it's not chances are that your object is not seam managed but is instantiated through the use of @Factory annotation for example.
-
2. Re: Instantiation by Seam vs. Component.getInstance
enda Jun 28, 2008 12:08 AM (in response to enda)Thank you for the answer
How do you trigger implicit instantiation in your case?Well I do not know if I am using the right term here. Lets say that I start from a table in my JSF
#{personList.resultList}
@Name("personList") public class PersonList extends GeneralSearch<Person> { ...
and then I pick a record in a table
<s:link id="selectPerson" value="ajax" action="#{personAccountManager.select}"> <f:param value="#{person.id}" name="personHome"/> </s:link>
and this calls my stateful bean, and instantiates it (well it is actually instantiated on the table page):
@Stateful @Name("personAccountManager") public class PersonManager extends GeneralManager<Person> implements IPersonManager, IGeneralManager { .. @Begin(flushMode = FlushModeType.MANUAL, join = true, pageflow = "personHomeFlow") public String select() { ...
I do not have any @Factory for this. I guess it is like in JSF, that page requests a bean and it will get instantiated. So annotation stateful should do the seam work.
Is that right?
Tomas