If there is a need to do some accounts complex calculation process with multiple table data and multiple records then can I do everything with entity beans? (assume this process can be done with regular Java and JDBC API's).
Here there is process and multiple tables updation. So can I put process logic in a session bean and data retrival and updation logic in entity bean of the same ejb-jar file.
Can this process done in the below way (1) I call session bean method to start process from client. (2) session bean calls entity bean via JNDI to get tables data. (3) entity bean retrives data and send back data to session bean as primary key class objects. (4) session bean processes data and changes the data of primary key objects and then sends the primary key objects back to entity bean. (5) entity bean updates the tables and returns control to session bean.
is this functionality is correct? Here assume entity bean is of type CMP.
This is normally how it works. Especially with EJB 2.0, local views have been introduced. This allow for the Facade pattern, where there is usually one session bean which offers both remote and local views, and entity beans are managed locally. This also allows for CMR, as one of the requirements is that the return type for a CMR field should be a local component interface.
Marco Tedone<br />SCJP1.4,SCJP5,SCBCD,SCWCD
Getting married means "We're in love, so let's tell the police!" - and invite this tiny ad to the wedding: