Which design approach can achieve this requirement?

A developer is working on a project that includes both EJB 2.1 and EJB 3.0 session beans. A lot of
business logic has been implemented and tested in these EJB 2.1 session beans.
Some EJB 3.0 session beans need to access this business logic. Which design approach can
achieve this requirement?

A developer is working on a project that includes both EJB 2.1 and EJB 3.0 session beans. A lot of
business logic has been implemented and tested in these EJB 2.1 session beans.
Some EJB 3.0 session beans need to access this business logic. Which design approach can
achieve this requirement?

A.
Add adapted home interfaces to EJB 3.0 session beans to make EJB 3.0 and EJB 2.1 session
beans interoperable.

B.
Add EJB 3.0 business interfaces to existing EJB 2.1 session beans and inject references to
these business interfaces into EJB 3.0 session beans.

C.
No need to modify existing EJB 2.1 session beans. Use the @EJB annotation to inject a
reference to the EJB 2.1 home interface into the EJB 3.0 bean class.

D.
No need to modify existing EJB 2.1 session beans. Use the @EJB annotation to inject a
reference to the EJB 2.1 component interface into the EJB 3.0 bean class.



Leave a Reply 0

Your email address will not be published. Required fields are marked *