[JBoss Seam] - Re: Seam, EJB3, POJOs, nested one to many relationships
by modoc
Yeah, I only thought of that after I made the initial post, it makes sense based on the behavior I'm seeing. It just doesn't seem right that I should have to define the entire user experience as a single conversation. I mean what if I need to have multiple conversations to allow multiple browsers/tabs?
I may be spoiled by ATG Repositories, but why can't the persistence code simply fetch the data I need? It knows what object I'm working with and which object(s) I need. I guess I don't know enough about EJB3 sessions or something. I guess that's something I need to research more of and/or take up on the EJB3 forum.
Anyhow, I can't be the only person with a hierarchy of data driving the majority of the user experience like this. Is the only answer to use a single user-session encompassing long running conversation? That or EAGER load everything into memory at the beginning (which still leaves me with my bag/indexcolumn issues)? Obviously I could also replace my nice simple EJB POJOs with "smarter" object that use the entityManager to populate themselves manually as needed, but that seems to be throwing away most of the POJO/annotation/EJB3 goodness.
How have other people solved this type of issue?
Regards,
Modoc
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3997284#3997284
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3997284
19 years, 3 months
[JBoss Seam] - Seam 1.1 nullifies member variables when it shouldn't
by andrew.rw.robinson
A circular call in Seam 1.1 causes null references to injected values.
Circular call use case:
@Name("a")
| public class A {
| @In(create=true)
| private B b;
|
| public void doSomething(ActionEvent evt) {
| b.thisWorks();
| b.nullPointerHere();
| }
|
| public void dummyMethod() {}
@Name("b")
| public class B {
| @In(create=true)
| private C c;
|
| public void thisWorks() {
| c.callMe();
| }
|
| public void nullPointerHere() {}
@Name("c")
| public class C {
| @In(create=true)
| private A a;
|
| public void callMe() {
| a.dummyMethod(); // this call causes A's member variables
| // to be set to "null"
| }
There is no reason IMO that this should not be allowed. Seam incorrectly removes A's member variables despite the fact that there is an actively running method on the thread inside of A.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3997283#3997283
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3997283
19 years, 3 months