






Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!







import javax.ejb.; public class AdviceBean implements SessionBean { private String[] adviceStrings = {"test", "test1", "test2"}; public String getMessage() { System.out.println("in get advice"); int random = (int) (Math.random() * adviceStrings.length); return adviceStrings[random]; } public void ejbCreate() { System.out.println("ejb create"); } … }* 19
import javax.ejb.; import java.rmi.RemoteException; public interface Advice extends EJBObject { public String getMessage() throws RemoteException; } public interface AdviceHome extends EJBHome { public Advice create() throws CreateException, RemoteException; }* 20
**
Ejb1
Advisor AdviceHome Advice AdviceBean Stateless Bean
**
Hello, world!
,
, etc.**
Thinking in Java Bruce Eckel
Program Development in Java Barbara Liskov John Guttag
** 31
** **
39
(Brill, CodeNotes for XML) 40