Win a copy of Testing JavaScript Applications this week in the HTML Pages with CSS and JavaScript forum!
  • 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Bear Bibeault
  • Ron McLeod
  • Jeanne Boyarsky
  • Paul Clapham
Sheriffs:
  • Tim Cooke
  • Liutauras Vilda
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • fred rosenberger
  • salvin francis
Bartenders:
  • Piet Souris
  • Frits Walraven
  • Carey Brown

CMR configuration confusion

 
Ranch Hand
Posts: 39
  • Mark post as helpful
  • send pies
  • 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
 
After some pecan pie, you might want to cleanse your palatte with this tiny ad:
Thread Boost feature
https://coderanch.com/t/674455/Thread-Boost-feature
    Bookmark Topic Watch Topic
  • New Topic