Win a copy of The Java Performance Companion this week in the Performance forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Assembly Descriptor

 
Ram Pra
Ranch Hand
Posts: 37
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
Dave Landers
Ranch Hand
Posts: 401
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic