Hello, A while ago I posted a message about extending the EJBLocalObject interface. But now I wonder if it is possible to extend the EJBLocalHome interface too?
Mayby I should explain why I want to do this? I have several LocalEntity beans which are accessed by a SessionFacade Bean. The current state I'm in is that I have a create method in the session facade for each Entitybean. The create methods in the SessionFacade look more or less the same. It is actually just a copy past operation and change the LocalHome and LocalObject interfaces. The data representing an entity bean is assembled in ValueObjects. Each value object extends a DefaultValueObject. What I want to do is create an interface BasicEJBLocalHome which extends EJBLocalHome. In the BasicEJBLocalHome, I define a create method which takes a valueobject and returns BasicLocalObject interface (this interface extends the EJBLocalObject interface. this was the question in my previous post.) All the LocalHome interfaces of the EJB's extend the BasicEJBLocalHome interface. If this is possible, I only have to create one create method in the SessionFacade taking a DefaultValueObject and a jndiName of the bean. Lookup the bean and cast it to BasicEJBLocalHome and call the create method on it. This should then call the create method of the corresponding beanclass. So my Session facade will look much smaller and it will be much easier to maintain the code. I tried this. I used sun's reference implementation to test this but the verifier in the deploytool fails. It claims the Beanclasses doesn't contain and ejbCreate method. Although there is one with the same signature as defined in the BasicEJBLocalHome. Can somebody tell me if what I wrote is possible? If it is possible, am I doing something wrong. And if it is not possible, is there an onther solution to the problem I described? I hope the describtion is clear enough. Thanks a lot for your time. Regards, Dries De Moor =========================================================================== To unsubscribe, send email to [EMAIL PROTECTED] and include in the body of the message "signoff EJB-INTEREST". For general help, send email to [EMAIL PROTECTED] and include in the body of the message "help".
