Can i write business logic methods in entitybean?
Answer Posted / supraja
One easy way to achieve this is to separate pure business
logic from the persistence mechanism. Implement the
business logic in your CMP class, which can be deployed
alone if CMP is chosen. Then implement the persistence code
into the BMP class, which inherits from the CMP class. This
preserves all the business logic of the CMP superclass and
adds database access code in the BMP subclass,
This model sounds easy to implement but still leaves the
following flexibility inhibitors:
It is impossible to extend the implementation classes.
Doing so means the subclasses must extend both the CMP and
the BMP superclass directly. In addition, the BMP subclass
will have to extend its direct CMP implementation. This
causes multiple class inheritance. Such multiple
inheritance is not allowed in Java programming
| Is This Answer Correct ? | 0 Yes | 1 No |
Post New Answer View All Answers
Explain transaction and various methods to manage it?
Does spring use ejb?
Why should we use ejb?
Which is more beneficial: Stateful or Stateless Bean?
Is microservice stateless?
Can an ejb send asynchronous notifications to its clients?
What is difference between stateless and stateful?
Why do we use @requestmapping?
What is the purpose of ejb in java?
What are the design principles for ejb?
Define EAR, WAR and JAR ?
What do you mean by ejbdoclet?
What are the various types of entrepreneur java bean?
What is the difference between ejbcreate() and ejbpostcreate?
What do you mean by ‘hot deployment’ ?