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


Please Help Members By Posting Answers For Below Questions

Explain transaction and various methods to manage it?

540


What is the default transaction attribute for an ejb?

546


What is stateless programming?

605


Is ejb a framework?

539


can we stop the execution of a method before completion?

2514






What is meant by ejb?

519


Enlist the enterprise beans types?

610


Explain the concept of ejb ql?

606


What is rmi and ejb in java?

543


What were entity beans?

596


Explain the concept of local interfaces?

540


What happens when I change a value in the httpsession from inside an ejb?

530


For ejb applications with bean-managed transaction demarcations, which of the following is used by the client to get a reference to the usertransaction object for the weblogic server domain?

550


What is the difference between @requestparam and @pathvariable?

490


What is the difference between ejbcreate() and ejbpostcreate?

538