1. Jsp will call session bean(Manager) to insert number of records. 2. The session bean(Manager) starts the transaction. And calls the Entity bean/s in loop. 3. The Session bean(Manager)commits the transaction.
I have packaged session bean and all entity beans separately. That is one jar for session bean and one for entity bean and deployed in the same application server. Here started my problem.
The problem is even though entity bean/s calling loop is not finished its iterations the method ejbRemove of sessionBean is called and the session Bean is destroyed.(within 2-3 secs)
Note : None of the Exceptions is thrown and also the return value is not coming.
Now I saw the CD bean example here session bean and entity bean are packaged together. I did the same and surprisingly ITS WORKING FINE.
I am using JBOSS-2.4.4 on NT2000 server, SQL 2000, Microsoft driver for JDBC.
My questions are
1. IS IT REALLY NECESSARY TO PACKAGE THE SESSION AND ENTITY BEANS WHICH SHARE THE TRANSACTIONS. OR 2. I MISSED OUT ANY SETTINGS FOR WHEN THE BEANS ARE PACKAGED SEPARATELY, IF SO WHAT IS THAT SETTING I HAVE TO DO?