ejbSelect()在实体Bean内部是一种辅助方法来访问数据库,并不在Home接口中或者组件接口中向用户公开,容器将会自动在ejbSelect()方法中生成代码。关于它的调用,他不能在远程接口和本地接口调用,但是可以在商务方法中调用,这才是它和ejbFind的区别,但它们是用同样的方式告诉容器是怎么编写的
解决方案 »
- java.lang.OutOfMemoryError: Java heap space
- 关于struts.xml配置的问题
- CVS Lock问题
- 【请教】tomcat 5.5 +axis2开发问题?
- 求自定义xml标签的教程资料,非JSP标签库
- 200分求教APACHE和TOMCAT整合过程中的问题
- weblogic8.1 自动关闭 EXCEPTION_ACCESS_VIOLATION
- 在视图层用struts标签logic:iterate显示数据列表时,可以实现这样的格式吗?!
- 询问上海的对日开发j2ee薪水行情
- ejb规范,高手指教
- JDBC连接数据库有问题~
- 怎样在Weblogic中设置JDBC啊?我要连接的是MS SQL SERVER,安装了SQL SERVER的驱动了,不行啊?急啊!
<query>
<query-method>
<method-name>ejbSelectxxx</method-name>
...
...
</query-method>然后在你的方法中,用Collection c = this.ejbSelectxxx();就可以得到select的结果如果你用工具生成代码的话,就想生成find方法一样,定义你的select方法,就可以了,用的时候方法是一样的
下面是我得在另一个方法中的调用:
public void selectID() throws Exception {
Collection c=this.ejbSelectid() ;
try{
Iterator i=c.iterator();
while(i.hasNext())
{System.out .println(i.toString() );
}
}
catch(Exception e){};
/**@todo Complete this method*/
}
"y2.jar": <2004-10-12 下午16时37分21秒 CST> <Warning> <EJB> <BEA-010054> <EJB Deployment: Student has a class y2.StudentBean that is in the classpath. This class should only be located in the ejb-jar file.>
"y2.jar": <2004-10-12 下午16时37分22秒 CST> <Warning> <EJB> <BEA-010054> <EJB Deployment: Student has a class y2.StudentRemoteHome that is in the classpath. This class should only be located in the ejb-jar file.>
"y2.jar": <2004-10-12 下午16时37分22秒 CST> <Warning> <EJB> <BEA-010054> <EJB Deployment: Student has a class y2.StudentRemote that is in the classpath. This class should only be located in the ejb-jar file.>
"y2.jar": <2004-10-12 下午16时37分22秒 CST> <Warning> <EJB> <BEA-010054> <EJB Deployment: Student has a class y2.StudentHome that is in the classpath. This class should only be located in the ejb-jar file.>
"y2.jar": <2004-10-12 下午16时37分22秒 CST> <Warning> <EJB> <BEA-010054> <EJB Deployment: Student has a class y2.Student that is in the classpath. This class should only be located in the ejb-jar file.>
"y2.jar": [J2EE:160121]Errors encountered while compiling module 'D:\javawork\y2\y2.jar.jar':
"y2.jar": In EJB Student, the throws clause for method selectID() in the bean class contains exceptions that are NOT in the throws clause of the remote interface.
请楼上的高手指点。