且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

带有实例变量的无状态会话bean

更新时间:2023-10-06 16:48:46

我根本就不打扰在无状态会话bean中使用实例变量。不管你遇到的问题的原因是什么,它可能不是你想要做的事情。只需尝试使用本地变量,或者在您从无状态会话bean业务方法调用的帮助程序类中定义实例变量。

I would just not bother using instance variable in stateless session bean at all. Regardless of what the cause of the issue you have encountered, it's probably not something you would want to do anyway. Just try using local variables throughout or define instance variables in helper classes you are calling from the stateless session bean business methods.