File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes EJB and other Java EE Technologies and the fly likes Bean Packaging Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Soft Skills this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Java » EJB and other Java EE Technologies
Bookmark "Bean Packaging" Watch "Bean Packaging" New topic
Author

Bean Packaging

Rajakumar Makapur
Greenhorn

Joined: Jun 23, 2001
Posts: 13
Hi,

The scenario is like this.

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?

Thanks in advance.

regards
Rajakumar.
:roll:
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Bean Packaging