I made several tests around this method...
you could have eventually few instances created and imediatly destroyed during an initial ramp up, but after the initial load... and the ConcurrentHashMap aways gave enough protection on the Store.
Well... But anyway I have created a new method synchronized createPageStore on the Chunk Branch which is aways used in places where I don't need concurrent calls over the same store. When we create the queue now, the pageStore will be also created.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4189272#4189272
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4189272
I am attempting to bridge two clustered queues, and am interested in the most efficient way to do so. I would like messages going from cluster 1 queue A to cluster 2 queue A to use a round robin approach when populating messages to the nodes.
Why does the DefaultJMSProvider defined within hajndi-jms-ds.xml contain a connection to XAConnectionFactory rather than ClusteredXAConnectionFactory?
Should I define a new JMSProviderLoader which will use a connection factory that I have setup to use the RoundRobinLoadBalancingFactory?
Thanks,
B
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4189265#4189265
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4189265
This comment was added into PagingManagerImpl:
| //FIXME - this is not thread safe
| public PagingStore getPageStore(final SimpleString storeName) throws Exception
| {
| PagingStore store = stores.get(storeName);
|
| if (store == null)
| {
| store = newStore(storeName);
|
| PagingStore oldStore = stores.putIfAbsent(storeName, store);
|
| if (oldStore != null)
| {
| store = oldStore;
| }
|
| store.start();
| }
|
| return store;
| }
|
stores is a ConcurrentHashMap, and the method is using putIfAbsent, getting the currentStore case it was already set.
I don't think we need a synchronization here, since this method is used every time page is needed. The idea was to use the ConcurrentHashmap to avoid the synchronized block.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4189229#4189229
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4189229
Maybe I'm confused on when addDestination should be called?
But the fact is, if you call session.createQueue, you will have BindingRecords on the Journal, but not DestinationRecords.
But other places, such as JMSServerManagerImpl are also calling addDestination.
And actually, do we really need AddDestination records? couldn't we just have a single record (Binding(AddressName, QueueName))?
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4189226#4189226
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4189226