N
Nachiketh
hi,
i tried compiling this piece of EJB code but it has a basic error, am
sure the package is present in the standard J2SE(1.4.2v) i have
downloaded from sun.com. plz help me with this anyone of you.
code:
// EJBTestBean.java
import javax.ejb.*;
import java.rmi.RemoteException;
public
class EJBTestBean implements SessionBean {
private SessionContext mContext = null;
public void ejbPassivate() {
System.out.println("EJBTestBean passivated.");
}
public void ejbActivate() {
System.out.println("EJBTestBean activated.");
}
public void ejbCreate() {
System.out.println("EJBTestBean created.");
}
public void ejbRemove() {
System.out.println("EJBTestBean removed.");
}
public void setSessionContext() {
System.out.println("EJBTestBean context set.");
mContext = context;
}
public String greet()
{
return "Hello, I'm an EJB!";
}
}
error :
D:\Project\EJB\EJBTestBean.java:3: package javax.ejb does not exist
import javax.ejb.*;
^
D:\Project\EJB\EJBTestBean.java:7: cannot resolve symbol
symbol : class SessionBean
location: class EJBTestBean
class EJBTestBean implements SessionBean {
^
D:\Project\EJB\EJBTestBean.java:9: cannot resolve symbol
symbol : class SessionContext
location: class EJBTestBean
private SessionContext mContext = null;
^
D:\Project\EJB\EJBTestBean.java:29: cannot resolve symbol
symbol : variable context
location: class EJBTestBean
mContext = context;
^
4 errors
Process javac exited with code 1
thx,bye
-Nachiketh
i tried compiling this piece of EJB code but it has a basic error, am
sure the package is present in the standard J2SE(1.4.2v) i have
downloaded from sun.com. plz help me with this anyone of you.
code:
// EJBTestBean.java
import javax.ejb.*;
import java.rmi.RemoteException;
public
class EJBTestBean implements SessionBean {
private SessionContext mContext = null;
public void ejbPassivate() {
System.out.println("EJBTestBean passivated.");
}
public void ejbActivate() {
System.out.println("EJBTestBean activated.");
}
public void ejbCreate() {
System.out.println("EJBTestBean created.");
}
public void ejbRemove() {
System.out.println("EJBTestBean removed.");
}
public void setSessionContext() {
System.out.println("EJBTestBean context set.");
mContext = context;
}
public String greet()
{
return "Hello, I'm an EJB!";
}
}
error :
D:\Project\EJB\EJBTestBean.java:3: package javax.ejb does not exist
import javax.ejb.*;
^
D:\Project\EJB\EJBTestBean.java:7: cannot resolve symbol
symbol : class SessionBean
location: class EJBTestBean
class EJBTestBean implements SessionBean {
^
D:\Project\EJB\EJBTestBean.java:9: cannot resolve symbol
symbol : class SessionContext
location: class EJBTestBean
private SessionContext mContext = null;
^
D:\Project\EJB\EJBTestBean.java:29: cannot resolve symbol
symbol : variable context
location: class EJBTestBean
mContext = context;
^
4 errors
Process javac exited with code 1
thx,bye
-Nachiketh