|
Hi all
I want to execute the following functionallity in an EntityBean CMP: method execute() will obtain a String in DataBase, for example, "Customer" , that is refering to another EntityBean CMP with following associated classes: CustomerHome - Home CustomerEJB - Implementation Customer - Interface In this case, I have to do the following activities: CustomerHome home = (CustomerHome) (new InitialContext()).lookup("java:comp/env/CustomerBeanRef"); Customer customer = home.findByPrimaryKey(10); customer.setIsCurrent(true); Until now it's all rigth, but the methos execute() can obtain a String = "Address", another EntityBean CMP with these associated classes: AddressHome - Home AddressEJB - Implementation Address - Interface And then I do this: AddressHome home = (AddressHome) (new InitialContext()).lookup("java:comp/env/AddressBeanRef"); Address addr= home.findByPrimaryKey(10); addr.setIsCurrent(true); I want to become this method in a generic method. Can anybody help me? �lvaro |
