开发者

Can I access an injected ejb from an inner class?

As i clearly mentioned above, I would be glad to开发者_StackOverflow hear your ideas about that.

btw, some other ones say; "call Component.getInstance(Facade,true) from your inner class." However, I dont understand it actually..

Thanks


Once the injection has happened, it's just a reference like any other, so there's no reason why it should not work.


Just make sure you don't declare your inner class as static. A static class can't use a non-static parent variable (you'll get a "Cannot make a static reference to the non-static field") exception.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜