• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Tim Cooke
  • Devaka Cooray
Sheriffs:
  • Liutauras Vilda
  • paul wheaton
  • Rob Spoor
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Piet Souris
  • Mikalai Zaikin
Bartenders:
  • Carey Brown
  • Roland Mueller

CMR configuration confusion

 
Ranch Hand
Posts: 39
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Guys,

Could someone explain what is happening here as I am not 100% sure of the exact mechanism in operation. I have the thing working OK but I had to configure things differently to how I was expecting. And no, I'm not using xdoclet as I want to understand what is going on!

I have two simple Entity Beans that represent these tables:


And there is a many to one relationship from movies to director.

- The Movie Bean has a remote interface which the client talks to.
- The Director bean has only a local interface.

I have a Movie remote Home business method:


I have setup a CMR in the configuration files and all works fine.

Here is my ejb-jar.xml file:


You can see the EJB-QL for the method:


The jbosscmp-jdbc.xml file is below:


The comment I have put in the above file explains my problem. It does not make too much sense that I have to define the foriegn-key mapping on the DirectorBean side of the relationship. As there are only two sides to the relationship, I guess Jboss can work it out but I don't understand the reasoning behind it.

Any pearls of wisdom out there ??

Thanks,
Clive
 
I think he's gonna try to grab my monkey. Do we have a monkey outfit for this tiny ad?
We need your help - Coderanch server fundraiser
https://coderanch.com/wiki/782867/Coderanch-server-fundraiser
reply
    Bookmark Topic Watch Topic
  • New Topic