java - Can a transaction have many threads? -


Normally

We have some business logic that has a bottle neck Due to a set of business logic data within a transaction (read only), it queries the database, executes it, and returns an object. In a given request, it should be done multiple times with different parameters. Can we break every business logic call into a separate thread?

Specially

  EJB object (part of an HTTP request on a JBoss application server) of objects that apply to the refundable - Creates (call system called business logic method) Using an ExecutorService Each Refund object invokes the business logic which uses a PreparedStatement POJOs We use a question in the PostgreSQL database - Resolverized Objects from Objects that come from Postgrassel - Haman After this we get errors of postgres, whose names portals do not exist, whenever we limit our thread to one:    

Previous> Error: Cursor "& lt; Unknown Portal 777 & gt;" Does not exist STATEMENT: FETCH ALL IN "& lt; anonymous P777"

I'm not sure what is happening due to the error, but business logic is being said properly and it works fine without threading. I have to question whether the threads can be started and added to the transaction (and how do we do if they can?).

Do not create threads within an EJB needed. If you need to break it down, use JMS or even easier to use, to provide concurrency within the EJB-based operation.


Comments

Popular posts from this blog

c# - How to capture HTTP packet with SharpPcap -

php - Multiple Select with Explode: only returns the word "Array" -

php - jQuery AJAX Post not working -