开发者

Can I access an injected ejb from an inner class?

开发者 https://www.devze.com 2023-01-12 23:01 出处:网络
As i clearly mentioned above, I would be glad to开发者_StackOverflow hear your ideas about that. btw, some other ones say;

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

精彩评论

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