@Stateful @RequestScoped
class Bar {
@Inject Baz baz;
public Baz getBaz() { return baz; }
}
@Stateful @RequestScoped
class Baz {
@Inject Bar bar;
public Bar getBar() { return bar; }
}
And verify that this works, assuming they are normal scoped of course!
Pete Muir (Inactive)
added a comment - For example, check that:
@Stateful @RequestScoped
class Bar {
@Inject Baz baz;
public Baz getBaz() { return baz; }
}
@Stateful @RequestScoped
class Baz {
@Inject Bar bar;
public Bar getBar() { return bar; }
}
And verify that this works, assuming they are normal scoped of course!
@Stateless
class Bar {
@Inject Foo foo;
public Foo getFoo() { return foo; }
}
@Stateless
class Baz {
@EJB Bar bar;
public Bar getBar() { return bar; }
}
@Stateless
class Qux {
@EJB Baz baz;
public Baz getBaz() { return baz; }
}
assertNotNull(qux.getBaz().getBar());
Pete Muir (Inactive)
added a comment - For example, check that:
class Foo {}
@Stateless
class Bar {
@Inject Foo foo;
public Foo getFoo() { return foo; }
}
@Stateless
class Baz {
@EJB Bar bar;
public Bar getBar() { return bar; }
}
@Stateless
class Qux {
@EJB Baz baz;
public Baz getBaz() { return baz; }
}
assertNotNull(qux.getBaz().getBar());
For example, check that:
And verify that this works, assuming they are normal scoped of course!