我們的JBoss [EAP] 4.3.0.GA_CP01環境,我需要修改的如何在運行時更改com.arjuna.ats.jbossatx.jta.TransactionManagerService TransactionTimeout的值?
com.arjuna.ats.jbossatx.jta.TransactionManagerService
的
TransactionTimeout
財產,但每當我試圖通過從MBean的JMX-控制檯更改值;以下堆棧跟蹤顯示出來:
java.lang.IllegalStateException: Cannot set transaction timeout once MBean has started
com.arjuna.ats.jbossatx.jta.TransactionManagerService.setTransactionTimeout(TransactionManagerService.java:323)
sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
java.lang.reflect.Method.invoke(Method.java:597)
org.jboss.mx.interceptor.AttributeDispatcher.invoke(AttributeDispatcher.java:136)
org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
org.jboss.mx.server.Invocation.invoke(Invocation.java:86)
org.jboss.mx.interceptor.ModelMBeanAttributeInterceptor.invoke(ModelMBeanAttributeInterceptor.java:103)
org.jboss.mx.interceptor.PersistenceInterceptor.invoke(PersistenceInterceptor.java:76)
org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
org.jboss.mx.server.AbstractMBeanInvoker.setAttribute(AbstractMBeanInvoker.java:461)
org.jboss.mx.server.MBeanServerImpl.setAttribute(MBeanServerImpl.java:608)
org.jboss.jmx.adaptor.control.Server.setAttributes(Server.java:206)
org.jboss.jmx.adaptor.html.HtmlAdaptorServlet.updateAttributes(HtmlAdaptorServlet.java:236)
org.jboss.jmx.adaptor.html.HtmlAdaptorServlet.processRequest(HtmlAdaptorServlet.java:98)
org.jboss.jmx.adaptor.html.HtmlAdaptorServlet.doPost(HtmlAdaptorServlet.java:82)
javax.servlet.http.HttpServlet.service(HttpServlet.java:710)
javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
有編程的方式來改變TransactionTimeout的值,而不在運行時反彈的服務器?
謝謝....讓我看看我如何在我的環境中使用它。我不使用Groovy。 – SiB 2012-07-12 09:20:45
是的......我發現groovy對於例子很有用,因爲我可以快速測試它,它的意圖通常很明顯就是僞代碼。 – Nicholas 2012-07-12 10:22:42