Originally posted by Sudd Ghosh:
"I do not see how to have a "findCustomer" method on the Customer class itself. Its more logical the ask the DAO to find customers. The DAO will then return a Customer class"
The find method will live in the Home interface of your Customer entity bean. It'll be looked up by the client appl using a reference to the home interface, which it gets using a JNDI context lookup.
Originally posted by Koen Serneels:
Yes, but in my question I'm refering to the scenario where I use a DAO instead of entity beans. For the DAO scenario I could also create a static method on Customer class to find Customers. This method would then access the DAO behind the scenes.
With entity beans thats indeed no problem. I know you can use the finder methods of the home interface. I am however not exposing my entity beans to clients. My entity beans will only be exposed to my domain model and/or session facades.
Is there any chance someone can answer my questions ?