[jboss-user] [JBossCache] - Re: Need to refresh the JBoss treecache periodically
bstansberry@jboss.com
do-not-reply at jboss.com
Sun Oct 1 11:08:28 EDT 2006
Writing and deploying services in JBoss AS is covered in Chapter 2.4 of the 4.0.4 version of the JBoss Application Server Guide, available at http://labs.jboss.com/portal/jbossas/docs.
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:
<depends optional-attribute-name="TreeCache">myco:service=MyCache</depends>
The above assumes your service exposes an mbean attribute named "TreeCache" and that the object name of your cache is "myco:service=MyCache".
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3975343#3975343
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3975343
More information about the jboss-user
mailing list