This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes EJB and other Java EE Technologies and the fly likes Entity EJB Inheritance Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » EJB and other Java EE Technologies
Bookmark "Entity EJB Inheritance" Watch "Entity EJB Inheritance" New topic
Author

Entity EJB Inheritance

Richard Reynolds
Greenhorn

Joined: Aug 24, 2004
Posts: 5
I have bean B extends A. In A I have a cmp field, x. getX() and setX are inherited by B, no probs.
However, in ejb-jar.xml I have to repeat the cmp field x for A and B.
Similarly for relationships, A has a 1 to many rel with C, the cmr code is inherited yet I have to specify the same rel xml block for A to C and B to C.
I have a lot of inheritance, cmp fields and relationships which results in a huge ejb-jar.xml file (and an even bigger weblogic-cmp-rdbms-jar.xml file as I'm using wls 8.1 and this file requires all the repitition too).
Is there a way to tell the server that the xml blocks are inherited too?

Cheers, Richard.
Terry Mullett
Greenhorn

Joined: Feb 21, 2003
Posts: 26
Nope, sorry. Or at least, not in a vendor neutral way. Bean-isms, endowed by the container, aren't inheritable, and don't have any connection to what your bean implementation class has going on with Java inheritance.

Terry
SCEA/SCBCD/SCWCD/SCJP
somkiat puisungnoen
Ranch Hand

Joined: Jul 04, 2003
Posts: 1312
I'm found tutorial about EJB inheritance:::

Part 1

Part 2

Part 3


This will help you.


SCJA,SCJP,SCWCD,SCBCD,SCEA I
Java Developer, Thailand
Richard Reynolds
Greenhorn

Joined: Aug 24, 2004
Posts: 5
My inheritance is working fine, just the repetitive xml that was annoying.
Oh well, guess i'll just have to put up with it.

Those articles are very good, they were my initial guide in setting up my hierarchy.

Thanks guys.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Entity EJB Inheritance
 
Similar Threads
jbosscmp-jdbc.xml nexus with ejb-jar.xml
a cmr-field and a cmp-field on the bean are using the same name. The names
Error with data source and jndi connectivity
Is there something wrong with this .ear archive?
CMR configuration confusion