[jboss-user] [JBoss Seam] - Seam 1.1 nullifies member variables when it shouldn't

andrew.rw.robinson do-not-reply at jboss.com
Tue Jan 2 11:20:14 EST 2007


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



More information about the jboss-user mailing list