This is an automated email from the ASF dual-hosted git repository. jgallimore pushed a commit to branch tomee-1.7.x in repository https://gitbox.apache.org/repos/asf/tomee.git
commit 8089d4be0d588bbd7dac0a68b89da9a9a00fd3eb Author: Jonathan Gallimore <[email protected]> AuthorDate: Fri Feb 22 15:05:39 2019 +0000 Add tomee-maven-plugin --- examples/ejb-remote-call/pom.xml | 9 +++ .../src/test/conf/system.properties | 84 ++++++++++++++++++++++ .../src/test/java/org/superbiz/remote/App.java | 2 +- 3 files changed, 94 insertions(+), 1 deletion(-) diff --git a/examples/ejb-remote-call/pom.xml b/examples/ejb-remote-call/pom.xml index 2708914..60af4ba 100644 --- a/examples/ejb-remote-call/pom.xml +++ b/examples/ejb-remote-call/pom.xml @@ -59,6 +59,15 @@ <target>1.8</target> </configuration> </plugin> + <plugin> + <groupId>org.apache.tomee.maven</groupId> + <artifactId>tomee-maven-plugin</artifactId> + <version>8.0.0-SNAPSHOT</version> + <configuration> + <args>-Xmx512m -XX:PermSize=256m</args> + <config>${project.basedir}/src/test/conf</config> + </configuration> + </plugin> </plugins> </build> <dependencies> diff --git a/examples/ejb-remote-call/src/test/conf/system.properties b/examples/ejb-remote-call/src/test/conf/system.properties new file mode 100644 index 0000000..17df9d4 --- /dev/null +++ b/examples/ejb-remote-call/src/test/conf/system.properties @@ -0,0 +1,84 @@ +# all this properties are added at JVM system properties at startup +# here some default Apache TomEE system properties +# for more information please see http://tomee.apache.org/properties-listing.html + +# allowed packages to be deserialized, by security we denied all by default, tune tomee.serialization.class.whitelist packages to change it +tomee.remote.support = true +# tomee.serialization.class.blacklist = * +# tomee.serialization.class.whitelist = my.package +# Johnzon prevents too big string to be unserialized by default +# You can either configure it by Mapper/Parser instance or globally +# With this property: +# org.apache.johnzon.max-string-length = 8192 + +# Should a jar with at least one EJB activate CDI for this module? +# Spec says so but this can imply more (permgen) memory usage +# openejb.cdi.activated-on-ejb = true + +# openejb.check.classloader = false +# openejb.check.classloader.verbose = false + +# Activate EE default resources (ManagedExecutorService, JMSConnectionFactory if JMS is there...)openejb.environment.default = true + +# tomee.jaxws.subcontext = webservices +# tomee.jaxws.oldsubcontext = false + +# if you want to propagate a deployment on a cluster when a tomcat cluster is defined +# tomee.cluster.deployment = false + +# openejb.system.apps = true +# openejb.servicemanager.enabled = true +# openejb.jmx.active = false +# openejb.descriptors.output = false +# openejb.strict.interface.declaration = false +# openejb.conf.file = conf/tomee.xml +# openejb.debuggable-vm-hackery = false +# openejb.validation.skip = false +# openejb.webservices.enabled = true +# openejb.validation.output.level = MEDIUM +# openejb.user.mbeans.list = * +# openejb.deploymentId.format = {appId}/{ejbJarId}/{ejbName} +# openejb.jndiname.format = {deploymentId}{interfaceType.annotationName} +# openejb.deployments.package.include = .* +# openejb.deployments.package.exclude = +# openejb.autocreate.jta-datasource-from-non-jta-one = true +# openejb.altdd.prefix = +# org.apache.openejb.default.system.interceptors = +# openejb.jndiname.failoncollision = true +# openejb.wsAddress.format = /{ejbDeploymentId} +# org.apache.openejb.server.webservices.saaj.provider = +# openejb.nobanner = true +# openejb.offline = false +# openejb.jmx.active = true +# openejb.exclude-include.order = include-exclude +# openejb.additional.exclude = +# openejb.additional.include = +# openejb.crosscontext = false +# openejb.jsessionid-support = +# openejb.myfaces.disable-default-values = true +# openejb.web.xml.major = +# openjpa.Log = +# openejb.jdbc.log = false +# javax.persistence.provider = org.apache.openjpa.persistence.PersistenceProviderImpl +# javax.persistence.transactionType = +# javax.persistence.jtaDataSource = +# javax.persistence.nonJtaDataSource = +# +# Properties for JAS RS +# openejb.jaxrs.application = +# openejb.cxf-rs.wadl-generator.ignoreRequests = false +# openejb.cxf-rs.wadl-generator.ignoreMessageWriters = true +# Replace the Jonhzon JSON Providers with the following classes [comma seperated, no spaces] +# openejb.jaxrs.jsonProviders = +# +# These properties are only for cxf service (SOAP webservices) and TomEE+ +# If you don't use special tricks and sun default implementation, uncommenting these 4 lines forces TomEE to use it without overhead at all = +# javax.xml.soap.MessageFactory = com.sun.xml.messaging.saaj.soap.ver1_1.SOAPMessageFactory1_1Impl +# javax.xml.soap.SOAPFactory = com.sun.xml.messaging.saaj.soap.ver1_1.SOAPFactory1_1Impl +# javax.xml.soap.SOAPConnectionFactory = com.sun.xml.messaging.saaj.client.p2p.HttpSOAPConnectionFactory +# javax.xml.soap.MetaFactory = com.sun.xml.messaging.saaj.soap.SAAJMetaFactoryImpl +# +# Which paths / libraries should be scanned? +openejb.scan.webapp.container = true +openejb.scan.webapp.container.includes = .*(geronimo|mp-jwt|mp-common|failsafe).* +openejb.scan.webapp.container.excludes = diff --git a/examples/ejb-remote-call/src/test/java/org/superbiz/remote/App.java b/examples/ejb-remote-call/src/test/java/org/superbiz/remote/App.java index c6396a3..4ee483d 100644 --- a/examples/ejb-remote-call/src/test/java/org/superbiz/remote/App.java +++ b/examples/ejb-remote-call/src/test/java/org/superbiz/remote/App.java @@ -29,7 +29,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.remote.Calculator"); + Object ref = ctx.lookup("global/ejb-remote-call-8.0.0-SNAPSHOT/Calculator!org.superbiz.remote.Calculator"); Calculator calculator = Calculator.class.cast(ref); System.out.println(calculator.sum(1, 2));
