[jboss-cvs] JBossAS SVN: r61247 - in branches/tdiesler/Branch_4_2: build and 18 other directories.
jboss-cvs-commits at lists.jboss.org
jboss-cvs-commits at lists.jboss.org
Fri Mar 9 22:25:04 EST 2007
Author: thomas.diesler at jboss.com
Date: 2007-03-09 22:25:04 -0500 (Fri, 09 Mar 2007)
New Revision: 61247
Added:
branches/tdiesler/Branch_4_2/server/src/main/org/jboss/metadata/serviceref/ServiceRefDelegate.java
branches/tdiesler/Branch_4_2/server/src/main/org/jboss/metadata/serviceref/ServiceRefObjectFactory.java
branches/tdiesler/Branch_4_2/tools/lib/org.eclipse.jdt.core_3.2.3.v_686_R32x.jar
Removed:
branches/tdiesler/Branch_4_2/ejb3/src/main/org/jboss/metamodel/descriptor/PortInfo.java
branches/tdiesler/Branch_4_2/ejb3/src/main/org/jboss/metamodel/descriptor/ServiceRef.java
branches/tdiesler/Branch_4_2/server/src/main/org/jboss/metadata/serviceref/HandlerMetaData.java
branches/tdiesler/Branch_4_2/server/src/main/org/jboss/metadata/serviceref/InitParamMetaData.java
branches/tdiesler/Branch_4_2/server/src/main/org/jboss/metadata/serviceref/PortComponentRefMetaData.java
branches/tdiesler/Branch_4_2/server/src/main/org/jboss/metadata/serviceref/ServiceRefHandler.java
branches/tdiesler/Branch_4_2/server/src/main/org/jboss/metadata/serviceref/ServiceRefHandlerFactory.java
branches/tdiesler/Branch_4_2/server/src/main/org/jboss/metadata/serviceref/ServiceRefMetaData.java
Modified:
branches/tdiesler/Branch_4_2/aspects/.classpath
branches/tdiesler/Branch_4_2/build/build-thirdparty.xml
branches/tdiesler/Branch_4_2/connector/.classpath
branches/tdiesler/Branch_4_2/console/.classpath
branches/tdiesler/Branch_4_2/ejb3/.classpath
branches/tdiesler/Branch_4_2/ejb3/src/main/org/jboss/ejb3/metamodel/EjbJarDDObjectFactory.java
branches/tdiesler/Branch_4_2/ejb3/src/main/org/jboss/ejb3/metamodel/EnterpriseBeans.java
branches/tdiesler/Branch_4_2/ejb3/src/main/org/jboss/ejb3/metamodel/Injectable.java
branches/tdiesler/Branch_4_2/ejb3/src/main/org/jboss/ejb3/metamodel/JBossClientDDObjectFactory.java
branches/tdiesler/Branch_4_2/ejb3/src/main/org/jboss/ejb3/metamodel/JBossDDObjectFactory.java
branches/tdiesler/Branch_4_2/ejb3/src/main/org/jboss/injection/WebServiceRefHandler.java
branches/tdiesler/Branch_4_2/ejb3/src/main/org/jboss/injection/WebServiceRefInjector.java
branches/tdiesler/Branch_4_2/ejb3/src/main/org/jboss/metamodel/descriptor/DDObjectFactory.java
branches/tdiesler/Branch_4_2/ejb3/src/main/org/jboss/metamodel/descriptor/EnvironmentRefGroup.java
branches/tdiesler/Branch_4_2/jaxrpc/.classpath
branches/tdiesler/Branch_4_2/server/.classpath
branches/tdiesler/Branch_4_2/server/build.xml
branches/tdiesler/Branch_4_2/server/src/main/org/jboss/deployment/ClientDeployer.java
branches/tdiesler/Branch_4_2/server/src/main/org/jboss/ejb/Container.java
branches/tdiesler/Branch_4_2/server/src/main/org/jboss/metadata/BeanMetaData.java
branches/tdiesler/Branch_4_2/server/src/main/org/jboss/metadata/ClientMetaData.java
branches/tdiesler/Branch_4_2/server/src/main/org/jboss/metadata/WebMetaData.java
branches/tdiesler/Branch_4_2/server/src/main/org/jboss/web/AbstractWebDeployer.java
branches/tdiesler/Branch_4_2/system/.classpath
branches/tdiesler/Branch_4_2/testsuite/.classpath
branches/tdiesler/Branch_4_2/tomcat/.classpath
branches/tdiesler/Branch_4_2/tomcat/build.xml
branches/tdiesler/Branch_4_2/varia/.classpath
Log:
Provide integration layer for <service-ref> handling
Modified: branches/tdiesler/Branch_4_2/aspects/.classpath
===================================================================
--- branches/tdiesler/Branch_4_2/aspects/.classpath 2007-03-09 22:42:37 UTC (rev 61246)
+++ branches/tdiesler/Branch_4_2/aspects/.classpath 2007-03-10 03:25:04 UTC (rev 61247)
@@ -19,7 +19,7 @@
<classpathentry kind="lib" path="/thirdparty/oswego-concurrent/lib/concurrent.jar"/>
<classpathentry kind="lib" path="/thirdparty/javassist/lib/javassist.jar"/>
<classpathentry kind="lib" path="/thirdparty/apache-logging/lib/commons-logging.jar" sourcepath="/thirdparty/apache-logging/lib/commons-logging-src.jar"/>
- <classpathentry kind="lib" path="/thirdparty/beanshell/lib/bsh-1.3.0.jar"/>
+ <classpathentry kind="lib" path="/thirdparty/beanshell/lib/bsh.jar"/>
<classpathentry kind="lib" path="/thirdparty/junit/lib/junit.jar"/>
<classpathentry kind="lib" path="/thirdparty/sun-servlet/lib/servlet-api.jar"/>
<classpathentry kind="lib" path="/thirdparty/jboss/aop/lib/jboss-aop.jar"/>
Modified: branches/tdiesler/Branch_4_2/build/build-thirdparty.xml
===================================================================
--- branches/tdiesler/Branch_4_2/build/build-thirdparty.xml 2007-03-09 22:42:37 UTC (rev 61246)
+++ branches/tdiesler/Branch_4_2/build/build-thirdparty.xml 2007-03-10 03:25:04 UTC (rev 61247)
@@ -86,7 +86,7 @@
<componentref name="jboss/dom4j-jarjar" version="1.6.1"/>
<componentref name="jboss/jaxr" version="1.2.0.GA"/>
<componentref name="jboss/jbossts14" version="4.2.3.CR3"/>
- <componentref name="jboss/jbossws" version="1.2.0.GA"/>
+ <componentref name="jboss/jbossws" version="1.2.0.SP1"/>
<componentref name="jboss/jbossws-wsconsume-impl" version="2.0.0"/>
<componentref name="jboss/jbossxb" version="1.0.0.CR9-brew"/>
<componentref name="jboss/microcontainer" version="1.0.2"/>
Modified: branches/tdiesler/Branch_4_2/connector/.classpath
===================================================================
--- branches/tdiesler/Branch_4_2/connector/.classpath 2007-03-09 22:42:37 UTC (rev 61246)
+++ branches/tdiesler/Branch_4_2/connector/.classpath 2007-03-10 03:25:04 UTC (rev 61247)
@@ -11,10 +11,10 @@
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
<classpathentry kind="lib" path="/thirdparty/apache-log4j/lib/log4j.jar"/>
<classpathentry kind="lib" path="/thirdparty/oswego-concurrent/lib/concurrent.jar"/>
- <classpathentry kind="lib" path="/thirdparty/apache-xerces/lib/xml-apis.jar"/>
+ <classpathentry kind="lib" path="/thirdparty/apache-xml-commons/lib/xml-apis.jar"/>
<classpathentry kind="lib" path="/thirdparty/apache-xerces/lib/xercesImpl.jar"/>
<classpathentry kind="lib" path="/thirdparty/sun-javamail/lib/mail.jar"/>
<classpathentry kind="lib" path="/thirdparty/jboss/jbossxb/lib/jboss-xml-binding.jar"/>
- <classpathentry kind="lib" path="/thirdparty/quartz/lib/quartz-all-1.5.2.jar"/>
+ <classpathentry kind="lib" path="/thirdparty/quartz/lib/quartz-all.jar"/>
<classpathentry kind="output" path="output/eclipse-classes"/>
</classpath>
Modified: branches/tdiesler/Branch_4_2/console/.classpath
===================================================================
--- branches/tdiesler/Branch_4_2/console/.classpath 2007-03-09 22:42:37 UTC (rev 61246)
+++ branches/tdiesler/Branch_4_2/console/.classpath 2007-03-10 03:25:04 UTC (rev 61247)
@@ -15,7 +15,7 @@
<classpathentry kind="lib" path="/thirdparty/sun-servlet/lib/jsp-api.jar"/>
<classpathentry kind="lib" path="/thirdparty/trove/lib/trove.jar"/>
<classpathentry kind="lib" path="/thirdparty/dom4j/lib/dom4j.jar"/>
- <classpathentry kind="lib" path="/thirdparty/beanshell/lib/bsh-1.3.0.jar"/>
+ <classpathentry kind="lib" path="/thirdparty/beanshell/lib/bsh.jar"/>
<classpathentry kind="lib" path="/thirdparty/jboss/aop/lib/jboss-aop.jar"/>
<classpathentry kind="lib" path="/thirdparty/jboss/remoting/lib/jboss-remoting.jar"/>
<classpathentry combineaccessrules="false" kind="src" path="/security"/>
Modified: branches/tdiesler/Branch_4_2/ejb3/.classpath
===================================================================
--- branches/tdiesler/Branch_4_2/ejb3/.classpath 2007-03-09 22:42:37 UTC (rev 61246)
+++ branches/tdiesler/Branch_4_2/ejb3/.classpath 2007-03-10 03:25:04 UTC (rev 61247)
@@ -78,7 +78,7 @@
<classpathentry kind="lib" path="/thirdparty/jboss/microcontainer/lib/jboss-container.jar"/>
<classpathentry kind="lib" path="/thirdparty/jboss/microcontainer/lib/jboss-dependency.jar"/>
<classpathentry kind="lib" path="/thirdparty/jboss/microcontainer/lib/jboss-microcontainer.jar"/>
- <classpathentry kind="lib" path="/thirdparty/quartz/lib/quartz-all-1.5.2.jar"/>
+ <classpathentry kind="lib" path="/thirdparty/quartz/lib/quartz-all.jar"/>
<classpathentry kind="lib" path="/thirdparty/jboss/jbossws/lib/jboss-jaxrpc.jar"/>
<classpathentry combineaccessrules="false" kind="src" path="/connector"/>
<classpathentry kind="lib" path="/thirdparty/jboss/jbossxb/lib/jboss-xml-binding.jar"/>
@@ -92,5 +92,6 @@
<classpathentry kind="lib" path="/thirdparty/dom4j/lib/dom4j.jar"/>
<classpathentry kind="lib" path="/thirdparty/jboss/dom4j-jarjar/lib/dom4j-jarjar.jar"/>
<classpathentry combineaccessrules="false" kind="src" path="/test"/>
+ <classpathentry kind="lib" path="/thirdparty/jboss/jbossws/lib/jbossws-integration.jar" sourcepath="/home/tdiesler/svn/jbossws/trunk/jbossws-core/src/java"/>
<classpathentry kind="output" path="output/eclipse-classes"/>
</classpath>
Modified: branches/tdiesler/Branch_4_2/ejb3/src/main/org/jboss/ejb3/metamodel/EjbJarDDObjectFactory.java
===================================================================
--- branches/tdiesler/Branch_4_2/ejb3/src/main/org/jboss/ejb3/metamodel/EjbJarDDObjectFactory.java 2007-03-09 22:42:37 UTC (rev 61246)
+++ branches/tdiesler/Branch_4_2/ejb3/src/main/org/jboss/ejb3/metamodel/EjbJarDDObjectFactory.java 2007-03-10 03:25:04 UTC (rev 61247)
@@ -29,28 +29,27 @@
import org.jboss.ejb3.KernelAbstraction;
import org.jboss.ejb3.KernelAbstractionFactory;
import org.jboss.logging.Logger;
-import org.jboss.util.xml.JBossEntityResolver;
-import org.jboss.xb.binding.JBossXBException;
-import org.jboss.xb.binding.ObjectModelFactory;
-import org.jboss.xb.binding.Unmarshaller;
-import org.jboss.xb.binding.UnmarshallerFactory;
-import org.jboss.xb.binding.UnmarshallingContext;
-import org.xml.sax.Attributes;
-
import org.jboss.metadata.SecurityRoleRefMetaData;
import org.jboss.metamodel.descriptor.DDObjectFactory;
import org.jboss.metamodel.descriptor.EjbLocalRef;
import org.jboss.metamodel.descriptor.EjbRef;
import org.jboss.metamodel.descriptor.EnvEntry;
import org.jboss.metamodel.descriptor.MessageDestinationRef;
-import org.jboss.metamodel.descriptor.PersistenceUnitRef;
import org.jboss.metamodel.descriptor.NameValuePair;
+import org.jboss.metamodel.descriptor.PersistenceContextRef;
+import org.jboss.metamodel.descriptor.PersistenceUnitRef;
import org.jboss.metamodel.descriptor.ResourceEnvRef;
import org.jboss.metamodel.descriptor.ResourceRef;
import org.jboss.metamodel.descriptor.RunAs;
-import org.jboss.metamodel.descriptor.ServiceRef;
import org.jboss.metamodel.descriptor.SecurityRole;
-import org.jboss.metamodel.descriptor.PersistenceContextRef;
+import org.jboss.util.xml.JBossEntityResolver;
+import org.jboss.ws.integration.ServiceRefMetaData;
+import org.jboss.xb.binding.JBossXBException;
+import org.jboss.xb.binding.ObjectModelFactory;
+import org.jboss.xb.binding.Unmarshaller;
+import org.jboss.xb.binding.UnmarshallerFactory;
+import org.jboss.xb.binding.UnmarshallingContext;
+import org.xml.sax.Attributes;
/**
* org.jboss.xb.binding.ObjectModelFactory implementation that accepts data
@@ -670,7 +669,7 @@
parent.addResourceRef(envRef);
}
- public void addChild(MessageDrivenBean parent, ServiceRef envRef, UnmarshallingContext navigator, String namespaceURI, String localName)
+ public void addChild(MessageDrivenBean parent, ServiceRefMetaData envRef, UnmarshallingContext navigator, String namespaceURI, String localName)
{
parent.addServiceRef(envRef);
}
@@ -771,7 +770,7 @@
/**
* Called when parsing character is complete.
*/
- public void addChild(SessionEnterpriseBean parent, ServiceRef envRef, UnmarshallingContext navigator, String namespaceURI, String localName)
+ public void addChild(SessionEnterpriseBean parent, ServiceRefMetaData envRef, UnmarshallingContext navigator, String namespaceURI, String localName)
{
parent.addServiceRef(envRef);
}
@@ -1037,7 +1036,7 @@
/**
* Called when parsing character is complete.
*/
- public void addChild(Interceptor parent, ServiceRef ref, UnmarshallingContext navigator, String namespaceURI, String localName)
+ public void addChild(Interceptor parent, ServiceRefMetaData ref, UnmarshallingContext navigator, String namespaceURI, String localName)
{
parent.addServiceRef(ref);
}
Modified: branches/tdiesler/Branch_4_2/ejb3/src/main/org/jboss/ejb3/metamodel/EnterpriseBeans.java
===================================================================
--- branches/tdiesler/Branch_4_2/ejb3/src/main/org/jboss/ejb3/metamodel/EnterpriseBeans.java 2007-03-09 22:42:37 UTC (rev 61246)
+++ branches/tdiesler/Branch_4_2/ejb3/src/main/org/jboss/ejb3/metamodel/EnterpriseBeans.java 2007-03-10 03:25:04 UTC (rev 61247)
@@ -26,8 +26,8 @@
import java.util.HashMap;
import java.util.Iterator;
import java.util.List;
+
import org.jboss.logging.Logger;
-
import org.jboss.metamodel.descriptor.EjbLocalRef;
import org.jboss.metamodel.descriptor.EjbRef;
import org.jboss.metamodel.descriptor.InjectionTarget;
@@ -35,7 +35,7 @@
import org.jboss.metamodel.descriptor.MessageDestinationRef;
import org.jboss.metamodel.descriptor.ResourceEnvRef;
import org.jboss.metamodel.descriptor.ResourceRef;
-import org.jboss.metamodel.descriptor.ServiceRef;
+import org.jboss.ws.integration.ServiceRefMetaData;
/**
* Represents EJB elements of the ejb-jar.xml deployment descriptor for the 1.4
@@ -114,7 +114,7 @@
currentEjb.mergeMessageDestinationRef(ref);
}
- public void addServiceRef(ServiceRef ref)
+ public void addServiceRef(ServiceRefMetaData ref)
{
currentEjb.addServiceRef(ref);
}
Modified: branches/tdiesler/Branch_4_2/ejb3/src/main/org/jboss/ejb3/metamodel/Injectable.java
===================================================================
--- branches/tdiesler/Branch_4_2/ejb3/src/main/org/jboss/ejb3/metamodel/Injectable.java 2007-03-09 22:42:37 UTC (rev 61246)
+++ branches/tdiesler/Branch_4_2/ejb3/src/main/org/jboss/ejb3/metamodel/Injectable.java 2007-03-10 03:25:04 UTC (rev 61247)
@@ -28,11 +28,11 @@
import org.jboss.metamodel.descriptor.EjbRef;
import org.jboss.metamodel.descriptor.JndiRef;
import org.jboss.metamodel.descriptor.MessageDestinationRef;
+import org.jboss.metamodel.descriptor.PersistenceContextRef;
import org.jboss.metamodel.descriptor.PersistenceUnitRef;
import org.jboss.metamodel.descriptor.ResourceEnvRef;
import org.jboss.metamodel.descriptor.ResourceRef;
-import org.jboss.metamodel.descriptor.ServiceRef;
-import org.jboss.metamodel.descriptor.PersistenceContextRef;
+import org.jboss.ws.integration.ServiceRefMetaData;
/**
*
@@ -50,7 +50,7 @@
Collection<ResourceRef> getResourceRefs();
- Collection<ServiceRef> getServiceRefs();
+ Collection<ServiceRefMetaData> getServiceRefs();
Collection<MessageDestinationRef> getMessageDestinationRefs();
Modified: branches/tdiesler/Branch_4_2/ejb3/src/main/org/jboss/ejb3/metamodel/JBossClientDDObjectFactory.java
===================================================================
--- branches/tdiesler/Branch_4_2/ejb3/src/main/org/jboss/ejb3/metamodel/JBossClientDDObjectFactory.java 2007-03-09 22:42:37 UTC (rev 61246)
+++ branches/tdiesler/Branch_4_2/ejb3/src/main/org/jboss/ejb3/metamodel/JBossClientDDObjectFactory.java 2007-03-10 03:25:04 UTC (rev 61247)
@@ -30,8 +30,8 @@
import org.jboss.metamodel.descriptor.MessageDestinationRef;
import org.jboss.metamodel.descriptor.ResourceEnvRef;
import org.jboss.metamodel.descriptor.ResourceRef;
-import org.jboss.metamodel.descriptor.ServiceRef;
import org.jboss.util.xml.JBossEntityResolver;
+import org.jboss.ws.integration.ServiceRefMetaData;
import org.jboss.xb.binding.JBossXBException;
import org.jboss.xb.binding.Unmarshaller;
import org.jboss.xb.binding.UnmarshallerFactory;
@@ -95,7 +95,7 @@
dd.updateMessageDestinationRef(ref);
}
- public void addChild(ApplicationClientDD parent, ServiceRef ref, UnmarshallingContext navigator, String namespaceURI, String localName)
+ public void addChild(ApplicationClientDD parent, ServiceRefMetaData ref, UnmarshallingContext navigator, String namespaceURI, String localName)
{
dd.addServiceRef(ref);
}
Modified: branches/tdiesler/Branch_4_2/ejb3/src/main/org/jboss/ejb3/metamodel/JBossDDObjectFactory.java
===================================================================
--- branches/tdiesler/Branch_4_2/ejb3/src/main/org/jboss/ejb3/metamodel/JBossDDObjectFactory.java 2007-03-09 22:42:37 UTC (rev 61246)
+++ branches/tdiesler/Branch_4_2/ejb3/src/main/org/jboss/ejb3/metamodel/JBossDDObjectFactory.java 2007-03-10 03:25:04 UTC (rev 61247)
@@ -29,15 +29,6 @@
import org.jboss.ejb3.KernelAbstraction;
import org.jboss.ejb3.KernelAbstractionFactory;
import org.jboss.logging.Logger;
-import org.jboss.util.xml.JBossEntityResolver;
-import org.jboss.xb.binding.JBossXBException;
-import org.jboss.xb.binding.ObjectModelFactory;
-import org.jboss.xb.binding.Unmarshaller;
-import org.jboss.xb.binding.UnmarshallerFactory;
-import org.jboss.xb.binding.UnmarshallingContext;
-import org.xml.sax.Attributes;
-
-import org.jboss.security.SecurityRoleMetaData;
import org.jboss.metamodel.descriptor.DDObjectFactory;
import org.jboss.metamodel.descriptor.EjbLocalRef;
import org.jboss.metamodel.descriptor.EjbRef;
@@ -47,7 +38,15 @@
import org.jboss.metamodel.descriptor.NameValuePair;
import org.jboss.metamodel.descriptor.ResourceEnvRef;
import org.jboss.metamodel.descriptor.ResourceRef;
-import org.jboss.metamodel.descriptor.ServiceRef;
+import org.jboss.security.SecurityRoleMetaData;
+import org.jboss.util.xml.JBossEntityResolver;
+import org.jboss.ws.integration.ServiceRefMetaData;
+import org.jboss.xb.binding.JBossXBException;
+import org.jboss.xb.binding.ObjectModelFactory;
+import org.jboss.xb.binding.Unmarshaller;
+import org.jboss.xb.binding.UnmarshallerFactory;
+import org.jboss.xb.binding.UnmarshallingContext;
+import org.xml.sax.Attributes;
/**
* Represents the jboss.xml deployment descriptor for the 2.1 schema
@@ -663,7 +662,7 @@
/**
* Called when parsing character is complete.
*/
- public void addChild(EnterpriseBeans parent, ServiceRef ref, UnmarshallingContext navigator, String namespaceURI, String localName)
+ public void addChild(EnterpriseBeans parent, ServiceRefMetaData ref, UnmarshallingContext navigator, String namespaceURI, String localName)
{
parent.addServiceRef(ref);
}
Modified: branches/tdiesler/Branch_4_2/ejb3/src/main/org/jboss/injection/WebServiceRefHandler.java
===================================================================
--- branches/tdiesler/Branch_4_2/ejb3/src/main/org/jboss/injection/WebServiceRefHandler.java 2007-03-09 22:42:37 UTC (rev 61246)
+++ branches/tdiesler/Branch_4_2/ejb3/src/main/org/jboss/injection/WebServiceRefHandler.java 2007-03-10 03:25:04 UTC (rev 61247)
@@ -34,8 +34,9 @@
import javax.xml.ws.WebServiceRefs;
import org.jboss.logging.Logger;
+import org.jboss.metadata.serviceref.ServiceRefDelegate;
import org.jboss.metamodel.descriptor.EnvironmentRefGroup;
-import org.jboss.metamodel.descriptor.ServiceRef;
+import org.jboss.ws.integration.ServiceRefMetaData;
/**
* Handle @WebServiceRef annotations
@@ -45,13 +46,13 @@
public class WebServiceRefHandler implements InjectionHandler
{
private static final Logger log = Logger.getLogger(WebServiceRefHandler.class);
- private Map<String, ServiceRef> srefMap = new HashMap<String, ServiceRef>();
+ private Map<String, ServiceRefMetaData> srefMap = new HashMap<String, ServiceRefMetaData>();
public void loadXml(EnvironmentRefGroup xml, InjectionContainer container)
{
if (xml == null) return;
if (xml.getServiceRefs() == null) return;
- for (ServiceRef sref : xml.getServiceRefs())
+ for (ServiceRefMetaData sref : xml.getServiceRefs())
{
log.debug("@WebServiceRef override: " + sref);
if (srefMap.get(sref.getServiceRefName()) != null)
@@ -88,7 +89,7 @@
if (!container.getEncInjectors().containsKey(name))
{
String encName = "env/" + name;
- ServiceRef sref = getServiceRef(name);
+ ServiceRefMetaData sref = getServiceRefForName(name);
container.getEncInjectors().put(name, new WebServiceRefInjector(encName, type, sref));
}
}
@@ -109,7 +110,7 @@
Context encCtx = container.getEnc();
if (!container.getEncInjectors().containsKey(name))
{
- ServiceRef sref = getServiceRef(name);
+ ServiceRefMetaData sref = getServiceRefForName(name);
container.getEncInjectors().put(name, new WebServiceRefInjector(encName, method, sref));
}
@@ -129,20 +130,20 @@
Context encCtx = container.getEnc();
if (!container.getEncInjectors().containsKey(name))
{
- ServiceRef sref = getServiceRef(name);
+ ServiceRefMetaData sref = getServiceRefForName(name);
container.getEncInjectors().put(name, new WebServiceRefInjector(encName, field, sref));
}
injectors.put(field, new JndiFieldInjector(field, encName, encCtx));
}
- private ServiceRef getServiceRef(String name)
+ private ServiceRefMetaData getServiceRefForName(String name)
{
- ServiceRef sref = srefMap.get(name);
+ ServiceRefMetaData sref = srefMap.get(name);
if (sref == null)
{
log.debug("No override for @WebServiceRef.name: " + name);
- sref = new ServiceRef();
+ sref = new ServiceRefDelegate().newServiceRefMetaData();
sref.setServiceRefName(name);
}
return sref;
Modified: branches/tdiesler/Branch_4_2/ejb3/src/main/org/jboss/injection/WebServiceRefInjector.java
===================================================================
--- branches/tdiesler/Branch_4_2/ejb3/src/main/org/jboss/injection/WebServiceRefInjector.java 2007-03-09 22:42:37 UTC (rev 61246)
+++ branches/tdiesler/Branch_4_2/ejb3/src/main/org/jboss/injection/WebServiceRefInjector.java 2007-03-10 03:25:04 UTC (rev 61247)
@@ -23,27 +23,17 @@
// $Id$
-import java.io.IOException;
import java.lang.reflect.AnnotatedElement;
import java.net.URL;
-import javax.management.MBeanServer;
-import javax.management.ObjectName;
import javax.naming.Context;
-import javax.naming.NamingException;
-import javax.xml.transform.Source;
-import javax.xml.transform.dom.DOMSource;
import javax.xml.ws.WebServiceException;
import org.jboss.ejb3.EJBContainer;
import org.jboss.logging.Logger;
-import org.jboss.metamodel.descriptor.ServiceRef;
-import org.jboss.mx.util.MBeanProxy;
-import org.jboss.mx.util.MBeanServerLocator;
-import org.jboss.mx.util.ObjectNameFactory;
-import org.jboss.util.xml.DOMUtils;
-//import org.jboss.virtual.VirtualFile;
-import org.w3c.dom.Element;
+import org.jboss.metadata.serviceref.ServiceRefDelegate;
+import org.jboss.ws.integration.ServiceRefMetaData;
+import org.jboss.ws.integration.URLLoaderAdapter;
/**
* Inject a jaxws web service ref.
@@ -56,23 +46,13 @@
private static final Logger log = Logger.getLogger(WebServiceRefInjector.class);
private String name;
- private AnnotatedElement anElement;
+ private ServiceRefMetaData sref;
- private ServiceRef sref;
-
- // The @WebServiceRef handler MBean interface
- // is duplicated here to avoid a binary dependency on JBossWS
- public interface WebServiceRefHandlerMBean
+ public WebServiceRefInjector(String name, AnnotatedElement anElement, ServiceRefMetaData sref)
{
- ObjectName OBJECT_NAME = ObjectNameFactory.create("jboss.ws:service=WebServiceRefHandler");
- void setupWebServiceRef(Context encCtx, String encName, AnnotatedElement anElement, URL rootURL, Source metadata) throws NamingException;
- }
-
- public WebServiceRefInjector(String name, AnnotatedElement anElement, ServiceRef sref)
- {
this.name = name;
- this.anElement = anElement;
this.sref = sref;
+ this.sref.setAnnotatedElement(anElement);
}
public void inject(InjectionContainer container)
@@ -82,11 +62,8 @@
Context encCtx = container.getEnc();
URL rootURL = ((EJBContainer)container).getDeploymentUnit().getUrl();
- // Decoupled invocation to JBossWS
- MBeanServer server = MBeanServerLocator.locateJBoss();
- ObjectName oname = WebServiceRefHandlerMBean.OBJECT_NAME;
- WebServiceRefHandlerMBean handler = (WebServiceRefHandlerMBean)MBeanProxy.get(WebServiceRefHandlerMBean.class, oname, server);
- handler.setupWebServiceRef(encCtx, name, anElement, rootURL, getMetaData());
+ URLLoaderAdapter vfsRoot = new URLLoaderAdapter(rootURL);
+ new ServiceRefDelegate().bindServiceRef(encCtx, name, vfsRoot, sref);
log.debug("@WebServiceRef bound [env=" + name + "]");
}
@@ -96,13 +73,6 @@
}
}
- private Source getMetaData() throws IOException
- {
- String xmlFragment = sref.toXMLFragment();
- Element root = DOMUtils.parse(xmlFragment);
- return new DOMSource(root);
- }
-
public String toString()
{
return super.toString() + "{enc=" + name + "}";
Modified: branches/tdiesler/Branch_4_2/ejb3/src/main/org/jboss/metamodel/descriptor/DDObjectFactory.java
===================================================================
--- branches/tdiesler/Branch_4_2/ejb3/src/main/org/jboss/metamodel/descriptor/DDObjectFactory.java 2007-03-09 22:42:37 UTC (rev 61246)
+++ branches/tdiesler/Branch_4_2/ejb3/src/main/org/jboss/metamodel/descriptor/DDObjectFactory.java 2007-03-10 03:25:04 UTC (rev 61247)
@@ -22,8 +22,9 @@
package org.jboss.metamodel.descriptor;
import javax.persistence.PersistenceContextType;
-import javax.xml.namespace.QName;
+import org.jboss.metadata.serviceref.ServiceRefDelegate;
+import org.jboss.metadata.serviceref.ServiceRefObjectFactory;
import org.jboss.xb.binding.ObjectModelFactory;
import org.jboss.xb.binding.UnmarshallingContext;
import org.xml.sax.Attributes;
@@ -33,7 +34,7 @@
* @author Thomas.Diesler at jboss.com
* @version <tt>$Revision$</tt>
*/
-public abstract class DDObjectFactory implements ObjectModelFactory
+public abstract class DDObjectFactory extends ServiceRefObjectFactory implements ObjectModelFactory
{
public Object newChild(PersistenceUnitRef ref, UnmarshallingContext navigator, String namespaceURI, String localName, Attributes attrs)
{
@@ -75,11 +76,6 @@
return newRefChild(ref, localName);
}
- public Object newChild(ServiceRef ref, UnmarshallingContext navigator, String namespaceURI, String localName, Attributes attrs)
- {
- return newServiceRefChild(ref, localName);
- }
-
public Object newChild(JndiRef ref, UnmarshallingContext navigator, String namespaceURI, String localName, Attributes attrs)
{
return newRefChild(ref, localName);
@@ -125,11 +121,6 @@
parent.setInjectionTarget(target);
}
- public void addChild(ServiceRef parent, InjectionTarget target, UnmarshallingContext navigator, String namespaceURI, String localName)
- {
- parent.setInjectionTarget(target);
- }
-
public void addChild(JndiRef parent, InjectionTarget target, UnmarshallingContext navigator, String namespaceURI, String localName)
{
parent.setInjectionTarget(target);
@@ -323,87 +314,6 @@
}
}
- public void setValue(ServiceRef ref, UnmarshallingContext navigator, String namespaceURI, String localName, String value)
- {
- if (localName.equals("service-ref-name"))
- {
- ref.setServiceRefName(value);
- }
- else if (localName.equals("service-class-name"))
- {
- ref.setServiceClassName(value);
- }
- else if (localName.equals("service-qname"))
- {
- ref.setServiceQName(QName.valueOf(value));
- }
- else if (localName.equals("config-name"))
- {
- ref.setConfigName(value);
- }
- else if (localName.equals("config-file"))
- {
- ref.setConfigFile(value);
- }
- else if (localName.equals("handler-chain"))
- {
- ref.setHandlerChain(value);
- }
- else if (localName.equals("wsdl-override"))
- {
- ref.setWsdlOverride(value);
- }
- }
-
- private Object newServiceRefChild(ServiceRef ref, String localName)
- {
- Object child = newRefChild(ref, localName);
-
- if (localName.equals("port-info"))
- child = new PortInfo(ref);
-
- return child;
- }
-
- public void addChild(ServiceRef parent, PortInfo portInfo, UnmarshallingContext navigator, String namespaceURI, String localName)
- {
- parent.getPortInfos().add(portInfo);
- }
-
- public void setValue(PortInfo portInfo, UnmarshallingContext navigator, String namespaceURI, String localName, String value)
- {
- if (localName.equals("service-endpoint-interface"))
- {
- portInfo.setServiceEndpointInterface(value);
- }
- else if (localName.equals("port-qname"))
- {
- portInfo.setPortQName(QName.valueOf(value));
- }
- else if (localName.equals("config-name"))
- {
- portInfo.setConfigName(value);
- }
- else if (localName.equals("config-file"))
- {
- portInfo.setConfigFile(value);
- }
- }
-
- public Object newChild(PortInfo portInfo, UnmarshallingContext navigator, String namespaceURI, String localName, Attributes attrs)
- {
- Object child = null;
- if (localName.equals("stub-property"))
- child = new NameValuePair();
-
- return child;
- }
-
- public void addChild(PortInfo parent, NameValuePair stubProp, UnmarshallingContext navigator, String namespaceURI, String localName)
- {
- parent.getStubProperties().add(stubProp);
- }
-
public void setValue(NameValuePair nvPair, UnmarshallingContext navigator, String namespaceURI, String localName, String value)
{
if (localName.equals("name"))
@@ -522,7 +432,7 @@
}
else if (localName.equals("service-ref"))
{
- child = new ServiceRef();
+ child = new ServiceRefDelegate().newServiceRefMetaData();
}
else if (localName.equals("jndi-ref"))
{
Modified: branches/tdiesler/Branch_4_2/ejb3/src/main/org/jboss/metamodel/descriptor/EnvironmentRefGroup.java
===================================================================
--- branches/tdiesler/Branch_4_2/ejb3/src/main/org/jboss/metamodel/descriptor/EnvironmentRefGroup.java 2007-03-09 22:42:37 UTC (rev 61246)
+++ branches/tdiesler/Branch_4_2/ejb3/src/main/org/jboss/metamodel/descriptor/EnvironmentRefGroup.java 2007-03-10 03:25:04 UTC (rev 61247)
@@ -21,22 +21,14 @@
*/
package org.jboss.metamodel.descriptor;
-import java.util.HashMap;
+import java.util.ArrayList;
import java.util.Collection;
+import java.util.HashMap;
import java.util.List;
-import java.util.ArrayList;
import org.jboss.logging.Logger;
+import org.jboss.ws.integration.ServiceRefMetaData;
-import org.jboss.metamodel.descriptor.EjbLocalRef;
-import org.jboss.metamodel.descriptor.EjbRef;
-import org.jboss.metamodel.descriptor.EnvEntry;
-import org.jboss.metamodel.descriptor.JndiRef;
-import org.jboss.metamodel.descriptor.MessageDestinationRef;
-import org.jboss.metamodel.descriptor.ResourceEnvRef;
-import org.jboss.metamodel.descriptor.ResourceRef;
-import org.jboss.metamodel.descriptor.ServiceRef;
-
/**
* @author <a href="mailto:bdecoste at jboss.com">William DeCoste</a>
* @version <tt>$Revision$</tt>
@@ -53,7 +45,7 @@
protected HashMap<String, MessageDestinationRef> messageDestinationRefs = new HashMap<String, MessageDestinationRef>();
/** An index of MessageDestinationRef keyed by message-destination-link values */
protected HashMap<String, MessageDestinationRef> messageDestinationRefsByLink = new HashMap<String, MessageDestinationRef>();
- protected HashMap<String, ServiceRef> serviceRefs = new HashMap<String, ServiceRef>();
+ protected HashMap<String, ServiceRefMetaData> serviceRefs = new HashMap<String, ServiceRefMetaData>();
protected HashMap<String, JndiRef> jndiRefs = new HashMap<String, JndiRef>();
protected List<PersistenceContextRef> persistenceContextRefs = new ArrayList<PersistenceContextRef>();
protected List<PersistenceUnitRef> persistenceUnitRefs = new ArrayList<PersistenceUnitRef>();
@@ -134,12 +126,12 @@
jndiRefs.put(ref.getJndiRefName(), ref);
}
- public Collection<ServiceRef> getServiceRefs()
+ public Collection<ServiceRefMetaData> getServiceRefs()
{
return serviceRefs.values();
}
- public void addServiceRef(ServiceRef ref)
+ public void addServiceRef(ServiceRefMetaData ref)
{
serviceRefs.put(ref.getServiceRefName(), ref);
}
Deleted: branches/tdiesler/Branch_4_2/ejb3/src/main/org/jboss/metamodel/descriptor/PortInfo.java
===================================================================
--- branches/tdiesler/Branch_4_2/ejb3/src/main/org/jboss/metamodel/descriptor/PortInfo.java 2007-03-09 22:42:37 UTC (rev 61246)
+++ branches/tdiesler/Branch_4_2/ejb3/src/main/org/jboss/metamodel/descriptor/PortInfo.java 2007-03-10 03:25:04 UTC (rev 61247)
@@ -1,127 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source.
- * Copyright 2006, Red Hat Middleware LLC, and individual contributors
- * as indicated by the @author tags. See the copyright.txt file in the
- * distribution for a full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jboss.metamodel.descriptor;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import javax.xml.namespace.QName;
-
-// $Id$
-
-/**
- * Represents a <port-info> element in <service-ref>
- *
- * @author Thomas.Diesler at jboss.com
- */
-public class PortInfo
-{
- private ServiceRef serviceRef;
- private String serviceEndpointInterface;
- private QName portQName;
- private String configName;
- private String configFile;
- private List<NameValuePair> stubProperties = new ArrayList<NameValuePair>();
-
- public PortInfo(ServiceRef serviceRef)
- {
- this.serviceRef = serviceRef;
- }
-
- public ServiceRef getServiceRef()
- {
- return serviceRef;
- }
-
- public QName getPortQName()
- {
- return portQName;
- }
-
- public void setPortQName(QName portName)
- {
- this.portQName = portName;
- }
-
- public String getServiceEndpointInterface()
- {
- return serviceEndpointInterface;
- }
-
- public void setServiceEndpointInterface(String serviceEndpointInterface)
- {
- this.serviceEndpointInterface = serviceEndpointInterface;
- }
-
- public String getConfigFile()
- {
- return configFile;
- }
-
- public void setConfigFile(String configFile)
- {
- this.configFile = configFile;
- }
-
- public String getConfigName()
- {
- return configName;
- }
-
- public void setConfigName(String configName)
- {
- this.configName = configName;
- }
-
- public List<NameValuePair> getStubProperties()
- {
- return stubProperties;
- }
-
- public String toXMLFragment()
- {
- StringBuilder xml = new StringBuilder("<port-info>");
-
- if (serviceEndpointInterface != null)
- xml.append("<service-endpoint-interface>" + serviceEndpointInterface + "</service-endpoint-interface>");
-
- if (portQName != null)
- xml.append("<port-qname>" + portQName + "</port-qname>");
-
- if (configName != null)
- xml.append("<config-name>" + configName + "</config-name>");
- if (configFile != null)
- xml.append("<config-file>" + configFile + "</config-file>");
-
- for (NameValuePair nvp : stubProperties)
- {
- xml.append("<stub-property>");
- xml.append("<name>" + nvp.getName() + "</name>");
- xml.append("<value>" + nvp.getValue() + "</value>");
- xml.append("</stub-property>");
- }
-
- xml.append("</port-info>");
-
- return xml.toString();
- }
-}
Deleted: branches/tdiesler/Branch_4_2/ejb3/src/main/org/jboss/metamodel/descriptor/ServiceRef.java
===================================================================
--- branches/tdiesler/Branch_4_2/ejb3/src/main/org/jboss/metamodel/descriptor/ServiceRef.java 2007-03-09 22:42:37 UTC (rev 61246)
+++ branches/tdiesler/Branch_4_2/ejb3/src/main/org/jboss/metamodel/descriptor/ServiceRef.java 2007-03-10 03:25:04 UTC (rev 61247)
@@ -1,163 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source.
- * Copyright 2006, Red Hat Middleware LLC, and individual contributors
- * as indicated by the @author tags. See the copyright.txt file in the
- * distribution for a full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jboss.metamodel.descriptor;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import javax.xml.namespace.QName;
-
-// $Id$
-
-/**
- * Represents a <service-ref> element of the jboss.xml, jboss-web.xml, jboss-client.xml deployment descriptor
- * for the 5.0 schema
- *
- * @author <a href="mailto:bdecoste at jboss.com">William DeCoste</a>
- * @author Thomas.Diesler at jboss.com
- */
-public class ServiceRef extends Ref
-{
- private String serviceRefName;
- private String serviceClassName;
- private QName serviceQName;
- private String configName;
- private String configFile;
- private String handlerChain;
- private List<PortInfo> portInfos = new ArrayList<PortInfo>();
- private String wsdlOverride;
-
- public String getServiceRefName()
- {
- return serviceRefName;
- }
-
- public void setServiceRefName(String name)
- {
- this.serviceRefName = name;
- }
-
- public String getServiceClassName()
- {
- return serviceClassName;
- }
-
- public void setServiceClassName(String serviceClassName)
- {
- this.serviceClassName = serviceClassName;
- }
-
- public QName getServiceQName()
- {
- return serviceQName;
- }
-
- public void setServiceQName(QName serviceQName)
- {
- this.serviceQName = serviceQName;
- }
-
- public String getConfigFile()
- {
- return configFile;
- }
-
- public void setConfigFile(String configFile)
- {
- this.configFile = configFile;
- }
-
- public String getConfigName()
- {
- return configName;
- }
-
- public void setConfigName(String configName)
- {
- this.configName = configName;
- }
-
- public String getHandlerChain()
- {
- return handlerChain;
- }
-
- public void setHandlerChain(String handlerChain)
- {
- this.handlerChain = handlerChain;
- }
-
- public List<PortInfo> getPortInfos()
- {
- return portInfos;
- }
-
- public String getWsdlOverride()
- {
- return wsdlOverride;
- }
-
- public void setWsdlOverride(String wsdlLocation)
- {
- this.wsdlOverride = wsdlLocation;
- }
-
- public String toXMLFragment()
- {
- StringBuilder xml = new StringBuilder("<service-ref>");
-
- xml.append("<service-ref-name>" + serviceRefName + "</service-ref-name>");
-
- if (serviceClassName != null)
- xml.append("<service-class-name>" + serviceClassName + "</service-class-name>");
-
- if (serviceQName != null)
- xml.append("<service-qname>" + serviceQName + "</service-qname>");
-
- if (configName != null)
- xml.append("<config-name>" + configName + "</config-name>");
- if (configFile != null)
- xml.append("<config-file>" + configFile + "</config-file>");
-
- if (handlerChain != null)
- xml.append("<handler-chain>" + handlerChain + "</handler-chain>");
-
- for (PortInfo portInfo : portInfos)
- xml.append(portInfo.toXMLFragment());
-
- if (wsdlOverride != null)
- xml.append("<wsdl-override>" + wsdlOverride + "</wsdl-override>");
-
- xml.append("</service-ref>");
-
- return xml.toString();
- }
-
- public String toString()
- {
- StringBuffer sb = new StringBuffer(100);
- sb.append("[");
- sb.append("name=").append(serviceRefName);
- sb.append("]");
- return sb.toString();
- }
-}
Modified: branches/tdiesler/Branch_4_2/jaxrpc/.classpath
===================================================================
--- branches/tdiesler/Branch_4_2/jaxrpc/.classpath 2007-03-09 22:42:37 UTC (rev 61246)
+++ branches/tdiesler/Branch_4_2/jaxrpc/.classpath 2007-03-10 03:25:04 UTC (rev 61247)
@@ -10,7 +10,6 @@
<classpathentry kind="lib" path="/thirdparty/apache-log4j/lib/log4j.jar"/>
<classpathentry kind="lib" path="/thirdparty/sun-servlet/lib/servlet-api.jar"/>
<classpathentry kind="lib" path="/thirdparty/sun-servlet/lib/jsp-api.jar"/>
- <classpathentry kind="lib" path="/thirdparty/apache-wss4j/lib/wss4j.jar"/>
<classpathentry kind="lib" path="/thirdparty/apache-xmlsec/lib/xmlsec.jar"/>
<classpathentry kind="lib" path="/thirdparty/ibm-wsdl4j/lib/wsdl4j.jar"/>
<classpathentry kind="lib" path="/thirdparty/sun-javamail/lib/mail.jar"/>
Modified: branches/tdiesler/Branch_4_2/server/.classpath
===================================================================
--- branches/tdiesler/Branch_4_2/server/.classpath 2007-03-09 22:42:37 UTC (rev 61246)
+++ branches/tdiesler/Branch_4_2/server/.classpath 2007-03-10 03:25:04 UTC (rev 61247)
@@ -25,5 +25,7 @@
<classpathentry kind="lib" path="/thirdparty/jboss/serialization/lib/jboss-serialization.jar"/>
<classpathentry kind="lib" path="/thirdparty/jboss/jbossws/lib/jboss-jaxrpc.jar"/>
<classpathentry kind="lib" path="/thirdparty/jboss/jbossws/lib/jboss-saaj.jar"/>
+ <classpathentry kind="lib" path="/thirdparty/jboss/jbossws/lib/jbossws-integration.jar"/>
+ <classpathentry kind="lib" path="/thirdparty/jboss/microcontainer/lib/jboss-microcontainer.jar"/>
<classpathentry kind="output" path="output/eclipse-classes"/>
</classpath>
Modified: branches/tdiesler/Branch_4_2/server/build.xml
===================================================================
--- branches/tdiesler/Branch_4_2/server/build.xml 2007-03-09 22:42:37 UTC (rev 61246)
+++ branches/tdiesler/Branch_4_2/server/build.xml 2007-03-10 03:25:04 UTC (rev 61247)
@@ -85,6 +85,7 @@
<path refid="gjt.jpl-util.classpath"/>
<path refid="gnu.getopt.classpath"/>
<path refid="ibm.wsdl4j.classpath"/>
+ <path refid="jboss.microcontainer.classpath"/>
<path refid="jboss.jbossws.classpath"/>
<path refid="jboss.jbossxb.classpath"/>
<path refid="junit.junit.classpath"/>
Modified: branches/tdiesler/Branch_4_2/server/src/main/org/jboss/deployment/ClientDeployer.java
===================================================================
--- branches/tdiesler/Branch_4_2/server/src/main/org/jboss/deployment/ClientDeployer.java 2007-03-09 22:42:37 UTC (rev 61246)
+++ branches/tdiesler/Branch_4_2/server/src/main/org/jboss/deployment/ClientDeployer.java 2007-03-10 03:25:04 UTC (rev 61247)
@@ -21,6 +21,19 @@
*/
package org.jboss.deployment;
+import java.io.File;
+import java.io.FileInputStream;
+import java.io.IOException;
+import java.io.InputStream;
+import java.net.URL;
+import java.util.HashMap;
+import java.util.Iterator;
+
+import javax.naming.Context;
+import javax.naming.InitialContext;
+import javax.naming.LinkRef;
+import javax.naming.NamingException;
+
import org.jboss.ejb.EjbUtil;
import org.jboss.metadata.ClientMetaData;
import org.jboss.metadata.EjbRefMetaData;
@@ -28,23 +41,14 @@
import org.jboss.metadata.ResourceEnvRefMetaData;
import org.jboss.metadata.ResourceRefMetaData;
import org.jboss.metadata.XmlFileLoader;
-import org.jboss.metadata.serviceref.ServiceRefHandler;
-import org.jboss.metadata.serviceref.ServiceRefHandlerFactory;
+import org.jboss.metadata.serviceref.ServiceRefDelegate;
import org.jboss.util.naming.Util;
+import org.jboss.ws.integration.ServiceRefHandler;
+import org.jboss.ws.integration.ServiceRefMetaData;
+import org.jboss.ws.integration.URLLoaderAdapter;
+import org.jboss.ws.integration.UnifiedVirtualFile;
import org.w3c.dom.Element;
-import javax.naming.Context;
-import javax.naming.InitialContext;
-import javax.naming.LinkRef;
-import javax.naming.NamingException;
-import java.io.File;
-import java.io.FileInputStream;
-import java.io.IOException;
-import java.io.InputStream;
-import java.net.URL;
-import java.util.HashMap;
-import java.util.Iterator;
-
/**
* An XMBean resource implementation of a deployer for j2ee application
* client jars
@@ -269,10 +273,12 @@
}
// Bind service references
- Iterator serviceRefs = metaData.getServiceReferences().values().iterator();
- ServiceRefHandler serviceRefHandler = ServiceRefHandlerFactory.newInstance();
- if (serviceRefHandler != null)
- serviceRefHandler.bindServiceRefs(envCtx, serviceRefs, di);
+ UnifiedVirtualFile vfsRoot = new URLLoaderAdapter(di.url);
+ for (ServiceRefMetaData sref : metaData.getServiceReferences().values())
+ {
+ String refName = sref.getServiceRefName();
+ new ServiceRefDelegate().bindServiceRef(envCtx, refName, vfsRoot, sref);
+ }
// Bind resource references
HashMap resRefs = metaData.getResourceReferences();
Modified: branches/tdiesler/Branch_4_2/server/src/main/org/jboss/ejb/Container.java
===================================================================
--- branches/tdiesler/Branch_4_2/server/src/main/org/jboss/ejb/Container.java 2007-03-09 22:42:37 UTC (rev 61246)
+++ branches/tdiesler/Branch_4_2/server/src/main/org/jboss/ejb/Container.java 2007-03-10 03:25:04 UTC (rev 61247)
@@ -75,8 +75,7 @@
import org.jboss.metadata.MessageDestinationRefMetaData;
import org.jboss.metadata.ResourceEnvRefMetaData;
import org.jboss.metadata.ResourceRefMetaData;
-import org.jboss.metadata.serviceref.ServiceRefHandler;
-import org.jboss.metadata.serviceref.ServiceRefHandlerFactory;
+import org.jboss.metadata.serviceref.ServiceRefDelegate;
import org.jboss.mx.util.ObjectNameConverter;
import org.jboss.mx.util.ObjectNameFactory;
import org.jboss.security.AnybodyPrincipal;
@@ -88,6 +87,9 @@
import org.jboss.util.naming.ENCThreadLocalKey;
import org.jboss.util.naming.NonSerializableFactory;
import org.jboss.util.naming.Util;
+import org.jboss.ws.integration.ServiceRefMetaData;
+import org.jboss.ws.integration.URLLoaderAdapter;
+import org.jboss.ws.integration.UnifiedVirtualFile;
import org.omg.CORBA.ORB;
/**
@@ -1235,10 +1237,12 @@
}
// Bind service references
- Iterator serviceRefs = metaData.getServiceReferences().values().iterator();
- ServiceRefHandler serviceRefHandler = ServiceRefHandlerFactory.newInstance();
- if (serviceRefHandler != null)
- serviceRefHandler.bindServiceRefs(envCtx, serviceRefs, di);
+ UnifiedVirtualFile vfsRoot = new URLLoaderAdapter(di.url);
+ for (ServiceRefMetaData sref : metaData.getServiceReferences().values())
+ {
+ String refName = sref.getServiceRefName();
+ new ServiceRefDelegate().bindServiceRef(envCtx, refName, vfsRoot, sref);
+ }
// Bind resource references
{
Modified: branches/tdiesler/Branch_4_2/server/src/main/org/jboss/metadata/BeanMetaData.java
===================================================================
--- branches/tdiesler/Branch_4_2/server/src/main/org/jboss/metadata/BeanMetaData.java 2007-03-09 22:42:37 UTC (rev 61246)
+++ branches/tdiesler/Branch_4_2/server/src/main/org/jboss/metadata/BeanMetaData.java 2007-03-10 03:25:04 UTC (rev 61247)
@@ -32,11 +32,12 @@
import org.jboss.deployment.DeploymentException;
import org.jboss.invocation.InvocationType;
+import org.jboss.metadata.serviceref.ServiceRefDelegate;
import org.jboss.mx.util.ObjectNameFactory;
import org.jboss.security.AnybodyPrincipal;
import org.jboss.security.NobodyPrincipal;
import org.jboss.security.SimplePrincipal;
-import org.jboss.metadata.serviceref.ServiceRefMetaData;
+import org.jboss.ws.integration.ServiceRefMetaData;
import org.w3c.dom.Element;
import EDU.oswego.cs.dl.util.concurrent.ConcurrentReaderHashMap;
@@ -110,7 +111,7 @@
/** The ejb-local-ref element(s) info */
private HashMap ejbLocalReferences = new HashMap();
/** The HashMap<ServiceRefMetaData> service-ref element(s) info */
- private HashMap serviceReferences = new HashMap();
+ private HashMap<String, ServiceRefMetaData> serviceReferences = new HashMap<String, ServiceRefMetaData>();
/** The security-role-ref element(s) info */
private ArrayList securityRoleReferences = new ArrayList();
/** The security-idemtity element info */
@@ -325,7 +326,7 @@
/**
* @return HashMap<ServiceRefMetaData>
*/
- public HashMap getServiceReferences()
+ public HashMap<String, ServiceRefMetaData> getServiceReferences()
{
return serviceReferences;
}
@@ -803,7 +804,8 @@
while (iterator.hasNext())
{
Element serviceRef = (Element)iterator.next();
- ServiceRefMetaData refMetaData = new ServiceRefMetaData(application.getResourceCl());
+ new ServiceRefDelegate().newServiceRefMetaData();
+ ServiceRefMetaData refMetaData = new ServiceRefDelegate().newServiceRefMetaData();
refMetaData.importStandardXml(serviceRef);
serviceReferences.put(refMetaData.getServiceRefName(), refMetaData);
}
Modified: branches/tdiesler/Branch_4_2/server/src/main/org/jboss/metadata/ClientMetaData.java
===================================================================
--- branches/tdiesler/Branch_4_2/server/src/main/org/jboss/metadata/ClientMetaData.java 2007-03-09 22:42:37 UTC (rev 61246)
+++ branches/tdiesler/Branch_4_2/server/src/main/org/jboss/metadata/ClientMetaData.java 2007-03-10 03:25:04 UTC (rev 61247)
@@ -24,7 +24,8 @@
// $Id$
import org.jboss.deployment.DeploymentException;
-import org.jboss.metadata.serviceref.ServiceRefMetaData;
+import org.jboss.metadata.serviceref.ServiceRefDelegate;
+import org.jboss.ws.integration.ServiceRefMetaData;
import org.w3c.dom.Element;
import java.util.ArrayList;
@@ -49,7 +50,7 @@
/** A HashMap<String, EjbRefMetaData> for the ejb-ref element(s) */
private HashMap ejbReferences = new HashMap();
/** The HashMap<String, ServiceRefMetaData> service-ref element(s) info */
- private HashMap serviceReferences = new HashMap();
+ private HashMap<String,ServiceRefMetaData> serviceReferences = new HashMap<String,ServiceRefMetaData>();
/** A HashMap<String, ResourceRefMetaData> resource-ref element(s) info */
private HashMap resourceReferences = new HashMap();
/** A HashMap<String, ResourceEnvRefMetaData> resource-env-ref element(s) info */
@@ -130,7 +131,7 @@
/**
* @return HashMap<ServiceRefMetaData>
*/
- public HashMap getServiceReferences()
+ public HashMap<String,ServiceRefMetaData> getServiceReferences()
{
return serviceReferences;
}
@@ -171,7 +172,7 @@
while (iterator.hasNext())
{
Element serviceRef = (Element) iterator.next();
- ServiceRefMetaData refMetaData = new ServiceRefMetaData(resourceCl);
+ ServiceRefMetaData refMetaData = new ServiceRefDelegate().newServiceRefMetaData();
refMetaData.importStandardXml(serviceRef);
serviceReferences.put(refMetaData.getServiceRefName(), refMetaData);
}
Modified: branches/tdiesler/Branch_4_2/server/src/main/org/jboss/metadata/WebMetaData.java
===================================================================
--- branches/tdiesler/Branch_4_2/server/src/main/org/jboss/metadata/WebMetaData.java 2007-03-09 22:42:37 UTC (rev 61246)
+++ branches/tdiesler/Branch_4_2/server/src/main/org/jboss/metadata/WebMetaData.java 2007-03-10 03:25:04 UTC (rev 61247)
@@ -35,12 +35,13 @@
import org.jboss.deployment.DeploymentException;
import org.jboss.logging.Logger;
+import org.jboss.metadata.serviceref.ServiceRefDelegate;
import org.jboss.mx.loading.LoaderRepositoryFactory;
import org.jboss.mx.loading.LoaderRepositoryFactory.LoaderRepositoryConfig;
import org.jboss.mx.util.ObjectNameFactory;
import org.jboss.security.RunAsIdentity;
import org.jboss.security.SecurityRoleMetaData;
-import org.jboss.metadata.serviceref.ServiceRefMetaData;
+import org.jboss.ws.integration.ServiceRefMetaData;
import org.w3c.dom.Element;
/** A representation of the web.xml and jboss-web.xml deployment
@@ -80,7 +81,7 @@
/** web.xml ejb-local-refs */
private HashMap ejbLocalReferences = new HashMap();
/** The web.xml service-refs */
- private HashMap serviceReferences = new HashMap();
+ private HashMap<String, ServiceRefMetaData> serviceReferences = new HashMap<String, ServiceRefMetaData>();
/** web.xml security-role-refs <String servlet-name, ArrayList<SecurityRoleRefMetaData>> */
private HashMap securityRoleReferences = new HashMap();
/** The web.xml servlet/run-as <String servlet-name, String role> */
@@ -291,18 +292,12 @@
this.messageDestinations.putAll(messageDestinations);
}
- /** Return an iterator of the service-ref mappings.
- * @return Iterator of ServiceRefMetaData objects
- */
- public Iterator getServiceReferences()
+ public Map<String,ServiceRefMetaData> getServiceReferences()
{
- return serviceReferences.values().iterator();
+ return serviceReferences;
}
- /**
- *
- * @param serviceReferences - Map<String, ServiceRefMetaData>
- */
- public void setServiceReferences(Map serviceReferences)
+
+ public void setServiceReferences(Map<String, ServiceRefMetaData> serviceReferences)
{
this.serviceReferences.clear();
this.serviceReferences.putAll(serviceReferences);
@@ -964,7 +959,7 @@
while (iterator.hasNext())
{
Element serviceRef = (Element)iterator.next();
- ServiceRefMetaData refMetaData = new ServiceRefMetaData(resourceCl);
+ ServiceRefMetaData refMetaData = new ServiceRefDelegate().newServiceRefMetaData();
refMetaData.importStandardXml(serviceRef);
serviceReferences.put(refMetaData.getServiceRefName(), refMetaData);
}
Deleted: branches/tdiesler/Branch_4_2/server/src/main/org/jboss/metadata/serviceref/HandlerMetaData.java
===================================================================
--- branches/tdiesler/Branch_4_2/server/src/main/org/jboss/metadata/serviceref/HandlerMetaData.java 2007-03-09 22:42:37 UTC (rev 61246)
+++ branches/tdiesler/Branch_4_2/server/src/main/org/jboss/metadata/serviceref/HandlerMetaData.java 2007-03-10 03:25:04 UTC (rev 61247)
@@ -1,178 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source.
- * Copyright 2006, Red Hat Middleware LLC, and individual contributors
- * as indicated by the @author tags. See the copyright.txt file in the
- * distribution for a full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jboss.metadata.serviceref;
-
-// $Id$
-
-import org.jboss.deployment.DeploymentException;
-import org.jboss.metadata.MetaData;
-import org.jboss.xb.QNameBuilder;
-import org.w3c.dom.Element;
-
-import javax.xml.namespace.QName;
-import java.util.ArrayList;
-import java.util.Iterator;
-import java.io.Serializable;
-
-/** The unified metdata data for a handler element
- *
- * @author Thomas.Diesler at jboss.org
- * @version $Revision$
- */
-public class HandlerMetaData implements Serializable
-{
- static final long serialVersionUID = 8749727542255024909L;
-
- // The required <handler-name> element
- private String handlerName;
- // The required <handler-class> element
- private String handlerClass;
- // The optional <init-param> elements
- private ArrayList initParams = new ArrayList();
- // The optional <soap-header> elements
- private ArrayList soapHeaders = new ArrayList();
- // The optional <soap-role> elements
- private ArrayList soapRoles = new ArrayList();
- // The optional <port-name> elements, these only apply to webserve clients
- private ArrayList portNames = new ArrayList();
-
- public void setHandlerName(String value)
- {
- this.handlerName = value;
- }
-
- public String getHandlerName()
- {
- return handlerName;
- }
-
- public void setHandlerClass(String handlerClass)
- {
- this.handlerClass = handlerClass;
- }
-
- public String getHandlerClass()
- {
- return handlerClass;
- }
-
- public void addInitParam(InitParamMetaData param)
- {
- initParams.add(param);
- }
-
- public InitParamMetaData[] getInitParams()
- {
- InitParamMetaData[] array = new InitParamMetaData[initParams.size()];
- initParams.toArray(array);
- return array;
- }
-
- public void addSoapHeader(QName qName)
- {
- soapHeaders.add(qName);
- }
-
- public QName[] getSoapHeaders()
- {
- QName[] array = new QName[soapHeaders.size()];
- soapHeaders.toArray(array);
- return array;
- }
-
- public void addSoapRole(String value)
- {
- soapRoles.add(value);
- }
-
- public String[] getSoapRoles()
- {
- String[] array = new String[soapRoles.size()];
- soapRoles.toArray(array);
- return array;
- }
-
- public String[] getPortNames()
- {
- String[] array = new String[portNames.size()];
- portNames.toArray(array);
- return array;
- }
-
- public void importStandardXml(Element element)
- throws DeploymentException
- {
- handlerName = MetaData.getUniqueChildContent(element, "handler-name");
-
- handlerClass = MetaData.getUniqueChildContent(element, "handler-class");
-
- // Parse the init-param elements
- Iterator iterator = MetaData.getChildrenByTagName(element, "init-param");
- while (iterator.hasNext())
- {
- Element paramElement = (Element) iterator.next();
- InitParamMetaData param = new InitParamMetaData();
- param.setParamName(MetaData.getUniqueChildContent(paramElement, "param-name"));
- param.setParamValue(MetaData.getUniqueChildContent(paramElement, "param-value"));
- initParams.add(param);
- }
-
- // Parse the soap-header elements
- iterator = MetaData.getChildrenByTagName(element, "soap-header");
- while (iterator.hasNext())
- {
- Element headerElement = (Element) iterator.next();
- String content = MetaData.getElementContent(headerElement);
- QName qname = QNameBuilder.buildQName(headerElement, content);
- soapHeaders.add(qname);
- }
-
- // Parse the soap-role elements
- iterator = MetaData.getChildrenByTagName(element, "soap-role");
- while (iterator.hasNext())
- {
- Element roleElement = (Element) iterator.next();
- String content = MetaData.getElementContent(roleElement);
- soapRoles.add(content);
- }
-
- // Parse the port-name elements
- iterator = MetaData.getChildrenByTagName(element, "port-name");
- while (iterator.hasNext())
- {
- Element portElement = (Element) iterator.next();
- String content = MetaData.getElementContent(portElement);
- portNames.add(content);
- }
- }
-
- public String toString() {
- StringBuffer buffer = new StringBuffer("\nHandlerMetaData:");
- buffer.append("\n name=" + handlerName);
- buffer.append("\n class=" + handlerClass);
- buffer.append("\n params=" + initParams);
- buffer.append("\n headers=" + soapHeaders);
- buffer.append("\n roles=" + soapRoles);
- buffer.append("\n ports=" + portNames);
- return buffer.toString();
- }
-}
Deleted: branches/tdiesler/Branch_4_2/server/src/main/org/jboss/metadata/serviceref/InitParamMetaData.java
===================================================================
--- branches/tdiesler/Branch_4_2/server/src/main/org/jboss/metadata/serviceref/InitParamMetaData.java 2007-03-09 22:42:37 UTC (rev 61246)
+++ branches/tdiesler/Branch_4_2/server/src/main/org/jboss/metadata/serviceref/InitParamMetaData.java 2007-03-10 03:25:04 UTC (rev 61247)
@@ -1,68 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source.
- * Copyright 2006, Red Hat Middleware LLC, and individual contributors
- * as indicated by the @author tags. See the copyright.txt file in the
- * distribution for a full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jboss.metadata.serviceref;
-
-// $Id$
-
-import java.io.Serializable;
-
-/**
- * XML Binding and ws4ee meta-data element for
- * <code>webservices/webservice-description/port-component/handler/init-param</code>
- *
- * @author Thomas.Diesler at jboss.org
- * @since 06-May-2004
- */
-public class InitParamMetaData implements Serializable
-{
- static final long serialVersionUID = 849652901282654531L;
-
- // The required <handler-name> element
- private String paramName;
- // The required <handler-class> element
- private String paramValue;
-
- public String getParamName()
- {
- return paramName;
- }
-
- public void setParamName(String paramName)
- {
- this.paramName = paramName;
- }
-
- public String getParamValue()
- {
- return paramValue;
- }
-
- public void setParamValue(String paramValue)
- {
- this.paramValue = paramValue;
- }
-
- public String toString()
- {
- return "[name=" + paramName + ",value=" + paramValue + "]";
- }
-}
Deleted: branches/tdiesler/Branch_4_2/server/src/main/org/jboss/metadata/serviceref/PortComponentRefMetaData.java
===================================================================
--- branches/tdiesler/Branch_4_2/server/src/main/org/jboss/metadata/serviceref/PortComponentRefMetaData.java 2007-03-09 22:42:37 UTC (rev 61246)
+++ branches/tdiesler/Branch_4_2/server/src/main/org/jboss/metadata/serviceref/PortComponentRefMetaData.java 2007-03-10 03:25:04 UTC (rev 61247)
@@ -1,127 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source.
- * Copyright 2006, Red Hat Middleware LLC, and individual contributors
- * as indicated by the @author tags. See the copyright.txt file in the
- * distribution for a full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jboss.metadata.serviceref;
-
-// $Id$
-
-import org.jboss.deployment.DeploymentException;
-import org.jboss.metadata.MetaData;
-import org.w3c.dom.Element;
-
-import javax.xml.rpc.JAXRPCException;
-import java.io.Serializable;
-import java.util.Properties;
-import java.util.Iterator;
-
-/** The metdata data from service-ref/port-component-ref element in web.xml, ejb-jar.xml, and application-client.xml.
- *
- * @author Thomas.Diesler at jboss.org
- * @version $Revision$
- */
-public class PortComponentRefMetaData implements Serializable
-{
- static final long serialVersionUID = 3856598615591044263L;
-
- // The parent service-ref
- private ServiceRefMetaData serviceRefMetaData;
-
- // The required <service-endpoint-interface> element
- private String serviceEndpointInterface;
- // The optional <port-component-link> element
- private String portComponentLink;
-
- /** Arbitrary proxy properties given by <call-property> */
- private Properties callProperties;
-
- public PortComponentRefMetaData(ServiceRefMetaData serviceRefMetaData)
- {
- this.serviceRefMetaData = serviceRefMetaData;
- }
-
- public ServiceRefMetaData getServiceRefMetaData()
- {
- return serviceRefMetaData;
- }
-
- /**
- * The port-component-link element links a port-component-ref
- * to a specific port-component required to be made available
- * by a service reference.
- *
- * The value of a port-component-link must be the
- * port-component-name of a port-component in the same module
- * or another module in the same application unit. The syntax
- * for specification follows the syntax defined for ejb-link
- * in the EJB 2.0 specification.
- */
- public String getPortComponentLink()
- {
- return portComponentLink;
- }
-
- public String getServiceEndpointInterface()
- {
- return serviceEndpointInterface;
- }
-
- public Class getServiceEndpointInterfaceClass()
- {
- try
- {
- ClassLoader cl = serviceRefMetaData.getResourceCL();
- return cl.loadClass(serviceEndpointInterface);
- }
- catch (ClassNotFoundException e)
- {
- throw new JAXRPCException("Cannot load service endpoint interface: " + serviceEndpointInterface);
- }
- }
-
- public Properties getCallProperties()
- {
- return callProperties;
- }
-
- public void importStandardXml(Element element)
- throws DeploymentException
- {
- serviceEndpointInterface = MetaData.getUniqueChildContent(element, "service-endpoint-interface");
-
- portComponentLink = MetaData.getOptionalChildContent(element, "port-component-link");
- }
-
- public void importJBossXml(Element element) throws DeploymentException
- {
- // Look for call-property elements
- Iterator iterator = MetaData.getChildrenByTagName(element, "call-property");
- while (iterator.hasNext())
- {
- Element propElement = (Element) iterator.next();
- String name = MetaData.getUniqueChildContent(propElement, "prop-name");
- String value = MetaData.getUniqueChildContent(propElement, "prop-value");
- if( callProperties == null )
- callProperties = new Properties();
- callProperties.setProperty(name, value);
- }
-
- }
-}
Added: branches/tdiesler/Branch_4_2/server/src/main/org/jboss/metadata/serviceref/ServiceRefDelegate.java
===================================================================
--- branches/tdiesler/Branch_4_2/server/src/main/org/jboss/metadata/serviceref/ServiceRefDelegate.java (rev 0)
+++ branches/tdiesler/Branch_4_2/server/src/main/org/jboss/metadata/serviceref/ServiceRefDelegate.java 2007-03-10 03:25:04 UTC (rev 61247)
@@ -0,0 +1,105 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.metadata.serviceref;
+
+// $Id$
+
+import javax.naming.Context;
+import javax.naming.NamingException;
+import javax.xml.soap.FactoryLoader;
+
+import org.jboss.kernel.Kernel;
+import org.jboss.kernel.spi.registry.KernelRegistry;
+import org.jboss.kernel.spi.registry.KernelRegistryEntry;
+import org.jboss.logging.Logger;
+import org.jboss.ws.integration.KernelLocator;
+import org.jboss.ws.integration.ServiceRefElement;
+import org.jboss.ws.integration.ServiceRefHandler;
+import org.jboss.ws.integration.ServiceRefMetaData;
+import org.jboss.ws.integration.UnifiedVirtualFile;
+import org.jboss.xb.binding.UnmarshallingContext;
+import org.xml.sax.Attributes;
+
+/**
+ * Factory for ServiceRefHandler
+ *
+ * @author Thomas.Diesler at jboss.org
+ * @since 05-May-2004
+ */
+public class ServiceRefDelegate implements ServiceRefHandler
+{
+ // provide logging
+ private static final Logger log = Logger.getLogger(ServiceRefDelegate.class);
+
+ private static ServiceRefHandler delegate;
+
+ public ServiceRefDelegate()
+ {
+ if (delegate == null)
+ {
+ Kernel kernel = KernelLocator.getKernel();
+ if (kernel != null)
+ {
+ KernelRegistry registry = kernel.getRegistry();
+ KernelRegistryEntry entry = registry.getEntry(ServiceRefHandler.BEAN_NAME);
+ delegate = (ServiceRefHandler)entry.getTarget();
+ }
+ else
+ {
+ String propName = ServiceRefHandler.class.getName();
+ String defaultImpl = "org.jboss.ws.core.client.ServiceRefHandlerImpl";
+ delegate = (ServiceRefHandler)FactoryLoader.loadFactory(propName, defaultImpl);
+ }
+ }
+
+ if (delegate == null)
+ log.warn("Not registered: " + ServiceRefHandler.BEAN_NAME);
+ }
+
+ public ServiceRefMetaData newServiceRefMetaData()
+ {
+ ServiceRefMetaData sref = null;
+ if (delegate != null)
+ sref = delegate.newServiceRefMetaData();
+ return sref;
+ }
+
+ public Object newChild(ServiceRefElement ref, UnmarshallingContext navigator, String namespaceURI, String localName, Attributes attrs)
+ {
+ Object child = null;
+ if (delegate != null)
+ child = delegate.newChild(ref, navigator, namespaceURI, localName, attrs);
+ return child;
+ }
+
+ public void setValue(ServiceRefElement ref, UnmarshallingContext navigator, String namespaceURI, String localName, String value)
+ {
+ if (delegate != null)
+ delegate.setValue(ref, navigator, namespaceURI, localName, value);
+ }
+
+ public void bindServiceRef(Context encCtx, String encName, UnifiedVirtualFile vfsRoot, ServiceRefMetaData sref) throws NamingException
+ {
+ if (delegate != null)
+ delegate.bindServiceRef(encCtx, encName, vfsRoot, sref);
+ }
+}
Property changes on: branches/tdiesler/Branch_4_2/server/src/main/org/jboss/metadata/serviceref/ServiceRefDelegate.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Deleted: branches/tdiesler/Branch_4_2/server/src/main/org/jboss/metadata/serviceref/ServiceRefHandler.java
===================================================================
--- branches/tdiesler/Branch_4_2/server/src/main/org/jboss/metadata/serviceref/ServiceRefHandler.java 2007-03-09 22:42:37 UTC (rev 61246)
+++ branches/tdiesler/Branch_4_2/server/src/main/org/jboss/metadata/serviceref/ServiceRefHandler.java 2007-03-10 03:25:04 UTC (rev 61247)
@@ -1,50 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source.
- * Copyright 2006, Red Hat Middleware LLC, and individual contributors
- * as indicated by the @author tags. See the copyright.txt file in the
- * distribution for a full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jboss.metadata.serviceref;
-
-// $Id$
-
-import java.util.Iterator;
-
-import javax.naming.Context;
-
-import org.jboss.deployment.DeploymentException;
-import org.jboss.deployment.DeploymentInfo;
-
-/**
- * Implemtent to bind JAXRPC ServiceRefs
- *
- * @author Thomas.Diesler at jboss.org
- * @since 05-May-2004
- */
-public interface ServiceRefHandler
-{
- /**
- * Binds a JAXRPC Service into the callers ENC for every service-ref element
- *
- * @param envCtx ENC to bind the javax.rpc.xml.Service object to
- * @param serviceRefs An iterator of the service-ref elements in the client deployment descriptor
- * @param di The client's deployment info
- * @throws org.jboss.deployment.DeploymentException if it goes wrong
- */
- void bindServiceRefs(Context envCtx, Iterator serviceRefs, DeploymentInfo di) throws DeploymentException;
-}
Deleted: branches/tdiesler/Branch_4_2/server/src/main/org/jboss/metadata/serviceref/ServiceRefHandlerFactory.java
===================================================================
--- branches/tdiesler/Branch_4_2/server/src/main/org/jboss/metadata/serviceref/ServiceRefHandlerFactory.java 2007-03-09 22:42:37 UTC (rev 61246)
+++ branches/tdiesler/Branch_4_2/server/src/main/org/jboss/metadata/serviceref/ServiceRefHandlerFactory.java 2007-03-10 03:25:04 UTC (rev 61247)
@@ -1,63 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source.
- * Copyright 2006, Red Hat Middleware LLC, and individual contributors
- * as indicated by the @author tags. See the copyright.txt file in the
- * distribution for a full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jboss.metadata.serviceref;
-
-// $Id$
-
-import javax.management.MBeanServer;
-import javax.management.ObjectName;
-
-import org.jboss.logging.Logger;
-import org.jboss.mx.util.MBeanProxyExt;
-import org.jboss.mx.util.MBeanServerLocator;
-import org.jboss.mx.util.ObjectNameFactory;
-
-/**
- * JBossWS client deployment over JMX
- *
- * @author Thomas.Diesler at jboss.org
- * @since 05-May-2004
- */
-public class ServiceRefHandlerFactory
-{
- // provide logging
- private static final Logger log = Logger.getLogger(ServiceRefHandlerFactory.class);
-
- /** Get the ServiceRefHandler MBean proxy
- */
- public static ServiceRefHandler newInstance()
- {
- MBeanServer server = MBeanServerLocator.locateJBoss();
- ObjectName objectName = ObjectNameFactory.create("jboss.ws:service=ServiceRefHandler");
-
- ServiceRefHandler refHandler = null;
- if (server.isRegistered(objectName))
- {
- refHandler = (ServiceRefHandler)MBeanProxyExt.create(ServiceRefHandler.class, objectName, server);
- }
- else
- {
- log.warn("Not registered: " + objectName);
- }
- return refHandler;
- }
-}
Deleted: branches/tdiesler/Branch_4_2/server/src/main/org/jboss/metadata/serviceref/ServiceRefMetaData.java
===================================================================
--- branches/tdiesler/Branch_4_2/server/src/main/org/jboss/metadata/serviceref/ServiceRefMetaData.java 2007-03-09 22:42:37 UTC (rev 61246)
+++ branches/tdiesler/Branch_4_2/server/src/main/org/jboss/metadata/serviceref/ServiceRefMetaData.java 2007-03-10 03:25:04 UTC (rev 61247)
@@ -1,316 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source.
- * Copyright 2006, Red Hat Middleware LLC, and individual contributors
- * as indicated by the @author tags. See the copyright.txt file in the
- * distribution for a full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jboss.metadata.serviceref;
-
-// $Id$
-
-import java.io.Serializable;
-import java.net.MalformedURLException;
-import java.net.URL;
-import java.net.URLClassLoader;
-import java.util.ArrayList;
-import java.util.Iterator;
-import java.util.LinkedHashMap;
-import java.util.Properties;
-
-import javax.xml.namespace.QName;
-
-import org.jboss.deployment.DeploymentException;
-import org.jboss.metadata.MetaData;
-import org.jboss.xb.QNameBuilder;
-import org.w3c.dom.Element;
-
-/** The metdata data from service-ref element in web.xml, ejb-jar.xml, and
- * application-client.xml.
- *
- * @author Thomas.Diesler at jboss.org
- * @version $Revision$
- */
-public class ServiceRefMetaData implements Serializable
-{
- private static final long serialVersionUID = -3723577995017108437L;
-
- // The required <service-ref-name> element
- private String serviceRefName;
- // The required <service-interface> element
- private String serviceInterface;
- // The optional <wsdl-file> element
- private String wsdlFile;
- // The optional <jaxrpc-mapping-file> element
- private String jaxrpcMappingFile;
- // The optional <service-qname> element
- private QName serviceQName;
- // The LinkedHashMap<String, PortComponentRefMetaData> for <port-component-ref> elements
- private LinkedHashMap portComponentRefs = new LinkedHashMap();
- // The optional <handler> elements
- private ArrayList handlers = new ArrayList();
-
- // The optional JBossWS config-name
- private String configName;
- // The optional JBossWS config-file
- private String configFile;
- /** The URL of the actual WSDL to use, <wsdl-override> */
- private URL wsdlOverride;
- /** Arbitrary proxy properties given by <call-property> */
- private Properties callProperties;
-
- // The wsdl definition, if we have one
- private Object wsdlDefinition;
- // The java/wsdl mapping, if we have one
- private Object javaWsdlMapping;
-
- /** The ClassLoader to load additional resources */
- private transient URLClassLoader resourceCL;
-
- /** Default constructor, used when unmarshalling on the client side
- */
- public ServiceRefMetaData()
- {
- }
-
- /** Constructor with a given resource classloader, used on the server side
- */
- public ServiceRefMetaData(URLClassLoader resourceCl)
- {
- setResourceCL(resourceCl);
- }
-
- /** Set the resource classloader that can load the wsdl file
- * On the client side this is set expicitly after unmarshalling.
- */
- public void setResourceCL(URLClassLoader resourceCL)
- {
- if (resourceCL == null)
- throw new IllegalArgumentException("ResourceClassLoader cannot be null");
-
- this.resourceCL = resourceCL;
- }
-
- public URLClassLoader getResourceCL()
- {
- if (resourceCL == null)
- resourceCL = new URLClassLoader(new URL[] {}, Thread.currentThread().getContextClassLoader());
-
- return resourceCL;
- }
-
- public String getJaxrpcMappingFile()
- {
- return jaxrpcMappingFile;
- }
-
- public URL getJavaWsdlMappingURL()
- {
- URL mappingURL = null;
- if (jaxrpcMappingFile != null)
- {
- mappingURL = getResourceCL().findResource(jaxrpcMappingFile);
- if (mappingURL == null)
- throw new IllegalStateException("Cannot find resource: " + jaxrpcMappingFile);
- }
- return mappingURL;
- }
-
- public Object getJavaWsdlMapping()
- {
- return javaWsdlMapping;
- }
-
- public void setJavaWsdlMapping(Object javaWsdlMapping)
- {
- this.javaWsdlMapping = javaWsdlMapping;
- }
-
- public PortComponentRefMetaData[] getPortComponentRefs()
- {
- PortComponentRefMetaData[] array = new PortComponentRefMetaData[portComponentRefs.size()];
- portComponentRefs.values().toArray(array);
- return array;
- }
-
- public HandlerMetaData[] getHandlers()
- {
- HandlerMetaData[] array = new HandlerMetaData[handlers.size()];
- handlers.toArray(array);
- return array;
- }
-
- public String getServiceInterface()
- {
- return serviceInterface;
- }
-
- public QName getServiceQName()
- {
- return serviceQName;
- }
-
- public String getServiceRefName()
- {
- return serviceRefName;
- }
-
- public String getWsdlFile()
- {
- return wsdlFile;
- }
-
- public String getConfigFile()
- {
- return configFile;
- }
-
- public void setConfigFile(String configFile)
- {
- this.configFile = configFile;
- }
-
- public String getConfigName()
- {
- return configName;
- }
-
- public void setConfigName(String configName)
- {
- this.configName = configName;
- }
- public URL getWsdlOverride()
- {
- return wsdlOverride;
- }
-
- public URL getWsdlURL()
- {
- URL wsdlURL = wsdlOverride;
- if (wsdlURL == null && wsdlFile != null)
- {
- wsdlURL = getResourceCL().findResource(wsdlFile);
- if (wsdlURL == null)
- throw new IllegalStateException("Cannot find resource: " + wsdlFile);
- }
- return wsdlURL;
- }
-
- public Properties getCallProperties()
- {
- return callProperties;
- }
-
- public Object getWsdlDefinition()
- {
- return wsdlDefinition;
- }
-
- public void setWsdlDefinition(Object wsdlDefinition)
- {
- this.wsdlDefinition = wsdlDefinition;
- }
-
- public void importStandardXml(Element element) throws DeploymentException
- {
- serviceRefName = MetaData.getUniqueChildContent(element, "service-ref-name");
-
- serviceInterface = MetaData.getUniqueChildContent(element, "service-interface");
-
- wsdlFile = MetaData.getOptionalChildContent(element, "wsdl-file");
-
- jaxrpcMappingFile = MetaData.getOptionalChildContent(element, "jaxrpc-mapping-file");
-
- Element qnameElement = MetaData.getOptionalChild(element, "service-qname");
- if (qnameElement != null)
- serviceQName = QNameBuilder.buildQName(qnameElement, MetaData.getElementContent(qnameElement));
-
- // Parse the port-component-ref elements
- Iterator iterator = MetaData.getChildrenByTagName(element, "port-component-ref");
- while (iterator.hasNext())
- {
- Element pcrefElement = (Element)iterator.next();
- PortComponentRefMetaData pcrefMetaData = new PortComponentRefMetaData(this);
- pcrefMetaData.importStandardXml(pcrefElement);
- portComponentRefs.put(pcrefMetaData.getServiceEndpointInterface(), pcrefMetaData);
- }
-
- // Parse the handler elements
- iterator = MetaData.getChildrenByTagName(element, "handler");
- while (iterator.hasNext())
- {
- Element handlerElement = (Element)iterator.next();
- HandlerMetaData handlerMetaData = new HandlerMetaData();
- handlerMetaData.importStandardXml(handlerElement);
- handlers.add(handlerMetaData);
- }
- }
-
- /** Parse jboss specific service-ref child elements
- * @param element
- * @throws DeploymentException
- */
- public void importJBossXml(Element element) throws DeploymentException
- {
- configName = MetaData.getOptionalChildContent(element, "config-name");
-
- configFile = MetaData.getOptionalChildContent(element, "config-file");
- String wsdlOverrideOption = MetaData.getOptionalChildContent(element, "wsdl-override");
- try
- {
- if (wsdlOverrideOption != null)
- wsdlOverride = new URL(wsdlOverrideOption);
- }
- catch (MalformedURLException e)
- {
- throw new DeploymentException("Invalid WSDL override: " + wsdlOverrideOption);
- }
-
- // Parse the port-component-ref elements
- Iterator iterator = MetaData.getChildrenByTagName(element, "port-component-ref");
- while (iterator.hasNext())
- {
- Element pcrefElement = (Element)iterator.next();
- String name = MetaData.getOptionalChildContent(pcrefElement, "service-endpoint-interface");
- if (name != null)
- {
- PortComponentRefMetaData pcrefMetaData = (PortComponentRefMetaData)portComponentRefs.get(name);
- if (pcrefMetaData == null)
- {
- // Its ok to only have the <port-component-ref> in jboss.xml and not in ejb-jar.xml
- pcrefMetaData = new PortComponentRefMetaData(this);
- pcrefMetaData.importStandardXml(pcrefElement);
- portComponentRefs.put(pcrefMetaData.getServiceEndpointInterface(), pcrefMetaData);
- }
-
- pcrefMetaData.importJBossXml(pcrefElement);
- }
- }
-
- // Parse the call-property elements
- iterator = MetaData.getChildrenByTagName(element, "call-property");
- while (iterator.hasNext())
- {
- Element propElement = (Element)iterator.next();
- String name = MetaData.getUniqueChildContent(propElement, "prop-name");
- String value = MetaData.getUniqueChildContent(propElement, "prop-value");
- if (callProperties == null)
- callProperties = new Properties();
- callProperties.setProperty(name, value);
- }
- }
-}
Added: branches/tdiesler/Branch_4_2/server/src/main/org/jboss/metadata/serviceref/ServiceRefObjectFactory.java
===================================================================
--- branches/tdiesler/Branch_4_2/server/src/main/org/jboss/metadata/serviceref/ServiceRefObjectFactory.java (rev 0)
+++ branches/tdiesler/Branch_4_2/server/src/main/org/jboss/metadata/serviceref/ServiceRefObjectFactory.java 2007-03-10 03:25:04 UTC (rev 61247)
@@ -0,0 +1,80 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.metadata.serviceref;
+
+// $Id$
+
+import org.jboss.logging.Logger;
+import org.jboss.ws.integration.ServiceRefElement;
+import org.jboss.xb.binding.ObjectModelFactory;
+import org.jboss.xb.binding.UnmarshallingContext;
+import org.w3c.dom.DocumentType;
+import org.w3c.dom.Element;
+import org.xml.sax.Attributes;
+
+/**
+ * A object model factory for <service-ref>
+ *
+ * @author Thomas.Diesler at jboss.com
+ */
+public abstract class ServiceRefObjectFactory implements ObjectModelFactory
+{
+ // provide logging
+ private static Logger log = Logger.getLogger(ServiceRefObjectFactory.class);
+
+
+ public Object newChild(ServiceRefElement ref, UnmarshallingContext navigator, String namespaceURI, String localName, Attributes attrs)
+ {
+ return new ServiceRefDelegate().newChild(ref, navigator, namespaceURI, localName, attrs);
+ }
+
+ public void setValue(ServiceRefElement ref, UnmarshallingContext navigator, String namespaceURI, String localName, String value)
+ {
+ new ServiceRefDelegate().setValue(ref, navigator, namespaceURI, localName, value);
+ }
+
+ public static boolean isJ2EE14Descriptor(Element element)
+ {
+ // Verify J2EE-1.4
+ String nsURI = element.getOwnerDocument().getDocumentElement().getNamespaceURI();
+ boolean isValid = "http://java.sun.com/xml/ns/j2ee".equals(nsURI);
+
+ // Verify JBoss-4.0
+ DocumentType doctype = element.getOwnerDocument().getDoctype();
+ if (isValid == false && doctype != null)
+ {
+ String publicId = doctype.getPublicId();
+ isValid |= "-//JBoss//DTD JBOSS 4.0//EN".equals(publicId);
+ isValid |= "-//JBoss//DTD JBOSS 4.2//EN".equals(publicId);
+ isValid |= "-//JBoss//DTD Web Application 2.4//EN".equals(publicId);
+ isValid |= "-//JBoss//DTD Application Client 4.0//EN".equals(publicId);
+ isValid |= "-//JBoss//DTD Application Client 4.2//EN".equals(publicId);
+ }
+
+ if (isValid == false)
+ {
+ String dtstr = (doctype != null ? "[public=" + doctype.getPublicId() + ",system=" + doctype.getSystemId() + "]" : null);
+ log.debug("Skip <service-ref> for: nsURI=" + nsURI + ",doctype=" + dtstr);
+ }
+ return isValid;
+ }
+}
Property changes on: branches/tdiesler/Branch_4_2/server/src/main/org/jboss/metadata/serviceref/ServiceRefObjectFactory.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Modified: branches/tdiesler/Branch_4_2/server/src/main/org/jboss/web/AbstractWebDeployer.java
===================================================================
--- branches/tdiesler/Branch_4_2/server/src/main/org/jboss/web/AbstractWebDeployer.java 2007-03-09 22:42:37 UTC (rev 61246)
+++ branches/tdiesler/Branch_4_2/server/src/main/org/jboss/web/AbstractWebDeployer.java 2007-03-10 03:25:04 UTC (rev 61247)
@@ -24,11 +24,12 @@
import java.net.MalformedURLException;
import java.net.URL;
import java.net.URLClassLoader;
+import java.security.Policy;
import java.util.ArrayList;
import java.util.HashSet;
import java.util.Iterator;
import java.util.Set;
-import java.security.Policy;
+
import javax.management.MBeanServer;
import javax.naming.Context;
import javax.naming.InitialContext;
@@ -52,12 +53,14 @@
import org.jboss.metadata.ResourceEnvRefMetaData;
import org.jboss.metadata.ResourceRefMetaData;
import org.jboss.metadata.WebMetaData;
-import org.jboss.metadata.serviceref.ServiceRefHandler;
-import org.jboss.metadata.serviceref.ServiceRefHandlerFactory;
+import org.jboss.metadata.serviceref.ServiceRefDelegate;
import org.jboss.mx.loading.LoaderRepositoryFactory;
import org.jboss.util.naming.NonSerializableFactory;
import org.jboss.util.naming.Util;
import org.jboss.web.AbstractWebContainer.WebDescriptorParser;
+import org.jboss.ws.integration.ServiceRefMetaData;
+import org.jboss.ws.integration.URLLoaderAdapter;
+import org.jboss.ws.integration.UnifiedVirtualFile;
import org.omg.CORBA.ORB;
/** A template pattern class for web deployer integration into JBoss. This class
@@ -515,17 +518,24 @@
Iterator ejbLocalRefs = metaData.getEjbLocalReferences();
log.debug("linkEjbLocalRefs");
linkEjbLocalRefs(ejbLocalRefs, envCtx, di);
- Iterator serviceRefs = metaData.getServiceReferences();
log.debug("linkServiceRefs");
- ServiceRefHandler serviceRefHandler = ServiceRefHandlerFactory.newInstance();
- if (serviceRefHandler != null)
- serviceRefHandler.bindServiceRefs(envCtx, serviceRefs, di);
+ linkServiceRefs(metaData, envCtx, di);
String securityDomain = metaData.getSecurityDomain();
log.debug("linkSecurityDomain");
linkSecurityDomain(securityDomain, envCtx);
log.debug("AbstractWebContainer.parseWebAppDescriptors, End");
}
+ private void linkServiceRefs(WebMetaData metaData, Context envCtx, DeploymentInfo di) throws NamingException
+ {
+ UnifiedVirtualFile vfsRoot = new URLLoaderAdapter(di.url);
+ for (ServiceRefMetaData sref : metaData.getServiceReferences().values())
+ {
+ String refName = sref.getServiceRefName();
+ new ServiceRefDelegate().bindServiceRef(envCtx, refName, vfsRoot, sref);
+ }
+ }
+
protected void addEnvEntries(Iterator envEntries, Context envCtx)
throws ClassNotFoundException, NamingException
{
Modified: branches/tdiesler/Branch_4_2/system/.classpath
===================================================================
--- branches/tdiesler/Branch_4_2/system/.classpath 2007-03-09 22:42:37 UTC (rev 61246)
+++ branches/tdiesler/Branch_4_2/system/.classpath 2007-03-10 03:25:04 UTC (rev 61247)
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry kind="src" path="src/main"/>
- <classpathentry output="output/eclipse-test-classes" kind="src" path="src/tests"/>
+ <classpathentry kind="src" output="output/eclipse-test-classes" path="src/tests"/>
<classpathentry kind="lib" path="src/resources/tests"/>
<classpathentry kind="lib" path="/thirdparty/jboss/common/lib/jboss-common.jar"/>
<classpathentry kind="src" path="/jmx"/>
@@ -13,8 +13,8 @@
<classpathentry kind="lib" path="/thirdparty/dom4j/lib/dom4j.jar"/>
<classpathentry kind="lib" path="/thirdparty/jboss/jbossxb/lib/jboss-xml-binding.jar"/>
<classpathentry kind="lib" path="/thirdparty/junit/lib/junit.jar"/>
- <classpathentry kind="lib" path="/thirdparty/apache-xerces/lib/resolver.jar"/>
<classpathentry kind="lib" path="/thirdparty/apache-xerces/lib/xercesImpl.jar"/>
- <classpathentry kind="lib" path="/thirdparty/apache-xerces/lib/xml-apis.jar"/>
+ <classpathentry kind="lib" path="/thirdparty/apache-xml-commons/lib/xml-apis.jar"/>
+ <classpathentry kind="lib" path="/thirdparty/apache-xml-commons/lib/resolver.jar"/>
<classpathentry kind="output" path="output/eclipse-classes"/>
</classpath>
Modified: branches/tdiesler/Branch_4_2/testsuite/.classpath
===================================================================
--- branches/tdiesler/Branch_4_2/testsuite/.classpath 2007-03-09 22:42:37 UTC (rev 61246)
+++ branches/tdiesler/Branch_4_2/testsuite/.classpath 2007-03-10 03:25:04 UTC (rev 61247)
@@ -24,7 +24,7 @@
<classpathentry kind="src" path="/aspects"/>
<classpathentry kind="src" path="/hibernate-int"/>
<classpathentry kind="src" path="/test"/>
- <classpathentry kind="lib" path="/thirdparty/apache-xerces/lib/xml-apis.jar"/>
+ <classpathentry kind="lib" path="/thirdparty/apache-xml-commons/lib/xml-apis.jar"/>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
<classpathentry kind="lib" path="/thirdparty/apache-log4j/lib/log4j.jar"/>
<classpathentry kind="lib" path="/thirdparty/apache-httpclient/lib/commons-httpclient.jar"/>
Modified: branches/tdiesler/Branch_4_2/tomcat/.classpath
===================================================================
--- branches/tdiesler/Branch_4_2/tomcat/.classpath 2007-03-09 22:42:37 UTC (rev 61246)
+++ branches/tdiesler/Branch_4_2/tomcat/.classpath 2007-03-10 03:25:04 UTC (rev 61247)
@@ -31,5 +31,6 @@
<classpathentry kind="lib" path="/thirdparty/sun-jsf/lib/jsf-api.jar"/>
<classpathentry kind="lib" path="/thirdparty/sun-jsf/lib/jsf-impl.jar"/>
<classpathentry kind="lib" path="/thirdparty/jboss/serialization/lib/jboss-serialization.jar"/>
+ <classpathentry kind="lib" path="/thirdparty/jboss/jbossws/lib/jbossws-integration.jar"/>
<classpathentry kind="output" path="output/eclipse-classes"/>
</classpath>
Modified: branches/tdiesler/Branch_4_2/tomcat/build.xml
===================================================================
--- branches/tdiesler/Branch_4_2/tomcat/build.xml 2007-03-09 22:42:37 UTC (rev 61246)
+++ branches/tdiesler/Branch_4_2/tomcat/build.xml 2007-03-10 03:25:04 UTC (rev 61247)
@@ -57,6 +57,7 @@
<path refid="sun.jsf.classpath"/>
<path refid="apache.commons.classpath"/>
<path refid="apache.log4j.classpath"/>
+ <path refid="jboss.jbossws.classpath"/>
<path refid="junit.junit.classpath"/>
<path refid="dom4j.dom4j.classpath"/>
<path refid="oswego.concurrent.classpath"/>
Added: branches/tdiesler/Branch_4_2/tools/lib/org.eclipse.jdt.core_3.2.3.v_686_R32x.jar
===================================================================
(Binary files differ)
Property changes on: branches/tdiesler/Branch_4_2/tools/lib/org.eclipse.jdt.core_3.2.3.v_686_R32x.jar
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Modified: branches/tdiesler/Branch_4_2/varia/.classpath
===================================================================
--- branches/tdiesler/Branch_4_2/varia/.classpath 2007-03-09 22:42:37 UTC (rev 61246)
+++ branches/tdiesler/Branch_4_2/varia/.classpath 2007-03-10 03:25:04 UTC (rev 61247)
@@ -21,7 +21,7 @@
<classpathentry kind="lib" path="/thirdparty/apache-httpclient/lib/commons-httpclient.jar"/>
<classpathentry kind="lib" path="/thirdparty/sun-servlet/lib/servlet-api.jar"/>
<classpathentry kind="lib" path="/thirdparty/oswego-concurrent/lib/concurrent.jar"/>
- <classpathentry kind="lib" path="/thirdparty/beanshell/lib/bsh-1.3.0.jar"/>
+ <classpathentry kind="lib" path="/thirdparty/beanshell/lib/bsh.jar"/>
<classpathentry kind="lib" path="/thirdparty/apache-velocity/lib/velocity.jar"/>
<classpathentry kind="lib" path="/thirdparty/apache-xalan/lib/xalan.jar"/>
<classpathentry kind="lib" path="/thirdparty/apache-logging/lib/commons-logging.jar"/>
More information about the jboss-cvs-commits
mailing list