Stateful Bean Create函数的参数问题
一直报错,部署不上去.
In EJB My, the local home create method ejbCreate() did not have a corresponding ejbCreate method in the bean class, or the ejbCreate method in the bean class was not public.
Unable to deploy EJB: test.jar from test.jar:
In EJB My, the local home create method ejbCreate() did not have a corresponding ejbCreate method in the bean class, or the ejbCreate method in the bean class was not public.
我是这样作的.
bean里面,加入了一个
public void ejbCreate(int val) {
this.val = val;
}
也保留了public void ejbCreate(){}
为了加参数,我把bean的构照函数也加了一个,这个不知道需要嘛??
public MyBean(int val) {}
public MyBean() {}
在Home接口中
public test.My create(int val)
throws javax.ejb.CreateException,java.rmi.RemoteException;
public test.My create()
throws javax.ejb.CreateException,java.rmi.RemoteException;
由于前面报错,所以在local home中这样写:
public test.MyLocal create(int val)
throws javax.ejb.CreateException;
public test.MyLocal create()
throws javax.ejb.CreateException;
我不用local home的,真不知道为什么会报错
能不能帮我看看,哪里错了???实在想不出了.......5555555555
In EJB My, the local home create method ejbCreate() did not have a corresponding ejbCreate method in the bean class, or the ejbCreate method in the bean class was not public.
Unable to deploy EJB: test.jar from test.jar:
In EJB My, the local home create method ejbCreate() did not have a corresponding ejbCreate method in the bean class, or the ejbCreate method in the bean class was not public.
我是这样作的.
bean里面,加入了一个
public void ejbCreate(int val) {
this.val = val;
}
也保留了public void ejbCreate(){}
为了加参数,我把bean的构照函数也加了一个,这个不知道需要嘛??
public MyBean(int val) {}
public MyBean() {}
在Home接口中
public test.My create(int val)
throws javax.ejb.CreateException,java.rmi.RemoteException;
public test.My create()
throws javax.ejb.CreateException,java.rmi.RemoteException;
由于前面报错,所以在local home中这样写:
public test.MyLocal create(int val)
throws javax.ejb.CreateException;
public test.MyLocal create()
throws javax.ejb.CreateException;
我不用local home的,真不知道为什么会报错
能不能帮我看看,哪里错了???实在想不出了.......5555555555
...全文
相关推荐
00000028_bean-parameter的用法.rar
00000028_bean-parameter的用法.rar
Entity_Bean
Bean,很好的东西,可以通过数据源绑获取到数据
spring学习----工厂Bean
NULL 博文链接:https://jijun87120681.iteye.com/blog/1399235
EJB 3.0学习之实体Bean
在EJB3.0中开发实体Bean非常简单,你可以象开发一般的java bean一样编程,只需做少量的注释。一个实体bean不需要实现Home接口或者Remote、Local接口。
ejb实体bean实例
ejb实体bean eclipse mysql


