Hi all,
I'm new to Seam and I'm starting in understanding how bijection works.

Current scenario is:
a jsf button is linked to a start() method on a session bean stateless where
there is declared:
 @Out
  PojoA pojoA = new PojoA("frank pojo a");

 public String start() {
        PojoB b = new PojoB();
        b.doB();
        return "nothing by now";
    }


PojoA is:
@Name("pojoA")
public class PojoA {

    public PojoA() {
        this.a="empty a";
    }

    private String a;

    public PojoA(String a) {
        this.a=a;
    }

    public void doA(String withWho){
        System.out.println("AAAA --> pojoa doing a with value: "+a+" from: 
"+withWho);
    }
}

and PojoB is:
@Name("pojoB")
 public class PojoB {

    @In(create=true)
    PojoA pojoA;


    public PojoA getPojoA() {
        return pojoA;
    }

    public void setPojoA(PojoA pojoA) {
        this.pojoA = pojoA;
    }



    public void doB(){
        System.out.println("b doing b");
        this.getPojoA().doA("b");
    }

}

Everytime start() is called and pojoB is called, pojoA is not injected
and the create=true annotation value is not considered throwing a 
NullPointerExcetpion (pojoA is null).

I think I'm missing something.

What am I missing?

Thanks to all 
Frank

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

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3940294


-------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
JBoss-user mailing list
JBoss-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jboss-user

Reply via email to