[jboss-cvs] JBossAS SVN: r58233 - in trunk/server/src/main/org/jboss: deployment metadata
jboss-cvs-commits at lists.jboss.org
jboss-cvs-commits at lists.jboss.org
Thu Nov 9 09:45:40 EST 2006
Author: alex.loubyansky at jboss.com
Date: 2006-11-09 09:45:38 -0500 (Thu, 09 Nov 2006)
New Revision: 58233
Modified:
trunk/server/src/main/org/jboss/deployment/JBossEjbObjectFactory.java
trunk/server/src/main/org/jboss/metadata/ApplicationMetaData.java
Log:
resource-managers and webservices
Modified: trunk/server/src/main/org/jboss/deployment/JBossEjbObjectFactory.java
===================================================================
--- trunk/server/src/main/org/jboss/deployment/JBossEjbObjectFactory.java 2006-11-09 14:19:12 UTC (rev 58232)
+++ trunk/server/src/main/org/jboss/deployment/JBossEjbObjectFactory.java 2006-11-09 14:45:38 UTC (rev 58233)
@@ -141,8 +141,12 @@
}
else if(localName.equals("webservices"))
{
- // TODO
+ child = dd;
}
+ else if(localName.equals("webservice-description"))
+ {
+ child = new WsDescription();
+ }
else if(localName.equals("enterprise-beans"))
{
child = dd;
@@ -155,8 +159,12 @@
}
else if(localName.equals("resource-managers"))
{
- // TODO
+ child = dd;
}
+ else if(localName.equals("resource-manager"))
+ {
+ child = new ResourceManagerMetaData();
+ }
else if(localName.equals("assembly-descriptor"))
{
child = dd.getAssemblyDescriptor();
@@ -304,7 +312,6 @@
}
else if(localName.equals("message-destination"))
{
- // TODO
return new MessageDestinationMetaData();
}
return null;
@@ -322,6 +329,31 @@
parent.addContainerConfiguration(container);
}
+ public void addChild(ApplicationMetaData parent, ResourceManagerMetaData child,
+ UnmarshallingContext navigator, String namespaceURI, String localName)
+ {
+ if(child.jndiName != null)
+ {
+ parent.mapResource(child.resName, child.jndiName);
+ }
+ else if(child.url != null)
+ {
+ parent.mapResource(child.resName, child.url);
+ }
+ else
+ {
+ throw new IllegalStateException(child.resName +" : expected res-url or res-jndi-name tag");
+ }
+ }
+
+ public void addChild(ApplicationMetaData parent, WsDescription child,
+ UnmarshallingContext navigator, String namespaceURI, String localName)
+ {
+ parent.setConfigName(child.configName);
+ parent.setConfigFile(child.configFile);
+ parent.getWsdlPublishLocations().put(child.name, child.location);
+ }
+
public void addChild(ConfigurationMetaData parent, ClusterConfigMetaData child,
UnmarshallingContext navigator, String namespaceURI, String localName)
{
@@ -474,7 +506,7 @@
}
ejbjarDest.setJNDIName(child.getJNDIName());
}
-
+
public void setValue(ApplicationMetaData amd,
UnmarshallingContext navigator, String namespaceURI, String localName,
String value)
@@ -504,6 +536,10 @@
{
amd.setUnauthenticatedPrincipal(value);
}
+ else if(localName.equals("context-root"))
+ {
+ amd.setWebServiceContextRoot(value);
+ }
}
public void setValue(InvokerProxyBindingMetaData md,
@@ -901,6 +937,46 @@
}
}
+ public void setValue(ResourceManagerMetaData parent,
+ UnmarshallingContext navigator, String namespaceURI, String localName,
+ String value)
+ {
+ if(localName.equals("res-name"))
+ {
+ parent.resName = value;
+ }
+ else if(localName.equals("res-jndi-name"))
+ {
+ parent.jndiName = value;
+ }
+ else if(localName.equals("res-url"))
+ {
+ parent.url = value;
+ }
+ }
+
+ public void setValue(WsDescription parent,
+ UnmarshallingContext navigator, String namespaceURI, String localName,
+ String value)
+ {
+ if(localName.equals("webservice-description-name"))
+ {
+ parent.name = value;
+ }
+ else if(localName.equals("config-name"))
+ {
+ parent.configName = value;
+ }
+ else if(localName.equals("config-file"))
+ {
+ parent.configFile = value;
+ }
+ else if(localName.equals("wsdl-publish-location"))
+ {
+ parent.location = value;
+ }
+ }
+
// static
public static class DomElement
@@ -961,4 +1037,19 @@
this.bean = bean;
}
}
+
+ public static class ResourceManagerMetaData
+ {
+ String resName;
+ String jndiName;
+ String url;
+ }
+
+ public static class WsDescription
+ {
+ String name;
+ String configName;
+ String configFile;
+ String location;
+ }
}
Modified: trunk/server/src/main/org/jboss/metadata/ApplicationMetaData.java
===================================================================
--- trunk/server/src/main/org/jboss/metadata/ApplicationMetaData.java 2006-11-09 14:19:12 UTC (rev 58232)
+++ trunk/server/src/main/org/jboss/metadata/ApplicationMetaData.java 2006-11-09 14:45:38 UTC (rev 58233)
@@ -261,6 +261,10 @@
public void setWebServiceContextRoot(String webServiceContextRoot)
{
+ if (webServiceContextRoot.charAt(0) != '/')
+ {
+ webServiceContextRoot = "/" + webServiceContextRoot;
+ }
this.webServiceContextRoot = webServiceContextRoot;
}
@@ -322,6 +326,11 @@
return (String)resources.get(name);
}
+ public void mapResource(String name, String value)
+ {
+ resources.put(name, value);
+ }
+
public void addPluginData(String pluginName, Object pluginData)
{
plugins.put(pluginName, pluginData);
More information about the jboss-cvs-commits
mailing list