Rickard,

Do you know any more about the licensing issues surrounding jini than I
do?  As I see it the only problem with a JINI discovery for JBOSS
servers is that you need a jini server running somewhere.  Simple
solution embed a jini server in jboss (ie if you cannot find a service
registrar to register the rmi adaptor with, just start one.  Then anyone
who comes along will automagically get it. Can this be done under gpl
licensing, or does it need to be quarantined and/or clean roomed? 

I'd love to get this going - real busy at the moment but maybe next
month if anyone else is interested in throwing around some ideas.

Geoff Hill.

Rickard �berg wrote:
> 
> Hey
> 
> (let's keep this on jboss-dev for now)
> 
> Andreas Schaefer wrote:
> > - Within EJX I would create a Panel containing a vertical SplitPanel
> 
> Is this for a particular server? In that case I would suggest that you
> also do a separate window with a "server finder" that lists the
> available server. One should be able to add servers manually. Later on
> this could be changed to find servers automagically through Jini too.
> When one clicks on a server in the list the below panel would open up.
> 
> > - The left hand side of the SplitPanel contains a list of the found services
> >   within jBoss. The query has to be performed in order to get the list
> >   of services (or through properties the program can also during startup
> >   perform a certain query).
> 
> This should be done automagically.
> 
> > - The list is a Tree where I would suggest the following hirarchy
> >     - 1. jBoss Application
> >     - 2. Domains of services
> >     - 3. Services within its domain
> >     - 4. Attributes or Operations
> 
> What would the first level (1.) contain? Only a root?
> 
> > - The right hand side gives a more detailed with of the selected item within
> >   the list (like infos about the attribute (is type, read only or writable,
> > ...) or
> >   a list of the parameters of the operation)
> > - The user can changes the attributes if they are writable
> > - The user can invoke an operation with a list of paramters he/she can enter
> >   in a dialog
> > - The user can record and replay maintenace steps to ease repeative work
> >
> > This week I will create a simple GUI with the Tree and the simple detail
> > panels
> > on the right hand side. But if you have already some comments or critiques
> > please let me know because then I can save time.
> 
> Sounds good to me. If you use the BeanContext and GUI components that
> are available in EJX you should be able to do this very fast. All the
> necessary code is already available, so you would only have to put it
> together really. Shouldn't take long at all.
> 
> > 2. Short introduction to JMX and our JMX-RMI Adaptor
> > =======================================
> >
> > This is a short introduction to JMX for all of you who do not know JMX and
> > for me a way to see if I understand it (when I am wrong please correct me).
> >
> > JMX is an architecture to make parts of an application or system manageable
> > from the outside of the application/system even when it is part of it. And
> > if the
> > user likes he/she can replace the management tool by another one like SNMP
> > (Simple network management protocol) client. This gives the user the
> > possiblity
> > to manage their environment in one tools (if desired) instead of learning
> > all the
> > different tools to manage all your applications.
> 
> Correct.
> 
> > JMX architecture are divided roughly in five parts:
> > 1) Manage(able) Beans (or short MBeans)
> > 2) Manage Bean Server (or short MBeanServer)
> > 3) Adaptor
> 
> Which is a kind of MBean at the same time.
> 
> > 4) Connector Server
> 
> What is a Connector Server? Never saw that in the JMX spec.
> 
> > 3) Client
> 
> Or "management console".
> 
> > The client is seperated into two parts:
> > 1) Connector Client
> > 2) Management program
> >
> > If a Java class becomes a MBean it can be managed from the outside. It
> > provides
> > the MBeanServer with the necessary information about itself:
> > - Service, Class etc.
> > - All attributes it will expose to the outside
> > - All operations it will expose to the outside
> > The MBeanServer collects the MBeans together and is the visible part to the
> > outside
> > world. The MBeanServer itself is a MBean also manageable by the client.
> 
> Correct.
> 
> > The Adaptor is a view for the MBeans to a given protocol. This protocol can
> > be
> > HTML or like in our case RMI.
> 
> To be precise the protocol would be HTTP and the "client" HTML.
> 
> > The Adaptor is part of the
> > The Connector is an interface which allows the client to work the same way
> > on
> > different protocols. Therefore it is necessary to have an Connection on
> > Server and
> > Client side.
> 
> Not quite with you here. Can you explain further what you are referring
> to? An adaptor provides a means through which you can access the server,
> that much I agree on.
> 
> > For jBoss the outside view is the
> >     org.jboss.jmx.interface.JMXAdaptor
> > which is our RMI Adaptor supporting the RMI protocol. It allows a Java class
> > running
> > in a different JVM to access the jBoss services (MBeans) and manipulate
> > their attributes
> > and invoke operations on them.
> 
> Correct.
> 
> > Here is now an example Java class printing all the available services, its
> > attributes and
> > operations. When you want to run it do the following:
> > - add /lib/jmxri.jar, /lib/ext/jboss.jar,/lib/ext.jar and your local
> > directory to the classpath
> > - add /client/stop.jar to your classpath (it needs JMXAdaptor.class and
> > JMXAdaptorImpl_Stub.class)
> > - copy jndi.properties from /conf to your local directory
> > - compile this class
> > - add /client/jnp-client.jar to the classpath (!!)
> > - start jBoss if not already done (wait till it is completely loaded)
> > - let it run
> >
> > Here is now the Java class (have
> > fun): -------------------------------------------
> > /*
> >  * jBoss, the OpenSource EJB server
> >  *
> >  * Distributable under GPL license.
> >  * See terms of license at gnu.org.
> >  */
> >
> > import java.util.Collection;
> > import java.util.Iterator;
> >
> > import javax.management.MBeanAttributeInfo;
> > import javax.management.MBeanInfo;
> > import javax.management.MBeanOperationInfo;
> > import javax.management.ObjectInstance;
> > import javax.naming.InitialContext;
> >
> > import org.jboss.jmx.interfaces.JMXAdaptor;
> >
> > /**
> >  *   <description>
> >  *
> >  *   @see <related>
> >  *   @author Andreas "Mad" Schaefer ([EMAIL PROTECTED])
> >  */
> > public class TestJmxClient
> > {
> >    // Constants -----------------------------------------------------
> >
> >    // Attributes ----------------------------------------------------
> >
> >    // Static --------------------------------------------------------
> >  public static void main(String[] args)
> >   throws Exception
> >  {
> >   System.out.println( "Testing JMX connection to server" );
> >   new TestJmxClient().listServices();
> >   System.out.println( "Testing JMX connection to server finished" );
> >  }
> >
> >    // Constructors --------------------------------------------------
> >
> >    // Public --------------------------------------------------------
> >    public void listServices()
> >   throws Exception
> >    {
> >     JMXAdaptor server = (JMXAdaptor) new InitialContext().lookup( "jmx" );
> >   try
> >   {
> >    Iterator i = server.getMBeanInfos().iterator();
> >    while( i.hasNext() ) {
> >     MBeanInfo info = (MBeanInfo) i.next();
> >     System.out.println( "MBean: " + info.getClassName() );
> >     MBeanAttributeInfo[] aInfos = info.getAttributes();
> >     for( int k = 0; k < aInfos.length; k++ ) {
> >      System.out.println( "\t" + k + ". Attribute: " +
> > aInfos[ k ].getName() );
> >     }
> >     MBeanOperationInfo[] oInfos = info.getOperations();
> >     for( int k = 0; k < oInfos.length; k++ ) {
> >      System.out.println( "\t" + k + ". Operation: " +
> > oInfos[ k ].getName() );
> >     }
> >    }
> >   } catch (Exception e)
> >   {
> >    System.err.println( e );
> >   }
> >    }
> >
> >    // Protected -----------------------------------------------------
> > }
> 
> Yes, that's the basics of it.
> 
> Preferably, I would add something on top of the JMX/RMI adaptor that
> implements MBeanServer. That way the GUI can work on MBeanServer *only*
> and not care about what adaptor is used (now, is that cool or what?).
> Currently that is impossible, since the version of JMX we have provides
> MBeanServer as a class. The final version will have it as an interface,
> which will allow this.
> 
> /Rickard
> 
> --
> Rickard �berg
> 
> Email: [EMAIL PROTECTED]
> http://www.telkel.com
> http://www.jboss.org
> http://www.dreambean.com

-- 
Geoff Hill
Ironico Pty. Ltd.
Brisbane AUSTRALIA
0402 219 904

Reply via email to