Card 6 / 59: What components do you need to declare an EJB using EJB 2.x ? choose the answer that covers the most components
A)
EJBHome interface, EJBObject and XML deployment descriptor
B)
EJBHome interface, EJBObject, XML deployment descriptor and a bean class extends either SessionBean or EntityBean
C)
EJBHome interface, EJBObject, XML deployment descriptor and a bean class annotated by either @SessionBean or @EntityBean
Answer:
B) EJBHome interface, EJBObject, XML deployment descriptor and a bean class extends either SessionBean or EntityBean
Previous Card | ← Previous Card Button |
Next Card | → Next Card Button |
Flip Card | Space-Bar |
class by either @SessionBean or @EntityBean is not correct in EJB 2.x.
In EJB 2.x we need:
1. Home (EJBHome) interface
2. Remote (EJBObject) interface
3. XML deployment descriptor
4. Bean class extends SessionBean or EntityBean
5. Context objects (not written by developers, rather generated by the container)
|