Oracle
1Z0-895 · Question #19
A developer wants to write a stateful session bean using the following interface as local business interface: 1. package acme; 2. public interface Bar { 3. public void bar (); 4. } Assuming there is…
The correct answer is C. @Stateful public class BarBean implements Serializable, Bar { public void bar () {}. See the full explanation below for the reasoning.
Question
A developer wants to write a stateful session bean using the following interface as local business interface: 1. package acme; 2. public interface Bar { 3. public void bar (); 4. } Assuming there is not an ejb-jar.xml file, which code can be inserted into Lines 4-6 below to define the bean with the ejb name of BarBean? 1. package acme; 2. import javax.ejb.; 3. import jav a.io.; 4. 5. 6. 7. }
Options
- A@Stateful
- B@Stateful (name = "Bar") public class Barbean implements Bar { public void bar () {}
- C@Stateful public class BarBean implements Serializable, Bar { public void bar () {}
- D@Stateful (name = "bar") public class BarBean implements Serializable, Bar { public void bar () throws
How the community answered
(29 responses)- A7% (2)
- B14% (4)
- C76% (22)
- D3% (1)
Community Discussion
No community discussion yet for this question.