One more thing, I tried to start a thread which would act as the loader. I 
tried this stupid approach of making it sleep for some time and then call the 
method to load the cache. The idea being that the cache would get evoked only 
after the server started up and the jboss transaction manager would be in 
place. 
Even after doing this, the cache was getting bound to dummytransactionManager 
only. My code was


private boolean retryAndLoadCache(Thread t) {
                for (int i = 0; i < 3; i++) {
                        try {
                                t.sleep(20000);
                                boolean cacheLoaded = checkIfCacheLoaded(); 
//sets up the configuration for my singleton cache object
                                if (cacheLoaded) {                              
        
                                        return true;
                                } else {
                                        cacheFactory.destroyCache(); // calls 
cache.destroy and makes the cache object back to null.
                                        log.info("destroying cache");
                                }
                        } catch (NameAlreadyBoundException nabe) {
                                //log.error(nabe, nabe);
                                log.info("Retrying " + i + "th time.");
                        } catch (InterruptedException e) {
                                log.error(e, e);
                        }
                }
                return false;
        }

View the original post : 
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4206699#4206699

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4206699
_______________________________________________
jboss-user mailing list
[email protected]
https://lists.jboss.org/mailman/listinfo/jboss-user

Reply via email to