KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > freeforums > message > ReadMessageBean


1 /*
2  * ReadMessageBean.java
3  *
4  * Defines the message bean implementation
5  *
6  * @author: Devraj Mukherjee
7  *
8  * Created: 23rd June 2001
9  *
10  */

11
12  package freeforums.message;
13
14  import java.rmi.RemoteException JavaDoc;
15  import javax.ejb.*;
16
17  public class ReadMessageBean implements EntityBean {
18
19      transient private EntityContext context;
20
21      public ReadMessagePK key;
22
23      public ReadMessagePK ejbCreate(ReadMessagePK key) {
24
25          this.key = key;
26          return null;
27
28      }
29
30      public void ejbPostCreate(ReadMessagePK key) { }
31
32      public void setEntityContext(EntityContext context) { this.context = context; }
33
34      public void unsetEntityContext() { context = null; }
35
36      public void ejbActivate() { }
37      public void ejbPassivate() { }
38      public void ejbLoad() { }
39      public void ejbStore() { }
40      public void ejbRemove() { }
41
42      /* The following are the implementation of the method from the
43         ReadMessage Remote interface
44       */

45
46      public String JavaDoc getUserName() throws RemoteException JavaDoc { return key.userName; }
47      public void setUserName(String JavaDoc userName) throws RemoteException JavaDoc { key.userName = userName; }
48
49      public Integer JavaDoc getMessageID() throws RemoteException JavaDoc { return key.messageID; }
50      public void setMessageID(Integer JavaDoc messageID) throws RemoteException JavaDoc { key.messageID = messageID; }
51
52  }
53
54
Popular Tags