• Post Reply Bookmark Topic Watch Topic
  • New Topic

Multithreading and EJB container  RSS feed

 
Jayashree Menon
Greenhorn
Posts: 16
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
My problem is stated below :
I have 4 Queues

Q1 Q2 Q3 Q4

The whole process is triggered by a message in Q1.
MDB listening at Q1 will then fire a stateless session bean.(SLSB1) This bean will pick around thousand records from the database and make a Message of each record and put them into Q2

A MDB listening on Q2 will fire another Stateless Session Bean (SLSB2) and pick each message and pass it to Q3 after which it will wait for a response Message on Q4.

The response having received is parsed and business logic is applied depending on the values of the message. The message has details about different Systems. Therefore, the SLSB2 deals with each System in a different method. They are private methods. The methods have transaction attribute as "Required" as they need to update the database. The main method calling these private methods has transaction attribute "NotSupported".

Now it so happens that if the messages are of the same System, the database is updated properly. But if the Systems are of different methods, the update is done only for any one System, which ever is picked first.
For the rest of the systems, the transaction times out.


All the variables holding values of the message are local.Even the database connection, preparedstatements, resultsets are all local.

Any help would be great.
Thanks in advance
Jayashree
 
Roger Chung-Wee
Ranch Hand
Posts: 1683
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Why are you using the Not supported attribute?
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!