You're still missing my point !
The reason for choosing an OO programming language is that it *supports* the
various OO constructs - inheritance, classes, polymorphism and all the
behavour that is implied (eg inheritance without resulting isA behaviour
isn't true inheritance.)
You would be mad to try and programme in a fully OO way using an 8 bit
assembler language, because you would have to hand code all of the support
for OO that an OO language has built into it. This would lead to a
maintenance nightmare. What happens if someone else modifies your code and
fails to follow your hand-crafted implementation of some OO feature ? It's a
real pain in the arse.
Enterprise Java Beans are implemented using Java. However the EJB spec does
not allow for inheritance between EJBs (the major issue being with entity
beans.) It doesn't support it. Can you hand craft support for isA
inheritance ? Sure, but that's rather missing the point, as I explained
above.
Clear now ?
-----Original Message-----
From: Peter Routtier-Wone [mailto:[EMAIL PROTECTED]]
Sent: 05 February 2001 18:20
To: jBoss
Subject: Re: [jBoss-User] IsA behaviour when inheriting beans
I have just exercised my suggestion and it works.
After deserved criticism from Mr K's for my sloppy wording - I should have
said "will work in all cases that are obvious to me" instead of projecting
my own viewpoint universally - I was rather worried that "this" might
resolve to the interposition class, but it resolved to the bean as I'd
hoped.
This mail list doesn't allow attachments but sample code can be had from my
web server. http://wamoz.com/interest.zip
Given the limited extent of my EJB experience I wouldn't doubt for a moment
that there are cases where this won't work. I'm hoping to learn quite a lot
when Mr K supplies an example case where this approach isn't viable.
To test the sample, follow the build, deploy, test instructions at
http://www.jboss.org/documentation/jboss_win32_trail_index.html or
http://www.jboss.org/documentation/jboss_linux_trail_index.html depending on
your platform. The sample code at http://wamoz.com/interest.zip contains a
modified version of the
sample to which the trail refers.
Follow the instructions there but use my source. Note that on my version of
Windows the classpath for the test client needed quotes as shown.
java -classpath
"%CLASSPATH%;..\..\lib\ext\ejb.jar;..\..\client\jboss-client.jar;."
InterestClient
When you run the sample you will see that InterestBean is identified as
assignment compatible with the SessionBean interface and identified as NOT
assignment compatible with java.util.Hashtable. In both cases this is the
expected and desired behaviour.
Peter Routtier-Wone
---------------------------------------
One day, all this too shall parse.
--
--------------------------------------------------------------
To subscribe: [EMAIL PROTECTED]
To unsubscribe: [EMAIL PROTECTED]
List Help?: [EMAIL PROTECTED]
--
--------------------------------------------------------------
To subscribe: [EMAIL PROTECTED]
To unsubscribe: [EMAIL PROTECTED]
List Help?: [EMAIL PROTECTED]