using xDoclet, can EJB pass ref to itself to DAO?

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,055
Latest member
SlimSparkKetoACVReview

Latest Threads

Top