Hi all,
Am facing some probs while creating a jar file using weblogic5.1.
Here's my entire code
Remote Interface---
===========================================================================
package emp;
import java.rmi.*;
import javax.ejb.*;
public interface empRemote extends EJBObject {
public int getEmpno() throws RemoteException;
public double getSal() throws RemoteException;
public void setSal(double sal) throws RemoteException;
}
============================================================================
Home interface--
===========================================================================
package emp;
import java.rmi.*;
import javax.ejb.*;
import java.util.*;
public interface empHome extends EJBHome {
public empRemote create(int empno) throws RemoteException, CreateException;
public empRemote findByPrimaryKey(empPK primaryKey) throws RemoteException, FinderException;
public Enumeration findBigSal(double sal) throws RemoteException, FinderException;
}
==============================================================================
Bean class
============================================================================
package emp;
import java.rmi.*;
import javax.ejb.*;
public class empBean implements EntityBean {
EntityContext entityContext;
public int empno;
public double sal;
public empPK ejbCreate(int empno) throws CreateException {
this.empno = empno;
return new empPK(empno);
}
public void ejbPostCreate(int empno) throws CreateException {
}
public void ejbRemove() throws RemoveException {
}
public void ejbActivate() {
}
public void ejbPassivate() {
}
public void ejbLoad() {
}
public void ejbStore() {
}
public void setEntityContext(EntityContext entityContext) {
this.entityContext = entityContext;
}
public void unsetEntityContext() {
entityContext = null;
}
public int getEmpno()
{
return empno;
}
public double getSal()
{
return sal;
}
public void setSal(double sal)
{
this.sal = sal;
}
}
============================================================================
PK class
==========================================================================
package emp;
import java.io.*;
public class empPK implements Serializable {
public int empno;
public empPK() {
}
public empPK(int key) {
empno = key;
}
public boolean equals(Object obj) {
if (obj==null | | !(obj instanceof empPK))
return false;
else if (((empPK)obj).empno == empno)
return true;
else
return false;
}
public int hashCode() {
return empno;
}
public
String toString()
{
return String.valueOf(empno);
}
}
=============================================================================
So pl tell me where am wrong( this is a CMP bean)
Waiting for your reply
[This message has been edited by Mary, Cole (edited March 07, 2001).]