Friday, February 13, 2009

Install jManage Application Management Platform as a service

You can find a detailed explanation at Vigil Bose's blog site.

Has anyone tried setting up jManage as a service on windows or linux?

Generating alerts from your Java application

You can very easily setup your application to emit MBean notification in case of a severe error. Here is some sample code:


public class AlertNotification
extends NotificationBroadcasterSupport
implements AlertNotificationMBean {

private static final String TYPE_SEVERE = "SEVERE";
private int sequence = 1;
private static AlertNotification instance =
new AlertNotification();

public static AlertNotification getInstance() {
return instance;
}

private AlertNotification() {
}

public MBeanNotificationInfo[] getNotificationInfo() {
MBeanNotificationInfo[] notifications =
new MBeanNotificationInfo[1];
notifications[0] =
new MBeanNotificationInfo(new String[] { TYPE_SEVERE },
"LogNotification",
"Types of notifications emitted by this broadcaster");
return notifications;
}

public void send(String message) {
this.sendNotification(new Notification(TYPE_SEVERE, this,
sequence++, System.currentTimeMillis(), message));
}
}


Also remember to register the MBean above:


MBeanServer mbeanServer =
ManagementFactory.getPlatformMBeanServer();
mbeanServer.registerMBean(
AlertNotification.getInstance(),
new ObjectName(ObjectNames.ALERT_NOTIFICATION_BEAN));


The code above will emit a MBean notification when the send() method is called. For example:


AlertNotification.getInstance().send("your alert message here");


You can then configure jManage to listen to this MBean notification and generate an alert that can be delivered to your mail box. To learn more about configuring alerts in jManage see jManage Documentation.

Please let me know what you think of the code above. Also, please share if you have setup something like this with jManage.

Wednesday, February 11, 2009

Problem with connecting to JBoss on remote linux machine

Just resolved a problem where jManage was not able to connect to JBoss instance on a remote box. The /etc/hosts file on the remote box had:


127.0.0.1 localhost uat2 uat2.carezen.local


After, changing the hosts file to:


127.0.0.1 localhost
10.10.1.51 uat2 uat2.carezen.local


and restarting the JBoss instance, the problem got resolved.

Please be aware of this issue. Other users have run into it as well. There is also a reference to this issue on JBoss forum.

Also note that this problem also occurs with JSR160 connections, e.g. connecting to JVM.

Thursday, September 13, 2007

Wow! This is a very useful product

First of all, my apologies to the jManage users for not being active in the jManage community in the last 6 months. My job at Care.com has kept me very busy.

We actually use jManage in the production environment of Care.com. We use it to monitor our JBoss application servers, and also the long running command-line processes.

jManage has proven most useful when generating alerts in case of errors in the command-line processes. We have extended the JDK logging (java.util.logging.Handler) to generate MBean notifications when "SEVERE" level error is logged. This helps us sleep better at night, as know that jManage is up watching the processes for us.

I was adding another command-line process to our production jManage instance today, and I couldn't stop myself from admiring what the jManage community has built. Now that I am very active user of jManage, I find it a very useful product.

PS: I will try to get some screen shots of our jManage instance at Care.com.

Tuesday, May 15, 2007

Merging JBoss and JDK1.5 MBeans under one MBeanServer

As per the following issue logged on JBoss, it seems like the new versions of JBoss support registering the JBoss MBeans in the JDK 1.5 MBeanServer:

http://jira.jboss.com/jira/browse/JBAS-1610

It says:

To enable this feature use: './run -Djboss.platform.mbeanserver'
and see the 'java.lang' and 'java.util.logging' domains appearing in the jmx-console

Thursday, November 16, 2006

jManage 2.0 beta is now available

We are very excited to announce the availability of jManage 2.0 beta.

We have decided to change the version number from 1.5 to 2.0 to better reflect the level of maturity and stability in this release, as well as many new features which transform jManage from a JMX console to a management platform.

2.0 beta contains the following major features:
- Improved dashboard framework, with two Java 5 dashboards.
- Connector framework for non-JMX applications, with a sample Oracle database connector.
- Application downtime tracking with ability to setup alerts when an application goes down.
- WebLogic 9.x support is now part of this release. This was earlier provided as a patch.
- UI Improvements.

There is documentation available on dashboards and connectors at http://www.jmanage.org/wiki.

A number of bugs found in 1.5 beta, have been fixed in this release. Please see the release notes for more info:
http://sourceforge.net/project/shownotes.php?release_id=464022&group_id=111374

You can download this release from:
http://sourceforge.net/project/showfiles.php?group_id=111374&package_id=211715&release_id=464022

We will now be working towards the next 2.0 release with:
a) Historical graphing.
b) Dashboards for major J2EE application servers.
c) More Bug fixes.

Best Regards,

The jManage Team

Saturday, May 20, 2006

jManage 1.0 Documentation

jManage Documentation is now being maintained on the following wiki:

http://jmanage.org/wiki/index.php/Documentation


You can also make changes to this documentation after you login.

Thursday, April 27, 2006

Hibernate Stats with jManage

You can configure Hibernate to expose statistics of a Hibernate SessionFactory via JMX. Please see the hibernate documentation for more information:

Before you can look at Hibernate stats via jManage, you need to copy hibernate-3.1.jar to JMANAGE_HOME/lib folder, and restart jManage.

Following is an example of getting Second Level Cache statistics for a cached entity.