Recently, I was observing a software system and found that in a couple of places Statless SessionBeans extend other Stateless SessionBeans.
Is this a good design ? What are the advantages and disadvantages of this approach ? What special issues should be kept in mind if such a design is required ?
I somehow feel that such an extension design is not a good practice. I could be wrong though.
Please share your comments.
Kiran
-
Session Bean extends another session bean (2 messages)
- Posted by: Kiran Kumar
- Posted on: March 19 2003 20:34 EST
Threaded Messages (2)
- Session Bean extends another session bean by stephen smithstone on March 20 2003 03:49 EST
- Session Bean extends another session bean by Ahmed Talaat on March 20 2003 09:01 EST
-
Session Bean extends another session bean[ Go to top ]
- Posted by: stephen smithstone
- Posted on: March 20 2003 03:49 EST
- in response to Kiran Kumar
Probably the trying to keep the LOC to a minimum as statlessbeans implement some standard callback methods extending the beans means less typing -
Session Bean extends another session bean[ Go to top ]
- Posted by: Ahmed Talaat
- Posted on: March 20 2003 09:01 EST
- in response to stephen smithstone
Actually this is not the only motivation ! Polymorphic beans come in handy in a lot of cases; for example if you have some sort of event handler mechanism in your app implemented as session beans, would you rather code to each bean separately each with a different interface or would it be cleaner and better to code a single interface polymorphically that is fronted by a factory and have you EJB client code implementation agnostic?