ANNOUNCE: JBoss Admin-Framework and Web-Console in HEAD
slaboure Jan 7, 2003 6:57 AMHello,
I've commited (on Sunday) and administration framework and a web-console implementation in HEAD.
ADMIN FRAMEWORK
===============
Allows you to plug administration plugins that provide admin features for a specific resources to be administered. The framework is based on a tree-based approach (resources are hierarchically presented).
Each plugin has to decide:
- where it wants to be located
- which kind of resource it wants to manage
- with which profile it is compatible (web, eclipse?, netbeans?)
And it can provide:
- a set of sub-nodes
- a set of sub-resources that can be managed by none/one/several other plugins (or the same plugin)
- a set of popup-menu entries (right-click on tree), each related to an action
- a default action (for the web profile, an action can be an HTTP link, calling an MBean operation, etc.)
- + other infos such as name, description, icon, wether a resource without pluging should be visible or node, etc.
The admin tree structure is lazy generated when an administration console request it and then cached. The cache is cleared either when a new MBean is registered/unregistered or when a plugin requests it. The tree strucutre permits recursive definitions (example: a JVM has a set of EAR which have a set of EJB which are located in a given JVM which has a set of EARs...) This will work.
Thus, you can provide a plugin by creating your object (an MBean for example) and register it with the PluginManager MBean. In the next section we will see that it is also possible to implement plugin-wrappers to make implementation of plugins easier.
WEB-CONSOLE
===========
The web-console is a browser-based admin console that fits in the admin framework as a "WEB" profile. The browser is split in two areas: the left side is a Java Applet presenting the tree structure and the right side is an HTML page (see gif if it goes through SF.net)
Plugins will be made available inside a WAR (to provide web content). Consequently, to make development of plugins easier, a set of helpers servlets classes and taglibs are available. Furthermore, BeanShell scripts (www.beanshell.org) can be used to write plugins. Thus, for very simple plugins, it is enough to add a few lines in the web.xml deployment descriptor of your WAR and provide a small uncompiled BSH script. If you hot-deploy your WAR containing your own enterprise-specific admin plugins, they will automatically integrate in the framework and all applets will refresh in the next 5 seconds and include your brand new tools and managed resources.
The goal was to provide the basic infrastructure on which an advanced web-console (and other consoles) can be built. Consequently, while the plugins I've provided are usefull, they are in no way the end-of-the-trip! What you can do today:
- J2EE:
- browse the JSR77 domains and servers
- browse the deployed EJBModules and see their deployment descriptors
- browse the deployed EARs and see their deployment descriptors
- browse the deployed EJBs and be linked to their MBean containers
- System
- browse the JMX mbeans by domains (the http page associated is good old jmx-console)
- see all UCLs
- Root node actions
- (force the) update of the tree. Otherwise, the applet will check for update every 5 seconds
- Cleanly shutdown the remote instance
- Cleanly shutdown and restart the remote instance(*)
- HALT and restart the remote instance
(*) the restart feature is very simple but very very convenient. The only problem is that the current implementation is based on specific exit return code and it seems that some OS implementations do not correctly forward the return code if the exit does not happen in the main thread. Thus, if the shutdown is not done by the main thread, it may not restart but simply shutdown. If that's the case for you, use the "HALT and restart the remote instance" feature: it will always work
Another useful feature is the description item that pops up when your mouse moves over a node: if you do it on the root node, you will see the complete JBoss version information, which can be very useful for bug-reports, etc. (ex: "JBoss [Matrix2] 4.0.0alpha (build: CVSTag=HEAD date=200301051952)")
JSR-77(/88)
===========
The current J2EE features of the console are based on the JSR-77 implementation available in JBoss. It is much much easier to implement the web-console once the JSR-77 features are fully available and this is the way to go. Nevertheless, as already pointed out on the ML, the current implementation is incomplete and... well... work needs to be done. Consequently, I suggest that people working on the admin console also work on the JSR-77 side. IMHO, Scott McLaughlin seems to be the right person.
TEST-IT-YOURSELF
================
To test it, get jboss-head from HEAD, compile it and launch it. Then direct your browser to http://localhost:8080/web-console/. To see the dynamic behaviour you can then take a EAR and hot-deploy it in JBoss: the applet will refresh and show the new resources. This has only be tested with JDK1.4 and the Java Browser Plugin.
Should this be ported to 3.2?
Cheers,
Sacha