Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...


Can i write business logic methods in entitybean?

Answers were Sorted based on User's Feedback



Can i write business logic methods in entitybean?..

Answer / madan

Entity beans are used to communicate directly with database, here we have setter and getter, each getter is represented with specific id., for example

@Column(name="id")
public String name()
{
return id;
}

this way..

the business logic is maintained Databasefile.java, which contains logics for the communication

Is This Answer Correct ?    2 Yes 0 No

Can i write business logic methods in entitybean?..

Answer / 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

Can i write business logic methods in entitybean?..

Answer / arun

yes you can write business in entity bean... and in entity
bean, you can call business method directly from home
interface, that is not possible in case of session bean. in
session bean you need EJBObject to intrect with bean and
bean' business method.

Is This Answer Correct ?    3 Yes 6 No

Post New Answer

More EJB Interview Questions

Using Container managed entity bean, how an entity bean can be created?

1 Answers  


How can I call one EJB from inside of another EJB?

2 Answers   CTS,


What are the basic and subtypes of enterprise java beans (ejb)?

0 Answers  


Is microservice stateless?

0 Answers  


What is a ejb container?

0 Answers  


Can CMP manage BMP Transaction ? Entity Bean Life Cycle ?

1 Answers   IBM, SAP Labs, Sony,


what are main features in EJB?

2 Answers  


what is the Relationship between EJB and CORBA architecture?

0 Answers   IBM,


What is an ejb context?

0 Answers  


Mention the three levels for applying interceptor methods.

0 Answers  


How to find ejb version in websphere?

0 Answers  


whatis the diff between ejb and servlet/jsp

6 Answers   TCS,


Categories