posted 15 years ago
Hi Sankar,
The <method-intf> tag belongs to the <method> element. The <method> sub-element can be used in both the <container-transaction> as well as the <method-permission> elements. <container-transaction> is used to specify the transaction attributes. Session beans have only create methods in the home interface which are non-transactional. So you would not specify transaction attributes for them. So you won't be using the <method-intf> tag for session beans in <container-transaction>. But entity bean home business methods must be given a transaction attribute and if you have for example, a home business method and component interface business method with the same name and you want to specify different Tx attributes for them, you would be using the <method-intf> tag. So you are right in the sense that you would not use the <method-intf> tag with <container-transaction> for session beans as you won't specify Tx attributes for home create methods.
But remember that you can also use the <method> element in <method-permission>. What if you have a create<something> method in both the home interface and component interface of a session bean? It's not illegal though a bit strange to have a create<something> method in the component interface. What if you want to specify different method permissions for these methods? You have to distinguish between them. You might also have a scenario where you want to provide different role-based access for a method with the same name in the local and remote interfaces (home or component). These scenarios would require the use of <method-intf> for session beans as well.