You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tomee.apache.org by jg...@apache.org on 2019/02/22 14:48:53 UTC
[tomee] branch master updated (ba3ac90 -> e914eba)
This is an automated email from the ASF dual-hosted git repository.
jgallimore pushed a change to branch master
in repository https://gitbox.apache.org/repos/asf/tomee.git.
from ba3ac90 Merge pull request #406 from j4fm/master
new 14bb843 Merge branch 'Enhance-Docker-Compose' of github.com:j4fm/tomee
new ea73c5e Merge remote-tracking branch 'apache/master'
new 264bd36 Merge remote-tracking branch 'apache/master'
new 898af3b creates adicional structure
new 33e7b74 updates the readme
new 3d22d43 renames package name
new bdf65b0 renames readme to adoc
new abb85c5 adds header
new 3ac61c4 Merge branch 'add_ejb_remote_call_sample' of github.com:otaviojava/tomee into add_ejb_remote_call_sample
new e914eba Add new example to the pom.
The 10 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails. The revisions
listed as "add" were already present in the repository and have only
been added to this reference.
Summary of changes:
examples/ejb-remote-call/README.adoc | 36 +++++++++++
examples/{java-modules => ejb-remote-call}/pom.xml | 70 ++++++++++------------
.../src/main/java/org/superbiz/remote/App.java} | 33 +++++-----
.../main/java/org/superbiz/remote/Calculator.java | 8 ++-
.../org/superbiz/remote/DefaultCalculator.java} | 25 ++++----
.../src/main/webapp/WEB-INF/web.xml | 1 -
examples/pom.xml | 1 +
7 files changed, 99 insertions(+), 75 deletions(-)
create mode 100644 examples/ejb-remote-call/README.adoc
copy examples/{java-modules => ejb-remote-call}/pom.xml (64%)
copy examples/{helloworld-weblogic/src/test/java/org/superbiz/hello/HelloTest.java => ejb-remote-call/src/main/java/org/superbiz/remote/App.java} (57%)
copy container/openejb-core/src/main/java/org/apache/openejb/config/ValidationRule.java => examples/ejb-remote-call/src/main/java/org/superbiz/remote/Calculator.java (85%)
copy examples/{ejb-webservice/src/main/java/org/superbiz/ws/Calculator.java => ejb-remote-call/src/main/java/org/superbiz/remote/DefaultCalculator.java} (75%)
copy examples/{ejb-webservice => ejb-remote-call}/src/main/webapp/WEB-INF/web.xml (99%)
[tomee] 07/10: renames readme to adoc
Posted by jg...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
jgallimore pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/tomee.git
commit bdf65b0398ffa1ba034e0b4632e5bb58d64aa83b
Author: Otavio Santana <ot...@gmail.com>
AuthorDate: Fri Feb 22 11:33:43 2019 -0300
renames readme to adoc
---
examples/ejb-remote-call/{README.md => README.adoc} | 0
1 file changed, 0 insertions(+), 0 deletions(-)
diff --git a/examples/ejb-remote-call/README.md b/examples/ejb-remote-call/README.adoc
similarity index 100%
rename from examples/ejb-remote-call/README.md
rename to examples/ejb-remote-call/README.adoc
[tomee] 02/10: Merge remote-tracking branch 'apache/master'
Posted by jg...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
jgallimore pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/tomee.git
commit ea73c5e19f249ef6ebafaac6e7593287dae8403f
Merge: 14bb843 7d705da
Author: Jonathan Gallimore <jo...@jrg.me.uk>
AuthorDate: Thu Feb 21 10:32:35 2019 +0000
Merge remote-tracking branch 'apache/master'
.../remote/RemoteTomEEConfiguration.java | 3 +-
docs/tomee-directory-structure.adoc | 6 +-
examples/application-composer/README.md | 6 +-
examples/cdi-realm/README.adoc | 181 ++++++++++
examples/concurrency-utils/README.adoc | 380 +++++++++++++++++++++
examples/multiple-tomee-arquillian/README.adoc | 57 ++++
examples/rest-cdi/README.md | 4 +-
examples/rest-xml-json/README.md | 4 +-
examples/simple-rest/README.md | 4 +-
.../README.adoc | 87 +++++
.../server/groovy/BeanManagerHelperTest.java | 4 +-
.../org/apache/openejb/server/cxf/FeatureTest.java | 4 +-
.../server/cxf/GlobalFeatureConfigTest.java | 4 +-
.../ServletContextListenerRegistrationTest.java | 4 +-
14 files changed, 727 insertions(+), 21 deletions(-)
[tomee] 10/10: Add new example to the pom.
Posted by jg...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
jgallimore pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/tomee.git
commit e914ebad5f17512c80d79ac0ac105be9a91766e9
Author: Jonathan Gallimore <jo...@jrg.me.uk>
AuthorDate: Fri Feb 22 14:48:08 2019 +0000
Add new example to the pom.
---
examples/pom.xml | 1 +
1 file changed, 1 insertion(+)
diff --git a/examples/pom.xml b/examples/pom.xml
index b761d83..fa82c12 100644
--- a/examples/pom.xml
+++ b/examples/pom.xml
@@ -78,6 +78,7 @@
<module>dynamic-proxy-to-access-mbean</module>
<module>ear-testing</module>
<module>ejb-examples</module>
+ <module>ejb-remote-call</module>
<module>ejb-webservice</module>
<module>groovy-cdi</module>
<module>groovy-jpa</module>
[tomee] 06/10: renames package name
Posted by jg...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
jgallimore pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/tomee.git
commit 3d22d4342357eb5a118716c71d4ec05e61007221
Author: Otavio Santana <ot...@gmail.com>
AuthorDate: Fri Feb 22 10:45:30 2019 -0300
renames package name
---
examples/ejb-remote-call/README.md | 7 ++---
examples/ejb-remote-call/client.pl | 34 ----------------------
.../main/java/org/superbiz/{ws => remote}/App.java | 4 +--
.../org/superbiz/{ws => remote}/Calculator.java | 2 +-
.../superbiz/{ws => remote}/DefaultCalculator.java | 2 +-
5 files changed, 7 insertions(+), 42 deletions(-)
diff --git a/examples/ejb-remote-call/README.md b/examples/ejb-remote-call/README.md
index c502449..752d7d9 100644
--- a/examples/ejb-remote-call/README.md
+++ b/examples/ejb-remote-call/README.md
@@ -1,10 +1,9 @@
-index-group=Misc
-type=page
-status=published
+:index-group: Misc
+:jbake-type: page
+:jbake-status: published
title=EJB Remote Call
~~~~~~
-*Help us document this example! Click the blue pencil icon in the upper right to edit this page.*
## Calculator
diff --git a/examples/ejb-remote-call/client.pl b/examples/ejb-remote-call/client.pl
deleted file mode 100644
index be0a632..0000000
--- a/examples/ejb-remote-call/client.pl
+++ /dev/null
@@ -1,34 +0,0 @@
-#!/usr/bin/env perl -w
-#============================================================
-# Licensed to the Apache Software Foundation (ASF) under one or more
-# contributor license agreements. See the NOTICE file distributed with
-# this work for additional information regarding copyright ownership.
-# The ASF licenses this file to You under the Apache License, Version 2.0
-# (the "License"); you may not use this file except in compliance with
-# the License. You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-#============================================================
-
-use SOAP::Lite;
-
-my $namespace = 'http://superbiz.org/wsdl';
-
-my $service = SOAP::Lite-> uri($namespace)
- ->proxy('http://localhost:8080/Calculator')
- ->on_action (sub { return '' } );
-
-my $method = SOAP::Data->name("ns1:multiply")
- ->attr({'xmlns:ns1' => $namespace});
-
-my @params = (
- SOAP::Data->name('arg0'=>3),
- SOAP::Data->name('arg1'=>4));
-
-print $service->call($method=>@params)->result;
diff --git a/examples/ejb-remote-call/src/main/java/org/superbiz/ws/App.java b/examples/ejb-remote-call/src/main/java/org/superbiz/remote/App.java
similarity index 90%
rename from examples/ejb-remote-call/src/main/java/org/superbiz/ws/App.java
rename to examples/ejb-remote-call/src/main/java/org/superbiz/remote/App.java
index e3661bf..36587b9 100644
--- a/examples/ejb-remote-call/src/main/java/org/superbiz/ws/App.java
+++ b/examples/ejb-remote-call/src/main/java/org/superbiz/remote/App.java
@@ -1,4 +1,4 @@
-package org.superbiz.ws;
+package org.superbiz.remote;
import javax.naming.Context;
import javax.naming.InitialContext;
@@ -13,7 +13,7 @@ public class App {
properties.put(Context.PROVIDER_URL, "http://localhost:8080/tomee/ejb");
Context ctx = new InitialContext(properties);
- Object ref = ctx.lookup("global/ejb_remote_call_war/Calculator!org.superbiz.ws.Calculator");
+ Object ref = ctx.lookup("global/ejb_remote_call_war/Calculator!org.superbiz.remote.Calculator");
Calculator calculator = Calculator.class.cast(ref);
System.out.println(calculator.sum(1, 2));
diff --git a/examples/ejb-remote-call/src/main/java/org/superbiz/ws/Calculator.java b/examples/ejb-remote-call/src/main/java/org/superbiz/remote/Calculator.java
similarity index 96%
rename from examples/ejb-remote-call/src/main/java/org/superbiz/ws/Calculator.java
rename to examples/ejb-remote-call/src/main/java/org/superbiz/remote/Calculator.java
index 176a856..09232ad 100644
--- a/examples/ejb-remote-call/src/main/java/org/superbiz/ws/Calculator.java
+++ b/examples/ejb-remote-call/src/main/java/org/superbiz/remote/Calculator.java
@@ -14,7 +14,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package org.superbiz.ws;
+package org.superbiz.remote;
public interface Calculator {
diff --git a/examples/ejb-remote-call/src/main/java/org/superbiz/ws/DefaultCalculator.java b/examples/ejb-remote-call/src/main/java/org/superbiz/remote/DefaultCalculator.java
similarity index 93%
rename from examples/ejb-remote-call/src/main/java/org/superbiz/ws/DefaultCalculator.java
rename to examples/ejb-remote-call/src/main/java/org/superbiz/remote/DefaultCalculator.java
index 49d9e8a..7713c2a 100644
--- a/examples/ejb-remote-call/src/main/java/org/superbiz/ws/DefaultCalculator.java
+++ b/examples/ejb-remote-call/src/main/java/org/superbiz/remote/DefaultCalculator.java
@@ -1,4 +1,4 @@
-package org.superbiz.ws;
+package org.superbiz.remote;
import javax.ejb.Remote;
import javax.ejb.Stateless;
[tomee] 08/10: adds header
Posted by jg...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
jgallimore pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/tomee.git
commit abb85c55b4e9acb8cd16466b2858d1bbaae93f5e
Author: Otavio Santana <ot...@gmail.com>
AuthorDate: Fri Feb 22 11:33:50 2019 -0300
adds header
---
.../src/main/java/org/superbiz/remote/App.java | 16 ++++++++++++++++
.../src/main/java/org/superbiz/remote/Calculator.java | 8 ++++----
.../main/java/org/superbiz/remote/DefaultCalculator.java | 16 ++++++++++++++++
3 files changed, 36 insertions(+), 4 deletions(-)
diff --git a/examples/ejb-remote-call/src/main/java/org/superbiz/remote/App.java b/examples/ejb-remote-call/src/main/java/org/superbiz/remote/App.java
index 36587b9..c6396a3 100644
--- a/examples/ejb-remote-call/src/main/java/org/superbiz/remote/App.java
+++ b/examples/ejb-remote-call/src/main/java/org/superbiz/remote/App.java
@@ -1,3 +1,19 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
package org.superbiz.remote;
import javax.naming.Context;
diff --git a/examples/ejb-remote-call/src/main/java/org/superbiz/remote/Calculator.java b/examples/ejb-remote-call/src/main/java/org/superbiz/remote/Calculator.java
index 09232ad..c42487f 100644
--- a/examples/ejb-remote-call/src/main/java/org/superbiz/remote/Calculator.java
+++ b/examples/ejb-remote-call/src/main/java/org/superbiz/remote/Calculator.java
@@ -1,13 +1,13 @@
-/**
+/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
- * <p/>
- * http://www.apache.org/licenses/LICENSE-2.0
- * <p/>
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
diff --git a/examples/ejb-remote-call/src/main/java/org/superbiz/remote/DefaultCalculator.java b/examples/ejb-remote-call/src/main/java/org/superbiz/remote/DefaultCalculator.java
index 7713c2a..8021a2b 100644
--- a/examples/ejb-remote-call/src/main/java/org/superbiz/remote/DefaultCalculator.java
+++ b/examples/ejb-remote-call/src/main/java/org/superbiz/remote/DefaultCalculator.java
@@ -1,3 +1,19 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
package org.superbiz.remote;
import javax.ejb.Remote;
[tomee] 09/10: Merge branch 'add_ejb_remote_call_sample' of
github.com:otaviojava/tomee into add_ejb_remote_call_sample
Posted by jg...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
jgallimore pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/tomee.git
commit 3ac61c4f5a30759b309d170af61829c5fed11bde
Merge: 264bd36 abb85c5
Author: Jonathan Gallimore <jo...@jrg.me.uk>
AuthorDate: Fri Feb 22 14:36:40 2019 +0000
Merge branch 'add_ejb_remote_call_sample' of github.com:otaviojava/tomee into add_ejb_remote_call_sample
examples/ejb-remote-call/README.adoc | 36 ++++++++
examples/ejb-remote-call/pom.xml | 98 ++++++++++++++++++++++
.../src/main/java/org/superbiz/remote/App.java | 39 +++++++++
.../main/java/org/superbiz/remote/Calculator.java | 26 ++++++
.../org/superbiz/remote/DefaultCalculator.java | 36 ++++++++
.../src/main/webapp/WEB-INF/web.xml | 27 ++++++
6 files changed, 262 insertions(+)
[tomee] 04/10: updates the readme
Posted by jg...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
jgallimore pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/tomee.git
commit 33e7b743cdef618f544ea66feefcc8238697eae4
Author: Otavio Santana <ot...@gmail.com>
AuthorDate: Fri Feb 22 10:18:52 2019 -0300
updates the readme
---
examples/ejb-remote-call/README.md | 32 +++++++++++++++-----------------
1 file changed, 15 insertions(+), 17 deletions(-)
diff --git a/examples/ejb-remote-call/README.md b/examples/ejb-remote-call/README.md
index 379925d..c502449 100644
--- a/examples/ejb-remote-call/README.md
+++ b/examples/ejb-remote-call/README.md
@@ -8,25 +8,23 @@ title=EJB Remote Call
## Calculator
- package org.superbiz.ws;
-
- import javax.ejb.Stateless;
- import javax.jws.WebService;
-
- @Stateless
- @WebService(portName = "CalculatorPort",
- serviceName = "CalculatorWebService",
- targetNamespace = "http://superbiz.org/wsdl")
- public class Calculator {
- public int sum(int add1, int add2) {
- return add1 + add2;
- }
-
- public int multiply(int mul1, int mul2) {
- return mul1 * mul2;
- }
+
+@Stateless(name = "Calculator", description = "Calculator", mappedName = "Calculator")
+@Remote(Calculator.class)
+public class DefaultCalculator implements Calculator {
+ @Override
+ public int sum(int add1, int add2) {
+ return add1 + add2;
}
+ @Override
+ public int multiply(int mul1, int mul2) {
+ return mul1 * mul2;
+ }
+
+
+}
+
## web.xml
<web-app xmlns="http://java.sun.com/xml/ns/javaee"
[tomee] 01/10: Merge branch 'Enhance-Docker-Compose' of
github.com:j4fm/tomee
Posted by jg...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
jgallimore pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/tomee.git
commit 14bb8430cd2e046db592e5a2b2d9d94be0c5b5a9
Merge: fbd93bb dc3edcf
Author: Jonathan Gallimore <jo...@jrg.me.uk>
AuthorDate: Wed Feb 20 21:28:19 2019 +0000
Merge branch 'Enhance-Docker-Compose' of github.com:j4fm/tomee
docker-compose.yml | 63 ++++++++++++++++++++++++++++++++++++++++++++++++------
1 file changed, 57 insertions(+), 6 deletions(-)
[tomee] 03/10: creates adicional structure
Posted by jg...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
jgallimore pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/tomee.git
commit 898af3bf7ae1877aa2f59ea19c4b337af4707112
Author: Otavio Santana <ot...@gmail.com>
AuthorDate: Fri Feb 22 10:18:07 2019 -0300
creates adicional structure
---
examples/ejb-remote-call/README.md | 39 +++++++++
examples/ejb-remote-call/client.pl | 34 ++++++++
examples/ejb-remote-call/pom.xml | 98 ++++++++++++++++++++++
.../src/main/java/org/superbiz/ws/App.java | 23 +++++
.../src/main/java/org/superbiz/ws/Calculator.java | 26 ++++++
.../java/org/superbiz/ws/DefaultCalculator.java | 20 +++++
.../src/main/webapp/WEB-INF/web.xml | 27 ++++++
7 files changed, 267 insertions(+)
diff --git a/examples/ejb-remote-call/README.md b/examples/ejb-remote-call/README.md
new file mode 100644
index 0000000..379925d
--- /dev/null
+++ b/examples/ejb-remote-call/README.md
@@ -0,0 +1,39 @@
+index-group=Misc
+type=page
+status=published
+title=EJB Remote Call
+~~~~~~
+
+*Help us document this example! Click the blue pencil icon in the upper right to edit this page.*
+
+## Calculator
+
+ package org.superbiz.ws;
+
+ import javax.ejb.Stateless;
+ import javax.jws.WebService;
+
+ @Stateless
+ @WebService(portName = "CalculatorPort",
+ serviceName = "CalculatorWebService",
+ targetNamespace = "http://superbiz.org/wsdl")
+ public class Calculator {
+ public int sum(int add1, int add2) {
+ return add1 + add2;
+ }
+
+ public int multiply(int mul1, int mul2) {
+ return mul1 * mul2;
+ }
+ }
+
+## web.xml
+
+ <web-app xmlns="http://java.sun.com/xml/ns/javaee"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"
+ metadata-complete="false"
+ version="2.5">
+
+ </web-app>
+
diff --git a/examples/ejb-remote-call/client.pl b/examples/ejb-remote-call/client.pl
new file mode 100644
index 0000000..be0a632
--- /dev/null
+++ b/examples/ejb-remote-call/client.pl
@@ -0,0 +1,34 @@
+#!/usr/bin/env perl -w
+#============================================================
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements. See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#============================================================
+
+use SOAP::Lite;
+
+my $namespace = 'http://superbiz.org/wsdl';
+
+my $service = SOAP::Lite-> uri($namespace)
+ ->proxy('http://localhost:8080/Calculator')
+ ->on_action (sub { return '' } );
+
+my $method = SOAP::Data->name("ns1:multiply")
+ ->attr({'xmlns:ns1' => $namespace});
+
+my @params = (
+ SOAP::Data->name('arg0'=>3),
+ SOAP::Data->name('arg1'=>4));
+
+print $service->call($method=>@params)->result;
diff --git a/examples/ejb-remote-call/pom.xml b/examples/ejb-remote-call/pom.xml
new file mode 100644
index 0000000..f93fc57
--- /dev/null
+++ b/examples/ejb-remote-call/pom.xml
@@ -0,0 +1,98 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements. See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You under the Apache License, Version 2.0
+ (the "License"); you may not use this file except in compliance with
+ the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+-->
+
+<!-- $Rev: 684173 $ $Date: 2008-08-08 20:13:24 -0700 (Fri, 08 Aug 2008) $ -->
+
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+ <modelVersion>4.0.0</modelVersion>
+ <groupId>org.superbiz</groupId>
+ <artifactId>ejb-remote-call</artifactId>
+ <packaging>war</packaging>
+ <version>8.0.0-SNAPSHOT</version>
+ <name>OpenEJB :: Web Examples :: EJB Remote Call</name>
+ <properties>
+ <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
+ </properties>
+ <repositories>
+ <repository>
+ <id>apache-m2-snapshot</id>
+ <name>Apache Snapshot Repository</name>
+ <url>https://repository.apache.org/content/groups/snapshots</url>
+ </repository>
+ </repositories>
+ <build>
+ <defaultGoal>install</defaultGoal>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-surefire-plugin</artifactId>
+ <version>2.18.1</version>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-war-plugin</artifactId>
+ <version>3.1.0</version>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-compiler-plugin</artifactId>
+ <version>3.5.1</version>
+ <configuration>
+ <source>1.8</source>
+ <target>1.8</target>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
+ <dependencies>
+ <dependency>
+ <groupId>org.apache.tomee</groupId>
+ <artifactId>javaee-api</artifactId>
+ <version>8.0</version>
+ <scope>provided</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.openejb</groupId>
+ <artifactId>openejb-client</artifactId>
+ <version>4.7.2</version>
+ </dependency>
+ <dependency>
+ <groupId>junit</groupId>
+ <artifactId>junit</artifactId>
+ <version>4.12</version>
+ <scope>test</scope>
+ </dependency>
+ </dependencies>
+ <!--
+ This section allows you to configure where to publish libraries for sharing.
+ It is not required and may be deleted. For more information see:
+ http://maven.apache.org/plugins/maven-deploy-plugin/
+ -->
+ <distributionManagement>
+ <repository>
+ <id>localhost</id>
+ <url>file://${basedir}/target/repo/</url>
+ </repository>
+ <snapshotRepository>
+ <id>localhost</id>
+ <url>file://${basedir}/target/snapshot-repo/</url>
+ </snapshotRepository>
+ </distributionManagement>
+</project>
diff --git a/examples/ejb-remote-call/src/main/java/org/superbiz/ws/App.java b/examples/ejb-remote-call/src/main/java/org/superbiz/ws/App.java
new file mode 100644
index 0000000..e3661bf
--- /dev/null
+++ b/examples/ejb-remote-call/src/main/java/org/superbiz/ws/App.java
@@ -0,0 +1,23 @@
+package org.superbiz.ws;
+
+import javax.naming.Context;
+import javax.naming.InitialContext;
+import javax.naming.NamingException;
+import java.util.Properties;
+
+public class App {
+
+ public static void main(String[] args) throws NamingException {
+ Properties properties = new Properties();
+ properties.put(Context.INITIAL_CONTEXT_FACTORY, "org.apache.openejb.client.RemoteInitialContextFactory");
+ properties.put(Context.PROVIDER_URL, "http://localhost:8080/tomee/ejb");
+
+ Context ctx = new InitialContext(properties);
+ Object ref = ctx.lookup("global/ejb_remote_call_war/Calculator!org.superbiz.ws.Calculator");
+
+ Calculator calculator = Calculator.class.cast(ref);
+ System.out.println(calculator.sum(1, 2));
+
+
+ }
+}
diff --git a/examples/ejb-remote-call/src/main/java/org/superbiz/ws/Calculator.java b/examples/ejb-remote-call/src/main/java/org/superbiz/ws/Calculator.java
new file mode 100644
index 0000000..176a856
--- /dev/null
+++ b/examples/ejb-remote-call/src/main/java/org/superbiz/ws/Calculator.java
@@ -0,0 +1,26 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ * <p/>
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * <p/>
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.superbiz.ws;
+
+public interface Calculator {
+
+ int sum(int add1, int add2);
+
+ int multiply(int mul1, int mul2);
+
+}
+
diff --git a/examples/ejb-remote-call/src/main/java/org/superbiz/ws/DefaultCalculator.java b/examples/ejb-remote-call/src/main/java/org/superbiz/ws/DefaultCalculator.java
new file mode 100644
index 0000000..49d9e8a
--- /dev/null
+++ b/examples/ejb-remote-call/src/main/java/org/superbiz/ws/DefaultCalculator.java
@@ -0,0 +1,20 @@
+package org.superbiz.ws;
+
+import javax.ejb.Remote;
+import javax.ejb.Stateless;
+
+@Stateless(name = "Calculator", description = "Calculator", mappedName = "Calculator")
+@Remote(Calculator.class)
+public class DefaultCalculator implements Calculator {
+ @Override
+ public int sum(int add1, int add2) {
+ return add1 + add2;
+ }
+
+ @Override
+ public int multiply(int mul1, int mul2) {
+ return mul1 * mul2;
+ }
+
+
+}
diff --git a/examples/ejb-remote-call/src/main/webapp/WEB-INF/web.xml b/examples/ejb-remote-call/src/main/webapp/WEB-INF/web.xml
new file mode 100644
index 0000000..addbd2d
--- /dev/null
+++ b/examples/ejb-remote-call/src/main/webapp/WEB-INF/web.xml
@@ -0,0 +1,27 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements. See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You under the Apache License, Version 2.0
+ (the "License"); you may not use this file except in compliance with
+ the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+-->
+
+<!-- $Rev: 634170 $ $Date: 2008-03-05 21:30:10 -0800 (Wed, 05 Mar 2008) $ -->
+
+<web-app xmlns="http://java.sun.com/xml/ns/javaee"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"
+ metadata-complete="false"
+ version="2.5">
+</web-app>
[tomee] 05/10: Merge remote-tracking branch 'apache/master'
Posted by jg...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
jgallimore pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/tomee.git
commit 264bd3604c536b0b52705262603ae9913f1d2376
Merge: ea73c5e ba3ac90
Author: Jonathan Gallimore <jg...@dev.jlpsoftwareltd.net>
AuthorDate: Fri Feb 22 13:21:35 2019 +0000
Merge remote-tracking branch 'apache/master'
.../java/org/apache/openejb/cdi/CdiScanner.java | 12 +++--
.../openejb/server/cxf/rs/CxfRsHttpListener.java | 57 ++++++++++++++++------
.../apache/openejb/server/rest/RESTService.java | 4 ++
3 files changed, 54 insertions(+), 19 deletions(-)