-
1. Re: How to extend EJBLocalHome interface?
tdang Sep 10, 2002 12:06 PM (in response to demoord)My project has a similar situation to yours, and of course you can extend the EJBLocalHome interface, and it is very easy.
public interface MyBasicEJBLocalHome extends the EJBLocalHome {
public MyBasicEJBLocalObject create(...) throws ...;
// some methods more.
}
public interface MyFirstEJBLocalHome extends MyBasicEJBLocalHome {
}
public interface MySecondEJBLocalHome extends MyBasicEJBLocalHome {
}
... and so on.
I could successfully deploy my project with JBoss 3.0.1 and it works fine.
Hope it helps. -
2. Re: How to extend EJBLocalHome interface?
demoord Sep 11, 2002 3:24 AM (in response to demoord)Hello,
I know this is possible. What I actually wanted to know is the following. You define a create method in the most generic LocalHome interface. Then you define several EntityBeans which have their own Home interface which extends the generic LocalHome interface.
You lookup an entitybeans homeinterface you cast it to the generic home interface and you call the create method.
e.g.
EntityBean is BeanA
BasicLocalHome basicLocalHome = (BasicLocalHome)context.lookUp();
basicLocalHome.create();
Will the EJB container call the create method of the bean you've looked up? If not, how can I solve the problem I descirbed in the first post?
Thanks,
Dries -
3. Re: How to extend EJBLocalHome interface?
tdang Sep 12, 2002 6:16 AM (in response to demoord)Of course, it will because in this case you have a BasicLocalHome and its create method will be invoked.
Regards.