summaryrefslogtreecommitdiffstats
path: root/java/sca/modules
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--java/sca/modules/assembly-xsd/src/main/resources/sca-1.1-cd04.xsd1
-rw-r--r--java/sca/modules/assembly-xsd/src/main/resources/sca-binding-ejb-1.1-cd01.xsd34
-rw-r--r--java/sca/modules/binding-ejb-runtime/META-INF/MANIFEST.MF3
-rw-r--r--java/sca/modules/binding-ejb-runtime/src/main/java/org/apache/tuscany/sca/binding/ejb/provider/EJBBindingProviderFactory.java22
-rw-r--r--java/sca/modules/binding-ejb-runtime/src/test/resources/account/account.composite2
-rw-r--r--java/sca/modules/binding-ejb/META-INF/MANIFEST.MF4
-rw-r--r--java/sca/modules/binding-ejb/src/main/java/org/apache/tuscany/sca/binding/ejb/EJBBinding.java6
-rw-r--r--java/sca/modules/binding-ejb/src/main/java/org/apache/tuscany/sca/binding/ejb/impl/EJBBindingImpl.java6
-rw-r--r--java/sca/modules/binding-ejb/src/main/java/org/apache/tuscany/sca/binding/ejb/impl/EJBBindingProcessor.java6
-rw-r--r--java/sca/modules/binding-ejb/src/main/resources/META-INF/services/org.apache.tuscany.sca.contribution.processor.StAXArtifactProcessor2
-rw-r--r--java/sca/modules/pom.xml2
11 files changed, 63 insertions, 25 deletions
diff --git a/java/sca/modules/assembly-xsd/src/main/resources/sca-1.1-cd04.xsd b/java/sca/modules/assembly-xsd/src/main/resources/sca-1.1-cd04.xsd
index de4620f460..b5fc21e9c0 100644
--- a/java/sca/modules/assembly-xsd/src/main/resources/sca-1.1-cd04.xsd
+++ b/java/sca/modules/assembly-xsd/src/main/resources/sca-1.1-cd04.xsd
@@ -24,6 +24,7 @@
<include schemaLocation="sca-binding-jms-1.1-cd04.xsd"/>
<include schemaLocation="sca-binding-jca-1.1-cd04.xsd"/>
<include schemaLocation="sca-binding-sca-1.1-cd04.xsd"/>
+ <include schemaLocation="sca-binding-ejb-1.1-cd01.xsd"/>
<include schemaLocation="sca-definitions-1.1-cd04.xsd"/>
<include schemaLocation="sca-policy-1.1-cd04.xsd"/>
diff --git a/java/sca/modules/assembly-xsd/src/main/resources/sca-binding-ejb-1.1-cd01.xsd b/java/sca/modules/assembly-xsd/src/main/resources/sca-binding-ejb-1.1-cd01.xsd
new file mode 100644
index 0000000000..bcb9539c40
--- /dev/null
+++ b/java/sca/modules/assembly-xsd/src/main/resources/sca-binding-ejb-1.1-cd01.xsd
@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- Copyright(C) OASIS(R) 2005,2009. All Rights Reserved. OASIS trademark,
+ IPR and other policies apply. -->
+<schema xmlns="http://www.w3.org/2001/XMLSchema" xmlns:sca="http://docs.oasis-open.org/ns/opencsa/sca/200903"
+ targetNamespace="http://docs.oasis-open.org/ns/opencsa/sca/200903"
+ elementFormDefault="qualified">
+
+ <include schemaLocation="sca-core-1.1-cd04.xsd" />
+
+ <element name="binding.ejb" type="sca:EJBSessionBeanBinding"
+ substitutionGroup="sca:binding" />
+
+ <simpleType name="VersionValue">
+ <restriction base="string">
+ <enumeration value="EJB2" />
+ <enumeration value="EJB3" />
+ </restriction>
+ </simpleType>
+
+ <complexType name="EJBSessionBeanBinding">
+ <complexContent>
+ <extension base="sca:Binding">
+ <sequence>
+ <any namespace="##other" processContents="lax" minOccurs="0"
+ maxOccurs="unbounded" />
+ </sequence>
+ <attribute name="homeInterface" type="NCName" use="optional" />
+ <attribute name="ejb-link-name" type="string" use="optional" />
+ <attribute name="ejb-version" type="sca:VersionValue" use="optional"
+ default="EJB3" />
+ </extension>
+ </complexContent>
+ </complexType>
+</schema> \ No newline at end of file
diff --git a/java/sca/modules/binding-ejb-runtime/META-INF/MANIFEST.MF b/java/sca/modules/binding-ejb-runtime/META-INF/MANIFEST.MF
index f10254dd0c..b203986264 100644
--- a/java/sca/modules/binding-ejb-runtime/META-INF/MANIFEST.MF
+++ b/java/sca/modules/binding-ejb-runtime/META-INF/MANIFEST.MF
@@ -38,5 +38,4 @@ Import-Package: javax.ejb,
org.oasisopen.sca.annotation;version="2.0.0";resolution:=optional
Bundle-SymbolicName: org.apache.tuscany.sca.binding.ejb.runtime
Bundle-DocURL: http://www.apache.org/
-
-Bundle-RequiredExecutionEnvironment: J2SE-1.5,JavaSE-1.6
+Bundle-RequiredExecutionEnvironment: J2SE-1.5,JavaSE-1.6
diff --git a/java/sca/modules/binding-ejb-runtime/src/main/java/org/apache/tuscany/sca/binding/ejb/provider/EJBBindingProviderFactory.java b/java/sca/modules/binding-ejb-runtime/src/main/java/org/apache/tuscany/sca/binding/ejb/provider/EJBBindingProviderFactory.java
index a6ea583d0b..f2647bdd2e 100644
--- a/java/sca/modules/binding-ejb-runtime/src/main/java/org/apache/tuscany/sca/binding/ejb/provider/EJBBindingProviderFactory.java
+++ b/java/sca/modules/binding-ejb-runtime/src/main/java/org/apache/tuscany/sca/binding/ejb/provider/EJBBindingProviderFactory.java
@@ -18,6 +18,8 @@
*/
package org.apache.tuscany.sca.binding.ejb.provider;
+import org.apache.tuscany.sca.assembly.Endpoint;
+import org.apache.tuscany.sca.assembly.EndpointReference;
import org.apache.tuscany.sca.binding.ejb.EJBBinding;
import org.apache.tuscany.sca.core.ExtensionPointRegistry;
import org.apache.tuscany.sca.provider.BindingProviderFactory;
@@ -25,7 +27,6 @@ import org.apache.tuscany.sca.provider.ReferenceBindingProvider;
import org.apache.tuscany.sca.provider.ServiceBindingProvider;
import org.apache.tuscany.sca.runtime.RuntimeComponent;
import org.apache.tuscany.sca.runtime.RuntimeComponentReference;
-import org.apache.tuscany.sca.runtime.RuntimeComponentService;
/**
* A factory from creating the EJB binding provider.
@@ -35,19 +36,18 @@ import org.apache.tuscany.sca.runtime.RuntimeComponentService;
public class EJBBindingProviderFactory implements BindingProviderFactory<EJBBinding> {
public EJBBindingProviderFactory(ExtensionPointRegistry extensionPoints) {
+ // empty constructor
}
-
- public ReferenceBindingProvider createReferenceBindingProvider(RuntimeComponent component,
- RuntimeComponentReference reference,
- EJBBinding binding) {
- return new EJBBindingReferenceBindingProvider(component, reference, binding);
+
+ public ReferenceBindingProvider createReferenceBindingProvider(EndpointReference endpointReference) {
+ return new EJBBindingReferenceBindingProvider((RuntimeComponent)endpointReference.getComponent(),
+ (RuntimeComponentReference)endpointReference.getReference(),
+ (EJBBinding)endpointReference.getBinding());
}
- public ServiceBindingProvider createServiceBindingProvider(RuntimeComponent component,
- RuntimeComponentService service,
- EJBBinding binding) {
- return null;
- //throw new EJBBindingException("Service Binding not supported for EJB Binding");
+ public ServiceBindingProvider createServiceBindingProvider(Endpoint endpoint) {
+ // Service Binding not supported for EJB Binding
+ return null;
}
public Class<EJBBinding> getModelType() {
diff --git a/java/sca/modules/binding-ejb-runtime/src/test/resources/account/account.composite b/java/sca/modules/binding-ejb-runtime/src/test/resources/account/account.composite
index 472ae949b9..943f82c0ed 100644
--- a/java/sca/modules/binding-ejb-runtime/src/test/resources/account/account.composite
+++ b/java/sca/modules/binding-ejb-runtime/src/test/resources/account/account.composite
@@ -17,7 +17,7 @@
* specific language governing permissions and limitations
* under the License.
-->
-<composite xmlns="http://docs.oasis-open.org/ns/opencsa/sca/200712"
+<composite xmlns="http://docs.oasis-open.org/ns/opencsa/sca/200903"
targetNamespace="http://sample"
name="account">
diff --git a/java/sca/modules/binding-ejb/META-INF/MANIFEST.MF b/java/sca/modules/binding-ejb/META-INF/MANIFEST.MF
index 9ef12193a9..a8bd2b925f 100644
--- a/java/sca/modules/binding-ejb/META-INF/MANIFEST.MF
+++ b/java/sca/modules/binding-ejb/META-INF/MANIFEST.MF
@@ -24,5 +24,5 @@ Import-Package: javax.xml.namespace,
org.apache.tuscany.sca.policy;version="2.0.0"
Bundle-SymbolicName: org.apache.tuscany.sca.binding.ejb
Bundle-DocURL: http://www.apache.org/
-
-Bundle-RequiredExecutionEnvironment: J2SE-1.5,JavaSE-1.6
+Bundle-RequiredExecutionEnvironment: J2SE-1.5,JavaSE-1.6
+
diff --git a/java/sca/modules/binding-ejb/src/main/java/org/apache/tuscany/sca/binding/ejb/EJBBinding.java b/java/sca/modules/binding-ejb/src/main/java/org/apache/tuscany/sca/binding/ejb/EJBBinding.java
index c6243266d6..afcd63e855 100644
--- a/java/sca/modules/binding-ejb/src/main/java/org/apache/tuscany/sca/binding/ejb/EJBBinding.java
+++ b/java/sca/modules/binding-ejb/src/main/java/org/apache/tuscany/sca/binding/ejb/EJBBinding.java
@@ -22,7 +22,6 @@ import javax.xml.namespace.QName;
import org.apache.tuscany.sca.assembly.Base;
import org.apache.tuscany.sca.assembly.Binding;
-import org.apache.tuscany.sca.assembly.xml.Constants;
/**
* An implementation of EJBBinding.
@@ -33,8 +32,9 @@ public interface EJBBinding extends Binding, Base {
// Constants used when describing the EJB binding
// model and for setting up defaults
String BINDING_EJB = "binding.ejb";
- QName BINDING_EJB_QNAME = new QName(Constants.SCA11_NS, BINDING_EJB);
-
+ QName BINDING_EJB_QNAME = new QName(SCA11_NS, BINDING_EJB);
+ QName TYPE = new QName(SCA11_NS, BINDING_EJB);
+
// Constants for the XML describing the EJB Binding
String HOME_INTERFACE = "homeInterface";
String EJB_LINK_NAME = "ejb-link-name";
diff --git a/java/sca/modules/binding-ejb/src/main/java/org/apache/tuscany/sca/binding/ejb/impl/EJBBindingImpl.java b/java/sca/modules/binding-ejb/src/main/java/org/apache/tuscany/sca/binding/ejb/impl/EJBBindingImpl.java
index 4abed80aa3..1207e9ecd9 100644
--- a/java/sca/modules/binding-ejb/src/main/java/org/apache/tuscany/sca/binding/ejb/impl/EJBBindingImpl.java
+++ b/java/sca/modules/binding-ejb/src/main/java/org/apache/tuscany/sca/binding/ejb/impl/EJBBindingImpl.java
@@ -18,6 +18,8 @@
*/
package org.apache.tuscany.sca.binding.ejb.impl;
+import javax.xml.namespace.QName;
+
import org.apache.tuscany.sca.binding.ejb.EJBBinding;
/**
@@ -147,6 +149,10 @@ public class EJBBindingImpl implements EJBBinding {
public void setURI(String uri) {
this.uri = uri;
}
+
+ public QName getType() {
+ return TYPE;
+ }
public boolean isUnresolved() {
return this.unresolved;
diff --git a/java/sca/modules/binding-ejb/src/main/java/org/apache/tuscany/sca/binding/ejb/impl/EJBBindingProcessor.java b/java/sca/modules/binding-ejb/src/main/java/org/apache/tuscany/sca/binding/ejb/impl/EJBBindingProcessor.java
index 49607e8716..6506114750 100644
--- a/java/sca/modules/binding-ejb/src/main/java/org/apache/tuscany/sca/binding/ejb/impl/EJBBindingProcessor.java
+++ b/java/sca/modules/binding-ejb/src/main/java/org/apache/tuscany/sca/binding/ejb/impl/EJBBindingProcessor.java
@@ -131,7 +131,6 @@ public class EJBBindingProcessor implements StAXArtifactProcessor<EJBBinding> {
ejbBinding.setSessionType(EJBBinding.SessionType.STATEFUL);
} else {
error("UnknownEJBSessionType", reader, sessionType, name);
- //throw new ContributionReadException("Unknown EJB Session Type of " + sessionType + " for " + name);
}
}
@@ -143,7 +142,6 @@ public class EJBBindingProcessor implements StAXArtifactProcessor<EJBBinding> {
ejbBinding.setEjbVersion(EJBBinding.EJBVersion.EJB3);
} else {
error("UnknownEJBVersion", reader, ejbVersion, name);
- //throw new ContributionReadException("Unknown EJB Version of " + ejbVersion + " for " + name);
}
}
@@ -167,11 +165,9 @@ public class EJBBindingProcessor implements StAXArtifactProcessor<EJBBinding> {
if (ejbBinding.getURI() != null){
writer.writeAttribute(EJBBinding.URI, ejbBinding.getURI());
- }
-
+ }
// FIXME Implement the rest
-
writer.writeEndElement();
}
diff --git a/java/sca/modules/binding-ejb/src/main/resources/META-INF/services/org.apache.tuscany.sca.contribution.processor.StAXArtifactProcessor b/java/sca/modules/binding-ejb/src/main/resources/META-INF/services/org.apache.tuscany.sca.contribution.processor.StAXArtifactProcessor
index 82e85ef067..1e45ca9f79 100644
--- a/java/sca/modules/binding-ejb/src/main/resources/META-INF/services/org.apache.tuscany.sca.contribution.processor.StAXArtifactProcessor
+++ b/java/sca/modules/binding-ejb/src/main/resources/META-INF/services/org.apache.tuscany.sca.contribution.processor.StAXArtifactProcessor
@@ -16,4 +16,4 @@
# under the License.
# Implementation class for the artifact processor extension
-org.apache.tuscany.sca.binding.ejb.impl.EJBBindingProcessor;qname=http://www.osoa.org/xmlns/sca/1.0#binding.ejb,model=org.apache.tuscany.sca.binding.ejb.EJBBinding
+org.apache.tuscany.sca.binding.ejb.impl.EJBBindingProcessor;qname=http://docs.oasis-open.org/ns/opencsa/sca/200903#binding.ejb,model=org.apache.tuscany.sca.binding.ejb.EJBBinding
diff --git a/java/sca/modules/pom.xml b/java/sca/modules/pom.xml
index f3a8276772..acd9c797a5 100644
--- a/java/sca/modules/pom.xml
+++ b/java/sca/modules/pom.xml
@@ -35,6 +35,8 @@
<module>assembly-xsd</module>
<module>binding-atom</module>
<module>binding-atom-runtime</module>
+ <module>binding-ejb</module>
+ <module>binding-ejb-runtime</module>
<module>binding-http</module>
<module>binding-http-runtime</module>
<module>binding-jms</module>