I need to setup the time to refresh the treecache for every 15 minutes. Can anybody provide me the information on how to setup the refreshing period, so that for every 15 minutes the need to be refreshed in the cache. That is for every 15 miuntes the data will be fetched from the database and keep it in cache.

I have used timer thread for cache refresh and it is working fine. Now I need to enable this jboss cache implementation including DB calls as a service which should start when the server starts. Is there any way to deploy like that please?

The various *-service.xml files found in etc/META-INF of the JBoss Cache distribution are actually service deployment descriptors that will deploy a cache in the AS as a service. Suggest you start with one of those as a template and modify it to configure your cache. Then add a second mbean in the same file to deploy your service that creates the timer thread, etc. Use dependency injection to inject the cache into your service; i.e. in your mbean declaration add: