File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes EJB and other Java EE Technologies and the fly likes Assembly Descriptor Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of The Software Craftsman this week in the Agile forum!
JavaRanch » Java Forums » Java » EJB and other Java EE Technologies
Bookmark "Assembly Descriptor" Watch "Assembly Descriptor" New topic

Assembly Descriptor

Ram Pra
Ranch Hand

Joined: Feb 06, 2001
Posts: 37
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.
Dave Landers
Ranch Hand

Joined: Jul 24, 2002
Posts: 401
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.
I agree. Here's the link:
subject: Assembly Descriptor