Why "Warning: Common implementation for both interfaces" in Netbeans?
I am using Netbeans to create EJB 2.0 module. In this module, I created both local and remote interfaces. When I added business methods in the bean class, Netbeans allows conveniently to add to either local interface or remote interface or both. When I selected to add business methods in both local and r开发者_如何学运维emote interfaces, Netbeans shows a warning message: "Warning: Common implementation for both interfaces
".
I do not understand what the problem it may cause if we have the same business methods in both local and remote interfaces??
See this answer:
Keep in mind that local interfaces are pass-by-reference and remote interfaces are pass-by-value. If callers (or the bean) mutate state on the return value (or arguments, respectively), then you're going to get different behavior between the two. You must manage this careful in your API contract.
精彩评论