It's not a secret anymore!*
The moose likes JBoss/WildFly and the fly likes Contents of a TreeMap not updated 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 » Products » JBoss/WildFly
Bookmark "Contents of a TreeMap not updated" Watch "Contents of a TreeMap not updated" New topic
Author

Contents of a TreeMap not updated

Raj roy
Greenhorn

Joined: Jan 11, 2013
Posts: 18
Hello all,

I am new to jboss. We have an application running on Jboss.

in the application we fetch records from database, put the data in a bean and store those beans in a Treemap.
So when a new row is added to the table we expect an object corresponding to the row would be created and put in the treemap. But this does not happen.

There is no problem with the database. all the data are committed properly.

We don't get the object until we restart the Jboss server. So the new objects added to the tree map does not reflect until the server is restarted.

What could be the possible reasons for the same??.....bit confused..never observed such behavior..
Jaikiran Pai
Marshal

Joined: Jul 20, 2005
Posts: 10288
    
168

Can you post the relevant code which does that?

[My Blog] [JavaRanch Journal]
Raj roy
Greenhorn

Joined: Jan 11, 2013
Posts: 18
we have tree map TreeMap<K,Y> where K is the primary key of the row and V is an bean(containing String variables for each columns in the row).

the code goes like this

execute the query


the above while loop is inside a method lets say.. retriveData()

So whenever a new row is added to the table and then I execute the retriveData() method the bean corresponding row is not added to the treemap.

When I restart the server the new row data is being reflected.
Raj roy
Greenhorn

Joined: Jan 11, 2013
Posts: 18
any inputs on this please?
Raj roy
Greenhorn

Joined: Jan 11, 2013
Posts: 18
can any one suggest something on these...please?? I am not able to solve this yet.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Contents of a TreeMap not updated