Hi Mohana,
1)What happens to Entity bean if we running application and delete the row(whose entity bean is active) from backend database manuvally. Does Entity bean throw Object not found exception? Does Entity bean keep the state of Entity bean?
Accordingly to
J2EE specs, every transaction starts with invoking ejbLoad() and ends with calling ejbStore(). Hence if the row is removed manually from the database the ejb container is still consistent with the database and no exception is thrown. The huge drawback of this silly approach is that ejb data cannot be cached between transactions and the container reloads the data every time a transaction is started. However some containers like weblogic have special concurrency strategies that allow caching the data using an optimistic approach.
2)How does MDB know the incoming message is belong to it and consumes it? How does other MDB does not consume it. (Assume message type is same for all implemented MDBs).
Not sure if I understand the question, but every MDB acts like a listener to a Topic or Queue. Is the JMS service that knows how to deliver messages to the right recipient, etc.
Regards.