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
What is mdb?
What are the advantages of ejb components?
Is is possible for an ejb client to marshal an object of class java.lang.class to an ejb?
How can I access ejb from asp?
What is ejb technology?
Which services are provided to ejb components by the ejb container?
Which of the recommended practices to be performed in the ejbpassivate() method of a stateful session bean?
Is microservice stateless?
What is session facade in ejb?
What do you mean by bean managed transaction?
What is ejb home object?
What are the types of ejb?
What is applicationscoped?
What is stateless ejb?
What are the key benefits of the ejb technology?