which code can be inserted into Lines 4-6 below to define the bean with the ejb name of BarBean?

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 java.io.*;
4.
5.
6.
7. }

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 java.io.*;
4.
5.
6.
7. }

A.
@Stateful
public class BarEJB implements Bar {
public void bar() {}

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 Bar {
public void bar() throws java.rmi.RemoteException {}



Leave a Reply 0

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