Thank you for the info.
I have numerous requirements for "daemon" processing. Watching a directory for
files, copying the files, making SOAP calls to a web service, querying/updating the
database. Walking a file system and creating a Lucene index. Etc. This processing needs to
occur on a regular basis.
The way that I am doing this today is with regular MBeans, packaged in a SAR in an overall
EAR application, which manage threads using java.util.concurrent.Executor framework. The
threads are started via the JMX lifecycle methods (start/stop). Works great.
Unfortunately, JBoss Tools for Eclipse does not support SARs as a module in an EAR.
Therefore, I'm interested in using @Service beans as a replacement for my plain MBeans
for my daemon processing, as I move to JBoss Tools for development.
Portability is not a requirement. This only needs to work on JBoss.
Would it be OK to do mostly the same with @Service beans as I'm currently doing with
plain MBeans? Threads are created/destroyed in the JMX lifecycle methods, as before. The
threads would access resources as required to do their work. Only, if they needed to
access DB resources, they would call an EJB - perhaps the @Service bean itself. The
threads in essence would be the "driver" for the daemon processing, accessing
all non-EJB resources directly, and delegating DB access to EJBs.
Or, is there a better way to handle this kind of daemon processing?
Thanks,
Jon
View the original post :
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4151185#...
Reply to the post :
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&a...