|
马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。
您需要 登录 才可以下载或查看,没有帐号?立即注册
x
关于第二点:俺问问你,如果是企业级项目的话,诸如RMI,EJB,等一些关键技术,这些难道都不需要学么?如果光是使用jsp,servlet,javabean的话。
依照办理来看看例子就分明了
这个是一个实体bean的完成
packagecom.ly.bean;
importjavax.ejb.Remote;
@Remote
publicinterfaceBean1{
publicvoidsayBean1();
}
packagecom.ly.bean;
importjavax.ejb.Remote;
@Remote
apublicinterfaceBean2{
publicvoidsayBean2();
}
packagecom.ly.bean;
importjavax.ejb.Remote;
@Remote
publicinterfaceBean3{
publicvoidsayBean3();
}
packagecom.ly.impl;
importjavax.ejb.Stateless;
importcom.ly.bean.Bean1;
importcom.ly.bean.Bean2;
@Stateless(name="bean12")
publicclassBean1ImplimplementsBean1,Bean2{
publicvoidsayBean1(){
System.out.println("bean1.........");
}
publicvoidsayBean2(){
System.out.println("bean2.........");
}
}
packagecom.ly.impl;
importjavax.ejb.EJB;
importjavax.ejb.Stateless;
importcom.ly.bean.Bean1;
importcom.ly.bean.Bean2;
importcom.ly.bean.Bean3;
@Stateless(name="bean3")
publicclassBean2ImplimplementsBean3{
@EJB(beanName="bean12")
Bean1bean1;
Bean2bean2;
publicvoidsayBean3(){
bean1.sayBean1();
bean2.sayBean2();
System.out.println("bean3.........");
}
@EJB(mappedName="bean12/remote")
publicvoidsetBean2(Bean2bean2){
this.bean2=bean2;
}
}
<p>
你通过从书的数量和开发周期及运行速度来证明:net网页编程和ruby要比java简单。 |
|