-
1. Re: no ejb select in home limitation
kv_moj May 4, 2003 7:29 AM (in response to nicfournier)I'm not sure if this solution is portable or not, but if all you need is the ejbSelect method to be accessible from the home interface this can be done in jboss by first declaring the method on the home interface and then implementing it on the bean and call the ejbSelect method from within this implementation.
Example:
public homeInterface extends EJB[Local]Home {
public String findCategory();
}
public Bean implements EntityBean {
// your original ejbSelect method
public abstract String ejbSelectCategory();
// implement home finder method in the bean
public String ejbHomeFindCategory() {
return ejbSelectCategory();
}
.....
.....
}
I hope this helps.
kv. -
2. Re: no ejb select in home limitation
nicfournier May 9, 2003 7:45 AM (in response to nicfournier)I tried what you said unsing jboss 3.2 and I got this error:
Section: 10.6.2
Warning: CMP entity beans may not define the implementation of a finder.
And it does not deploy.
Do I miss something?? -
3. Re: no ejb select in home limitation
kv_moj May 11, 2003 3:50 AM (in response to nicfournier)No you're not missing anything.
Forgive me - my mistake.
It's the word 'find'. Use another word like 'select'.
Revised example:
public homeInterface extends EJB[Local]Home {
public String selectCategory();
}
public Bean implements EntityBean {
// your original ejbSelect method
public abstract String ejbSelectCategory();
// implement home finder method in the bean
public String ejbHomeSelectCategory() {
return ejbSelectCategory();
}
.....
.....
}
kv. -
4. Re: no ejb select in home limitation
nicfournier May 14, 2003 12:39 PM (in response to nicfournier)IT WORKED, thanks a lot !!!
Do you know if this solution is portable (mean j2ee compliant) ?
Thanks again!