-
1. Re: CMR across jars
jgofio Nov 9, 2002 4:14 PM (in response to briandarcher)Hi Brian,
I have exactly the same problem. I have been searching for a solution and it looks like the CMP2 specification has this restriction: the cmr is between beans in the same ejb jar.
Can anybody tell me if the JBOSS implementation has this restriction... Could it be used between beans in the same ear file?
Please, if somebody can tell me something about this issue I will appreciate it very much !!!
jGofio -
2. Re: CMR across jars
rakn Nov 11, 2002 3:49 AM (in response to briandarcher)Hi,
I had the same problem as well. The only thing I can suggest is to have a xml file for all the persistence (CMP) and have a separate xml for every session bean. -
3. Re: CMR across jars
briandarcher Nov 11, 2002 11:33 AM (in response to briandarcher)Actually, after reading the spec, jars are never mentioned as far as I could see. It does say the following: "Container-managed relationships can exist only among entity beans within the same local relational scope, as defined by the element in the deployment descriptor". It could be interpreted to mean that the 'local relational scope' means the same descriptor or the same jar. However, this is merely one interpretation. There's nothing that says an implementation couldn't acknowledge all entity beans deployed on the same machine as being part of the same 'local relational scope'.
Does anyone know if this issue been brought up with Sun as a JSR? It wouldn't be the first mistake Sun has made (e.g. remote/local interfaces requiring code changes).
It looks like for now I'll be managing some of my relationships myself in the session layer until somebody at Sun or JBoss decides to circumvent this problem. Thanks for all the replies so far. I'm still interested in hearing other thoughts on this subject. I wonder how many people are actually using CMR in production code these days?
Regards,
Brian -
4. Re: CMR across jars
briandarcher Nov 11, 2002 11:41 AM (in response to briandarcher)Hello rakn. Thanks for the reply, although I don't understand your suggestion. Could you please explain?