Webadmin has been created by David Blevins (Sep 02, 2005).

Content:

The Webadmin is a new addition to OpenEJB 1.0 and very innovative in that it lets you plug-in your own admin beans. Here are some screenshots:

Enabling the Webadmin in 1.0 beta 1

The Webadmin console is in the 1.0 beta 1 release. To enable it, simply move into the openejb.home directory and copy the openejb-webadmin-main.jar from the beans directory into the lib directory. Then start the server.

mingus:~/
$ cd /usr/local/openejb-1.0-beta1

mingus:/usr/local/openejb-1.0-beta1 03:37:33 
$ cp beans/openejb-webadmin-main.jar lib/

mingus:/usr/local/openejb-1.0-beta1 03:37:52 
$ ./bin/openejb start
OPENEJB_HOME = /usr/local/openejb-1.0-beta1
OpenEJB 1.0-beta1    build: 20050829-2233
http://www.openejb.org
resources 1
OpenEJB ready.
[init] OpenEJB Remote Server
  ** Starting Services **
  NAME                 IP              PORT  
  admin thread         127.0.0.1       4200  
  ejbd                 127.0.0.1       4201  
  telnet               127.0.0.1       4202  
  webadmin             127.0.0.1       4203  
-------
Ready!

Now you can open your browser to go to http://localhost:4203/

WebAdmin Beans

To create an EJB and have it included as part of the WebAdmin, simply subclass from WebAdminBean and include it in your ejb-jar.xml file as such:

ejb-jar.xml
<session>
    <description>A JNDI viewer</description>
    <ejb-name>webadmin/ViewJndi</ejb-name>
    <home>org.openejb.webadmin.HttpHome</home>
    <remote>org.openejb.webadmin.HttpObject</remote>
    <ejb-class>org.openejb.webadmin.clienttools.ViewJndiBean</ejb-class>
    <session-type>Stateless</session-type>
    <transaction-type>Bean</transaction-type>
  </session>

The ejb-name is used to create the menus and should follow the format of 'menu-section/menu-item'. WebAdminBeans are grouped together by the 'menu-section' portion of their ejb-name. The 'menu-item' is the clickable link that causes the EJB code to be execute. Very simple and makes it possible to package administrative components with your EJB applications.

WebAdmin Plugins

Here is a project that already takes advantage of the new feature. BeanGen

Reply via email to