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