Could anybody explain to me , the method element in an assembly descriptor. the optional method-intf element allows to distinguish between a method with the same signature that is multiply defined across in both the home and component interfaces - What does this mean Thanks in advance. Prashanth
posted 13 years ago
If you have a method on your Home interface and a method with the same signature (name+arguments) exists on the Remote (or Local) interface, you can use method-intf to set different transaction or security settings on each. For example, say you have:
The only way to distinguish between these two methods named "create" that take a string arg is using method-intf. So, the EJBHome's create (i.e. ejbCreate) is:
and the one in the Remote interface is
Using these, you can set different security or transaction attributes for these two methods. There's a pretty good description and examples in the docs before the method element in the EJB 2.0 DTD.