-
1. Re: Outject/Inject across a regular HTML link
bsmithjj Jan 3, 2007 4:39 PM (in response to vk101)Your entity probably needs to be scoped to conversational or session scope in order for it to 'last' between requests.
-
2. Re: Outject/Inject across a regular HTML link
vk101 Jan 3, 2007 4:51 PM (in response to vk101)That's probably not it... Entity beans are by default scoped to the Conversation scope, and I haven't overridden that setting.
-
3. Re: Outject/Inject across a regular HTML link
hstang Jan 3, 2007 5:00 PM (in response to vk101)Create a long running conversation. your entity will last longer instead of disappearing a temporary conversation (which only lasts for a request)
-
4. Re: Outject/Inject across a regular HTML link
vk101 Jan 3, 2007 5:01 PM (in response to vk101)Now I'm even more confused: The documentation says "Entity bean components do not support bijection or context demarcation. Nor does invocation of an entity bean trigger validation."
Does this mean I can't use bijection with an entity bean and therefore can't pass it between session beans? -
5. Re: Outject/Inject across a regular HTML link
jblackmore Jan 3, 2007 5:14 PM (in response to vk101)Hrrrm, I think that must pertain to the entity itself. It certainly doesn't mean you can't inject an entity into a session bean, because I do it all the time.
How about outjecting the entity from the SLSB with (scope=SESSION)? Do you really not want it session scoped? I think bsmithjj and hstang are right - your conversation is ending, taking your entity with it. -
6. Re: Outject/Inject across a regular HTML link
norman.richards Jan 3, 2007 5:14 PM (in response to vk101)It means that you cannot inject values INTO an entity. The entity itself can be in/out-jected by another component.
-
7. Re: Outject/Inject across a regular HTML link
vk101 Jan 3, 2007 5:33 PM (in response to vk101)John, thanks I'll give it a shot. Btw, could you describe under what circumstances a conversation would end, as you said? I've been guessing (e.g. "when a new link is encountered" and stuff like that) but I'd really like the actual guidelines as to what things cause it to end (apart from an explicit @End, because I don't have that in my situation).
-
8. Re: Outject/Inject across a regular HTML link
vk101 Jan 3, 2007 7:49 PM (in response to vk101)Yes, putting it in Session scope worked, thanks.
Could somebody please help me understand how the Seam-Managed Persistence Context (SMPC) eliminates LazyInitializationExceptions (LIEs)?
I do not understand how it does this, but am confident that it's pretty important information (as I got a LIE during this exercise). -
9. Re: Outject/Inject across a regular HTML link
hstang Jan 3, 2007 7:55 PM (in response to vk101)If you have a long running conversation, Seam provides a special EntityManager em along with it. It's special because it lasts as long as the conversation, and the instances that em fetches will become managed, and not detached, throughout the entire conversation. So you will avoid LIE.