geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From djen...@apache.org
Subject cvs commit: incubator-geronimo/modules/naming/src/java/org/apache/geronimo/naming/deployment EJBLocalRefDConfigBean.java EJBRefDConfigBean.java ENCHelper.java MessageDestinationRefDConfigBean.java ResourceEnvRefDConfigBean.java ResourceRefDConfigBean.java
Date Sun, 22 Feb 2004 19:11:53 GMT
djencks     2004/02/22 11:11:53

  Modified:    modules/connector/src/java/org/apache/geronimo/connector/deployment/dconfigbean
                        AdminObjectDConfigBean.java
                        AdminObjectInstance.java
                        ConfigPropertySettingDConfigBean.java
                        ConfigPropertySettings.java
                        ConnectionDefinitionDConfigBean.java
                        ConnectionDefinitionInstance.java
                        ResourceAdapterDConfigBean.java
                        ResourceAdapterDConfigRoot.java
                        ResourceAdapter_1_0DConfigRoot.java
               modules/deployment/src/java/org/apache/geronimo/deployment/plugin
                        DConfigBeanRootSupport.java DConfigBeanSupport.java
                        XmlBeanSupport.java
               modules/deployment/src/java/org/apache/geronimo/deployment/plugin/application
                        EARConfigBean.java
               modules/deployment/src/java/org/apache/geronimo/deployment/plugin/client
                        ClientConfigBean.java
               modules/jetty/src/java/org/apache/geronimo/jetty/deployment
                        WebAppDConfigBean.java WebAppDConfigRoot.java
               modules/naming/src/java/org/apache/geronimo/naming/deployment
                        EJBLocalRefDConfigBean.java EJBRefDConfigBean.java
                        ENCHelper.java
                        MessageDestinationRefDConfigBean.java
                        ResourceEnvRefDConfigBean.java
                        ResourceRefDConfigBean.java
  Log:
  make determination of schema type loader to use unambiguous
  
  Revision  Changes    Path
  1.4       +6 -4      incubator-geronimo/modules/connector/src/java/org/apache/geronimo/connector/deployment/dconfigbean/AdminObjectDConfigBean.java
  
  Index: AdminObjectDConfigBean.java
  ===================================================================
  RCS file: /home/cvs/incubator-geronimo/modules/connector/src/java/org/apache/geronimo/connector/deployment/dconfigbean/AdminObjectDConfigBean.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- AdminObjectDConfigBean.java	21 Feb 2004 16:40:00 -0000	1.3
  +++ AdminObjectDConfigBean.java	22 Feb 2004 19:11:52 -0000	1.4
  @@ -62,7 +62,6 @@
   import org.apache.geronimo.xbeans.geronimo.GerAdminobjectInstanceType;
   import org.apache.geronimo.xbeans.geronimo.GerAdminobjectType;
   import org.apache.xmlbeans.SchemaTypeLoader;
  -import org.apache.xmlbeans.XmlBeans;
   
   /**
    *
  @@ -71,11 +70,10 @@
    *
    * */
   public class AdminObjectDConfigBean extends DConfigBeanSupport {
  -    private final static SchemaTypeLoader SCHEMA_TYPE_LOADER = XmlBeans.getContextTypeLoader();
       private AdminObjectInstance[] instances = new AdminObjectInstance[0];
   
       public AdminObjectDConfigBean(DDBean ddBean, GerAdminobjectType adminObject) {
  -        super(ddBean, adminObject, SCHEMA_TYPE_LOADER);
  +        super(ddBean, adminObject);
           String adminObjectInterface = ddBean.getText("adminobject-interface")[0];
           if (adminObject.getAdminobjectInterface() == null) {
               adminObject.addNewAdminobjectInterface().setStringValue(adminObjectInterface);
  @@ -138,6 +136,10 @@
               }
           }
           pcs.firePropertyChange("adminObjectInstance", old, instances);
  +    }
  +
  +    protected SchemaTypeLoader getSchemaTypeLoader() {
  +        return ResourceAdapterDConfigRoot.SCHEMA_TYPE_LOADER;
       }
   
   }
  
  
  
  1.4       +2 -2      incubator-geronimo/modules/connector/src/java/org/apache/geronimo/connector/deployment/dconfigbean/AdminObjectInstance.java
  
  Index: AdminObjectInstance.java
  ===================================================================
  RCS file: /home/cvs/incubator-geronimo/modules/connector/src/java/org/apache/geronimo/connector/deployment/dconfigbean/AdminObjectInstance.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- AdminObjectInstance.java	21 Feb 2004 01:10:50 -0000	1.3
  +++ AdminObjectInstance.java	22 Feb 2004 19:11:52 -0000	1.4
  @@ -78,7 +78,7 @@
       private XpathListener configListener;
   
       public AdminObjectInstance() {
  -        super(null, SCHEMA_TYPE_LOADER);
  +        super(null);
       }
   
       void initialize(GerAdminobjectInstanceType xmlObject, AdminObjectDConfigBean parent)
{
  
  
  
  1.5       +6 -4      incubator-geronimo/modules/connector/src/java/org/apache/geronimo/connector/deployment/dconfigbean/ConfigPropertySettingDConfigBean.java
  
  Index: ConfigPropertySettingDConfigBean.java
  ===================================================================
  RCS file: /home/cvs/incubator-geronimo/modules/connector/src/java/org/apache/geronimo/connector/deployment/dconfigbean/ConfigPropertySettingDConfigBean.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- ConfigPropertySettingDConfigBean.java	21 Feb 2004 01:10:50 -0000	1.4
  +++ ConfigPropertySettingDConfigBean.java	22 Feb 2004 19:11:52 -0000	1.5
  @@ -61,7 +61,6 @@
   import org.apache.geronimo.deployment.plugin.DConfigBeanSupport;
   import org.apache.geronimo.xbeans.geronimo.GerConfigPropertySettingType;
   import org.apache.xmlbeans.SchemaTypeLoader;
  -import org.apache.xmlbeans.XmlBeans;
   
   /**
    *
  @@ -70,10 +69,9 @@
    *
    * */
   public class ConfigPropertySettingDConfigBean extends DConfigBeanSupport {
  -    private final static SchemaTypeLoader SCHEMA_TYPE_LOADER = XmlBeans.getContextTypeLoader();
   
       public ConfigPropertySettingDConfigBean(DDBean ddBean, GerConfigPropertySettingType
configPropertySetting) {
  -        super(ddBean, configPropertySetting, SCHEMA_TYPE_LOADER);
  +        super(ddBean, configPropertySetting);
           String name = ddBean.getText("config-property-name")[0];
           if (configPropertySetting.getName() == null) {
               configPropertySetting.setName(name);
  @@ -105,6 +103,10 @@
   
       public void setConfigPropertyValue(String configPropertyValue) {
           getConfigPropertySetting().setStringValue(configPropertyValue);
  +    }
  +
  +    protected SchemaTypeLoader getSchemaTypeLoader() {
  +        return ResourceAdapterDConfigRoot.SCHEMA_TYPE_LOADER;
       }
   
   }
  
  
  
  1.4       +2 -2      incubator-geronimo/modules/connector/src/java/org/apache/geronimo/connector/deployment/dconfigbean/ConfigPropertySettings.java
  
  Index: ConfigPropertySettings.java
  ===================================================================
  RCS file: /home/cvs/incubator-geronimo/modules/connector/src/java/org/apache/geronimo/connector/deployment/dconfigbean/ConfigPropertySettings.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- ConfigPropertySettings.java	21 Feb 2004 01:10:50 -0000	1.3
  +++ ConfigPropertySettings.java	22 Feb 2004 19:11:52 -0000	1.4
  @@ -75,7 +75,7 @@
       private XpathListener nameListener;
   
       public ConfigPropertySettings() {
  -        super(null, SCHEMA_TYPE_LOADER);
  +        super(null);
       }
   
       void initialize(GerConfigPropertySettingType xmlObject, DDBean configPropertyBean)
{
  
  
  
  1.5       +7 -4      incubator-geronimo/modules/connector/src/java/org/apache/geronimo/connector/deployment/dconfigbean/ConnectionDefinitionDConfigBean.java
  
  Index: ConnectionDefinitionDConfigBean.java
  ===================================================================
  RCS file: /home/cvs/incubator-geronimo/modules/connector/src/java/org/apache/geronimo/connector/deployment/dconfigbean/ConnectionDefinitionDConfigBean.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- ConnectionDefinitionDConfigBean.java	21 Feb 2004 01:10:50 -0000	1.4
  +++ ConnectionDefinitionDConfigBean.java	22 Feb 2004 19:11:52 -0000	1.5
  @@ -63,7 +63,6 @@
   import org.apache.geronimo.xbeans.geronimo.GerConnectiondefinitionInstanceType;
   import org.apache.geronimo.xbeans.geronimo.GerConnectionmanagerType;
   import org.apache.xmlbeans.SchemaTypeLoader;
  -import org.apache.xmlbeans.XmlBeans;
   
   /**
    *
  @@ -72,11 +71,11 @@
    *
    **/
   public class ConnectionDefinitionDConfigBean extends DConfigBeanSupport {
  -    private final static SchemaTypeLoader SCHEMA_TYPE_LOADER = XmlBeans.getContextTypeLoader();
  +
       private ConnectionDefinitionInstance[] instances = new ConnectionDefinitionInstance[0];
   
       public ConnectionDefinitionDConfigBean(DDBean ddBean, GerConnectionDefinitionType connectionDefinition)
{
  -        super(ddBean, connectionDefinition, SCHEMA_TYPE_LOADER);
  +        super(ddBean, connectionDefinition);
           String connectionfactoryInterface = ddBean.getText("connectionfactory-interface")[0];
           if (connectionDefinition.getConnectionfactoryInterface() == null) {
               connectionDefinition.addNewConnectionfactoryInterface().setStringValue(connectionfactoryInterface);
  @@ -133,6 +132,10 @@
               }
           }
           pcs.firePropertyChange("connectionDefinitionInstance", old, instances);
  +    }
  +
  +    protected SchemaTypeLoader getSchemaTypeLoader() {
  +        return ResourceAdapterDConfigRoot.SCHEMA_TYPE_LOADER;
       }
   
   }
  
  
  
  1.6       +2 -2      incubator-geronimo/modules/connector/src/java/org/apache/geronimo/connector/deployment/dconfigbean/ConnectionDefinitionInstance.java
  
  Index: ConnectionDefinitionInstance.java
  ===================================================================
  RCS file: /home/cvs/incubator-geronimo/modules/connector/src/java/org/apache/geronimo/connector/deployment/dconfigbean/ConnectionDefinitionInstance.java,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- ConnectionDefinitionInstance.java	21 Feb 2004 01:10:50 -0000	1.5
  +++ ConnectionDefinitionInstance.java	22 Feb 2004 19:11:52 -0000	1.6
  @@ -77,7 +77,7 @@
       private XpathListener configListener;
   
       public ConnectionDefinitionInstance() {
  -        super(null, SCHEMA_TYPE_LOADER);
  +        super(null);
       }
   
       void initialize(GerConnectiondefinitionInstanceType xmlObject, ConnectionDefinitionDConfigBean
parent) {
  
  
  
  1.8       +10 -8     incubator-geronimo/modules/connector/src/java/org/apache/geronimo/connector/deployment/dconfigbean/ResourceAdapterDConfigBean.java
  
  Index: ResourceAdapterDConfigBean.java
  ===================================================================
  RCS file: /home/cvs/incubator-geronimo/modules/connector/src/java/org/apache/geronimo/connector/deployment/dconfigbean/ResourceAdapterDConfigBean.java,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- ResourceAdapterDConfigBean.java	21 Feb 2004 01:10:50 -0000	1.7
  +++ ResourceAdapterDConfigBean.java	22 Feb 2004 19:11:52 -0000	1.8
  @@ -56,22 +56,21 @@
   
   package org.apache.geronimo.connector.deployment.dconfigbean;
   
  -import java.util.Map;
   import java.util.HashMap;
  +import java.util.Map;
   
   import javax.enterprise.deploy.model.DDBean;
   import javax.enterprise.deploy.spi.DConfigBean;
   import javax.enterprise.deploy.spi.exceptions.ConfigurationException;
   
   import org.apache.geronimo.deployment.plugin.DConfigBeanSupport;
  -import org.apache.geronimo.xbeans.geronimo.GerResourceadapterType;
  +import org.apache.geronimo.xbeans.geronimo.GerAdminobjectType;
   import org.apache.geronimo.xbeans.geronimo.GerConfigPropertySettingType;
  -import org.apache.geronimo.xbeans.geronimo.GerOutboundResourceadapterType;
   import org.apache.geronimo.xbeans.geronimo.GerConnectionDefinitionType;
  -import org.apache.geronimo.xbeans.geronimo.GerAdminobjectType;
  +import org.apache.geronimo.xbeans.geronimo.GerOutboundResourceadapterType;
   import org.apache.geronimo.xbeans.geronimo.GerResourceadapterInstanceType;
  +import org.apache.geronimo.xbeans.geronimo.GerResourceadapterType;
   import org.apache.xmlbeans.SchemaTypeLoader;
  -import org.apache.xmlbeans.XmlBeans;
   
   /**
    *
  @@ -80,7 +79,6 @@
    *
    * */
   public class ResourceAdapterDConfigBean extends DConfigBeanSupport {
  -    private final static SchemaTypeLoader SCHEMA_TYPE_LOADER = XmlBeans.getContextTypeLoader();
   
       private final static String[][] RESOURCE_ADAPTER_XPATHS = {
           {"config-property"},
  @@ -91,7 +89,7 @@
       private Map adminObjectsMap = new HashMap();
   
       public ResourceAdapterDConfigBean(DDBean ddBean, final GerResourceadapterType resourceadapter)
{
  -        super(ddBean, resourceadapter, SCHEMA_TYPE_LOADER);
  +        super(ddBean, resourceadapter);
           if (getResourceadapterInstance() == null) {
               resourceadapter.addNewResourceadapterInstance();
           }
  @@ -235,6 +233,10 @@
   
       public String[] getXpaths() {
           return getXPathsForJ2ee_1_4(RESOURCE_ADAPTER_XPATHS);
  +    }
  +
  +    protected SchemaTypeLoader getSchemaTypeLoader() {
  +        return ResourceAdapterDConfigRoot.SCHEMA_TYPE_LOADER;
       }
   
   
  
  
  
  1.6       +11 -3     incubator-geronimo/modules/connector/src/java/org/apache/geronimo/connector/deployment/dconfigbean/ResourceAdapterDConfigRoot.java
  
  Index: ResourceAdapterDConfigRoot.java
  ===================================================================
  RCS file: /home/cvs/incubator-geronimo/modules/connector/src/java/org/apache/geronimo/connector/deployment/dconfigbean/ResourceAdapterDConfigRoot.java,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- ResourceAdapterDConfigRoot.java	21 Feb 2004 01:10:50 -0000	1.5
  +++ ResourceAdapterDConfigRoot.java	22 Feb 2004 19:11:52 -0000	1.6
  @@ -79,7 +79,11 @@
    *
    * */
   public class ResourceAdapterDConfigRoot extends DConfigBeanRootSupport {
  -    private final static SchemaTypeLoader SCHEMA_TYPE_LOADER = XmlBeans.getContextTypeLoader();
  +    static final SchemaTypeLoader SCHEMA_TYPE_LOADER = XmlBeans.typeLoaderUnion(new SchemaTypeLoader[]
{
  +        XmlBeans.typeLoaderForClassLoader(org.apache.geronimo.xbeans.j2ee.String.class.getClassLoader()),
  +        XmlBeans.typeLoaderForClassLoader(GerConnectorDocument.class.getClassLoader())
  +    });
  +
       private static String[][] XPATHS = {
           {"connector", "resourceadapter"}
       };
  @@ -87,7 +91,7 @@
       private ResourceAdapterDConfigBean resourceAdapterDConfigBean;
   
       public ResourceAdapterDConfigRoot(DDBeanRoot ddBean) {
  -        super(ddBean, GerConnectorDocument.Factory.newInstance(), SCHEMA_TYPE_LOADER);
  +        super(ddBean, GerConnectorDocument.Factory.newInstance());
           GerResourceadapterType resourceAdapter = getConnectorDocument().addNewConnector().addNewResourceadapter();
           getConnectorDocument().getConnector().setVersion(GerVersionType.X_1_5);
           replaceResourceAdapterDConfigBean(resourceAdapter);
  @@ -120,5 +124,9 @@
               throw new IllegalStateException("Wrong version, expected 1.5");
           }
           replaceResourceAdapterDConfigBean(getConnectorDocument().getConnector().getResourceadapter());
  +    }
  +
  +    protected SchemaTypeLoader getSchemaTypeLoader() {
  +        return SCHEMA_TYPE_LOADER;
       }
   }
  
  
  
  1.3       +8 -4      incubator-geronimo/modules/connector/src/java/org/apache/geronimo/connector/deployment/dconfigbean/ResourceAdapter_1_0DConfigRoot.java
  
  Index: ResourceAdapter_1_0DConfigRoot.java
  ===================================================================
  RCS file: /home/cvs/incubator-geronimo/modules/connector/src/java/org/apache/geronimo/connector/deployment/dconfigbean/ResourceAdapter_1_0DConfigRoot.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- ResourceAdapter_1_0DConfigRoot.java	21 Feb 2004 01:10:50 -0000	1.2
  +++ ResourceAdapter_1_0DConfigRoot.java	22 Feb 2004 19:11:52 -0000	1.3
  @@ -69,8 +69,8 @@
   import org.apache.geronimo.xbeans.geronimo.GerConnectorDocument;
   import org.apache.geronimo.xbeans.geronimo.GerVersionType;
   import org.apache.xmlbeans.SchemaTypeLoader;
  -import org.apache.xmlbeans.XmlBeans;
   import org.apache.xmlbeans.XmlException;
  +import org.apache.xmlbeans.XmlBeans;
   
   /**
    *
  @@ -79,7 +79,7 @@
    *
    * */
   public class ResourceAdapter_1_0DConfigRoot extends DConfigBeanRootSupport {
  -    private final static SchemaTypeLoader SCHEMA_TYPE_LOADER = XmlBeans.getContextTypeLoader();
  +
       private static String[] XPATHS = {
           "connector/resourceadapter"
       };
  @@ -87,7 +87,7 @@
       private ConnectionDefinitionDConfigBean connectionDefinitionDConfigBean;
   
       public ResourceAdapter_1_0DConfigRoot(DDBeanRoot ddBean) {
  -        super(ddBean, GerConnectorDocument.Factory.newInstance(), SCHEMA_TYPE_LOADER);
  +        super(ddBean, GerConnectorDocument.Factory.newInstance());
           GerConnectionDefinitionType connectionDefinition = getConnectorDocument().addNewConnector().addNewResourceadapter().addNewOutboundResourceadapter().addNewConnectionDefinition();
           getConnectorDocument().getConnector().setVersion(GerVersionType.X_1_0);
           replaceConnectionDefinitionDConfigBean(connectionDefinition);
  @@ -120,5 +120,9 @@
               throw new IllegalStateException("Wrong version, expected 1.0");
           }
           replaceConnectionDefinitionDConfigBean(getConnectorDocument().getConnector().getResourceadapter().getOutboundResourceadapter().getConnectionDefinitionArray(0));
  +    }
  +
  +    protected SchemaTypeLoader getSchemaTypeLoader() {
  +        return ResourceAdapterDConfigRoot.SCHEMA_TYPE_LOADER;
       }
   }
  
  
  
  1.3       +5 -5      incubator-geronimo/modules/deployment/src/java/org/apache/geronimo/deployment/plugin/DConfigBeanRootSupport.java
  
  Index: DConfigBeanRootSupport.java
  ===================================================================
  RCS file: /home/cvs/incubator-geronimo/modules/deployment/src/java/org/apache/geronimo/deployment/plugin/DConfigBeanRootSupport.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- DConfigBeanRootSupport.java	6 Feb 2004 08:55:04 -0000	1.2
  +++ DConfigBeanRootSupport.java	22 Feb 2004 19:11:53 -0000	1.3
  @@ -56,10 +56,9 @@
   package org.apache.geronimo.deployment.plugin;
   
   import javax.enterprise.deploy.model.DDBeanRoot;
  -import javax.enterprise.deploy.spi.DConfigBeanRoot;
   import javax.enterprise.deploy.spi.DConfigBean;
  +import javax.enterprise.deploy.spi.DConfigBeanRoot;
   
  -import org.apache.xmlbeans.SchemaTypeLoader;
   import org.apache.xmlbeans.XmlObject;
   
   /**
  @@ -68,8 +67,9 @@
    * @version $Revision$ $Date$
    */
   public abstract class DConfigBeanRootSupport extends DConfigBeanSupport implements DConfigBeanRoot
{
  -    public DConfigBeanRootSupport(DDBeanRoot ddBean, XmlObject xmlObject, SchemaTypeLoader
schemaTypeLoader) {
  -        super(ddBean, xmlObject, schemaTypeLoader);
  +
  +    public DConfigBeanRootSupport(DDBeanRoot ddBean, XmlObject xmlObject) {
  +        super(ddBean, xmlObject);
       }
   
       public DConfigBean getDConfigBean(DDBeanRoot ddBeanRoot) {
  
  
  
  1.10      +3 -5      incubator-geronimo/modules/deployment/src/java/org/apache/geronimo/deployment/plugin/DConfigBeanSupport.java
  
  Index: DConfigBeanSupport.java
  ===================================================================
  RCS file: /home/cvs/incubator-geronimo/modules/deployment/src/java/org/apache/geronimo/deployment/plugin/DConfigBeanSupport.java,v
  retrieving revision 1.9
  retrieving revision 1.10
  diff -u -r1.9 -r1.10
  --- DConfigBeanSupport.java	20 Feb 2004 08:11:39 -0000	1.9
  +++ DConfigBeanSupport.java	22 Feb 2004 19:11:53 -0000	1.10
  @@ -57,12 +57,10 @@
   
   import javax.enterprise.deploy.model.DDBean;
   import javax.enterprise.deploy.model.XpathEvent;
  -import javax.enterprise.deploy.model.DDBeanRoot;
   import javax.enterprise.deploy.spi.DConfigBean;
   import javax.enterprise.deploy.spi.exceptions.BeanNotFoundException;
   import javax.enterprise.deploy.spi.exceptions.ConfigurationException;
   
  -import org.apache.xmlbeans.SchemaTypeLoader;
   import org.apache.xmlbeans.XmlObject;
   
   /**
  @@ -73,8 +71,8 @@
   public abstract class DConfigBeanSupport extends XmlBeanSupport implements DConfigBean
{
       private DDBean ddBean;
   
  -    public DConfigBeanSupport(DDBean ddBean, XmlObject xmlObject, SchemaTypeLoader schemaTypeLoader)
{
  -        super(xmlObject, schemaTypeLoader);
  +    public DConfigBeanSupport(DDBean ddBean, XmlObject xmlObject) {
  +        super(xmlObject);
           this.ddBean = ddBean;
       }
   
  
  
  
  1.2       +9 -5      incubator-geronimo/modules/deployment/src/java/org/apache/geronimo/deployment/plugin/XmlBeanSupport.java
  
  Index: XmlBeanSupport.java
  ===================================================================
  RCS file: /home/cvs/incubator-geronimo/modules/deployment/src/java/org/apache/geronimo/deployment/plugin/XmlBeanSupport.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- XmlBeanSupport.java	15 Feb 2004 17:46:21 -0000	1.1
  +++ XmlBeanSupport.java	22 Feb 2004 19:11:53 -0000	1.2
  @@ -73,11 +73,9 @@
   public abstract class XmlBeanSupport { // should implement Serializable or Externalizable
       protected final PropertyChangeSupport pcs = new PropertyChangeSupport(this);
       private XmlObject xmlObject;
  -    private final SchemaTypeLoader schemaTypeLoader;
   
  -    public XmlBeanSupport(XmlObject xmlObject, SchemaTypeLoader schemaTypeLoader) {
  +    public XmlBeanSupport(XmlObject xmlObject) {
           this.xmlObject = xmlObject;
  -        this.schemaTypeLoader = schemaTypeLoader;
       }
   
       protected void setXmlObject(XmlObject xmlObject) {
  @@ -101,6 +99,12 @@
       }
   
       public void fromXML(InputStream inputStream) throws XmlException, IOException {
  -        xmlObject = schemaTypeLoader.parse(inputStream, null, null);
  +        xmlObject = getSchemaTypeLoader().parse(inputStream, null, null);
  +    }
  +
  +    //override unless the particular object can never be read directly from xml, such as
the
  +    //connector ConnectionDefinitionInstance.
  +    protected SchemaTypeLoader getSchemaTypeLoader() {
  +        return null;
       }
   }
  
  
  
  1.4       +7 -2      incubator-geronimo/modules/deployment/src/java/org/apache/geronimo/deployment/plugin/application/EARConfigBean.java
  
  Index: EARConfigBean.java
  ===================================================================
  RCS file: /home/cvs/incubator-geronimo/modules/deployment/src/java/org/apache/geronimo/deployment/plugin/application/EARConfigBean.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- EARConfigBean.java	6 Feb 2004 08:55:04 -0000	1.3
  +++ EARConfigBean.java	22 Feb 2004 19:11:53 -0000	1.4
  @@ -58,6 +58,7 @@
   import javax.enterprise.deploy.model.DDBean;
   
   import org.apache.geronimo.deployment.plugin.DConfigBeanSupport;
  +import org.apache.xmlbeans.SchemaTypeLoader;
   
   /**
    *
  @@ -66,6 +67,10 @@
    */
   public class EARConfigBean extends DConfigBeanSupport {
       public EARConfigBean(DDBean ddBean) {
  -        super(ddBean, null, null);
  +        super(ddBean, null);
  +    }
  +
  +    protected SchemaTypeLoader getSchemaTypeLoader() {
  +        return null;
       }
   }
  
  
  
  1.4       +7 -2      incubator-geronimo/modules/deployment/src/java/org/apache/geronimo/deployment/plugin/client/ClientConfigBean.java
  
  Index: ClientConfigBean.java
  ===================================================================
  RCS file: /home/cvs/incubator-geronimo/modules/deployment/src/java/org/apache/geronimo/deployment/plugin/client/ClientConfigBean.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- ClientConfigBean.java	6 Feb 2004 08:55:04 -0000	1.3
  +++ ClientConfigBean.java	22 Feb 2004 19:11:53 -0000	1.4
  @@ -58,6 +58,7 @@
   import javax.enterprise.deploy.model.DDBean;
   
   import org.apache.geronimo.deployment.plugin.DConfigBeanSupport;
  +import org.apache.xmlbeans.SchemaTypeLoader;
   
   /**
    *
  @@ -71,10 +72,14 @@
       };
   
       public ClientConfigBean(DDBean ddBean) {
  -        super(ddBean, null, null);
  +        super(ddBean, null);
       }
   
       public String[] getXpaths() {
           return XPATHS;
  +    }
  +
  +    protected SchemaTypeLoader getSchemaTypeLoader() {
  +        return null;
       }
   }
  
  
  
  1.11      +6 -3      incubator-geronimo/modules/jetty/src/java/org/apache/geronimo/jetty/deployment/WebAppDConfigBean.java
  
  Index: WebAppDConfigBean.java
  ===================================================================
  RCS file: /home/cvs/incubator-geronimo/modules/jetty/src/java/org/apache/geronimo/jetty/deployment/WebAppDConfigBean.java,v
  retrieving revision 1.10
  retrieving revision 1.11
  diff -u -r1.10 -r1.11
  --- WebAppDConfigBean.java	20 Feb 2004 07:19:13 -0000	1.10
  +++ WebAppDConfigBean.java	22 Feb 2004 19:11:53 -0000	1.11
  @@ -72,12 +72,11 @@
    * @version $Revision$ $Date$
    */
   public class WebAppDConfigBean extends DConfigBeanSupport {
  -    private final static SchemaTypeLoader SCHEMA_TYPE_LOADER = XmlBeans.getContextTypeLoader();
   
   //    private ENCHelper encHelper;
   
       WebAppDConfigBean(DDBean ddBean, JettyWebAppType webApp) {
  -        super(ddBean, webApp, SCHEMA_TYPE_LOADER);
  +        super(ddBean, webApp);
   /*
           encHelper = new ENCHelper(ddBean, new ENCHelper.XmlEnvRefs() {
               public GerEjbRefType[] getEjbRefs() {
  @@ -186,6 +185,10 @@
       public String[] getXpaths() {
           return null;
   //        return ENCHelper.ENC_XPATHS;
  +    }
  +
  +    protected SchemaTypeLoader getSchemaTypeLoader() {
  +        return WebAppDConfigRoot.SCHEMA_TYPE_LOADER;
       }
   
   }
  
  
  
  1.7       +11 -3     incubator-geronimo/modules/jetty/src/java/org/apache/geronimo/jetty/deployment/WebAppDConfigRoot.java
  
  Index: WebAppDConfigRoot.java
  ===================================================================
  RCS file: /home/cvs/incubator-geronimo/modules/jetty/src/java/org/apache/geronimo/jetty/deployment/WebAppDConfigRoot.java,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- WebAppDConfigRoot.java	14 Feb 2004 01:50:15 -0000	1.6
  +++ WebAppDConfigRoot.java	22 Feb 2004 19:11:53 -0000	1.7
  @@ -76,7 +76,11 @@
    * @version $Revision$ $Date$
    */
   public class WebAppDConfigRoot extends DConfigBeanRootSupport {
  -    private final static SchemaTypeLoader SCHEMA_TYPE_LOADER = XmlBeans.getContextTypeLoader();
  +    static final SchemaTypeLoader SCHEMA_TYPE_LOADER = XmlBeans.typeLoaderUnion(new SchemaTypeLoader[]
{
  +        XmlBeans.typeLoaderForClassLoader(org.apache.geronimo.xbeans.j2ee.String.class.getClassLoader()),
  +        XmlBeans.typeLoaderForClassLoader(JettyWebAppDocument.class.getClassLoader())
  +    });
  +
       private static String[] XPATHS = {
           "web-app"
       };
  @@ -84,7 +88,7 @@
       private WebAppDConfigBean webAppBean;
   
       public WebAppDConfigRoot(DDBeanRoot ddBean) {
  -        super(ddBean, JettyWebAppDocument.Factory.newInstance(), SCHEMA_TYPE_LOADER);
  +        super(ddBean, JettyWebAppDocument.Factory.newInstance());
           JettyWebAppType webApp = getWebAppDocument().addNewWebApp();
           replaceWebAppDConfigBean(webApp);
       }
  @@ -112,6 +116,10 @@
       public void fromXML(InputStream inputStream) throws XmlException, IOException {
           super.fromXML(inputStream);
           replaceWebAppDConfigBean(getWebAppDocument().getWebApp());
  +    }
  +
  +    protected SchemaTypeLoader getSchemaTypeLoader() {
  +        return SCHEMA_TYPE_LOADER;
       }
   
   
  
  
  
  1.2       +6 -5      incubator-geronimo/modules/naming/src/java/org/apache/geronimo/naming/deployment/EJBLocalRefDConfigBean.java
  
  Index: EJBLocalRefDConfigBean.java
  ===================================================================
  RCS file: /home/cvs/incubator-geronimo/modules/naming/src/java/org/apache/geronimo/naming/deployment/EJBLocalRefDConfigBean.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- EJBLocalRefDConfigBean.java	18 Feb 2004 20:58:43 -0000	1.1
  +++ EJBLocalRefDConfigBean.java	22 Feb 2004 19:11:53 -0000	1.2
  @@ -58,10 +58,8 @@
   import javax.enterprise.deploy.model.DDBean;
   
   import org.apache.geronimo.deployment.plugin.DConfigBeanSupport;
  -import org.apache.geronimo.xbeans.geronimo.GerEjbRefType;
   import org.apache.geronimo.xbeans.geronimo.GerEjbLocalRefType;
   import org.apache.xmlbeans.SchemaTypeLoader;
  -import org.apache.xmlbeans.XmlBeans;
   
   /**
    *
  @@ -69,10 +67,9 @@
    * @version $Revision$ $Date$
    */
   public class EJBLocalRefDConfigBean extends DConfigBeanSupport {
  -    private final static SchemaTypeLoader SCHEMA_TYPE_LOADER = XmlBeans.getContextTypeLoader();
   
       public EJBLocalRefDConfigBean(DDBean ddBean, GerEjbLocalRefType ejbLocalRef) {
  -        super(ddBean, ejbLocalRef, SCHEMA_TYPE_LOADER);
  +        super(ddBean, ejbLocalRef);
           assert ddBean.getChildBean("ejb-ref-name")[0].equals(getEjbRefName());
       }
   
  @@ -90,5 +87,9 @@
   
       public void setTargetURI(String targetURI) {
           getEjbRef().setUri(targetURI);
  +    }
  +
  +    protected SchemaTypeLoader getSchemaTypeLoader() {
  +        return ENCHelper.SCHEMA_TYPE_LOADER;
       }
   }
  
  
  
  1.2       +6 -4      incubator-geronimo/modules/naming/src/java/org/apache/geronimo/naming/deployment/EJBRefDConfigBean.java
  
  Index: EJBRefDConfigBean.java
  ===================================================================
  RCS file: /home/cvs/incubator-geronimo/modules/naming/src/java/org/apache/geronimo/naming/deployment/EJBRefDConfigBean.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- EJBRefDConfigBean.java	18 Feb 2004 20:58:43 -0000	1.1
  +++ EJBRefDConfigBean.java	22 Feb 2004 19:11:53 -0000	1.2
  @@ -60,7 +60,6 @@
   import org.apache.geronimo.deployment.plugin.DConfigBeanSupport;
   import org.apache.geronimo.xbeans.geronimo.GerEjbRefType;
   import org.apache.xmlbeans.SchemaTypeLoader;
  -import org.apache.xmlbeans.XmlBeans;
   
   /**
    *
  @@ -68,10 +67,9 @@
    * @version $Revision$ $Date$
    */
   public class EJBRefDConfigBean extends DConfigBeanSupport {
  -    private final static SchemaTypeLoader SCHEMA_TYPE_LOADER = XmlBeans.getContextTypeLoader();
   
       public EJBRefDConfigBean(DDBean ddBean, GerEjbRefType ejbRef) {
  -        super(ddBean, ejbRef, SCHEMA_TYPE_LOADER);
  +        super(ddBean, ejbRef);
           assert ddBean.getChildBean("ejb-ref-name")[0].equals(getEjbRefName());
       }
   
  @@ -89,5 +87,9 @@
   
       public void setTargetURI(String targetURI) {
           getEjbRef().setUri(targetURI);
  +    }
  +
  +    protected SchemaTypeLoader getSchemaTypeLoader() {
  +        return ENCHelper.SCHEMA_TYPE_LOADER;
       }
   }
  
  
  
  1.2       +7 -1      incubator-geronimo/modules/naming/src/java/org/apache/geronimo/naming/deployment/ENCHelper.java
  
  Index: ENCHelper.java
  ===================================================================
  RCS file: /home/cvs/incubator-geronimo/modules/naming/src/java/org/apache/geronimo/naming/deployment/ENCHelper.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- ENCHelper.java	18 Feb 2004 20:58:43 -0000	1.1
  +++ ENCHelper.java	22 Feb 2004 19:11:53 -0000	1.2
  @@ -67,6 +67,8 @@
   import org.apache.geronimo.xbeans.geronimo.GerMessageDestinationRefType;
   import org.apache.geronimo.xbeans.geronimo.GerResourceEnvRefType;
   import org.apache.geronimo.xbeans.geronimo.GerResourceRefType;
  +import org.apache.xmlbeans.SchemaTypeLoader;
  +import org.apache.xmlbeans.XmlBeans;
   
   /**
    *
  @@ -74,6 +76,10 @@
    * @version $Revision$ $Date$
    */
   public class ENCHelper {
  +    static final SchemaTypeLoader SCHEMA_TYPE_LOADER = XmlBeans.typeLoaderUnion(new SchemaTypeLoader[]
{
  +        XmlBeans.typeLoaderForClassLoader(org.apache.geronimo.xbeans.j2ee.String.class.getClassLoader()),
  +        XmlBeans.typeLoaderForClassLoader(GerEjbRefType.class.getClassLoader())
  +    });
   
   
       public static final String[] ENC_XPATHS = {
  
  
  
  1.2       +6 -4      incubator-geronimo/modules/naming/src/java/org/apache/geronimo/naming/deployment/MessageDestinationRefDConfigBean.java
  
  Index: MessageDestinationRefDConfigBean.java
  ===================================================================
  RCS file: /home/cvs/incubator-geronimo/modules/naming/src/java/org/apache/geronimo/naming/deployment/MessageDestinationRefDConfigBean.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- MessageDestinationRefDConfigBean.java	18 Feb 2004 20:58:43 -0000	1.1
  +++ MessageDestinationRefDConfigBean.java	22 Feb 2004 19:11:53 -0000	1.2
  @@ -60,7 +60,6 @@
   import org.apache.geronimo.deployment.plugin.DConfigBeanSupport;
   import org.apache.geronimo.xbeans.geronimo.GerMessageDestinationRefType;
   import org.apache.xmlbeans.SchemaTypeLoader;
  -import org.apache.xmlbeans.XmlBeans;
   
   /**
    *
  @@ -68,10 +67,9 @@
    * @version $Revision$ $Date$
    */
   public class MessageDestinationRefDConfigBean extends DConfigBeanSupport {
  -    private final static SchemaTypeLoader SCHEMA_TYPE_LOADER = XmlBeans.getContextTypeLoader();
   
       public MessageDestinationRefDConfigBean(DDBean ddBean, GerMessageDestinationRefType
messageDestinationRef) {
  -        super(ddBean, messageDestinationRef, SCHEMA_TYPE_LOADER);
  +        super(ddBean, messageDestinationRef);
           assert ddBean.getChildBean("message-destination-ref-name")[0].equals(getMessageDestinationRefName());
       }
   
  @@ -89,5 +87,9 @@
   
       public void setTargetURI(String targetURI) {
           getMessageDestinationRef().setUri(targetURI);
  +    }
  +
  +    protected SchemaTypeLoader getSchemaTypeLoader() {
  +        return ENCHelper.SCHEMA_TYPE_LOADER;
       }
   }
  
  
  
  1.2       +6 -5      incubator-geronimo/modules/naming/src/java/org/apache/geronimo/naming/deployment/ResourceEnvRefDConfigBean.java
  
  Index: ResourceEnvRefDConfigBean.java
  ===================================================================
  RCS file: /home/cvs/incubator-geronimo/modules/naming/src/java/org/apache/geronimo/naming/deployment/ResourceEnvRefDConfigBean.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- ResourceEnvRefDConfigBean.java	18 Feb 2004 20:58:43 -0000	1.1
  +++ ResourceEnvRefDConfigBean.java	22 Feb 2004 19:11:53 -0000	1.2
  @@ -58,10 +58,8 @@
   import javax.enterprise.deploy.model.DDBean;
   
   import org.apache.geronimo.deployment.plugin.DConfigBeanSupport;
  -import org.apache.geronimo.xbeans.geronimo.GerEjbRefType;
   import org.apache.geronimo.xbeans.geronimo.GerResourceEnvRefType;
   import org.apache.xmlbeans.SchemaTypeLoader;
  -import org.apache.xmlbeans.XmlBeans;
   
   /**
    *
  @@ -69,10 +67,9 @@
    * @version $Revision$ $Date$
    */
   public class ResourceEnvRefDConfigBean extends DConfigBeanSupport {
  -    private final static SchemaTypeLoader SCHEMA_TYPE_LOADER = XmlBeans.getContextTypeLoader();
   
       public ResourceEnvRefDConfigBean(DDBean ddBean, GerResourceEnvRefType resourceEnvRef)
{
  -        super(ddBean, resourceEnvRef, SCHEMA_TYPE_LOADER);
  +        super(ddBean, resourceEnvRef);
           assert ddBean.getChildBean("resource-env-ref-name")[0].equals(getResourceEnvRefName());
       }
   
  @@ -90,5 +87,9 @@
   
       public void setTargetURI(String targetURI) {
           getResourceEnvRef().setUri(targetURI);
  +    }
  +
  +    protected SchemaTypeLoader getSchemaTypeLoader() {
  +        return ENCHelper.SCHEMA_TYPE_LOADER;
       }
   }
  
  
  
  1.2       +6 -4      incubator-geronimo/modules/naming/src/java/org/apache/geronimo/naming/deployment/ResourceRefDConfigBean.java
  
  Index: ResourceRefDConfigBean.java
  ===================================================================
  RCS file: /home/cvs/incubator-geronimo/modules/naming/src/java/org/apache/geronimo/naming/deployment/ResourceRefDConfigBean.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- ResourceRefDConfigBean.java	18 Feb 2004 20:58:43 -0000	1.1
  +++ ResourceRefDConfigBean.java	22 Feb 2004 19:11:53 -0000	1.2
  @@ -60,7 +60,6 @@
   import org.apache.geronimo.deployment.plugin.DConfigBeanSupport;
   import org.apache.geronimo.xbeans.geronimo.GerResourceRefType;
   import org.apache.xmlbeans.SchemaTypeLoader;
  -import org.apache.xmlbeans.XmlBeans;
   
   /**
    *
  @@ -68,10 +67,9 @@
    * @version $Revision$ $Date$
    */
   public class ResourceRefDConfigBean extends DConfigBeanSupport {
  -    private final static SchemaTypeLoader SCHEMA_TYPE_LOADER = XmlBeans.getContextTypeLoader();
   
       public ResourceRefDConfigBean(DDBean ddBean, GerResourceRefType resourceRef) {
  -        super(ddBean, resourceRef, SCHEMA_TYPE_LOADER);
  +        super(ddBean, resourceRef);
           assert ddBean.getChildBean("res-ref-name")[0].equals(getResourceRefName());
       }
   
  @@ -89,5 +87,9 @@
   
       public void setTargetURI(String targetURI) {
           getResourceRef().setUri(targetURI);
  +    }
  +
  +    protected SchemaTypeLoader getSchemaTypeLoader() {
  +        return ENCHelper.SCHEMA_TYPE_LOADER;
       }
   }
  
  
  

Mime
View raw message