I have to EJBs with a 1 - n relation. I use CMR with JBoss 3.0.6
In the jbosscmp-jdbc.xml I configured the dataSource like this:
the same princip is done for BeanB.
So both Beans know their datasource.
But when I make a call on BeanA like this:
getBeanB(); //should return a Collection of BeanB
then I got an empty Collection.
The problem is the following: JBoss tries to resolve the relation via the defaultDS (in my case the Hypersonic-DB).
When I do this entry in the jbosscmp-jdbc.xml:
I do not have longer this problem, and all works fine.
But this entry makes for me no sense. Both tables allready know their datasource!
When I have really to do the default-entry like described above, this has drawbacks:
- I can only deploy beans in the same jar with the same datasource
- I do not know how to generate jbosscmp-jdbc.xml with XDoclet.
Does anybody knows if the default-entry is really needed, and if yes how to use XDoclet for that.
Thanks a lot.