Which of the following declarations in the XML Deployment Descriptor correctly defines an enterprise Stateful session bean with Bean managed transaction semantics with a name 'NotifierBean' whose implementation class is 'net.javabeat.ejb3.NotifierBean' and the remote business interface is defined as 'net.javabeat.ejb3.Notifier'?
a. <session>
<ejb-name>NotifierBean</ejb-name>
<ejb-class>net.javabeat.ejb3.NotifierBean</ ejb-class>
<remote>net.javabeat.ejb3.Notifier</remote>
<session-type>Stateful</session-type>
<transaction-type>Bean</transaction-type>
</session>
b. <session>
<ejb-name>NotifierBean</ejb-name>
<ejb-class>net.javabeat.ejb3.NotifierBean</ ejb-class>
<business-remote>net.javabeat.ejb3.Notifier</business-remote>
<session-type>Stateful</session-type>
<transaction-type>Bean</transaction-type>
</session>
c. <session>
<ejb-name>NotifierBean</ejb-name>
<ejb-class>net.javabeat.ejb3.NotifierBean</ ejb-class>
<business-remote>net.javabeat.ejb3.Notifier</business-remote>
<session>Stateful</session>
<transaction-type>Bean-managed</transaction-type>
</session>
d. None of the above.
Should option 'a' be the correct answer?
"Know where to find the solution and how to use it - that's the secret of success."
Yes! The buisiness-remote element don't exists, so the alternatives b and c are automatically wrongs. The alternative a is correct, because define minimum elements to declare a bean.