Is it possible to config injection in such  way that injection will be done 
only on instance create?

Consider the following code:

class A{

  @In
  B b;

  C c;  
  public getC(){..}

}

class C{

A a;

public getName(){
  a.getB().getName();
}

}

in .xhtml file present the following reference:
#{a.c.name}


What happens: C.getName is called - A instance doesn't have anymore reference 
to B due to disinjection after call A.getC() -> NPE is thrown.

The code above is simplified and making C as component is not desirable.
Probably this code is too much coupled, but it doesn't break any Java rules.


View the original post : 
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3999835#3999835

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3999835
_______________________________________________
jboss-user mailing list
[email protected]
https://lists.jboss.org/mailman/listinfo/jboss-user

Reply via email to