Author: heiko.braun(a)jboss.com
Date: 2007-01-26 05:55:00 -0500 (Fri, 26 Jan 2007)
New Revision: 2130
Modified:
trunk/jbossws-core/src/main/java/org/jboss/ws/metadata/umdm/ClientEndpointMetaData.java
trunk/jbossws-core/src/main/java/org/jboss/ws/metadata/umdm/EndpointMetaData.java
trunk/jbossws-core/src/main/java/org/jboss/ws/metadata/umdm/ServerEndpointMetaData.java
Log:
Only force reconfiguration when the name changes. Simplify EMPD hirarchy
Modified:
trunk/jbossws-core/src/main/java/org/jboss/ws/metadata/umdm/ClientEndpointMetaData.java
===================================================================
---
trunk/jbossws-core/src/main/java/org/jboss/ws/metadata/umdm/ClientEndpointMetaData.java 2007-01-26
08:50:02 UTC (rev 2129)
+++
trunk/jbossws-core/src/main/java/org/jboss/ws/metadata/umdm/ClientEndpointMetaData.java 2007-01-26
10:55:00 UTC (rev 2130)
@@ -39,37 +39,14 @@
public ClientEndpointMetaData(ServiceMetaData service, QName qname, QName
portTypeName, Type type)
{
super(service, qname, portTypeName, type);
- }
+ super.configName = ConfigurationProvider.DEFAULT_CLIENT_CONFIG_NAME;
- public String getConfigName()
- {
- String configName = super.getConfigName();
- if (configName == null)
- {
- configName = ConfigurationProvider.DEFAULT_CLIENT_CONFIG_NAME;
- setConfigName(configName);
- }
- return configName;
+ if (type == Type.JAXRPC)
+ super.configFile = ConfigurationProvider.DEFAULT_JAXRPC_CLIENT_CONFIG_FILE;
+ else
+ super.configFile = ConfigurationProvider.DEFAULT_JAXWS_CLIENT_CONFIG_FILE;
}
- public String getConfigFile()
- {
- String configFile = super.getConfigFile();
- if (configFile == null)
- {
- if (getType() == Type.JAXRPC)
- {
- configFile = ConfigurationProvider.DEFAULT_JAXRPC_CLIENT_CONFIG_FILE;
- }
- else
- {
- configFile = ConfigurationProvider.DEFAULT_JAXWS_CLIENT_CONFIG_FILE;
- }
- setConfigFile(configFile);
- }
- return configFile;
- }
-
public String toString()
{
StringBuilder buffer = new StringBuilder("\nClientEndpointMetaData:");
Modified:
trunk/jbossws-core/src/main/java/org/jboss/ws/metadata/umdm/EndpointMetaData.java
===================================================================
---
trunk/jbossws-core/src/main/java/org/jboss/ws/metadata/umdm/EndpointMetaData.java 2007-01-26
08:50:02 UTC (rev 2129)
+++
trunk/jbossws-core/src/main/java/org/jboss/ws/metadata/umdm/EndpointMetaData.java 2007-01-26
10:55:00 UTC (rev 2130)
@@ -90,9 +90,9 @@
// The REQUIRED name of the WSDL interface/portType
private QName portTypeName;
// The REQUIRED config-name
- private String configName;
+ protected String configName;
// The REQUIRED config-file
- private String configFile;
+ protected String configFile;
// The endpoint address
private String endpointAddress;
// The endpoint interface name
@@ -645,7 +645,7 @@
public String getConfigFile()
{
- return configFile;
+ return this.configFile;
}
public void setConfigFile(String configFile)
@@ -656,18 +656,23 @@
public String getConfigName()
{
- return configName;
+ return this.configName;
}
public void setConfigName(String configName)
{
- this.configName = configName;
- this.config = null;
+ if(null == configName)
+ throw new IllegalArgumentException("Invalid config name: " +
configName);
- // notify observers
- log.debug("Reconfiguration forced");
- this.configObservable.touch();
- this.configObservable.notifyObservers(configName);
+ if( !configName.equals(this.configName) )
+ {
+ this.configName = configName;
+ this.config = null;
+
+ // notify observers
+ log.debug("Reconfiguration forced, new config is
'"+configName+"'");
+ this.configObservable.doNotify(configName);
+ }
}
public List<Class> getRegisteredTypes()
@@ -680,9 +685,10 @@
}
class ConfigObservable extends Observable {
- public void touch()
- {
+
+ public void doNotify(Object object) {
setChanged();
- };
+ notifyObservers(object);
+ }
}
}
Modified:
trunk/jbossws-core/src/main/java/org/jboss/ws/metadata/umdm/ServerEndpointMetaData.java
===================================================================
---
trunk/jbossws-core/src/main/java/org/jboss/ws/metadata/umdm/ServerEndpointMetaData.java 2007-01-26
08:50:02 UTC (rev 2129)
+++
trunk/jbossws-core/src/main/java/org/jboss/ws/metadata/umdm/ServerEndpointMetaData.java 2007-01-26
10:55:00 UTC (rev 2130)
@@ -66,6 +66,12 @@
public ServerEndpointMetaData(ServiceMetaData service, QName portName, QName
portTypeName, Type type)
{
super(service, portName, portTypeName, type);
+ super.configName = ConfigurationProvider.DEFAULT_ENDPOINT_CONFIG_NAME;
+
+ if (type == Type.JAXRPC)
+ configFile = ConfigurationProvider.DEFAULT_JAXRPC_ENDPOINT_CONFIG_FILE;
+ else
+ configFile = ConfigurationProvider.DEFAULT_JAXWS_ENDPOINT_CONFIG_FILE;
}
public String getLinkName()
@@ -174,34 +180,6 @@
this.managedEndpointBean = managedEndpointBean;
}
- public String getConfigName() {
- String configName = super.getConfigName();
- if (configName == null)
- {
- configName = ConfigurationProvider.DEFAULT_ENDPOINT_CONFIG_NAME;
- setConfigName(configName);
- }
- return configName;
- }
-
- public String getConfigFile() {
- String configFile = super.getConfigFile();
-
- if (configFile == null)
- {
- if (getType() == Type.JAXRPC)
- {
- configFile = ConfigurationProvider.DEFAULT_JAXRPC_ENDPOINT_CONFIG_FILE;
- }
- else
- {
- configFile = ConfigurationProvider.DEFAULT_JAXWS_ENDPOINT_CONFIG_FILE;
- }
- setConfigFile(configFile);
- }
- return configFile;
- }
-
public String toString()
{
StringBuilder buffer = new StringBuilder("\nServerEndpointMetaData:");
Show replies by date