I new to EJB…
I am trying to run ejb3 with jboss and I am new to ejb…
Using tutorial from:
http://docs.jboss.org/ejb3/tutorial/stateless/stateless.html
Problems:
1)
@Stateless, @Remote, @Local causes a syntax error
See below for usage
2)
I am getting errors in the EJB class and both interface classes.
ACTypeServiceBean:
public class ACTypeServiceBean implements ACTypeServiceRemote, ACTypeServiceLocal {
No error is shown but ACTypeServiceBean is underlined in red.
ACTypeServiceLocal:
public interface ACTypeServiceLocal extends ACTypeService {
ACTypeService is underlined; error is:
ACTypeService can not be resolved or is not a valid superinterface.
ACTypeServiceRemote:
Same as above.
Will someone be kind enough to point me in the right direction….
Please explain if I am missing a file, directory structure problem, etc…
Thanks in advance…
/*
* JBoss, the OpenSource J2EE webOS
*
* Distributable under LGPL license.
* See terms of license at gnu.org.
*/
package org.jboss.tutorial.stateless.bean;
import javax.ejb.Stateless;
@Stateless // causes syntax error
public class CalculatorBean implements CalculatorRemote, CalculatorLocal
{
public int add(int x, int y)
{
return x + y;
}
public int subtract(int x, int y)
{
return x - y;
}
}