6 Replies Latest reply on Jan 29, 2003 3:27 AM by slaboure

    ANNOUNCE: JBoss Admin-Framework and Web-Console in HEAD

    slaboure

      Hello,

      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

        • 1. Re: ANNOUNCE: JBoss Admin-Framework and Web-Console in HEAD
          slaboure

          the picture...

          • 2. 3761010
            edgarsilva

            Can I download only this files , or I have to proceed with complete download of source code?

            best regards

            Edgar

            • 3. Re: ANNOUNCE: JBoss Admin-Framework and Web-Console in HEAD
              slaboure

              it is only in CVS HEAD, you will have to do a CVS checkout

              • 4. Re: ANNOUNCE: JBoss Admin-Framework and Web-Console in HEAD
                wondersonic

                Hello,
                I've checked out jboss-head and compiled JBoss.
                I've started JBoss and then accessed the web-console
                with http://localhost:8080/web-console/

                and then, I get the following exception:

                java.security.AccessControlException: access denied (java.net.SocketPermission XXX.XXX.XXX.192:3117 connect,resolve)

                at java.security.AccessControlContext.checkPermission(AccessControlContext.java:270)

                at java.security.AccessController.checkPermission(AccessController.java:401)

                at java.lang.SecurityManager.checkPermission(SecurityManager.java:542)

                at java.lang.SecurityManager.checkConnect(SecurityManager.java:1044)

                at java.net.Socket.connect(Socket.java:419)

                at java.net.Socket.connect(Socket.java:375)

                at java.net.Socket.(Socket.java:290)

                at java.net.Socket.(Socket.java:118)

                at sun.rmi.transport.proxy.RMIDirectSocketFactory.createSocket(RMIDirectSocketFactory.java:22)

                at sun.rmi.transport.proxy.RMIMasterSocketFactory.createSocket(RMIMasterSocketFactory.java:122)

                at sun.rmi.transport.tcp.TCPEndpoint.newSocket(TCPEndpoint.java:562)

                at sun.rmi.transport.tcp.TCPChannel.createConnection(TCPChannel.java:185)

                at sun.rmi.transport.tcp.TCPChannel.newConnection(TCPChannel.java:171)

                at sun.rmi.server.UnicastRef.invoke(UnicastRef.java:101)

                at org.jnp.server.NamingServer_Stub.lookup(Unknown Source)

                at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:492)

                at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:471)

                at javax.naming.InitialContext.lookup(InitialContext.java:347)

                at org.jboss.console.navtree.ConsoleTreeModel.getPM(ConsoleTreeModel.java:243)

                at org.jboss.console.navtree.ConsoleTreeModel.loadTree(ConsoleTreeModel.java:102)

                at org.jboss.console.navtree.ConsoleTreeModel.(ConsoleTreeModel.java:60)

                at org.jboss.console.navtree.AdminTreeBrowser.(AdminTreeBrowser.java:63)

                at org.jboss.console.navtree.AppletBrowser.start(AppletBrowser.java:53)

                at sun.applet.AppletPanel.run(AppletPanel.java:355)

                at java.lang.Thread.run(Thread.java:536)

                I use the Plug-in Java(TM): Version 1.4.0_02.

                Should the applet.jar be signed?

                Loïc

                • 5. Re: ANNOUNCE: JBoss Admin-Framework and Web-Console in HEAD
                  wondersonic

                  Hello,
                  I've checked out jboss-head and compiled JBoss.
                  I've started JBoss and then accessed the web-console
                  with http://localhost:8080/web-console/

                  and then, I get the following exception:

                  java.security.AccessControlException: access denied (java.net.SocketPermission XXX.XXX.XXX.192:3117 connect,resolve)
                  at java.security.AccessControlContext.checkPermission(AccessControlContext.java:270)
                  at java.security.AccessController.checkPermission(AccessController.java:401)
                  at java.lang.SecurityManager.checkPermission(SecurityManager.java:542)
                  at java.lang.SecurityManager.checkConnect(SecurityManager.java:1044)
                  at java.net.Socket.connect(Socket.java:419)
                  at java.net.Socket.connect(Socket.java:375)
                  at java.net.Socket.(Socket.java:290)
                  at java.net.Socket.(Socket.java:118)
                  at sun.rmi.transport.proxy.RMIDirectSocketFactory.createSocket(RMIDirectSocketFactory.java:22)
                  at sun.rmi.transport.proxy.RMIMasterSocketFactory.createSocket(RMIMasterSocketFactory.java:122)
                  at sun.rmi.transport.tcp.TCPEndpoint.newSocket(TCPEndpoint.java:562)
                  at sun.rmi.transport.tcp.TCPChannel.createConnection(TCPChannel.java:185)
                  at sun.rmi.transport.tcp.TCPChannel.newConnection(TCPChannel.java:171)
                  at sun.rmi.server.UnicastRef.invoke(UnicastRef.java:101)
                  at org.jnp.server.NamingServer_Stub.lookup(Unknown Source)
                  at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:492)
                  at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:471)
                  at javax.naming.InitialContext.lookup(InitialContext.java:347)
                  at org.jboss.console.navtree.ConsoleTreeModel.getPM(ConsoleTreeModel.java:243)
                  at org.jboss.console.navtree.ConsoleTreeModel.loadTree(ConsoleTreeModel.java:102)
                  at org.jboss.console.navtree.ConsoleTreeModel.(ConsoleTreeModel.java:60)
                  at org.jboss.console.navtree.AdminTreeBrowser.(AdminTreeBrowser.java:63)
                  at org.jboss.console.navtree.AppletBrowser.start(AppletBrowser.java:53)
                  at sun.applet.AppletPanel.run(AppletPanel.java:355)
                  at java.lang.Thread.run(Thread.java:536)

                  I use the Plug-in Java(TM): Version 1.4.0_02.

                  Should the applet.jar be signed?

                  Loïc

                  • 6. Re: ANNOUNCE: JBoss Admin-Framework and Web-Console in HEAD
                    slaboure

                    Yes, that's a current issue with the code, it will be soon fixed, nothing terrifying here. No need to sign the code though.