• 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 ...
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
  • Mikalai Zaikin

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 ??

Don't get me started about those stupid light bulbs.
    Bookmark Topic Watch Topic
  • New Topic