客户不得对内部实施做出任何假设

The client must not make any assumptions regarding the internal implementation

取自 EJB3.2 规范的完整句子:

When interacting with a reference to the no-interface view, the client must not make any assumptions regarding the internal implementation of the reference, such as any instance-specific state that may be present in the reference

我实际上是在尝试理解这到底是什么意思,我想知道是否有人可以提供一些示例。

编辑:
上面这句话摘自Section 3.4.4 Session Bean's No-Interface View,也许这个信息有帮助

生成无接口视图代理时,EJB 容器必须创建 EJB class 的子class 并覆盖所有 public 方法以提供代理行为(如安全性, 交易)。

您可以获得对 bean 的引用(例如,将其传递给另一个 ejb):

NoInterfaceBean bean = ejbContext.getBusinessObject(NoInterfaceBean.class);

这个 return 是一个 class 类型的引用,它与 bean class 本身 相同(通常如果 EJB有一个业务接口,它将 return 接口 class),但 它不是对 NoInterfaceBean 实例的引用(而是对该代理 class同名)。将其视为对您的 bean 的拉皮条版本 的 引用,您

must not make any assumptions regarding the internal implementation

它与"normal" EJB 的基本相同。您知道您的 bean 实例有一些神奇之处,但是由于您将接口作为 class 类型,所以已经很清楚每个实现该接口的 class 都可以有不同的内部实现。

所以规范在那个时候强调了这个区别。即使它看起来像是对您的具体 class 的引用,它也是 none(正如他们在规范的下一段中所说 JSR-000345 Enterprise JavaBeansTM 3.2 Final Release

Although the reference object is type-compatible with the corresponding bean class type, there is no prescribed relationship between the internal implementation of the reference and the implementation of the bean instance.