Hi, i am trying to develop a system which looks like a Company/Employees CMR.
Each employees got a reference on a company id. The two beans are linked through a relationship defined in the ejb-jar file. The employee bean got two abstract methods : - companyLocal getCompany() //get the company object from the employee bean - void setCompany(companyLocal co) //set the company object of an employee My major problem appears when I try to create an employee using the ejbCreate() method. if I try to do : setCompany(companyLocalHome.findByPrimaryKey(5)); I get a "calling non-static method from a static method blabla" at compil time and if I do not put the setCompany() line, it complains at running time that the company can't be null (define in my table to force each employee to belong to a company) I thought of passing a companyLocal object as a parameter to the employee's ejbCreate() method but I'm looking for a more clever way to do this. My current ejbCreate() of employee does not take parameters as it sets default values for the newly created employee. Any ideas are welcome, thanks, ionel ------------------------------------------------------- This sf.net email is sponsored by:ThinkGeek Gadgets, caffeine, t-shirts, fun stuff. http://thinkgeek.com/sf _______________________________________________ JBoss-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-user
