请问各位:cmp/cmr

02-12-09 yahoo163
cmp中的cmr字段是不是必须是local接口的,为什么我用jb7做的cmp如果实现的是远程接口就没有remote方式的getter和setter呢?

yahoo163
2002-12-10 10:18
没人知道吗?

Jevang
2002-12-10 14:17
I am not sure, but I never sene a case that you get a remote bean handle from another bean. Will the parent bean keep a collection of remote handles for its children, unlikely.

yahoo163
2002-12-10 14:39
我在cmp的remote接口里定义了一个方法用于获得bean里的静态getter方法返回的类型,可是部署到服务器后运行出现一个错误:
java.lang.ClassCastException:$Proxy76.
去掉这个自定义方法后,错误就消失了,为什么,谢谢.

fans
2002-12-13 18:55
you should take a look at the EJB Specification.
CMP may be used on b/w local bean interfaces.

The reason is quite simple: it is for performance
and data consistency.

Finally, because CMR may be used only with local interfaces,
all the beans that use CMR must be in the same ejb-jar file.