W
wizumwalt
I have an entity bean that has a getter method in it. My DAO
implementation class needs to make a call to this entity beans getter
method because I don't want to move the getter method into my DAO class.
This DAO class strictly does access to my database.
--- entity bean
/**
* @ejb.create-method
*/
public abstract String ejbCreate(MyObj obj) throws CreateException,
RemoteException;
/**
* @ejb.interface-method
* view-type="local"
*/
public String getMethod() { ... }
--- DAO impl class
public String create(MyObj obj) throws CreateException, RemoteException {
// somehow call ejb.getMethod();
}
Can the EJB pass a reference to itself to the DAO and the DAO
implementation class can then use that reference to call the get/setters
on the EJB as needed?
Any help much appreciated.
implementation class needs to make a call to this entity beans getter
method because I don't want to move the getter method into my DAO class.
This DAO class strictly does access to my database.
--- entity bean
/**
* @ejb.create-method
*/
public abstract String ejbCreate(MyObj obj) throws CreateException,
RemoteException;
/**
* @ejb.interface-method
* view-type="local"
*/
public String getMethod() { ... }
--- DAO impl class
public String create(MyObj obj) throws CreateException, RemoteException {
// somehow call ejb.getMethod();
}
Can the EJB pass a reference to itself to the DAO and the DAO
implementation class can then use that reference to call the get/setters
on the EJB as needed?
Any help much appreciated.