Wildfly : Is there any overhead enabling ejbs and datasources statistics? - statistics

In the wildfly config file (standalone.xml), it is possible to enable statistics for the ejb and datasources susbsystems
I would like to enable them to get useful infos at runtime (invocations, execution times,...)
But is it something that can be activated on a production server ?
Is there any overhead ?

The answer to both question is yes :) you can activate it and there will be an overhead.
You can use the jboss-cli to enable/disable the stats without requiring a restart of the server.

Related

Web interface for managing Tomcat services

I have tons of tomcat servers, they are all in a virtual machine. At the moment there is a need to develop a web panel, where I can track the statuses of servers, change their configurations, stop and restart. Actually the question itself: with what technologies can I do this. Previously, there was an idea to use the playbook ansible.
How can I at least display the names of my servers on the page?
There are two standard ways to monitor Tomcat:
you can use Tomcat Manager, especially its text interface,
you can use JMX directly or through the JMX Proxy Servlet. On Tomcat's webpage you can find a not so up-to-date list of MBeans. For some MBeans you'll have to fire up jconsole and explore the names yourself.

Dynamically Changing Hazelcast Server Log Level

I am using client - server mode of Hazelcast. Is it possible to control the logging level of Hazelcast server dynamically from Hazelcast client ?. My intention is that, by default I will start Hazelcast server in ERROR mode and in case of any problem, I want to change the log level to DEBUG mode without restarting the Hazelcast server.
Thanks
JK
Hazelcast does not depend on any custom logging frameworks and makes use of adaptors to connect to a number of existing logging frameworks. See some details here:
http://docs.hazelcast.org/docs/3.5/manual/html/logging.html
Most of the current logging frameworks allow you to dynamically / programmatically change the log levels. I'm at a loss here, since you haven't given any details of the logging framework you have used.
For example :
LogManager.getLogger("loggername").setLevel(newLoglevel);
will achieve whatever you are looking for. You can also change logj configuration file (logj.xml) in runtime and the changes will be in effect without restarting any of the hazelcast servers.

how to generate heap dump from jboss-eap-6.0

Hello All,
how to generate heap dump from jboss-eap-6.0 ?
below link talks about JBoss AS 6.x but i am looking for jboss-eap-6.0, seems jboss-eap-6.0 doesn't JMX bean support. i know Jmap command but i am more of looking how to trigger manually from jboss-eap-6.0
http://www.jochenhebbrecht.be/site/2012-12-12/java/creating-a-java-heapdump-in-jboss-6x
Try JVisualVM. It comes with the JDK, you should see it in your bin folder next to java/javac
It has options to profile and dump a running JVM. It can connect to remote JVMs, check here on how to enable JMX port, if JBOSS doesn't have that by default.

How to do HTTP Session Replication between apache karaf containers?

Does anybody know of a way to do http session replication between web apps running in distributed apache karaf OSGi containers?
In this post, http://karaf.922171.n3.nabble.com/Pax-web-failover-LoadBalancing-td4029552.html, Jean-Baptiste Onofré says it's not available in apache cellar yet. Is this capability available anywhere yet?
I've been googling all day and haven't found any options -- Thanks for any help.
Steve
Karaf does not have it for pax-web as confirmed by JB in the above post. I am also waiting for him to provide us.
If you are in a hurry
You can use Hazelcast (already with Cellar) for session replication.
Hazelcast supports it and provide HazelcastWM for the same purpose.
Jetty does provide session replication and we use jetty as
servlet-container.You have to check possibility with it.
Try on forum for putting Tomcat instead of Jetty.

How do I start my grails dev server in single threaded mode?

grails run-app will start my app in an embedded tomcat server.
I would like to configure this embedded server so that only a single request processor thread is available and that multiple threads are processed serially rather than concurrently (similar to default webrick behaviour in the rails world)
Is it possible? If so, how do I do it?
As far as I know, this is not directly supported by the Tomcat plugin. But you could easily modify the Tomcat plug-in and run your own version.
If you look at the class org.grails.tomcat.TomcatServer, you will see it starts a Tomcat instance.
Here is the doc for this class: http://tomcat.apache.org/tomcat-7.0-doc/api/org/apache/catalina/startup/Tomcat.html
There is a getConnector() method which will return the default HTTP connector. Once you have it, you can probably change the settings, like maxThreads.
But be careful the performance will be awful. But I guess you already know that.

Resources