jboss - startup class (extends ServiceMBean) vs load-on-startup servlet -
jboss - startup class (extends ServiceMBean) vs load-on-startup servlet -
i new jboss , know differences between servicembean , load-on-startup servlet tag in web.xml? also, know 1 loaded first or loaded @ same time? in situation, should utilize mbean , when should utilize startup servlet or doesn't matter?
i need write a class/servlet validate if required scheme properties (e.g -dinstall_dir=blah ) set. if not, stop right there. else proceed , start application.
thanks in advance
-a
servicembean jmx, part of jvm. load-on-startup servlet tag in web.xml part of j2ee application.
jmx part of j2se starting jdk 1.5. so, can have 1 servicembean per jvm. not per application. jmx used mostely monitoring , managing jvm. provides access info such as: number of classes loaded , threads running, memory consumption, garbage collection statistics, on-demand deadlock detection, , others. mutual use, refresh cache.
jmx allow instrument application , control/monitor using what-ever management console jmx container supports. illustration web application implements reference info cache...
a problem had before need refresh cache because client name changed in database. if had refresh method on mbean interface should able trigger event using jmx console. jmx console may web or fat client comes our j2ee server. our j2ee server may back upwards snmp. means may able invoke method standard tivoli or unicenter console. http://www.theserverside.com/news/1364664/j2ee-application-management-the-power-of-jmx
you don't need remote access servicembean in order trigger asynchrious action. moreover, need validation on scope of application, not whole jvm (while, can, theoretically, handle issue in servicembean). so, more naturally, load-on-startup servlet tag in web.xml. in way, in every start of application validation happen.
one more clarification: servicembean jboss-way write jmx. mbeans server wide (not application wide). that's why utilize mbean , servicembean freely above.
jboss
Comments
Post a Comment