hi, If there is a method in the bean class. Under what circumstances would we consider to make it available as part of the home interface? I happend to come across an example where a findby method is made available through the homeinterface. Usually methods that are meant to be used by the clients are made available through the remote interface. I would appreciate if any one clears my doubt. thanks
Ajit, You can only define finder and create methods in the HomeInterface. The primary purpose of the HomeObject is to act as a factory for the EJBObject.So it needs to have method/responsibities to make available the EJBObject instances to the client - The EJB specs stipulates the finder and the create methods as the only means to do it. Hope this helps. Regards, ------------------ Sandeep
Sun Certified Programmer for Java 2 PlatformScored 93 per cent
Oracle JDeveloper Rel. 3.0 - Develop Database Applications with Java Scored 56 out of 59
IBM Enterprise Connectivity with J2EE Scored 72 per cent
Enterprise Development on the Oracle Internet Platform Scored 44 out of 56
There are also methods referred to as "home methods" in the home interface (sorry if the term is confusing). These can be used when a particular bean reference is not needed to do the work, kind of like a static method of a class. These methods names should NOT start with "find" or "create". They also will have a corresponding ejbHomeXXX method in the bean class. So for example, if I have a method in my home interface called getSomeStuff(), I would have a method in the bean class called ejbHomeGetSomeStuff(). This is probably not what you are looking for, but you should be aware that it is available. It's in the EJB 2.0 spec, if you want to read up on it.
Villains always have antidotes. They're funny that way. Here's an antidote disguised as a tiny ad: