21天精通Java,这是一本英文书
源代码在线查看: locationbean.java
package data;
import java.rmi.*;
import java.sql.*;
import java.util.*;
import javax.ejb.*;
import javax.naming.*;
import javax.sql.*;
public abstract class LocationBean implements EntityBean
{
public abstract void setName(String name);
public abstract Collection getApplicants();
public abstract void setApplicants(Collection applicants);
public abstract Collection getJobs();
public abstract void setJobs(Collection jobs);
public abstract String getName ();
public abstract String getDescription ();
public abstract void setDescription (String description);
// EJB methods start here
public void ejbPostCreate (String name, String description) {}
public String ejbCreate (String name, String description) throws CreateException {
/*
// for BMP, there was a workaround here, namely to call ejbFindByPrimaryKey
// under CMP, cannot call since doesn't exist.
// could look up own home interface ... but instead,
// will rely on unique primary key on RDBMS table
try {
((LocationLocalHome)ctx.getEJBHome()).findByPrimaryKey(name);
throw new CreateException("Duplicate location name: "+name);
}
catch (FinderException ex) {}
*/
setName(name);
setDescription(description);
return name;
}
public void ejbLoad(){
}
public void ejbStore(){
}
public void ejbPassivate(){
setName(null);
setDescription(null);
}
public void ejbActivate(){
}
public void ejbRemove(){
}
private EntityContext ctx;
public void setEntityContext(EntityContext ctx) {
this.ctx = ctx;
}
public void unsetEntityContext() {
this.ctx = null;
}
private void error (String msg, Exception ex) {
String s = "LocationBean: "+msg + "\n" + ex;
System.out.println(s);
throw new EJBException(s,ex);
}
}
|
相关资源 |
|
-
21天精通Java,这是一本英文书
-
21天学会用JAVA开发网络游戏,这是一本英文书
-
<<21天精通JAVA>>一书的源码,边学边做,很快上手,适合JAVA初学者.
-
Linux设备驱动设计开发.是一本英文书.讲的挺不错。比国内的书强多了,强烈建议下载此书.配合另外本英文(linux kenel)书,书看完的时候,将是你成专家的时候.
-
这是一本不错的JAVA入门书藉.只要你恳踏踏实实的去学,一定会有你出人头地的一天.
-
这是一本叫精通java中间件的一本书的源码,大家一起学习学习
-
这是一本很权威的java编程英文书
-
这是一本有关java的教科书
|