File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Spring and the fly likes  Why it is making soo many tansactions? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Frameworks » Spring
Bookmark " Why it is making soo many tansactions?" Watch " Why it is making soo many tansactions?" New topic
Author

Why it is making soo many tansactions?

Amirr Rafique
Ranch Hand

Joined: Nov 14, 2005
Posts: 324
I have created a basic Spring applicatin to read from Oracle AQ. I am experiencing following issues. Kindly help me on this

1)- Messages placed on the queue (by PL/SQL code) prior to starting of my spring application are not dequeued by it.
2)- A message that is successfull read from the queue should be removed from the queue. This is not happening. All messages remain in Queue Table.
3)- Once a message is read, the process goes in block/waiting state, as shown by the log below, if any message is place on queue during that period, that message is ignored.


4)- Why it is making soo many tansactions? While waiting on queue


below is my spring config


Kindly help me out
Thanks


"Know where to find the solution and how to use it - that's the secret of success."
Amirr Rafique
Ranch Hand

Joined: Nov 14, 2005
Posts: 324
any idea guys
Mark Spritzler
ranger
Sheriff

Joined: Feb 05, 2001
Posts: 17249
    
    6

In your message listener bean you have

container-class="org.springframework.data.jdbc.jms.listener.oracle.AdtMessageListenerContainer" destination-type="topic">

destination-type="topic" but you say it is a Queue. Queues and Topics work differently, Topics can keep messages on the Topic after just one listener receives it.

Maybe that is why.

Mark


Perfect World Programming, LLC - Two Laptop Bag - Tube Organizer
How to Ask Questions the Smart Way FAQ
Amirr Rafique
Ranch Hand

Joined: Nov 14, 2005
Posts: 324
Hi Mark,
it is a Topic but even if there is no other listener and no new message on Topic, my transaction manager keeps on creating transaction.....
Mark Spritzler
ranger
Sheriff

Joined: Feb 05, 2001
Posts: 17249
    
    6

You are not making sense, in your first post you say you are putting a message on the Queue, then it is a Topic, then there is no messages.

Do you have your Topic configured to be a persistent one, so that it uses a database to save Messages? Maybe that is causing it.


Maybe it is not the Topic creating Transactions but some other code. You aren't using any Scheduler?

It also looks like the Transaction is committing something, so what query is running?

Unfortunately, this might be a case of there is too much information missing to help, and too much too post. In a forum, and might require someone with eyes on it to help fix it.

Good Luck.

Thanks

Mark
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Why it is making soo many tansactions?
 
Similar Threads
Transaction name null if WebsphereUowTransactionManager is configured
TransactionRequiredException - Help required !!!
Transaction not rolled back on a JDBC manual commit / Spring transaction / MySQL InnoDB
Spring JDBC Transaction vs Connection ?
SqlMap problem in Spring-ibatis integration app