wap application with enterprise java beans.

源代码在线查看: itembean.java

软件大小: 25 K
上传用户: sinoarts
关键词: application enterprise beans java
下载地址: 免注册下载 普通下载 VIP

相关代码

				import java.io.*;
				import java.util.Collection;
				import javax.ejb.*;
				import javax.naming.*;
				import javax.sql.DataSource;
				
				abstract public class ItemBean implements EntityBean
				{
					private EntityContext ctx;
					
					public ItemBean() {}
					
					public void setEntityContext(EntityContext ctx)
					{
						this.ctx = ctx;
					}
				
					public void unsetEntityContext()
					{
						this.ctx = null;
					}
					
					public void ejbLoad() 
					{
						System.out.println("item ejb loaded");
				
					}
					
					public void ejbStore()
					{
						System.out.println("item bean store");
					}
					
					public void ejbRemove() throws RemoveException
					{
						System.out.println("item bean remove called");
					}
					
					public void ejbPassivate() 
					{
						System.out.println("itembean passivate");
					}
					
					public void ejbActivate()
					{
						System.out.println("client bean activated");
					}
				
					public String ejbCreate(String id,String name,String description)
						throws CreateException
					{
						System.out.println("ejb create called");
						setItemId(id);
						setItemName(name);
						setItemDescription(description);
						return null;
					}
					
					public void ejbPostCreate(String id,String name,String description)
					{}
				
					abstract public void setItemId(String id);
					abstract public String getItemId();
					
					abstract public void setItemName(String name);
					abstract public String getItemName();
					
					abstract public void setItemDescription(String description);
					abstract public String getItemDescription();
					
					public String getId()
					{
						return getItemId();
					}
					
					public String getName()
					{
						return getItemName();
					}
					
					public String getDescription()
					{
						return getItemDescription();
					}
				}
				
				
				
				
				
							

相关资源