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



Leave a Reply 1

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