[jboss-user] [JBoss Cache: Core Edition] - Re: Problems with Transaction Manager

fatboysuns do-not-reply at jboss.com
Tue Feb 3 14:05:47 EST 2009

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 {
				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

More information about the jboss-user mailing list