Hi all:

I've been thinking about the easy way to separate the GUI from the 
data in jBoss classes. Here is one possible solution.

Modify the class removing the code that uses awt, and then make a
subclass (with same name + "GUI" for example) incorporating the
GUI code.

I have tested this with ContainerConfiguration.java. This is the
"data" class :

-------------------------------------------------------------------
package org.jboss.ejb.deployment;

import java.beans.*;
import java.beans.beancontext.*;
import java.io.*;
import java.util.*;

import org.w3c.dom.Node;
import org.w3c.dom.NodeList;
import org.w3c.dom.Document;
import org.w3c.dom.Element;

import com.dreambean.ejx.xml.XMLManager;
import com.dreambean.ejx.xml.XmlExternalizable;
import com.dreambean.ejx.Util;

/**
 *   <description> 
 *      
 *   @see <related>
 *   @author Rickard �berg ([EMAIL PROTECTED])
 *   @version $Revision: 1.4 $
 */
public abstract class ContainerConfiguration
   extends BeanContextServicesSupport
   implements XmlExternalizable
.....
....
.. etc
-------------------------------------------------------------------

It doesn't implement BeanContextChildComponentProxy. The subclass
that returns the GUI component is this:

-------------------------------------------------------------------
package org.jboss.ejb.deployment;

import java.awt.*;
import java.beans.beancontext.*;

import com.dreambean.awt.GenericCustomizer;

/**
 *   <description> 
 *      
 *   @see <related>
 *   @author Rickard �berg ([EMAIL PROTECTED])
 *   @version $Revision: 1.0 $
 */
public abstract class ContainerConfigurationGUI
   extends ContainerConfiguration
   implements BeanContextChildComponentProxy
{  
   // Attributes ----------------------------------------------------
   Component c;

   // BeanContextChildComponentProxy implementation -----------------
   public Component getComponent()
   {
      if (c == null)
          c = new GenericCustomizer(false, this);
      return c;
   }
}
-------------------------------------------------------------------

Of course ejx code will need to be changed to use "GUI" classes,
but jBoss will work without touching a single line of code (I
think, I'm not completely sure :-)

If you like it, I can begin working on this (I will need the most
up to date com.dreambean.* java classes to change ejx code).

Pedro

P.S. - I've tried jBoss with this change and works perfectly. Of
course, EJX Container configuration doesn't work

Reply via email to