mbeans

Programmatically update certificates in tomcat 8 without server restart

扶醉桌前 提交于 2021-02-20 18:50:10
问题 In order to update the certificate that I use for SSL for my server I have a code that does the import\export and validation that I need. It works well, but In order for the changes to take effect I have to restart the tomcat. I wish to avoid the restart, and update it without using external tools (keytool for example). I looked up for some similar questions, and found a solution - restarting the 443 connector. I'm able to do so, and the connector is stopping and starting, but the certificate

404 on JAX-RS on Tomcat, MBeans?

巧了我就是萌 提交于 2021-01-29 18:11:59
问题 I'm getting a 404 on a JAX-RS request, but am running out of things to try out of my bag of tricks. Simplified code where service is defined: package mypackage; @Path("/") public class SavedQueriesService { ... @POST @Path("saved_queries") @Consumes(MediaType.APPLICATION_JSON) @Produces({ MediaType.APPLICATION_JSON + AppConstants.COMMA + MediaType.CHARSET_PARAMETER + AppConstants.UTF_8 }) public Response saveNewSavedQuery(@Context HttpServletRequest httpServletRequest, SavedQueryRequest

WSO2: StatisticsClient

喜你入骨 提交于 2020-02-07 09:32:25
问题 How can i use StatisticsAdmin of Application Server My scenario is : i want to get responsetime of a service that deploy on a server(AppServer/DataServer..) and probed by ESB using discoveryproxy of governance regidtry. if is it possible how can i implement it? otherwise i should be get service response time from AppServer in direct using service name. i can create a proxy of ServerAdminMBean using this package and interface import org.wso2.carbon.server.admin.service.ServerAdminMBean but i

Name for @ManagedOperation in Spring JMX

懵懂的女人 提交于 2020-02-01 05:31:11
问题 I used org.springframework.jmx.export.annotation.@ManagedOperation to expose a method as MBean. I want the operation name different from the method name, but managed operation doesn't have any attribute for it. For example: @ManagedOperation public synchronized void clearCache() { // do something } and I want this operation exposed with name = "ResetCache". 回答1: Create a custom annotation: @Retention(RetentionPolicy.RUNTIME) @Target(ElementType.METHOD) public @interface JmxName { String value

JXM MXBean custom attributes

别等时光非礼了梦想. 提交于 2020-01-17 02:41:28
问题 I have a problem with MXBean custom types and I am not able to handle it. This is my java structure, that involves Map< enum, OtherThing> attribute PPV and its interface public class PPV implements PPVMXBean { public enum EnumPV { PV1, PV2; } public static Map<EnumPV, PV> list; public Map<EnumPV, PV> getList() { return list; } } public interface PPVMXBean { public Map<EnumPV, PV> getList(); } PV and its interface public class PV implements PVBean { public enum EnumTP { TP1, TP2; } private Map

Managed Mbeans from ManagementFactory in JDK1.6 - NotCompliantMBeanException:

谁说胖子不能爱 提交于 2020-01-13 16:24:31
问题 I was using ManagementFactory to get ManagedMbeans in JDK1.5 and JBOSS 4.X. Now wanted to move my same code to JDK 1.6. The Mbean part breaks throwing the exception Caused by: javax.management.NotCompliantMBeanException: Class does not expose a management interface: java.lang.Object Caused by: java.lang.Exception: Unable to register platform (JVM) MBeans with JBoss MBeanServer 回答1: Here's 2 approaches: Make JBossAS use the platform MBeanServer. Create your own proxies that implement the

Non-Java JMX client

允我心安 提交于 2020-01-03 00:53:34
问题 Is it possible to create a JMX client that doesn't run on the JVM? From my understanding JMX is a protocol on top of other protocols (like RMI) so it should be possible to create a C or Go client. Any reason why this hasn't been done? I am aware of Jolokia and realise it can be used as a proxy. 来源: https://stackoverflow.com/questions/49207999/non-java-jmx-client

Port MBean from JBoss 4.x to JBoss 7

柔情痞子 提交于 2020-01-01 08:33:30
问题 we're currently in the process of porting some of our projects from JBoss 4.x to JBoss 7. So far everything seems to work fine, except for our MBeans, which we're commonly using to provide simple management operations. I've been searching for quite a while now, but either I'm incapable of comming up with the correct search term or I'm missing some piece of knowledge to bridge the gap between MBean definition in JBoss 4.x and JBoss 7. Thus, hopefully someone can provide a hint on what I might

Port MBean from JBoss 4.x to JBoss 7

拈花ヽ惹草 提交于 2020-01-01 08:33:10
问题 we're currently in the process of porting some of our projects from JBoss 4.x to JBoss 7. So far everything seems to work fine, except for our MBeans, which we're commonly using to provide simple management operations. I've been searching for quite a while now, but either I'm incapable of comming up with the correct search term or I'm missing some piece of knowledge to bridge the gap between MBean definition in JBoss 4.x and JBoss 7. Thus, hopefully someone can provide a hint on what I might

Why are some methods on the JConsole disabled

情到浓时终转凉″ 提交于 2019-12-30 04:24:12
问题 I can see that some methods on the jconsole are disabled. Given below is the screenshot for com.sun.management.ThreadMXBean The javadocs for these MBean methods do not specify anything about the accessibility part. I think it is a security feature, but I am not able to get a concrete answer for this. The obvious second part to this question is how to create custom MBean implementations which can be selectively disabled on the jconsole. Given below is the system config : JConsole version "1.7