-
1. Re: Relationships in EJB 1.1
pazu Mar 12, 2002 7:36 AM (in response to alice_adler01)Relationships are akward in EJB 1.1 since it doesn't have container manager relationships. Are your beans going to be CMP or BMP?
As Employees are going to be used by themselves, not anly as a Company aggregate (is that right? Employee seems to be a useful entity to me), code it as an Entity bean. Write a value object wrapper for it and return a collection of value objects in the Company's accessor method.public Collection getEmployees(); ^^^^^^^^^^ Collection of EmployeeValue
Anyway, if you have the courage, you could try JBoss 3.0.0beta and code everything container managed. Make your beans CMP and define a container managed relationship between them.
Hey, this is my 100th post! -
2. Re: Relationships in EJB 1.1
alice_adler01 Mar 12, 2002 1:45 PM (in response to alice_adler01)I want them to be CMP. Does that mean I'll have to create foreign key manually? And I'll have to get the "collection of employees" by making jdbc calls myself? So essentially I am making it a CMP and yet writing a lot of persistence myself?? I mean it seems like CMP is very limited in EJB 1.1..
Im a little afraid of using Jboss3.0 beta. Is it too buggy?
Thanks very much. -
3. Re: Relationships in EJB 1.1
dsundstrom Mar 12, 2002 3:33 PM (in response to alice_adler01)I am sure that it is less buggy then writing a couple thousand lines of code to manage relationships.
-
4. Re: Relationships in EJB 1.1
pazu Mar 13, 2002 7:07 AM (in response to alice_adler01)Yes, CMP is very limited in EJB 1.1. As David pointed out, JBoss 3.0 may still be buggy (the horror! the horror!), but sure it is less buggy then writing thousand of JDBC/SQL code.
As another *great* option, you can stick to JBoss 2.4.x and use MVCSoft persistence manager. This is a great product that enables you to use CMP 2.0 in JBoss 2.4.x and other application servers. It costs a few bucks, but sure it's worth the money. Take a look at http://www.mvcsoft.com -
5. Re: Relationships in EJB 1.1
alice_adler01 Mar 13, 2002 1:35 PM (in response to alice_adler01)Thank you guys for all the help.