[tomee] branch master updated: ensure WebappWebBeansContext#getInjectableBeanManager is the correct one
This is an automated email from the ASF dual-hosted git repository. rmannibucau pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/tomee.git The following commit(s) were added to refs/heads/master by this push: new 80954e5 ensure WebappWebBeansContext#getInjectableBeanManager is the correct one 80954e5 is described below commit 80954e5ee5e71d9eedaae3c8b1fbb6bac02c4901 Author: Romain Manni-Bucau AuthorDate: Thu Oct 7 17:45:37 2021 +0200 ensure WebappWebBeansContext#getInjectableBeanManager is the correct one --- .../src/main/java/org/apache/openejb/cdi/WebappBeanManager.java | 1 + .../main/java/org/apache/openejb/cdi/WebappWebBeansContext.java | 8 2 files changed, 9 insertions(+) diff --git a/container/openejb-core/src/main/java/org/apache/openejb/cdi/WebappBeanManager.java b/container/openejb-core/src/main/java/org/apache/openejb/cdi/WebappBeanManager.java index ded4bee..fc63bf0 100644 --- a/container/openejb-core/src/main/java/org/apache/openejb/cdi/WebappBeanManager.java +++ b/container/openejb-core/src/main/java/org/apache/openejb/cdi/WebappBeanManager.java @@ -23,6 +23,7 @@ import org.apache.webbeans.component.ExtensionBean; import org.apache.webbeans.component.OwbBean; import org.apache.webbeans.config.WebBeansContext; import org.apache.webbeans.container.BeanManagerImpl; +import org.apache.webbeans.container.InjectableBeanManager; import org.apache.webbeans.context.creational.CreationalContextImpl; import org.apache.webbeans.event.EventMetadataImpl; import org.apache.webbeans.util.Asserts; diff --git a/container/openejb-core/src/main/java/org/apache/openejb/cdi/WebappWebBeansContext.java b/container/openejb-core/src/main/java/org/apache/openejb/cdi/WebappWebBeansContext.java index 6effb38..00bf9a5 100644 --- a/container/openejb-core/src/main/java/org/apache/openejb/cdi/WebappWebBeansContext.java +++ b/container/openejb-core/src/main/java/org/apache/openejb/cdi/WebappWebBeansContext.java @@ -22,12 +22,14 @@ import java.util.Properties; import org.apache.webbeans.config.WebBeansContext; import org.apache.webbeans.container.BeanManagerImpl; +import org.apache.webbeans.container.InjectableBeanManager; import org.apache.webbeans.event.NotificationManager; import javax.enterprise.inject.spi.Bean; public class WebappWebBeansContext extends WebBeansContext { private final WebBeansContext parent; +private final InjectableBeanManager ibm; private BeanManagerImpl bm; private final WebappNotificationManager webappNotificationManager; @@ -35,6 +37,12 @@ public class WebappWebBeansContext extends WebBeansContext { super(services, properties); parent = webBeansContext; webappNotificationManager = new WebappNotificationManager(this); +ibm = new InjectableBeanManager(getBeanManagerImpl()); +} + +@Override +public InjectableBeanManager getInjectableBeanManager() { +return ibm; } @SuppressWarnings("PMD.DoubleCheckedLocking")
tomee git commit: TOMEE-2366 ensure JAX-RS Feature are taken into account even without @Provider
Repository: tomee Updated Branches: refs/heads/master 0cc96a643 -> 2c1ee1f0e TOMEE-2366 ensure JAX-RS Feature are taken into account even without @Provider Project: http://git-wip-us.apache.org/repos/asf/tomee/repo Commit: http://git-wip-us.apache.org/repos/asf/tomee/commit/2c1ee1f0 Tree: http://git-wip-us.apache.org/repos/asf/tomee/tree/2c1ee1f0 Diff: http://git-wip-us.apache.org/repos/asf/tomee/diff/2c1ee1f0 Branch: refs/heads/master Commit: 2c1ee1f0e7e5532a7d2426ed9405b009fdaf01c9 Parents: 0cc96a6 Author: Romain Manni-Bucau Authored: Thu Dec 13 19:58:23 2018 +0100 Committer: Romain Manni-Bucau Committed: Thu Dec 13 19:58:23 2018 +0100 -- .../server/cxf/rs/ApplicationFeatureTest.java | 87 .../apache/openejb/server/rest/RESTService.java | 2 + 2 files changed, 89 insertions(+) -- http://git-wip-us.apache.org/repos/asf/tomee/blob/2c1ee1f0/server/openejb-cxf-rs/src/test/java/org/apache/openejb/server/cxf/rs/ApplicationFeatureTest.java -- diff --git a/server/openejb-cxf-rs/src/test/java/org/apache/openejb/server/cxf/rs/ApplicationFeatureTest.java b/server/openejb-cxf-rs/src/test/java/org/apache/openejb/server/cxf/rs/ApplicationFeatureTest.java new file mode 100644 index 000..3ae114b --- /dev/null +++ b/server/openejb-cxf-rs/src/test/java/org/apache/openejb/server/cxf/rs/ApplicationFeatureTest.java @@ -0,0 +1,87 @@ +/* + * 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.apache.openejb.server.cxf.rs; + +import static java.util.stream.Collectors.toSet; +import static org.junit.Assert.assertEquals; + +import java.util.Set; +import java.util.stream.Stream; + +import javax.ws.rs.ApplicationPath; +import javax.ws.rs.GET; +import javax.ws.rs.Path; +import javax.ws.rs.client.Client; +import javax.ws.rs.client.ClientBuilder; +import javax.ws.rs.container.ContainerRequestFilter; +import javax.ws.rs.core.Application; +import javax.ws.rs.core.Feature; +import javax.ws.rs.core.FeatureContext; +import javax.ws.rs.core.Response; + +import org.apache.cxf.jaxrs.client.WebClient; +import org.apache.openejb.junit.ApplicationComposer; +import org.apache.openejb.testing.Classes; +import org.apache.openejb.testing.EnableServices; +import org.apache.openejb.testing.RandomPort; +import org.junit.Test; +import org.junit.runner.RunWith; + +@EnableServices("jaxrs") +@RunWith(ApplicationComposer.class) +@Classes({ ApplicationFeatureTest.MyEndpoint.class, ApplicationFeatureTest.MyApp.class }) +public class ApplicationFeatureTest { +@RandomPort("http") +private int port; + +@Test +public void checkStarIsNotAnIssue() { +final Client client = ClientBuilder.newClient(); +try { +assertEquals("ok", client.target("http://localhost:; + port + "/openejb/ApplicationFeatureTest-MyApp") +.path("test") +.request().get(String.class)); +} finally { +client.close(); +} +} + +@Path("test") +public static class MyEndpoint { +@GET +public String get() { +return "failed"; +} +} + +// don't put @Provider here +public static class MyFeature implements Feature { +@Override +public boolean configure(final FeatureContext featureContext) { +featureContext.register((ContainerRequestFilter) ctx -> ctx.abortWith(Response.ok("ok").build())); +return true; +} +} + +@ApplicationPath("ApplicationFeatureTest-MyApp") +public static class MyApp extends Application { +@Override +public Set> getClasses() { +return Stream.of(MyEndpoint.class, MyFeature.class).collect(toSet()); +} +} +} http://git-wip-us.apache.org/repos/asf/tomee/blob/2c1ee1f0/server/openejb-rest/src/main/java/org/apache/openejb/server/rest/RESTService.java -- diff --git
tomee git commit: TOMEE-2266 upgrading bval tck and making tomee ones passing back
Repository: tomee Updated Branches: refs/heads/master dfe07dd00 -> f815b5036 TOMEE-2266 upgrading bval tck and making tomee ones passing back Project: http://git-wip-us.apache.org/repos/asf/tomee/repo Commit: http://git-wip-us.apache.org/repos/asf/tomee/commit/f815b503 Tree: http://git-wip-us.apache.org/repos/asf/tomee/tree/f815b503 Diff: http://git-wip-us.apache.org/repos/asf/tomee/diff/f815b503 Branch: refs/heads/master Commit: f815b503690c4ce395f3704430158c88680b4edc Parents: dfe07dd Author: Romain Manni-Bucau Authored: Tue Oct 30 15:10:28 2018 +0100 Committer: Romain Manni-Bucau Committed: Tue Oct 30 15:10:28 2018 +0100 -- .../util/classloader/URLClassLoaderFirst.java | 36 pom.xml | 2 +- tck/bval-embedded/pom.xml | 7 +--- tck/bval-tomee/pom.xml | 10 +++--- .../src/test/resources/arquillian.xml | 17 - tck/bval-tomee/src/test/resources/dev.xml | 6 +--- tck/pom.xml | 7 ++-- 7 files changed, 42 insertions(+), 43 deletions(-) -- http://git-wip-us.apache.org/repos/asf/tomee/blob/f815b503/container/openejb-core/src/main/java/org/apache/openejb/util/classloader/URLClassLoaderFirst.java -- diff --git a/container/openejb-core/src/main/java/org/apache/openejb/util/classloader/URLClassLoaderFirst.java b/container/openejb-core/src/main/java/org/apache/openejb/util/classloader/URLClassLoaderFirst.java index c6c9bcf..d749584 100644 --- a/container/openejb-core/src/main/java/org/apache/openejb/util/classloader/URLClassLoaderFirst.java +++ b/container/openejb-core/src/main/java/org/apache/openejb/util/classloader/URLClassLoaderFirst.java @@ -48,6 +48,7 @@ public class URLClassLoaderFirst extends URLClassLoader { // - will not match anything, that's the desired default behavior public static final Collection FORCED_SKIP = new ArrayList<>(); public static final Collection FORCED_LOAD = new ArrayList<>(); +public static final Collection FILTERABLE_RESOURCES = new ArrayList<>(); static { reloadConfig(); @@ -61,14 +62,22 @@ public class URLClassLoaderFirst extends URLClassLoader { private static final boolean ALLOW_OPEN_EJB_SYSTEM_LOADING = !Boolean.getBoolean("openejb.classloader.first.disallow-system-loading"); public static void reloadConfig() { -list(FORCED_SKIP, "openejb.classloader.forced-skip"); -list(FORCED_LOAD, "openejb.classloader.forced-load"); +list(FORCED_SKIP, "openejb.classloader.forced-skip", null); +list(FORCED_LOAD, "openejb.classloader.forced-load", null); +list(FILTERABLE_RESOURCES, "openejb.classloader.filterable-resources", +"META-INF/services/javax.validation.spi.ValidationProvider," + +"META-INF/services/javax.ws.rs.client.ClientBuilder," + +"META-INF/services/javax.json.spi.JsonProvider," + +"META-INF/services/javax.cache.spi.CachingProvider," + + "META-INF/javamail.default.providers,META-INF/javamail.default.address.map," + +"META-INF/javamail.charset.map,META-INF/mailcap," + +SLF4J_BINDER_CLASS); } -private static void list(final Collection list, final String key) { +private static void list(final Collection list, final String key, final String def) { list.clear(); -final String s = SystemInstance.get().getOptions().get(key, (String) null); +final String s = SystemInstance.get().getOptions().get(key, def); if (s != null && !s.trim().isEmpty()) { list.addAll(Arrays.asList(s.trim().split(","))); } @@ -567,24 +576,7 @@ public class URLClassLoaderFirst extends URLClassLoader { public static boolean isFilterableResource(final String name) { // currently bean validation, Slf4j, myfaces (because of enrichment) return name != null -&& ( -// bval - "META-INF/services/javax.validation.spi.ValidationProvider".equals(name) -// jaxrs 2 -|| "META-INF/services/javax.ws.rs.client.ClientBuilder".equals(name) -// jsonp -|| "META-INF/services/javax.json.spi.JsonProvider".equals(name) -// jcache -|| "META-INF/services/javax.cache.spi.CachingProvider".equals(name) -// javamail -|| "META-INF/javamail.default.providers".equals(name) -|| "META-INF/javamail.default.address.map".equals(name) -|| "META-INF/javamail.charset.map".equals(name) -|| "META-INF/mailcap".equals(name) -// myfaces -||
tomee git commit: TOMEE-2258 ensure tomee parent classloader is the correct one and not system loader (default tomcat behavior)
Repository: tomee Updated Branches: refs/heads/master d1c78d231 -> ded08b8b6 TOMEE-2258 ensure tomee parent classloader is the correct one and not system loader (default tomcat behavior) Project: http://git-wip-us.apache.org/repos/asf/tomee/repo Commit: http://git-wip-us.apache.org/repos/asf/tomee/commit/ded08b8b Tree: http://git-wip-us.apache.org/repos/asf/tomee/tree/ded08b8b Diff: http://git-wip-us.apache.org/repos/asf/tomee/diff/ded08b8b Branch: refs/heads/master Commit: ded08b8b6cfbb8689edd16125e7034e6e687bbef Parents: d1c78d2 Author: Romain Manni-Bucau Authored: Sat Oct 13 14:05:08 2018 +0200 Committer: Romain Manni-Bucau Committed: Sat Oct 13 14:05:08 2018 +0200 -- .../apache/openejb/assembler/classic/Assembler.java| 13 + .../org/apache/tomee/catalina/TomcatWebAppBuilder.java | 5 + 2 files changed, 6 insertions(+), 12 deletions(-) -- http://git-wip-us.apache.org/repos/asf/tomee/blob/ded08b8b/container/openejb-core/src/main/java/org/apache/openejb/assembler/classic/Assembler.java -- diff --git a/container/openejb-core/src/main/java/org/apache/openejb/assembler/classic/Assembler.java b/container/openejb-core/src/main/java/org/apache/openejb/assembler/classic/Assembler.java index 5e6bbfe..72659d9 100644 --- a/container/openejb-core/src/main/java/org/apache/openejb/assembler/classic/Assembler.java +++ b/container/openejb-core/src/main/java/org/apache/openejb/assembler/classic/Assembler.java @@ -388,18 +388,7 @@ public class Assembler extends AssemblerTool implements org.apache.openejb.spi.A loader.loadClass("org.apache.bval.cdi.BValExtension$AnnotatedTypeFilter")) .invoke(null, filter); } catch (final Throwable th) { -// Quick hack to fix TOMEE-2258. Needs to be addressed properly. Fallback to TCCL. -try { -final ClassLoader loader = Thread.currentThread().getContextClassLoader(); -final Object filter = loader.loadClass("org.apache.openejb.bval.BValCdiFilter").newInstance(); -loader.loadClass("org.apache.bval.cdi.BValExtension") - .getMethod( - "setAnnotatedTypeFilter", - loader.loadClass("org.apache.bval.cdi.BValExtension$AnnotatedTypeFilter")) - .invoke(null, filter); -} catch (Throwable e) { -// ignore, bval not compatible or not present -} +logger.warning("Can't setup BVal filtering, this can impact negatively performances: " + th.getMessage()); } } } http://git-wip-us.apache.org/repos/asf/tomee/blob/ded08b8b/tomee/tomee-catalina/src/main/java/org/apache/tomee/catalina/TomcatWebAppBuilder.java -- diff --git a/tomee/tomee-catalina/src/main/java/org/apache/tomee/catalina/TomcatWebAppBuilder.java b/tomee/tomee-catalina/src/main/java/org/apache/tomee/catalina/TomcatWebAppBuilder.java index 123c8ea..4e296c3 100644 --- a/tomee/tomee-catalina/src/main/java/org/apache/tomee/catalina/TomcatWebAppBuilder.java +++ b/tomee/tomee-catalina/src/main/java/org/apache/tomee/catalina/TomcatWebAppBuilder.java @@ -285,6 +285,7 @@ public class TomcatWebAppBuilder implements WebAppBuilder, ContextListener, Pare //Getting host config listeners hosts = new Hosts(); SystemInstance.get().setComponent(Hosts.class, hosts); +final ClassLoader tccl = Thread.currentThread().getContextClassLoader(); for (final Service service : standardServer.findServices()) { if (service.getContainer() instanceof Engine) { final Engine engine = service.getContainer(); @@ -298,6 +299,10 @@ public class TomcatWebAppBuilder implements WebAppBuilder, ContextListener, Pare } parentClassLoader = engine.getParentClassLoader(); +if (parentClassLoader == ClassLoader.getSystemClassLoader() && parentClassLoader != tccl) { +parentClassLoader = tccl; +engine.setParentClassLoader(tccl); +} // else assume tomcat was setup to force a classloader and then respect it manageCluster(engine.getCluster()); hosts.setDefault(engine.getDefaultHost());
tomee git commit: finish to integrate bval 2 and finally pass bval tcks :)
Repository: tomee Updated Branches: refs/heads/fb_tomee8 bf929780a -> 24a0db4c1 finish to integrate bval 2 and finally pass bval tcks :) Project: http://git-wip-us.apache.org/repos/asf/tomee/repo Commit: http://git-wip-us.apache.org/repos/asf/tomee/commit/24a0db4c Tree: http://git-wip-us.apache.org/repos/asf/tomee/tree/24a0db4c Diff: http://git-wip-us.apache.org/repos/asf/tomee/diff/24a0db4c Branch: refs/heads/fb_tomee8 Commit: 24a0db4c1dd48e33a2eb0035c12426d2cbb38c9a Parents: bf92978 Author: Romain Manni-Bucau Authored: Thu Aug 16 09:57:45 2018 +0200 Committer: Romain Manni-Bucau Committed: Thu Aug 16 09:57:45 2018 +0200 -- .../assembler/classic/ValidationInfo.java | 6 +- .../assembler/classic/ValidatorBuilder.java | 43 +++- .../apache/openejb/config/ReadDescriptors.java | 5 +- .../apache/openejb/config/sys/JaxbOpenejb.java | 51 +++- .../openejb/jee/bval/ValidationConfigType.java | 239 --- tck/bval-embedded/src/test/resources/dev.xml| 3 +- tck/bval-tomee/src/test/resources/dev.xml | 7 +- 7 files changed, 242 insertions(+), 112 deletions(-) -- http://git-wip-us.apache.org/repos/asf/tomee/blob/24a0db4c/container/openejb-core/src/main/java/org/apache/openejb/assembler/classic/ValidationInfo.java -- diff --git a/container/openejb-core/src/main/java/org/apache/openejb/assembler/classic/ValidationInfo.java b/container/openejb-core/src/main/java/org/apache/openejb/assembler/classic/ValidationInfo.java index f67d1ab..6dfc84a 100644 --- a/container/openejb-core/src/main/java/org/apache/openejb/assembler/classic/ValidationInfo.java +++ b/container/openejb-core/src/main/java/org/apache/openejb/assembler/classic/ValidationInfo.java @@ -30,10 +30,10 @@ public class ValidationInfo extends InfoObject { public String parameterNameProviderClass; public String version; public final Properties propertyTypes = new Properties(); -public final List constraintMappings = new ArrayList(); +public final List constraintMappings = new ArrayList<>(); public boolean executableValidationEnabled; -public final List validatedTypes = new ArrayList(); +public final List validatedTypes = new ArrayList<>(); public String clockProviderClassName; -public Set valueExtractorClassNames; +public List valueExtractorClassNames; } http://git-wip-us.apache.org/repos/asf/tomee/blob/24a0db4c/container/openejb-core/src/main/java/org/apache/openejb/assembler/classic/ValidatorBuilder.java -- diff --git a/container/openejb-core/src/main/java/org/apache/openejb/assembler/classic/ValidatorBuilder.java b/container/openejb-core/src/main/java/org/apache/openejb/assembler/classic/ValidatorBuilder.java index 4999c05..0b4c40d 100644 --- a/container/openejb-core/src/main/java/org/apache/openejb/assembler/classic/ValidatorBuilder.java +++ b/container/openejb-core/src/main/java/org/apache/openejb/assembler/classic/ValidatorBuilder.java @@ -52,8 +52,11 @@ import java.io.Serializable; import java.util.Collection; import java.util.HashMap; import java.util.HashSet; +import java.util.LinkedHashSet; import java.util.LinkedList; +import java.util.List; import java.util.Map; +import java.util.Objects; import java.util.Set; public final class ValidatorBuilder { @@ -78,6 +81,8 @@ public final class ValidatorBuilder { info.traversableResolverClass = config.getTraversableResolver(); info.messageInterpolatorClass = config.getMessageInterpolator(); info.parameterNameProviderClass = config.getParameterNameProvider(); +info.valueExtractorClassNames = config.getValueExtractor(); +info.clockProviderClassName = config.getClockProvider(); final ExecutableValidationType executableValidation = config.getExecutableValidation(); if (executableValidation != null) { @@ -179,8 +184,9 @@ public final class ValidatorBuilder { final OpenEjbBootstrapConfig bootstrapConfig = new OpenEjbBootstrapConfig( providerClassName, info.constraintFactoryClass, info.messageInterpolatorClass, info.traversableResolverClass, -info.parameterNameProviderClass, new HashSet<>(info.constraintMappings), info.executableValidationEnabled, -types, props, info.clockProviderClassName, info.valueExtractorClassNames); +info.parameterNameProviderClass, new LinkedHashSet<>(info.constraintMappings), info.executableValidationEnabled, +types, props, info.clockProviderClassName, +info.valueExtractorClassNames == null ? null : new LinkedHashSet<>(info.valueExtractorClassNames)); final OpenEjbConfig config = new
tomee git commit: ensure cxf BeanValidationProvider handles validation properly and doesnt mix returned entity and methods
Repository: tomee Updated Branches: refs/heads/fb_tomee8 76cd27fc5 -> a20c7a346 ensure cxf BeanValidationProvider handles validation properly and doesnt mix returned entity and methods Project: http://git-wip-us.apache.org/repos/asf/tomee/repo Commit: http://git-wip-us.apache.org/repos/asf/tomee/commit/a20c7a34 Tree: http://git-wip-us.apache.org/repos/asf/tomee/tree/a20c7a34 Diff: http://git-wip-us.apache.org/repos/asf/tomee/diff/a20c7a34 Branch: refs/heads/fb_tomee8 Commit: a20c7a346321c83a1ab74c6aca7fc048a198f75c Parents: 76cd27f Author: Romain Manni-BucauAuthored: Wed May 16 23:14:34 2018 +0200 Committer: Romain Manni-Bucau Committed: Wed May 16 23:14:34 2018 +0200 -- .../org/apache/openejb/server/cxf/rs/CxfRsHttpListener.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) -- http://git-wip-us.apache.org/repos/asf/tomee/blob/a20c7a34/server/openejb-cxf-rs/src/main/java/org/apache/openejb/server/cxf/rs/CxfRsHttpListener.java -- diff --git a/server/openejb-cxf-rs/src/main/java/org/apache/openejb/server/cxf/rs/CxfRsHttpListener.java b/server/openejb-cxf-rs/src/main/java/org/apache/openejb/server/cxf/rs/CxfRsHttpListener.java index e10172f..e155b9d 100644 --- a/server/openejb-cxf-rs/src/main/java/org/apache/openejb/server/cxf/rs/CxfRsHttpListener.java +++ b/server/openejb-cxf-rs/src/main/java/org/apache/openejb/server/cxf/rs/CxfRsHttpListener.java @@ -886,7 +886,7 @@ public class CxfRsHttpListener implements RsHttpListener { SystemInstance.get().getProperty("openejb.cxf.rs.bval.active", serviceConfiguration.getProperties().getProperty(CXF_JAXRS_PREFIX + "bval.active", "true"))); if (factory.getFeatures() == null && bvalActive) { -factory.setFeatures(new ArrayList()); +factory.setFeatures(new ArrayList<>()); } else if (bvalActive) { // check we should activate it and user didn't configure it for (final Feature f : factory.getFeatures()) { if (BeanValidationFeature.class.isInstance(f)) { @@ -908,7 +908,7 @@ public class CxfRsHttpListener implements RsHttpListener { } } if (bvalActive) { // bval doesn't need the actual instance so faking it to avoid to lookup the bean -final BeanValidationProvider provider = new BeanValidationProvider(); +final BeanValidationProvider provider = new BeanValidationProvider(); // todo: close the factory final BeanValidationInInterceptor in = new JAXRSBeanValidationInInterceptor() { @Override @@ -926,6 +926,7 @@ public class CxfRsHttpListener implements RsHttpListener { return CxfRsHttpListener.this.getServiceObject(message); } }; +out.setEnforceOnlyBeanConstraints(true); out.setProvider(provider); out.setServiceObject(FAKE_SERVICE_OBJECT); factory.getOutInterceptors().add(out);
tomee git commit: avoid to scan too much when reactor has itest jars
Repository: tomee Updated Branches: refs/heads/fb_tomee8 4224af351 -> 76cd27fc5 avoid to scan too much when reactor has itest jars Project: http://git-wip-us.apache.org/repos/asf/tomee/repo Commit: http://git-wip-us.apache.org/repos/asf/tomee/commit/76cd27fc Tree: http://git-wip-us.apache.org/repos/asf/tomee/tree/76cd27fc Diff: http://git-wip-us.apache.org/repos/asf/tomee/diff/76cd27fc Branch: refs/heads/fb_tomee8 Commit: 76cd27fc51786789d7da609f451168b53d27a012 Parents: 4224af3 Author: Romain Manni-BucauAuthored: Wed May 16 09:39:44 2018 +0200 Committer: Romain Manni-Bucau Committed: Wed May 16 09:39:44 2018 +0200 -- .../openejb-core/src/main/resources/default.exclusions | 5 + .../org/apache/openejb/config/EarModuleNamesTest.java | 12 +--- .../org/apache/openejb/config/rules/InvokeMethod.java | 12 3 files changed, 26 insertions(+), 3 deletions(-) -- http://git-wip-us.apache.org/repos/asf/tomee/blob/76cd27fc/container/openejb-core/src/main/resources/default.exclusions -- diff --git a/container/openejb-core/src/main/resources/default.exclusions b/container/openejb-core/src/main/resources/default.exclusions index d46396b..d795634 100644 --- a/container/openejb-core/src/main/resources/default.exclusions +++ b/container/openejb-core/src/main/resources/default.exclusions @@ -33,6 +33,7 @@ axis2- batchee-jbatch bcprov- bootstrap.jar +bsh- bval-core bval-jsr byte-buddy @@ -63,6 +64,7 @@ commons-pool2- cryptacular- cssparser- cxf- +debugger-agent deploy.jar derby- derbyclient- @@ -80,6 +82,8 @@ jnr- johnzon- fusemq-leveldb- geronimo-connector +geronimo-j2ee- +geronimo-jpa_ geronimo-javamail geronimo-transaction google- @@ -141,6 +145,7 @@ jsr311- jsse.jar juli- junit- +junit5- kahadb- kotlin-runtime leveldb http://git-wip-us.apache.org/repos/asf/tomee/blob/76cd27fc/container/openejb-core/src/test/java/org/apache/openejb/config/EarModuleNamesTest.java -- diff --git a/container/openejb-core/src/test/java/org/apache/openejb/config/EarModuleNamesTest.java b/container/openejb-core/src/test/java/org/apache/openejb/config/EarModuleNamesTest.java index 7dd3e8d..cbb6096 100644 --- a/container/openejb-core/src/test/java/org/apache/openejb/config/EarModuleNamesTest.java +++ b/container/openejb-core/src/test/java/org/apache/openejb/config/EarModuleNamesTest.java @@ -23,30 +23,37 @@ import org.apache.openejb.loader.SystemInstance; import org.apache.openejb.util.Archives; import org.junit.AfterClass; import org.junit.BeforeClass; -import org.junit.Ignore; import org.junit.Test; import javax.ejb.Singleton; import java.io.File; import java.util.HashMap; import java.util.Map; +import java.util.stream.Stream; import static org.junit.Assert.assertEquals; /** * @version $Rev$ $Date$ */ -@Ignore("this needs to get properly fixed. Currently it misses the TxMgr and thus blows up") public class EarModuleNamesTest { +private static final String[] ORIGINAL_EXCLUSIONS = NewLoaderLogic.getExclusions(); + @BeforeClass public static void preventDefaults() { System.setProperty("openejb.environment.default", "false"); SystemInstance.reset(); +// we use it in a bunch of other tests but not here +NewLoaderLogic.setExclusions( +Stream.concat(Stream.of(ORIGINAL_EXCLUSIONS), +Stream.of("openejb-itest", "failover-ejb")) + .toArray(String[]::new)); } @AfterClass public static void reset() { System.clearProperty("openejb.environment.default"); +NewLoaderLogic.setExclusions(ORIGINAL_EXCLUSIONS); SystemInstance.reset(); } @@ -217,7 +224,6 @@ public class EarModuleNamesTest { assertEquals("testIdWebapp", appInfo.webApps.get(0).moduleId); } - @Singleton public static class Orange { http://git-wip-us.apache.org/repos/asf/tomee/blob/76cd27fc/container/openejb-core/src/test/java/org/apache/openejb/config/rules/InvokeMethod.java -- diff --git a/container/openejb-core/src/test/java/org/apache/openejb/config/rules/InvokeMethod.java b/container/openejb-core/src/test/java/org/apache/openejb/config/rules/InvokeMethod.java index 7ef0dbd..d7c6eb0 100644 --- a/container/openejb-core/src/test/java/org/apache/openejb/config/rules/InvokeMethod.java +++ b/container/openejb-core/src/test/java/org/apache/openejb/config/rules/InvokeMethod.java @@ -22,6 +22,7 @@ import org.apache.openejb.assembler.classic.TransactionServiceInfo; import org.apache.openejb.config.AppModule; import
tomee git commit: TOMEE-2179 tomcat 9.0.8
Repository: tomee Updated Branches: refs/heads/fb_tomee8 b6a013f65 -> 488c43ae2 TOMEE-2179 tomcat 9.0.8 Project: http://git-wip-us.apache.org/repos/asf/tomee/repo Commit: http://git-wip-us.apache.org/repos/asf/tomee/commit/488c43ae Tree: http://git-wip-us.apache.org/repos/asf/tomee/tree/488c43ae Diff: http://git-wip-us.apache.org/repos/asf/tomee/diff/488c43ae Branch: refs/heads/fb_tomee8 Commit: 488c43ae201a8cbbe8b1bd9f811346e3d07f09b1 Parents: b6a013f Author: Romain Manni-BucauAuthored: Fri May 4 09:29:02 2018 +0200 Committer: Romain Manni-Bucau Committed: Fri May 4 09:29:02 2018 +0200 -- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/tomee/blob/488c43ae/pom.xml -- diff --git a/pom.xml b/pom.xml index a92188d..d7844b1 100644 --- a/pom.xml +++ b/pom.xml @@ -132,7 +132,7 @@ 2.0.0 1.2.6 -9.0.6 +9.0.8 3.2.4 2.10.3
tomee git commit: TOMEE-2184 myfaces 2.3.1
Repository: tomee Updated Branches: refs/heads/fb_tomee8 6d591bbbd -> b6a013f65 TOMEE-2184 myfaces 2.3.1 Project: http://git-wip-us.apache.org/repos/asf/tomee/repo Commit: http://git-wip-us.apache.org/repos/asf/tomee/commit/b6a013f6 Tree: http://git-wip-us.apache.org/repos/asf/tomee/tree/b6a013f6 Diff: http://git-wip-us.apache.org/repos/asf/tomee/diff/b6a013f6 Branch: refs/heads/fb_tomee8 Commit: b6a013f65ed5ba143db74790727053a2f55cec3f Parents: 6d591bb Author: Romain Manni-BucauAuthored: Thu May 3 16:08:43 2018 +0200 Committer: Romain Manni-Bucau Committed: Thu May 3 16:08:43 2018 +0200 -- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/tomee/blob/b6a013f6/pom.xml -- diff --git a/pom.xml b/pom.xml index 23768c0..a92188d 100644 --- a/pom.xml +++ b/pom.xml @@ -175,7 +175,7 @@ 3.1.4 1.1 1.9.0-alpha-2 -2.3.0 +2.3.1 2.3.3 1.7.21 1.2.17
[14/32] tomee git commit: Merge branch 'master' into master_j9
Merge branch 'master' into master_j9 Project: http://git-wip-us.apache.org/repos/asf/tomee/repo Commit: http://git-wip-us.apache.org/repos/asf/tomee/commit/53e21ef3 Tree: http://git-wip-us.apache.org/repos/asf/tomee/tree/53e21ef3 Diff: http://git-wip-us.apache.org/repos/asf/tomee/diff/53e21ef3 Branch: refs/heads/fb_tomee8 Commit: 53e21ef3f0aa3f1c2e5071326ef98b3dad8d12c0 Parents: 65a131e f8764fe Author: Jonathan GallimoreAuthored: Tue Feb 20 11:07:53 2018 + Committer: Jonathan Gallimore Committed: Tue Feb 20 11:07:53 2018 + -- .../java/org/apache/openejb/arquillian/tests/jms/EnvEntryTest.java | 2 ++ 1 file changed, 2 insertions(+) --
[26/32] tomee git commit: Removed MicroProfileClassLoaderEnricher. Using configuration to pass jar prefixes to scan in TomEEClassLoaderEnricher.
Removed MicroProfileClassLoaderEnricher. Using configuration to pass jar prefixes to scan in TomEEClassLoaderEnricher. Project: http://git-wip-us.apache.org/repos/asf/tomee/repo Commit: http://git-wip-us.apache.org/repos/asf/tomee/commit/6c8604cd Tree: http://git-wip-us.apache.org/repos/asf/tomee/tree/6c8604cd Diff: http://git-wip-us.apache.org/repos/asf/tomee/diff/6c8604cd Branch: refs/heads/fb_tomee8 Commit: 6c8604cdb54c1473d2f03b9044313ab527eb245c Parents: dd524e5 Author: Roberto CortezAuthored: Tue Mar 6 00:48:06 2018 + Committer: Roberto Cortez Committed: Tue Mar 6 00:48:06 2018 + -- .../org/apache/tomee/catalina/TomcatLoader.java | 4 +- .../MicroProfileClassLoaderEnricher.java| 53 .../tomee/microprofile/MicroProfileService.java | 26 +- 3 files changed, 15 insertions(+), 68 deletions(-) -- http://git-wip-us.apache.org/repos/asf/tomee/blob/6c8604cd/tomee/tomee-catalina/src/main/java/org/apache/tomee/catalina/TomcatLoader.java -- diff --git a/tomee/tomee-catalina/src/main/java/org/apache/tomee/catalina/TomcatLoader.java b/tomee/tomee-catalina/src/main/java/org/apache/tomee/catalina/TomcatLoader.java index 22d9337..b8baad1 100644 --- a/tomee/tomee-catalina/src/main/java/org/apache/tomee/catalina/TomcatLoader.java +++ b/tomee/tomee-catalina/src/main/java/org/apache/tomee/catalina/TomcatLoader.java @@ -221,6 +221,8 @@ public class TomcatLoader implements Loader { // for compatibility purpose, no more used normally by our trunk SystemInstance.get().setComponent(WebDeploymentListeners.class, new WebDeploymentListeners()); +optionalService(properties, "org.apache.tomee.microprofile.MicroProfileService"); + // tomee webapp enricher final TomEEClassLoaderEnricher classLoaderEnricher = new TomEEClassLoaderEnricher(); SystemInstance.get().setComponent(WebAppEnricher.class, classLoaderEnricher); @@ -234,8 +236,6 @@ public class TomcatLoader implements Loader { } } -optionalService(properties, "org.apache.tomee.microprofile.MicroProfileService"); - // optional services if (optionalService(properties, "org.apache.tomee.webservices.TomeeJaxRsService")) { // in embedded mode we use regex, in tomcat we use tomcat servlet mapping http://git-wip-us.apache.org/repos/asf/tomee/blob/6c8604cd/tomee/tomee-microprofile/src/main/java/org/apache/tomee/microprofile/MicroProfileClassLoaderEnricher.java -- diff --git a/tomee/tomee-microprofile/src/main/java/org/apache/tomee/microprofile/MicroProfileClassLoaderEnricher.java b/tomee/tomee-microprofile/src/main/java/org/apache/tomee/microprofile/MicroProfileClassLoaderEnricher.java deleted file mode 100644 index 7100f87..000 --- a/tomee/tomee-microprofile/src/main/java/org/apache/tomee/microprofile/MicroProfileClassLoaderEnricher.java +++ /dev/null @@ -1,53 +0,0 @@ -/* - * 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.apache.tomee.microprofile; - -import org.apache.openejb.classloader.WebAppEnricher; -import org.apache.tomee.installer.Paths; - -import java.io.File; -import java.net.MalformedURLException; -import java.net.URL; -import java.util.Collection; -import java.util.HashSet; - -public class MicroProfileClassLoaderEnricher implements WebAppEnricher { -private static final String[] MICROPROFILE_LIBS_IMPLS_PREFIXES = new String[]{ -"geronimo-config-impl" -}; - -@SuppressWarnings("Duplicates") -@Override -public URL[] enrichment(final ClassLoader webappClassLaoder) { -final Collection urls = new HashSet<>(); - -// from prefix -final Paths paths = new Paths(new File(System.getProperty("openejb.home"))); // parameter is useless -for (final String prefix : MICROPROFILE_LIBS_IMPLS_PREFIXES) { -final File file = paths.findTomEELibJar(prefix); -
[30/32] tomee git commit: applygin Roberto's PR about MP distro + MP-config TCK + fixing pom merge issues
applygin Roberto's PR about MP distro + MP-config TCK + fixing pom merge issues Project: http://git-wip-us.apache.org/repos/asf/tomee/repo Commit: http://git-wip-us.apache.org/repos/asf/tomee/commit/62f75fc6 Tree: http://git-wip-us.apache.org/repos/asf/tomee/tree/62f75fc6 Diff: http://git-wip-us.apache.org/repos/asf/tomee/diff/62f75fc6 Branch: refs/heads/fb_tomee8 Commit: 62f75fc6c7d0a7e179012e9466a43c553998e9fc Parents: 27639ab 021b9ca Author: Romain Manni-BucauAuthored: Mon Mar 12 14:25:47 2018 +0100 Committer: Romain Manni-Bucau Committed: Mon Mar 12 14:25:47 2018 +0100 -- .../arquillian/tests/jms/EnvEntryTest.java |2 + .../apache/openejb/config/DeploymentLoader.java | 12 +- .../src/main/resources/default.exclusions |4 +- .../superbiz/counter/CounterCallbacksTest.java |2 +- pom.xml | 12 +- tck/microprofile-tck/config/pom.xml | 129 ++ .../microprofile/config/ConfigurationBean.java | 25 + .../MicroProfileConfigTCKArchiveProcessor.java | 33 + .../config/MicroProfileConfigTCKExtension.java | 11 + .../config/MicroProfileConfigurationTest.java | 69 + jboss.arquillian.core.spi.LoadableExtension |1 + .../config/src/test/resources/arquillian.xml| 41 + tck/microprofile-tck/pom.xml| 37 + tck/pom.xml |1 + tomee/apache-tomee/pom.xml | 68 + .../src/main/assembly/tomee-microprofile.xml| 84 ++ tomee/pom.xml |1 + .../org/apache/tomee/catalina/TomcatLoader.java |2 + tomee/tomee-microprofile-webapp/pom.xml | 101 ++ .../src/main/assembly/war.xml | 92 ++ .../src/main/resources/META-INF/LICENSE | 1197 ++ .../src/main/resources/META-INF/NOTICE | 140 ++ 22 files changed, 2052 insertions(+), 12 deletions(-) -- http://git-wip-us.apache.org/repos/asf/tomee/blob/62f75fc6/container/openejb-core/src/main/java/org/apache/openejb/config/DeploymentLoader.java -- http://git-wip-us.apache.org/repos/asf/tomee/blob/62f75fc6/pom.xml -- diff --cc pom.xml index e143fc2,0fc7f2e..92db56b --- a/pom.xml +++ b/pom.xml @@@ -94,17 -94,16 +94,17 @@@ ${project.version} -1.7 -1.7 +1.8 +1.8 +2.20 -7.0-1 +8.0-SNAPSHOT -2.4.2 -1.7.4 +3.0.0-SNAPSHOT +2.0.4 2.1 - 1.1.6 -1.0.0 ++1.1.7 3.3.0 @@@ -126,15 -125,18 +126,15 @@@ ${openejb.osgi.dynamic.import.pkg} ${project.groupId}.${project.artifactId} - 0.5-incubating -0.4-incubating ++0.5-incubating 1.1.13.Final - 2.0.0-alpha-10 + 2.0.0 1.2.6 - 9.0.5 -8.5.23 ++9.0.6 -3.1.13 -1.2.6 -2.0.0 -1.1.13.Final +3.2.1 2.10.3 7.5.3.v20111011 @@@ -175,8 -177,8 +175,8 @@@ 3.1.4 1.1 1.9.0-alpha-2 - 2.3.0-SNAPSHOT -2.2.12 -2.2.12 ++2.3.0 +2.3.3 1.7.21 1.2.17 2.0.1 http://git-wip-us.apache.org/repos/asf/tomee/blob/62f75fc6/tck/pom.xml -- http://git-wip-us.apache.org/repos/asf/tomee/blob/62f75fc6/tomee/apache-tomee/pom.xml -- http://git-wip-us.apache.org/repos/asf/tomee/blob/62f75fc6/tomee/pom.xml --
[24/32] tomee git commit: Fixed MicroProfile Config TCK tests.
Fixed MicroProfile Config TCK tests. Project: http://git-wip-us.apache.org/repos/asf/tomee/repo Commit: http://git-wip-us.apache.org/repos/asf/tomee/commit/47b1f6f7 Tree: http://git-wip-us.apache.org/repos/asf/tomee/tree/47b1f6f7 Diff: http://git-wip-us.apache.org/repos/asf/tomee/diff/47b1f6f7 Branch: refs/heads/fb_tomee8 Commit: 47b1f6f774d1df5ce310aa3448485a3bd0b6047d Parents: 1c6613b Author: Roberto CortezAuthored: Sun Mar 4 23:32:21 2018 + Committer: Roberto Cortez Committed: Sun Mar 4 23:32:21 2018 + -- tck/microprofile-tck/config/pom.xml | 31 ++ .../MicroProfileConfigTCKArchiveProcessor.java | 33 .../config/MicroProfileConfigTCKExtension.java | 11 +++ jboss.arquillian.core.spi.LoadableExtension | 1 + .../config/src/test/resources/arquillian.xml| 10 +- 5 files changed, 77 insertions(+), 9 deletions(-) -- http://git-wip-us.apache.org/repos/asf/tomee/blob/47b1f6f7/tck/microprofile-tck/config/pom.xml -- diff --git a/tck/microprofile-tck/config/pom.xml b/tck/microprofile-tck/config/pom.xml index 491241c..4b6b61d 100644 --- a/tck/microprofile-tck/config/pom.xml +++ b/tck/microprofile-tck/config/pom.xml @@ -51,6 +51,10 @@ org.eclipse.microprofile.config:microprofile-config-tck + + + org.eclipse.microprofile.config.tck.ClassConverterTest + @@ -93,6 +97,33 @@ ${project.version} test + + + org.jboss.arquillian.testng + arquillian-testng-core + 1.1.13.Final + + + + org.jboss.shrinkwrap.resolver + shrinkwrap-resolver-api-maven + 2.2.2 + test + + + + org.jboss.shrinkwrap.resolver + shrinkwrap-resolver-impl-maven + 2.2.2 + test + + + + org.jboss.shrinkwrap.resolver + shrinkwrap-resolver-spi + 2.2.2 + test + http://git-wip-us.apache.org/repos/asf/tomee/blob/47b1f6f7/tck/microprofile-tck/config/src/test/java/org/apache/openejb/tck/microprofile/config/MicroProfileConfigTCKArchiveProcessor.java -- diff --git a/tck/microprofile-tck/config/src/test/java/org/apache/openejb/tck/microprofile/config/MicroProfileConfigTCKArchiveProcessor.java b/tck/microprofile-tck/config/src/test/java/org/apache/openejb/tck/microprofile/config/MicroProfileConfigTCKArchiveProcessor.java new file mode 100644 index 000..0cad5eb --- /dev/null +++ b/tck/microprofile-tck/config/src/test/java/org/apache/openejb/tck/microprofile/config/MicroProfileConfigTCKArchiveProcessor.java @@ -0,0 +1,33 @@ +package org.apache.openejb.tck.microprofile.config; + +import org.eclipse.microprofile.config.tck.converters.UpperCaseDuckConverter; +import org.jboss.arquillian.container.test.spi.client.deployment.ApplicationArchiveProcessor; +import org.jboss.arquillian.test.spi.TestClass; +import org.jboss.shrinkwrap.api.Archive; +import org.jboss.shrinkwrap.api.ShrinkWrap; +import org.jboss.shrinkwrap.api.spec.JavaArchive; +import org.jboss.shrinkwrap.api.spec.WebArchive; +import org.jboss.shrinkwrap.resolver.api.maven.Maven; + +import java.io.File; + +public class MicroProfileConfigTCKArchiveProcessor implements ApplicationArchiveProcessor { +@Override +public void process(final Archive archive, final TestClass testClass) { +if (archive instanceof WebArchive) { +// TODO - this could be fixed in the TCK by adding UpperCaseDuckConverter into org.eclipse.microprofile.config.tck.ConverterTest +JavaArchive configJar = ShrinkWrap +.create(JavaArchive.class, "config-tck-additional.jar") +.addClass(UpperCaseDuckConverter.class) +; +((WebArchive) archive).addAsLibraries(configJar); + +File[] requiredLibraries = Maven.resolver() +.loadPomFromFile("pom.xml") + .resolve("org.hamcrest:hamcrest-all:1.3") +.withTransitivity() +.asFile(); +((WebArchive) archive).addAsLibraries(requiredLibraries); +} +} +} http://git-wip-us.apache.org/repos/asf/tomee/blob/47b1f6f7/tck/microprofile-tck/config/src/test/java/org/apache/openejb/tck/microprofile/config/MicroProfileConfigTCKExtension.java -- diff --git a/tck/microprofile-tck/config/src/test/java/org/apache/openejb/tck/microprofile/config/MicroProfileConfigTCKExtension.java
[29/32] tomee git commit: Introduced configuration properties to include / exclude urls in the Classloader.
Introduced configuration properties to include / exclude urls in the Classloader. Project: http://git-wip-us.apache.org/repos/asf/tomee/repo Commit: http://git-wip-us.apache.org/repos/asf/tomee/commit/021b9ca8 Tree: http://git-wip-us.apache.org/repos/asf/tomee/tree/021b9ca8 Diff: http://git-wip-us.apache.org/repos/asf/tomee/diff/021b9ca8 Branch: refs/heads/fb_tomee8 Commit: 021b9ca8d01a78f5b7ee3438f30fd8901ff60d5b Parents: a04e4b7 Author: Roberto CortezAuthored: Fri Mar 9 16:10:56 2018 + Committer: Roberto Cortez Committed: Fri Mar 9 16:10:56 2018 + -- .../apache/openejb/config/DeploymentLoader.java | 12 +++-- .../config/src/test/resources/arquillian.xml| 2 + tomee/pom.xml | 1 - tomee/tomee-microprofile-webapp/pom.xml | 6 --- tomee/tomee-microprofile/pom.xml| 56 .../tomee/microprofile/MicroProfileService.java | 51 -- 6 files changed, 11 insertions(+), 117 deletions(-) -- http://git-wip-us.apache.org/repos/asf/tomee/blob/021b9ca8/container/openejb-core/src/main/java/org/apache/openejb/config/DeploymentLoader.java -- diff --git a/container/openejb-core/src/main/java/org/apache/openejb/config/DeploymentLoader.java b/container/openejb-core/src/main/java/org/apache/openejb/config/DeploymentLoader.java index 1135c07..d602f81 100644 --- a/container/openejb-core/src/main/java/org/apache/openejb/config/DeploymentLoader.java +++ b/container/openejb-core/src/main/java/org/apache/openejb/config/DeploymentLoader.java @@ -60,6 +60,7 @@ import org.apache.xbean.finder.UrlSet; import org.apache.xbean.finder.archive.ClassesArchive; import org.apache.xbean.finder.filter.Filter; import org.apache.xbean.finder.filter.Filters; +import org.apache.xbean.finder.filter.PatternFilter; import java.io.BufferedInputStream; import java.io.File; @@ -81,6 +82,7 @@ import java.util.LinkedHashMap; import java.util.LinkedHashSet; import java.util.LinkedList; import java.util.List; +import java.util.Locale; import java.util.Map; import java.util.Properties; import java.util.Set; @@ -90,7 +92,6 @@ import java.util.jar.JarEntry; import java.util.jar.JarFile; import java.util.jar.Manifest; import java.util.zip.ZipEntry; -import java.util.Locale; import static java.util.Arrays.asList; @@ -116,6 +117,9 @@ public class DeploymentLoader implements DeploymentFilterable { private static String ALTDD = SystemInstance.get().getOptions().get(OPENEJB_ALTDD_PREFIX, (String) null); private volatile List containerUrls = null; +private static final String OPENEJB_CONTAINER_INCLUDES = "openejb.scan.webapp.container.includes"; +private static final String OPENEJB_CONTAINER_EXCLUDES = "openejb.scan.webapp.container.excludes"; + @Deprecated // use load(File, ExternalConfiguration) public AppModule load(final File jarFile) throws OpenEJBException { return load(jarFile, null); @@ -1098,13 +1102,15 @@ public class DeploymentLoader implements DeploymentFilterable { private void ensureContainerUrls() { if (containerUrls == null) { -if ("true".equalsIgnoreCase(SystemInstance.get().getProperty("openejb.scan.webapp.container", "false"))) { +if ("true".equalsIgnoreCase(SystemInstance.get().getProperty("openejb.scan.webapp.container", "true"))) { synchronized (this) { if (containerUrls == null) { try { UrlSet urlSet = new UrlSet(ParentClassLoaderFinder.Helper.get()); urlSet = URLs.cullSystemJars(urlSet); -urlSet = NewLoaderLogic.applyBuiltinExcludes(urlSet); +final PatternFilter containerIncludes = new PatternFilter(SystemInstance.get().getProperty(OPENEJB_CONTAINER_INCLUDES, ".*")); +final PatternFilter containerExcludes = new PatternFilter(SystemInstance.get().getProperty(OPENEJB_CONTAINER_EXCLUDES, "")); +urlSet = NewLoaderLogic.applyBuiltinExcludes(urlSet, containerIncludes, containerExcludes); containerUrls = urlSet.getUrls(); final boolean skipContainerFolders = "true".equalsIgnoreCase(SystemInstance.get().getProperty("openejb.scan.webapp.container.skip-folder", "true")); http://git-wip-us.apache.org/repos/asf/tomee/blob/021b9ca8/tck/microprofile-tck/config/src/test/resources/arquillian.xml -- diff --git a/tck/microprofile-tck/config/src/test/resources/arquillian.xml
[17/32] tomee git commit: Temporarily adding some timings
Temporarily adding some timings Project: http://git-wip-us.apache.org/repos/asf/tomee/repo Commit: http://git-wip-us.apache.org/repos/asf/tomee/commit/33173147 Tree: http://git-wip-us.apache.org/repos/asf/tomee/tree/33173147 Diff: http://git-wip-us.apache.org/repos/asf/tomee/diff/33173147 Branch: refs/heads/fb_tomee8 Commit: 3317314772514172f97dda1636595abe795144c9 Parents: 646f92c Author: Jonathan GallimoreAuthored: Mon Feb 26 15:13:47 2018 + Committer: Jonathan Gallimore Committed: Mon Feb 26 15:13:47 2018 + -- .../src/test/java/org/superbiz/counter/CounterCallbacksTest.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/tomee/blob/33173147/examples/simple-stateful-callbacks/src/test/java/org/superbiz/counter/CounterCallbacksTest.java -- diff --git a/examples/simple-stateful-callbacks/src/test/java/org/superbiz/counter/CounterCallbacksTest.java b/examples/simple-stateful-callbacks/src/test/java/org/superbiz/counter/CounterCallbacksTest.java index 6d041e3..1b3815c 100644 --- a/examples/simple-stateful-callbacks/src/test/java/org/superbiz/counter/CounterCallbacksTest.java +++ b/examples/simple-stateful-callbacks/src/test/java/org/superbiz/counter/CounterCallbacksTest.java @@ -120,7 +120,7 @@ public class CounterCallbacksTest implements ExecutionObserver { @Override public void onExecution(Object value) { -System.out.println("Test step -> " + value); +System.out.println("[" + System.currentTimeMillis() + "] Test step -> " + value); this.received.add(value); } }
[18/32] tomee git commit: Added TomEE dist profile for MicroProfile.
http://git-wip-us.apache.org/repos/asf/tomee/blob/8262b3bc/tomee/tomee-microprofile-webapp/src/main/resources/META-INF/NOTICE -- diff --git a/tomee/tomee-microprofile-webapp/src/main/resources/META-INF/NOTICE b/tomee/tomee-microprofile-webapp/src/main/resources/META-INF/NOTICE new file mode 100644 index 000..4d74e4a --- /dev/null +++ b/tomee/tomee-microprofile-webapp/src/main/resources/META-INF/NOTICE @@ -0,0 +1,124 @@ +Apache OpenEJB +Copyright 1999-2014 The Apache Software Foundation + +This product includes software developed at +The Apache Software Foundation (http://www.apache.org/). + +This product includes schema files developed for the Glassfish Java EE +reference implementation (http://java.sun.com/xml/ns/j2ee/). +Apache OpenEJB elects to include this software in this distribution +under the CDDL license. You can obtain a copy of the License at: +https://glassfish.dev.java.net/public/CDDL+GPL.html + + += +Apache Xerces Java NOTICE + +Portions of this software were originally based on the following: + - software copyright (c) 1999, IBM Corporation., http://www.ibm.com. + - software copyright (c) 1999, Sun Microsystems., http://www.sun.com. + - voluntary contributions made by Paul Eng on behalf of the + Apache Software Foundation that were originally developed at iClick, Inc., + software copyright (c) 1999. + + += +Apache OpenJPA NOTICE + +OpenJPA includes the persistence and orm schemas from the JPA specifications. +Copyright 2005-2014 Sun Microsystems, Inc. All rights reserved. + +OpenJPA elects to include this software in this distribution under the +CDDL license. You can obtain a copy of the License at: +https://glassfish.dev.java.net/public/CDDL+GPL.html +The source code is available at: +https://glassfish.dev.java.net/source/browse/glassfish/ + +OpenJPA includes software written by Miroslav Nachev + + += +Apache WebServices - XmlSchema NOTICE + +Portions Copyright 2006 International Business Machines Corp. + +Portions Copyright (C) World Wide Web Consortium 2006, 2007 and licensed under the +three-part BSD license. + + += +Apache Bean Validation NOTICE + +This product includes software developed by agimatec GmbH. +Copyright 2007-2010 Agimatec GmbH. All rights reserved. + + += +Apache MyFaces NOTICE + +This software also includes code from Facelets (https://facelets.dev.java.net/) +for the purpose of implementing Facelets PDL for JSF 2.0 support. + +This product includes schema files developed for the Glassfish Java EE +reference implementation (http://java.sun.com/xml/ns/j2ee/). +Apache Myfaces elects to include this software in this distribution +under the CDDL license. You can obtain a copy of the License at: +https://glassfish.dev.java.net/public/CDDL+GPL.html +The source code is available at: +https://glassfish.dev.java.net/source/browse/glassfish/ + + +This software also includes code from the Dojo toolkit (http://www.dojotoolkit.org/) +for the purpose of reusing existing well proven javascript code in the myfaces +javascript core, which is licensed under a modified BSD license or the Academic Free License version 2.1 +(see http://o.dojotoolkit.org/about/license and http://trac.dojotoolkit.org/browser/dojo/trunk/LICENSE for more information) + +This software also includes code from j4fry (http://www.j4fry.org/), +which is licensed under ASL 2.0. + += + - JAnsi (http://http://jansi.fusesource.org/) org.fusesource.jansi:jansi:jar:1.8 +License: Apache License 2.0 (http://www.apache.org/licenses/LICENSE-2.0.txt) + += + - HawtBuf (http://fusesource.com/forge/projects/hawtbuf) +License: Apache License 2.0 (http://www.apache.org/licenses/LICENSE-2.0.txt) += +FastInfoset (https://fi.java.net/) +License: Apache License 2.0 (http://www.apache.org/licenses/LICENSE-2.0.txt) += +Istack Commons Runtime (https://istack-commons.java.net/) +License: CDDL v1.1 and GPL v2 (https://glassfish.java.net/public/CDDL+GPL_1_1.html) += +Jaxb Core (https://jaxb.java.net/) +License: CDDL v1.1 and GPL v2 (https://glassfish.java.net/public/CDDL+GPL_1_1.html) += +Quartz (http://quartz-scheduler.org/) +License: Apache License 2.0 (http://www.apache.org/licenses/LICENSE-2.0.txt) += +el-api - Unified Expression Language is dual
[32/32] tomee git commit: upgrading g-config to ensure we pass tck + fixing tck setup (speed improvement and removing some workarounds)
upgrading g-config to ensure we pass tck + fixing tck setup (speed improvement and removing some workarounds) Project: http://git-wip-us.apache.org/repos/asf/tomee/repo Commit: http://git-wip-us.apache.org/repos/asf/tomee/commit/59c398d1 Tree: http://git-wip-us.apache.org/repos/asf/tomee/tree/59c398d1 Diff: http://git-wip-us.apache.org/repos/asf/tomee/diff/59c398d1 Branch: refs/heads/fb_tomee8 Commit: 59c398d19d715d03c0549bf92d9a70b6ba1c7644 Parents: 4a7531d Author: Romain Manni-BucauAuthored: Mon Mar 12 15:59:55 2018 +0100 Committer: Romain Manni-Bucau Committed: Mon Mar 12 15:59:55 2018 +0100 -- pom.xml | 2 +- tck/bval-embedded/pom.xml | 1 + tck/microprofile-tck/config/pom.xml | 26 ++-- .../MicroProfileConfigTCKArchiveProcessor.java | 23 --- .../config/MicroProfileConfigurationTest.java | 69 .../config/src/test/resources/arquillian.xml| 1 - tomee/tomee-microprofile-webapp/pom.xml | 16 + 7 files changed, 39 insertions(+), 99 deletions(-) -- http://git-wip-us.apache.org/repos/asf/tomee/blob/59c398d1/pom.xml -- diff --git a/pom.xml b/pom.xml index 92db56b..53ded49 100644 --- a/pom.xml +++ b/pom.xml @@ -96,7 +96,7 @@ ${project.version} 1.8 1.8 -2.20 +2.21.0 8.0-SNAPSHOT http://git-wip-us.apache.org/repos/asf/tomee/blob/59c398d1/tck/bval-embedded/pom.xml -- diff --git a/tck/bval-embedded/pom.xml b/tck/bval-embedded/pom.xml index 2ff885a..dbf59a6 100644 --- a/tck/bval-embedded/pom.xml +++ b/tck/bval-embedded/pom.xml @@ -132,6 +132,7 @@ maven-surefire-plugin ${surefire.version} + true ${project.build.directory}/dependency/beanvalidation-tck-tests-suite.xml http://git-wip-us.apache.org/repos/asf/tomee/blob/59c398d1/tck/microprofile-tck/config/pom.xml -- diff --git a/tck/microprofile-tck/config/pom.xml b/tck/microprofile-tck/config/pom.xml index 55c81d6..a218412 100644 --- a/tck/microprofile-tck/config/pom.xml +++ b/tck/microprofile-tck/config/pom.xml @@ -33,25 +33,40 @@ 1.2 + + org.apache.maven.plugins maven-surefire-plugin + 1 + true org.eclipse.microprofile.config:microprofile-config-tck - - - org.eclipse.microprofile.config.tck.ClassConverterTest - + + + org.apache.geronimo.config + geronimo-config-impl + 1.1 + provided + + + org.apache.tomee + tomee-catalina + ${project.version} + provided + + + ${project.groupId} apache-tomee @@ -61,6 +76,7 @@ test + org.eclipse.microprofile.config microprofile-config-api @@ -92,7 +108,7 @@ org.jboss.arquillian.testng arquillian-testng-core - 1.1.13.Final + ${version.arquillian} http://git-wip-us.apache.org/repos/asf/tomee/blob/59c398d1/tck/microprofile-tck/config/src/test/java/org/apache/openejb/tck/microprofile/config/MicroProfileConfigTCKArchiveProcessor.java -- diff --git a/tck/microprofile-tck/config/src/test/java/org/apache/openejb/tck/microprofile/config/MicroProfileConfigTCKArchiveProcessor.java b/tck/microprofile-tck/config/src/test/java/org/apache/openejb/tck/microprofile/config/MicroProfileConfigTCKArchiveProcessor.java index 0cad5eb..dcee75d 100644 --- a/tck/microprofile-tck/config/src/test/java/org/apache/openejb/tck/microprofile/config/MicroProfileConfigTCKArchiveProcessor.java +++ b/tck/microprofile-tck/config/src/test/java/org/apache/openejb/tck/microprofile/config/MicroProfileConfigTCKArchiveProcessor.java @@ -1,33 +1,38 @@ package org.apache.openejb.tck.microprofile.config; +import static org.apache.openejb.loader.JarLocation.jarLocation; + import org.eclipse.microprofile.config.tck.converters.UpperCaseDuckConverter; +import org.hamcrest.object.HasToString; import org.jboss.arquillian.container.test.spi.client.deployment.ApplicationArchiveProcessor; import org.jboss.arquillian.test.spi.TestClass; import org.jboss.shrinkwrap.api.Archive; import org.jboss.shrinkwrap.api.ShrinkWrap; import org.jboss.shrinkwrap.api.spec.JavaArchive; import org.jboss.shrinkwrap.api.spec.WebArchive; -import org.jboss.shrinkwrap.resolver.api.maven.Maven; import java.io.File; public class
[19/32] tomee git commit: Added TomEE dist profile for MicroProfile.
http://git-wip-us.apache.org/repos/asf/tomee/blob/8262b3bc/tomee/tomee-microprofile-webapp/src/main/resources/META-INF/LICENSE -- diff --git a/tomee/tomee-microprofile-webapp/src/main/resources/META-INF/LICENSE b/tomee/tomee-microprofile-webapp/src/main/resources/META-INF/LICENSE new file mode 100644 index 000..469c73b --- /dev/null +++ b/tomee/tomee-microprofile-webapp/src/main/resources/META-INF/LICENSE @@ -0,0 +1,1288 @@ + + Apache License + Version 2.0, January 2004 +http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their
[20/32] tomee git commit: Added TomEE dist profile for MicroProfile.
Added TomEE dist profile for MicroProfile. Project: http://git-wip-us.apache.org/repos/asf/tomee/repo Commit: http://git-wip-us.apache.org/repos/asf/tomee/commit/8262b3bc Tree: http://git-wip-us.apache.org/repos/asf/tomee/tree/8262b3bc Diff: http://git-wip-us.apache.org/repos/asf/tomee/diff/8262b3bc Branch: refs/heads/fb_tomee8 Commit: 8262b3bc445bb70b50a6346a8f285973dac02c3b Parents: 3317314 Author: Roberto CortezAuthored: Wed Feb 28 16:44:13 2018 + Committer: Roberto Cortez Committed: Wed Feb 28 16:44:13 2018 + -- tomee/apache-tomee/pom.xml | 61 + .../src/main/assembly/tomee-microprofile.xml| 84 ++ tomee/pom.xml |2 + tomee/tomee-microprofile-webapp/pom.xml | 92 ++ .../src/main/assembly/war.xml | 92 ++ .../src/main/resources/META-INF/LICENSE | 1288 ++ .../src/main/resources/META-INF/NOTICE | 124 ++ tomee/tomee-microprofile/pom.xml| 40 + 8 files changed, 1783 insertions(+) -- http://git-wip-us.apache.org/repos/asf/tomee/blob/8262b3bc/tomee/apache-tomee/pom.xml -- diff --git a/tomee/apache-tomee/pom.xml b/tomee/apache-tomee/pom.xml index 9cc3790..08047df 100644 --- a/tomee/apache-tomee/pom.xml +++ b/tomee/apache-tomee/pom.xml @@ -36,6 +36,7 @@ ${project.build.directory}/webprofile-work-dir ${project.build.directory}/plus-work-dir ${project.build.directory}/plume-work-dir + ${project.build.directory}/microprofile-work-dir @@ -225,6 +226,25 @@ + +copy-tomcat-for-microprofile +process-resources + + copy + + + + + org.apache.tomcat + tomcat + ${tomcat.version} + zip + ${microprofile.work-dir} + apache-tomcat-${tomcat.version}.zip + + + + @@ -323,6 +343,22 @@ + +execute-microprofile-installer +prepare-package + + execute + + + +${microprofile.work-dir} +tomee-microprofile-webapp + + +new commands.SetupCommand(pom: this, log: log, project: project, ant: ant, properties: properties).execute() + + + @@ -375,6 +411,21 @@ single + +microprofile +package + + + src/main/assembly/tomee-microprofile.xml + + false + false + apache-tomee-microprofile-${project.version} + + + single + + @@ -420,6 +471,16 @@ tar.gz plume + + ${project.build.directory}/apache-tomee-microprofile-${project.version}.zip + zip + microprofile + + + ${project.build.directory}/apache-tomee-microprofile-${project.version}.tar.gz + tar.gz + microprofile + http://git-wip-us.apache.org/repos/asf/tomee/blob/8262b3bc/tomee/apache-tomee/src/main/assembly/tomee-microprofile.xml -- diff --git a/tomee/apache-tomee/src/main/assembly/tomee-microprofile.xml b/tomee/apache-tomee/src/main/assembly/tomee-microprofile.xml new file mode 100644 index 000..7b7ecd5 --- /dev/null +++ b/tomee/apache-tomee/src/main/assembly/tomee-microprofile.xml @@ -0,0 +1,84 @@ + + + + + + + tomee-microprofile + +tar.gz +zip + + false + + + ${microprofile.work-dir}/apache-tomcat-${tomcat.version} + /apache-tomee-microprofile-${project.version} + +**/* + + +LICENSE +NOTICE +**/bin/**/* +**/lib/tomcat-annotations-api*.jar + + + + ${project.basedir}/target/maven-shared-archive-resources/META-INF/ + /apache-tomee-microprofile-${project.version} + +LICENSE + + + + ${project.basedir}/src/main/resources/META-INF/microprofile/ + /apache-tomee-microprofile-${project.version} + +* + + + +
[22/32] tomee git commit: Enrich classloader to add MicroProfile Config implementation Beans.
Enrich classloader to add MicroProfile Config implementation Beans. Project: http://git-wip-us.apache.org/repos/asf/tomee/repo Commit: http://git-wip-us.apache.org/repos/asf/tomee/commit/2421c524 Tree: http://git-wip-us.apache.org/repos/asf/tomee/tree/2421c524 Diff: http://git-wip-us.apache.org/repos/asf/tomee/diff/2421c524 Branch: refs/heads/fb_tomee8 Commit: 2421c524f0928d476701729eb575624f73f7b91e Parents: 856f728 Author: Roberto CortezAuthored: Fri Mar 2 01:20:01 2018 + Committer: Roberto Cortez Committed: Fri Mar 2 01:20:01 2018 + -- .../src/main/resources/default.exclusions | 4 +- .../org/apache/tomee/catalina/TomcatLoader.java | 2 + .../MicroProfileClassLoaderEnricher.java| 53 .../tomee/microprofile/MicroProfileService.java | 46 + 4 files changed, 104 insertions(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/tomee/blob/2421c524/container/openejb-core/src/main/resources/default.exclusions -- diff --git a/container/openejb-core/src/main/resources/default.exclusions b/container/openejb-core/src/main/resources/default.exclusions index f0e543b..d46396b 100644 --- a/container/openejb-core/src/main/resources/default.exclusions +++ b/container/openejb-core/src/main/resources/default.exclusions @@ -79,7 +79,9 @@ jfxrt.jar jnr- johnzon- fusemq-leveldb- -geronimo- +geronimo-connector +geronimo-javamail +geronimo-transaction google- gragent.jar groovy- http://git-wip-us.apache.org/repos/asf/tomee/blob/2421c524/tomee/tomee-catalina/src/main/java/org/apache/tomee/catalina/TomcatLoader.java -- diff --git a/tomee/tomee-catalina/src/main/java/org/apache/tomee/catalina/TomcatLoader.java b/tomee/tomee-catalina/src/main/java/org/apache/tomee/catalina/TomcatLoader.java index 8b066e5..22d9337 100644 --- a/tomee/tomee-catalina/src/main/java/org/apache/tomee/catalina/TomcatLoader.java +++ b/tomee/tomee-catalina/src/main/java/org/apache/tomee/catalina/TomcatLoader.java @@ -234,6 +234,8 @@ public class TomcatLoader implements Loader { } } +optionalService(properties, "org.apache.tomee.microprofile.MicroProfileService"); + // optional services if (optionalService(properties, "org.apache.tomee.webservices.TomeeJaxRsService")) { // in embedded mode we use regex, in tomcat we use tomcat servlet mapping http://git-wip-us.apache.org/repos/asf/tomee/blob/2421c524/tomee/tomee-microprofile/src/main/java/org/apache/tomee/microprofile/MicroProfileClassLoaderEnricher.java -- diff --git a/tomee/tomee-microprofile/src/main/java/org/apache/tomee/microprofile/MicroProfileClassLoaderEnricher.java b/tomee/tomee-microprofile/src/main/java/org/apache/tomee/microprofile/MicroProfileClassLoaderEnricher.java new file mode 100644 index 000..7100f87 --- /dev/null +++ b/tomee/tomee-microprofile/src/main/java/org/apache/tomee/microprofile/MicroProfileClassLoaderEnricher.java @@ -0,0 +1,53 @@ +/* + * 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.apache.tomee.microprofile; + +import org.apache.openejb.classloader.WebAppEnricher; +import org.apache.tomee.installer.Paths; + +import java.io.File; +import java.net.MalformedURLException; +import java.net.URL; +import java.util.Collection; +import java.util.HashSet; + +public class MicroProfileClassLoaderEnricher implements WebAppEnricher { +private static final String[] MICROPROFILE_LIBS_IMPLS_PREFIXES = new String[]{ +"geronimo-config-impl" +}; + +@SuppressWarnings("Duplicates") +@Override +public URL[] enrichment(final ClassLoader webappClassLaoder) { +final Collection urls = new HashSet<>(); + +// from prefix +final Paths paths = new Paths(new File(System.getProperty("openejb.home"))); // parameter is useless +for (final String prefix
[16/32] tomee git commit: some forgotten ASM upgrades
some forgotten ASM upgrades Project: http://git-wip-us.apache.org/repos/asf/tomee/repo Commit: http://git-wip-us.apache.org/repos/asf/tomee/commit/646f92c4 Tree: http://git-wip-us.apache.org/repos/asf/tomee/tree/646f92c4 Diff: http://git-wip-us.apache.org/repos/asf/tomee/diff/646f92c4 Branch: refs/heads/fb_tomee8 Commit: 646f92c40e7badf844324995381d9d4431c5cf0a Parents: 069c8a3 Author: Romain Manni-BucauAuthored: Tue Feb 20 17:52:43 2018 +0100 Committer: Jonathan Gallimore Committed: Wed Feb 21 09:03:37 2018 + -- .../apache/openejb/config/PersistenceContextAnnFactory.java| 2 +- .../src/main/java/org/apache/openejb/dyni/DynamicSubclass.java | 6 +++--- .../main/java/org/apache/openejb/util/AnnotationFinder.java| 2 +- .../src/test/java/org/apache/openejb/DependencyVisitor.java| 2 +- .../src/test/java/org/apache/openejb/core/cmp/jpa/JpaTest.java | 2 +- 5 files changed, 7 insertions(+), 7 deletions(-) -- http://git-wip-us.apache.org/repos/asf/tomee/blob/646f92c4/container/openejb-core/src/main/java/org/apache/openejb/config/PersistenceContextAnnFactory.java -- diff --git a/container/openejb-core/src/main/java/org/apache/openejb/config/PersistenceContextAnnFactory.java b/container/openejb-core/src/main/java/org/apache/openejb/config/PersistenceContextAnnFactory.java index 12adae1..66e2361 100644 --- a/container/openejb-core/src/main/java/org/apache/openejb/config/PersistenceContextAnnFactory.java +++ b/container/openejb-core/src/main/java/org/apache/openejb/config/PersistenceContextAnnFactory.java @@ -248,7 +248,7 @@ public class PersistenceContextAnnFactory { private final AsmPersistenceContext persistenceContext = new AsmPersistenceContext(); public PersistenceContextVisitor(final String className, final String memberName, final Map contexts) { -super(Opcodes.ASM5); +super(Opcodes.ASM6); this.contexts = contexts; persistenceContext.name = className + "/" + memberName; } http://git-wip-us.apache.org/repos/asf/tomee/blob/646f92c4/container/openejb-core/src/main/java/org/apache/openejb/dyni/DynamicSubclass.java -- diff --git a/container/openejb-core/src/main/java/org/apache/openejb/dyni/DynamicSubclass.java b/container/openejb-core/src/main/java/org/apache/openejb/dyni/DynamicSubclass.java index fc0ff9a..c9dd53b 100644 --- a/container/openejb-core/src/main/java/org/apache/openejb/dyni/DynamicSubclass.java +++ b/container/openejb-core/src/main/java/org/apache/openejb/dyni/DynamicSubclass.java @@ -297,7 +297,7 @@ public class DynamicSubclass implements Opcodes { private final MethodVisitor newMethod; public MoveAnnotationsVisitor(final MethodVisitor movedMethod, final MethodVisitor newMethod) { -super(Opcodes.ASM5, movedMethod); +super(Opcodes.ASM6, movedMethod); this.newMethod = newMethod; } @@ -323,7 +323,7 @@ public class DynamicSubclass implements Opcodes { private final ClassVisitor newClass; public CopyClassAnnotations(final ClassVisitor newClass) { -super(Opcodes.ASM5); +super(Opcodes.ASM6); this.newClass = newClass; } @@ -337,7 +337,7 @@ public class DynamicSubclass implements Opcodes { private final Map visitors; public CopyMethodAnnotations(final Map visitors) { -super(Opcodes.ASM5); +super(Opcodes.ASM6); this.visitors = visitors; } http://git-wip-us.apache.org/repos/asf/tomee/blob/646f92c4/container/openejb-core/src/main/java/org/apache/openejb/util/AnnotationFinder.java -- diff --git a/container/openejb-core/src/main/java/org/apache/openejb/util/AnnotationFinder.java b/container/openejb-core/src/main/java/org/apache/openejb/util/AnnotationFinder.java index eb4587c..3f29b3a 100644 --- a/container/openejb-core/src/main/java/org/apache/openejb/util/AnnotationFinder.java +++ b/container/openejb-core/src/main/java/org/apache/openejb/util/AnnotationFinder.java @@ -327,7 +327,7 @@ public class AnnotationFinder { private final Filter filter; public Visitor(final Filter filter) { -super(Opcodes.ASM5); +super(Opcodes.ASM6); this.filter = filter; try { http://git-wip-us.apache.org/repos/asf/tomee/blob/646f92c4/container/openejb-core/src/test/java/org/apache/openejb/DependencyVisitor.java -- diff
[23/32] tomee git commit: Added MicroProfile Config TCK.
Added MicroProfile Config TCK. Project: http://git-wip-us.apache.org/repos/asf/tomee/repo Commit: http://git-wip-us.apache.org/repos/asf/tomee/commit/1c6613b9 Tree: http://git-wip-us.apache.org/repos/asf/tomee/tree/1c6613b9 Diff: http://git-wip-us.apache.org/repos/asf/tomee/diff/1c6613b9 Branch: refs/heads/fb_tomee8 Commit: 1c6613b9e3e734f6accdfe5cd996b1686bfc3a62 Parents: 2421c52 Author: Roberto CortezAuthored: Fri Mar 2 01:20:24 2018 + Committer: Roberto Cortez Committed: Fri Mar 2 01:20:24 2018 + -- tck/microprofile-tck/config/pom.xml | 98 .../microprofile/config/ConfigurationBean.java | 25 + .../config/MicroProfileConfigurationTest.java | 69 ++ .../config/src/test/resources/arquillian.xml| 48 ++ tck/microprofile-tck/pom.xml| 37 tck/pom.xml | 1 + 6 files changed, 278 insertions(+) -- http://git-wip-us.apache.org/repos/asf/tomee/blob/1c6613b9/tck/microprofile-tck/config/pom.xml -- diff --git a/tck/microprofile-tck/config/pom.xml b/tck/microprofile-tck/config/pom.xml new file mode 100644 index 000..491241c --- /dev/null +++ b/tck/microprofile-tck/config/pom.xml @@ -0,0 +1,98 @@ + + +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;> + + 4.0.0 + + +org.apache.tomee +microprofile-tck +7.0.5-SNAPSHOT + + + microprofile-config-tck + OpenEJB :: TCK :: MicroProfile Config TCK + + +1.2 + + + + + +org.apache.maven.plugins +maven-compiler-plugin + + 1.8 + 1.8 + + + + +org.apache.maven.plugins +maven-surefire-plugin + + + org.eclipse.microprofile.config:microprofile-config-tck + + + + + + + + + ${project.groupId} + apache-tomee + ${project.version} + zip + microprofile + test + + + + org.eclipse.microprofile.config + microprofile-config-api + ${microprofile.config.version} + test + + + + org.eclipse.microprofile.config + microprofile-config-tck + ${microprofile.config.version} + test + + + + org.testng + testng + 6.9.9 + test + + + + ${project.groupId} + arquillian-tomee-remote + ${project.version} + test + + + + http://git-wip-us.apache.org/repos/asf/tomee/blob/1c6613b9/tck/microprofile-tck/config/src/test/java/org/apache/openejb/tck/microprofile/config/ConfigurationBean.java -- diff --git a/tck/microprofile-tck/config/src/test/java/org/apache/openejb/tck/microprofile/config/ConfigurationBean.java b/tck/microprofile-tck/config/src/test/java/org/apache/openejb/tck/microprofile/config/ConfigurationBean.java new file mode 100644 index 000..3193ad9 --- /dev/null +++ b/tck/microprofile-tck/config/src/test/java/org/apache/openejb/tck/microprofile/config/ConfigurationBean.java @@ -0,0 +1,25 @@ +/* + * 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.apache.openejb.tck.microprofile.config; + +import org.eclipse.microprofile.config.ConfigProvider; + +public class ConfigurationBean { +public String getConfig() { +return ConfigProvider.getConfig().getValue("config.test", String.class); +} +} http://git-wip-us.apache.org/repos/asf/tomee/blob/1c6613b9/tck/microprofile-tck/config/src/test/java/org/apache/openejb/tck/microprofile/config/MicroProfileConfigurationTest.java -- diff --git a/tck/microprofile-tck/config/src/test/java/org/apache/openejb/tck/microprofile/config/MicroProfileConfigurationTest.java
[06/32] tomee git commit: Revert "Preparation for Microprofile"
Revert "Preparation for Microprofile" This reverts commit 36c9c47eda2ecb2bdd7f5a4ff78b8610d83589df. Project: http://git-wip-us.apache.org/repos/asf/tomee/repo Commit: http://git-wip-us.apache.org/repos/asf/tomee/commit/bcce7086 Tree: http://git-wip-us.apache.org/repos/asf/tomee/tree/bcce7086 Diff: http://git-wip-us.apache.org/repos/asf/tomee/diff/bcce7086 Branch: refs/heads/fb_tomee8 Commit: bcce708630ec494669115da0807a5e3593f8a8b6 Parents: 1388139 Author: Andy GumbrechtAuthored: Mon Feb 12 18:40:12 2018 +0100 Committer: Andy Gumbrecht Committed: Mon Feb 12 21:21:43 2018 +0100 -- arquillian/arquillian-common/pom.xml| 2 +- arquillian/arquillian-openejb-embedded/pom.xml | 2 +- .../pom.xml | 2 +- arquillian/arquillian-tck/pom.xml | 2 +- arquillian/arquillian-tomee-common/pom.xml | 2 +- arquillian/arquillian-tomee-embedded/pom.xml| 2 +- .../arquillian-tomee-moviefun-example/pom.xml | 2 +- arquillian/arquillian-tomee-remote/pom.xml | 2 +- .../arquillian-tomee-codi-tests/pom.xml | 2 +- .../arquillian-tomee-config-tests/pom.xml | 2 +- .../arquillian-tomee-jaxrs-tests/pom.xml| 2 +- .../arquillian-tomee-jaxws-tests/pom.xml| 2 +- .../arquillian-tomee-jms-tests/pom.xml | 2 +- .../arquillian-tomee-webprofile-tests/pom.xml | 2 +- arquillian/arquillian-tomee-tests/pom.xml | 2 +- .../arquillian-tomee-webapp-remote/pom.xml | 2 +- arquillian/pom.xml | 2 +- arquillian/ziplock/pom.xml | 2 +- examples/access-timeout-meta/pom.xml| 2 +- examples/access-timeout/pom.xml | 2 +- examples/alternate-descriptors/pom.xml | 2 +- examples/applet/pom.xml | 2 +- examples/application-composer/pom.xml | 2 +- examples/applicationcomposer-jaxws-cdi/pom.xml | 2 +- examples/applicationexception/pom.xml | 2 +- examples/arquillian-jpa/pom.xml | 2 +- examples/async-methods/pom.xml | 2 +- examples/async-postconstruct/pom.xml| 2 +- .../bean-validation-design-by-contract/pom.xml | 2 +- .../cdi-alternative-and-stereotypes/pom.xml | 2 +- examples/cdi-application-scope/pom.xml | 2 +- examples/cdi-basic/pom.xml | 2 +- examples/cdi-ejbcontext-jaas/pom.xml| 2 +- examples/cdi-events/pom.xml | 2 +- examples/cdi-interceptors/pom.xml | 2 +- examples/cdi-produces-disposes/pom.xml | 2 +- examples/cdi-produces-field/pom.xml | 2 +- examples/cdi-realm/pom.xml | 2 +- examples/cdi-request-scope/pom.xml | 2 +- examples/cdi-session-scope/pom.xml | 2 +- examples/change-jaxws-url/pom.xml | 2 +- examples/client-resource-lookup-preview/pom.xml | 2 +- examples/component-interfaces/pom.xml | 2 +- examples/cucumber-jvm/pom.xml | 2 +- examples/custom-injection/pom.xml | 2 +- examples/datasource-ciphered-password/pom.xml | 2 +- examples/datasource-definition/pom.xml | 2 +- examples/datasource-versioning/pom.xml | 2 +- examples/decorators/pom.xml | 2 +- examples/deltaspike-configproperty/pom.xml | 2 +- examples/deltaspike-exception-handling/pom.xml | 2 +- examples/deltaspike-fullstack/pom.xml | 2 +- examples/deltaspike-i18n/pom.xml| 2 +- examples/dynamic-dao-implementation/pom.xml | 2 +- examples/dynamic-datasource-routing/pom.xml | 2 +- examples/dynamic-implementation/pom.xml | 2 +- examples/dynamic-proxy-to-access-mbean/pom.xml | 2 +- examples/ear-testing/business-logic/pom.xml | 2 +- examples/ear-testing/business-model/pom.xml | 2 +- examples/ear-testing/pom.xml| 2 +- examples/ejb-examples/pom.xml | 2 +- examples/ejb-webservice/pom.xml | 2 +- examples/groovy-cdi/pom.xml | 2 +- examples/groovy-jpa/pom.xml | 2 +- examples/groovy-spock/pom.xml | 2 +- examples/helloworld-weblogic/pom.xml| 2 +- examples/injection-of-connectionfactory/pom.xml | 2 +- examples/injection-of-datasource/pom.xml| 2 +- examples/injection-of-ejbs/pom.xml | 2 +- examples/injection-of-entitymanager/pom.xml | 2 +- examples/injection-of-env-entry/pom.xml | 2 +- examples/interceptors/pom.xml | 2 +- examples/javamail/pom.xml | 2 +- examples/jpa-eclipselink/pom.xml| 2 +- examples/jpa-enumerated/pom.xml | 2 +-
[08/32] tomee git commit: Delete mp
Delete mp Project: http://git-wip-us.apache.org/repos/asf/tomee/repo Commit: http://git-wip-us.apache.org/repos/asf/tomee/commit/0a0ddab9 Tree: http://git-wip-us.apache.org/repos/asf/tomee/tree/0a0ddab9 Diff: http://git-wip-us.apache.org/repos/asf/tomee/diff/0a0ddab9 Branch: refs/heads/fb_tomee8 Commit: 0a0ddab90e50c84197ee8be409a5a9d0a6f1920f Parents: f39497f Author: Andy GumbrechtAuthored: Mon Feb 12 22:35:05 2018 +0100 Committer: Andy Gumbrecht Committed: Mon Feb 12 22:35:05 2018 +0100 -- microprofile/microprofile-config/pom.xml| 41 - .../config/MicroprofileConfigTest.java | 37 .../java/org/superbiz/config/BeanAppScoped.java | 20 - .../src/test/resources/arquillian.xml | 33 -- microprofile/pom.xml| 46 5 files changed, 177 deletions(-) -- http://git-wip-us.apache.org/repos/asf/tomee/blob/0a0ddab9/microprofile/microprofile-config/pom.xml -- diff --git a/microprofile/microprofile-config/pom.xml b/microprofile/microprofile-config/pom.xml deleted file mode 100644 index cce11b2..000 --- a/microprofile/microprofile-config/pom.xml +++ /dev/null @@ -1,41 +0,0 @@ - - -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/xsd/maven-4.0.0.xsd;> - - 4.0.0 - - -microprofile -org.apache.tomee -7.0.5-SNAPSHOT - - - microprofile-config - Microprofile :: Config - - - - org.apache.geronimo.config - geronimo-config-impl - - - - \ No newline at end of file http://git-wip-us.apache.org/repos/asf/tomee/blob/0a0ddab9/microprofile/microprofile-config/src/test/java/org/apache/tomee/microprofile/config/MicroprofileConfigTest.java -- diff --git a/microprofile/microprofile-config/src/test/java/org/apache/tomee/microprofile/config/MicroprofileConfigTest.java b/microprofile/microprofile-config/src/test/java/org/apache/tomee/microprofile/config/MicroprofileConfigTest.java deleted file mode 100644 index 25f2fc0..000 --- a/microprofile/microprofile-config/src/test/java/org/apache/tomee/microprofile/config/MicroprofileConfigTest.java +++ /dev/null @@ -1,37 +0,0 @@ -package org.apache.tomee.microprofile.config; - -import org.jboss.arquillian.container.test.api.Deployment; -import org.jboss.arquillian.junit.Arquillian; -import org.jboss.arquillian.test.api.ArquillianResource; -import org.jboss.shrinkwrap.api.Archive; -import org.jboss.shrinkwrap.api.ShrinkWrap; -import org.jboss.shrinkwrap.api.asset.EmptyAsset; -import org.jboss.shrinkwrap.api.spec.WebArchive; -import org.junit.Assert; -import org.junit.Test; -import org.junit.runner.RunWith; -import org.superbiz.config.BeanAppScoped; - -import java.net.URL; - -@RunWith(Arquillian.class) -public class MicroprofileConfigTest { - -@Deployment -public static Archive createDeployment() { -final WebArchive war = ShrinkWrap.create(WebArchive.class) -.addClass(BeanAppScoped.class) -.addAsManifestResource(EmptyAsset.INSTANCE, "beans.xml"); - -System.out.println(war.toString(true)); -return war; -} - -@ArquillianResource -private URL url; - -@Test -public void should_get_config_parameter() { -Assert.fail("Not yet implemented for " + url); -} -} http://git-wip-us.apache.org/repos/asf/tomee/blob/0a0ddab9/microprofile/microprofile-config/src/test/java/org/superbiz/config/BeanAppScoped.java -- diff --git a/microprofile/microprofile-config/src/test/java/org/superbiz/config/BeanAppScoped.java b/microprofile/microprofile-config/src/test/java/org/superbiz/config/BeanAppScoped.java deleted file mode 100644 index efe40ff..000 --- a/microprofile/microprofile-config/src/test/java/org/superbiz/config/BeanAppScoped.java +++ /dev/null @@ -1,20 +0,0 @@ -package org.superbiz.config; - -import org.eclipse.microprofile.config.inject.ConfigProperty; -import javax.enterprise.context.ApplicationScoped; -import org.jboss.arquillian.core.api.annotation.Inject; - -import javax.annotation.PostConstruct; - -@ApplicationScoped -public class BeanAppScoped { - -@PostConstruct -public void postConstruct() { -System.out.println("BeanAppScoped created"); -} - -@Inject -@ConfigProperty(name="my.string.value", defaultValue = "nothing") -private String myString; -}
[11/32] tomee git commit: Revert "Upgrade HSQLDB to 2.3.5"
Revert "Upgrade HSQLDB to 2.3.5" This reverts commit 7b1ad5f0aedcc2cad68b67604f0ec33acd3b511d. Project: http://git-wip-us.apache.org/repos/asf/tomee/repo Commit: http://git-wip-us.apache.org/repos/asf/tomee/commit/613c847e Tree: http://git-wip-us.apache.org/repos/asf/tomee/tree/613c847e Diff: http://git-wip-us.apache.org/repos/asf/tomee/diff/613c847e Branch: refs/heads/fb_tomee8 Commit: 613c847e436d8658db45e4013a0c699560a81579 Parents: eb8199f Author: Jonathan GallimoreAuthored: Thu Feb 15 18:25:54 2018 + Committer: Jonathan Gallimore Committed: Thu Feb 15 18:25:54 2018 + -- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/tomee/blob/613c847e/pom.xml -- diff --git a/pom.xml b/pom.xml index 6fc6360..58581b8 100644 --- a/pom.xml +++ b/pom.xml @@ -183,7 +183,7 @@ 1.2.17 2.0.1 4.2.0 -2.3.5 +2.3.2 1.2.20 2.7.2 4.2.18.Final
[31/32] tomee git commit: fixing pom versions
fixing pom versions Project: http://git-wip-us.apache.org/repos/asf/tomee/repo Commit: http://git-wip-us.apache.org/repos/asf/tomee/commit/4a7531dc Tree: http://git-wip-us.apache.org/repos/asf/tomee/tree/4a7531dc Diff: http://git-wip-us.apache.org/repos/asf/tomee/diff/4a7531dc Branch: refs/heads/fb_tomee8 Commit: 4a7531dcf7e470044d732b089a8d1d764a4571c2 Parents: 62f75fc Author: Romain Manni-BucauAuthored: Mon Mar 12 14:32:15 2018 +0100 Committer: Romain Manni-Bucau Committed: Mon Mar 12 14:32:15 2018 +0100 -- examples/connector-ear/pom.xml| 2 +- examples/connector-war/pom.xml| 2 +- examples/simple-ear/moviefun-business-logic/pom.xml | 2 +- examples/simple-ear/moviefun-functional-tests/pom.xml | 6 +++--- examples/simple-ear/moviefun-webapp/pom.xml | 2 +- tck/microprofile-tck/config/pom.xml | 11 +-- tck/microprofile-tck/pom.xml | 2 +- tomee/tomee-microprofile-webapp/pom.xml | 2 +- 8 files changed, 10 insertions(+), 19 deletions(-) -- http://git-wip-us.apache.org/repos/asf/tomee/blob/4a7531dc/examples/connector-ear/pom.xml -- diff --git a/examples/connector-ear/pom.xml b/examples/connector-ear/pom.xml index a17ef21..97067b0 100644 --- a/examples/connector-ear/pom.xml +++ b/examples/connector-ear/pom.xml @@ -25,7 +25,7 @@ UTF-8 -7.0.5-SNAPSHOT +8.0.0-SNAPSHOT 2.1.0 http://git-wip-us.apache.org/repos/asf/tomee/blob/4a7531dc/examples/connector-war/pom.xml -- diff --git a/examples/connector-war/pom.xml b/examples/connector-war/pom.xml index 213fa56..c7a8b69 100644 --- a/examples/connector-war/pom.xml +++ b/examples/connector-war/pom.xml @@ -21,7 +21,7 @@ OpenEJB :: Connector Examples :: Connector in WAR UTF-8 -7.0.5-SNAPSHOT +8.0.0-SNAPSHOT 2.1.0 http://git-wip-us.apache.org/repos/asf/tomee/blob/4a7531dc/examples/simple-ear/moviefun-business-logic/pom.xml -- diff --git a/examples/simple-ear/moviefun-business-logic/pom.xml b/examples/simple-ear/moviefun-business-logic/pom.xml index b1a7e99..cd44a26 100644 --- a/examples/simple-ear/moviefun-business-logic/pom.xml +++ b/examples/simple-ear/moviefun-business-logic/pom.xml @@ -78,7 +78,7 @@ org.apache.tomee openejb-core - 7.0.5-SNAPSHOT + 8.0.0-SNAPSHOT test http://git-wip-us.apache.org/repos/asf/tomee/blob/4a7531dc/examples/simple-ear/moviefun-functional-tests/pom.xml -- diff --git a/examples/simple-ear/moviefun-functional-tests/pom.xml b/examples/simple-ear/moviefun-functional-tests/pom.xml index 414d8fa..4bbf3d8 100644 --- a/examples/simple-ear/moviefun-functional-tests/pom.xml +++ b/examples/simple-ear/moviefun-functional-tests/pom.xml @@ -88,7 +88,7 @@ org.apache.tomee openejb-core - 7.0.5-SNAPSHOT + 8.0.0-SNAPSHOT test @@ -106,7 +106,7 @@ org.apache.tomee tomee-embedded - 7.0.5-SNAPSHOT + 8.0.0-SNAPSHOT test @@ -136,7 +136,7 @@ org.apache.tomee arquillian-tomee-remote - 7.0.5-SNAPSHOT + 8.0.0-SNAPSHOT test http://git-wip-us.apache.org/repos/asf/tomee/blob/4a7531dc/examples/simple-ear/moviefun-webapp/pom.xml -- diff --git a/examples/simple-ear/moviefun-webapp/pom.xml b/examples/simple-ear/moviefun-webapp/pom.xml index d070c32..cb03986 100644 --- a/examples/simple-ear/moviefun-webapp/pom.xml +++ b/examples/simple-ear/moviefun-webapp/pom.xml @@ -59,7 +59,7 @@ org.apache.tomee openejb-core - 7.0.5-SNAPSHOT + 8.0.0-SNAPSHOT test http://git-wip-us.apache.org/repos/asf/tomee/blob/4a7531dc/tck/microprofile-tck/config/pom.xml -- diff --git a/tck/microprofile-tck/config/pom.xml b/tck/microprofile-tck/config/pom.xml index 4b6b61d..55c81d6 100644 --- a/tck/microprofile-tck/config/pom.xml +++ b/tck/microprofile-tck/config/pom.xml @@ -23,7 +23,7 @@ org.apache.tomee microprofile-tck -7.0.5-SNAPSHOT +8.0.0-SNAPSHOT microprofile-config-tck @@ -37,15 +37,6 @@ org.apache.maven.plugins -maven-compiler-plugin - - 1.8 - 1.8 - - - - -org.apache.maven.plugins maven-surefire-plugin
[28/32] tomee git commit: Updated LICENSE and NOTICE to use WebProfile.
Updated LICENSE and NOTICE to use WebProfile. Project: http://git-wip-us.apache.org/repos/asf/tomee/repo Commit: http://git-wip-us.apache.org/repos/asf/tomee/commit/a04e4b7d Tree: http://git-wip-us.apache.org/repos/asf/tomee/tree/a04e4b7d Diff: http://git-wip-us.apache.org/repos/asf/tomee/diff/a04e4b7d Branch: refs/heads/fb_tomee8 Commit: a04e4b7df46f6fc2b757d0a5d44d5ed42143349e Parents: 4c9a987 Author: Roberto CortezAuthored: Tue Mar 6 10:28:16 2018 + Committer: Roberto Cortez Committed: Tue Mar 6 10:28:16 2018 + -- .../src/main/resources/META-INF/LICENSE | 93 +--- .../src/main/resources/META-INF/NOTICE | 46 ++ 2 files changed, 32 insertions(+), 107 deletions(-) -- http://git-wip-us.apache.org/repos/asf/tomee/blob/a04e4b7d/tomee/tomee-microprofile-webapp/src/main/resources/META-INF/LICENSE -- diff --git a/tomee/tomee-microprofile-webapp/src/main/resources/META-INF/LICENSE b/tomee/tomee-microprofile-webapp/src/main/resources/META-INF/LICENSE index 469c73b..b71e72c 100644 --- a/tomee/tomee-microprofile-webapp/src/main/resources/META-INF/LICENSE +++ b/tomee/tomee-microprofile-webapp/src/main/resources/META-INF/LICENSE @@ -674,7 +674,7 @@ THE POSSIBILITY OF SUCH DAMAGE. = - - JSTL, JSP, Java EE Schemas, Mojarra + - JSTL, JSP, Java EE Schemas License: CDDL - @@ -1195,94 +1195,3 @@ Linking this library statically or dynamically with other modules is making a co As a special exception, the copyright holders of this library give you permission to link this library with independent modules to produce an executable, regardless of the license terms of these independent modules, and to copy and distribute the resulting executable under terms of your choice, provided that you also meet, for each linked independent module, the terms and conditions of the license of that module. An independent module is a module which is not derived from or based on this library. If you modify this library, you may extend this exception to your version of the library, but you are not obligated to do so. If you do not wish to do so, delete this exception statement from your version. -= -EclipseLink -ECJ - Eclipse Compiler for Java - -Eclipse Public License - v 1.0 - -THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC LICENSE ("AGREEMENT"). ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. - -1. DEFINITIONS - -"Contribution" means: - -a) in the case of the initial Contributor, the initial code and documentation distributed under this Agreement, and - -b) in the case of each subsequent Contributor: - -i) changes to the Program, and - -ii) additions to the Program; - -where such changes and/or additions to the Program originate from and are distributed by that particular Contributor. A Contribution 'originates' from a Contributor if it was added to the Program by such Contributor itself or anyone acting on such Contributor's behalf. Contributions do not include additions to the Program which: (i) are separate modules of software distributed in conjunction with the Program under their own license agreement, and (ii) are not derivative works of the Program. - -"Contributor" means any person or entity that distributes the Program. - -"Licensed Patents" mean patent claims licensable by a Contributor which are necessarily infringed by the use or sale of its Contribution alone or when combined with the Program. - -"Program" means the Contributions distributed in accordance with this Agreement. - -"Recipient" means anyone who receives the Program under this Agreement, including all Contributors. - -2. GRANT OF RIGHTS - -a) Subject to the terms of this Agreement, each Contributor hereby grants Recipient a non-exclusive, worldwide, royalty-free copyright license to reproduce, prepare derivative works of, publicly display, publicly perform, distribute and sublicense the Contribution of such Contributor, if any, and such derivative works, in source code and object code form. - -b) Subject to the terms of this Agreement, each Contributor hereby grants Recipient a non-exclusive, worldwide, royalty-free patent license under Licensed Patents to make, use, sell, offer to sell, import and otherwise transfer the Contribution of such Contributor, if any, in source code and object code form. This patent license shall apply to the combination of the Contribution and the Program if, at
[21/32] tomee git commit: Updated MicroProfile to version 1.3. Updated MicroProfile Config to version 1.2.
Updated MicroProfile to version 1.3. Updated MicroProfile Config to version 1.2. Project: http://git-wip-us.apache.org/repos/asf/tomee/repo Commit: http://git-wip-us.apache.org/repos/asf/tomee/commit/856f7285 Tree: http://git-wip-us.apache.org/repos/asf/tomee/tree/856f7285 Diff: http://git-wip-us.apache.org/repos/asf/tomee/diff/856f7285 Branch: refs/heads/fb_tomee8 Commit: 856f728560e13c472c996b145572758b1fbe3d5e Parents: 8262b3b Author: Roberto CortezAuthored: Fri Mar 2 01:19:05 2018 + Committer: Roberto Cortez Committed: Fri Mar 2 01:19:05 2018 + -- tomee/tomee-microprofile-webapp/pom.xml | 23 +++ tomee/tomee-microprofile/pom.xml| 14 ++ 2 files changed, 33 insertions(+), 4 deletions(-) -- http://git-wip-us.apache.org/repos/asf/tomee/blob/856f7285/tomee/tomee-microprofile-webapp/pom.xml -- diff --git a/tomee/tomee-microprofile-webapp/pom.xml b/tomee/tomee-microprofile-webapp/pom.xml index 2a6d9a3..55ae7f0 100644 --- a/tomee/tomee-microprofile-webapp/pom.xml +++ b/tomee/tomee-microprofile-webapp/pom.xml @@ -37,8 +37,11 @@ UTF-8 -1.1.0 -1.0 +1.3 + + +1.2 +1.1 @@ -49,16 +52,28 @@ war - + org.eclipse.microprofile.config + microprofile-config-api + ${microprofile.config.api.version} + + + org.apache.geronimo.config geronimo-config-impl ${microprofile.config.impl.version} http://git-wip-us.apache.org/repos/asf/tomee/blob/856f7285/tomee/tomee-microprofile/pom.xml -- diff --git a/tomee/tomee-microprofile/pom.xml b/tomee/tomee-microprofile/pom.xml index c67d672..cd1688b 100644 --- a/tomee/tomee-microprofile/pom.xml +++ b/tomee/tomee-microprofile/pom.xml @@ -37,4 +37,18 @@ UTF-8 + + + ${project.groupId} + tomee-catalina + ${project.version} + + + + ${project.groupId} + tomee-common + ${project.version} + + +
[12/32] tomee git commit: move to asm6
move to asm6 Project: http://git-wip-us.apache.org/repos/asf/tomee/repo Commit: http://git-wip-us.apache.org/repos/asf/tomee/commit/65a131e4 Tree: http://git-wip-us.apache.org/repos/asf/tomee/tree/65a131e4 Diff: http://git-wip-us.apache.org/repos/asf/tomee/diff/65a131e4 Branch: refs/heads/fb_tomee8 Commit: 65a131e46fe18ef3ae72390499c9222409044a01 Parents: 613c847 Author: Mark StrubergAuthored: Thu Feb 15 22:59:24 2018 +0100 Committer: Jonathan Gallimore Committed: Mon Feb 19 13:47:16 2018 + -- arquillian/arquillian-tomee-common/pom.xml | 2 +- .../arquillian-tomee-webapp-remote/pom.xml | 2 +- container/openejb-core/pom.xml | 4 ++-- .../config/PersistenceContextAnnFactory.java| 12 ++-- .../apache/openejb/core/TempClassLoader.java| 6 +++--- .../openejb/core/cmp/cmp2/Cmp1Generator.java| 10 +- .../openejb/core/cmp/cmp2/Cmp2Generator.java| 12 ++-- .../apache/openejb/core/cmp/cmp2/CmpField.java | 2 +- .../apache/openejb/core/cmp/cmp2/CmrField.java | 2 +- .../apache/openejb/core/cmp/cmp2/CmrStyle.java | 2 +- .../core/cmp/cmp2/PostCreateGenerator.java | 8 .../apache/openejb/dyni/DynamicSubclass.java| 14 +++--- .../apache/openejb/util/AnnotationFinder.java | 14 +++--- .../util/proxy/LocalBeanProxyFactory.java | 10 +- .../openejb/DependenceValidationTest.java | 4 ++-- .../org/apache/openejb/DependencyVisitor.java | 20 ++-- .../openejb/config/ServiceClasspathTest.java| 6 +++--- .../config/rules/KeysAnnotationVisitor.java | 8 .../config/rules/ValidationKeysAuditorTest.java | 4 ++-- .../apache/openejb/core/cmp/jpa/JpaTest.java| 8 container/openejb-jpa-integration/pom.xml | 2 +- .../openejb/jpa/integration/MakeTxLookup.java | 10 +- pom.xml | 4 ++-- server/openejb-server/pom.xml | 2 +- tomee/apache-tomee/pom.xml | 2 +- 25 files changed, 85 insertions(+), 85 deletions(-) -- http://git-wip-us.apache.org/repos/asf/tomee/blob/65a131e4/arquillian/arquillian-tomee-common/pom.xml -- diff --git a/arquillian/arquillian-tomee-common/pom.xml b/arquillian/arquillian-tomee-common/pom.xml index 2308bf7..a45d771 100644 --- a/arquillian/arquillian-tomee-common/pom.xml +++ b/arquillian/arquillian-tomee-common/pom.xml @@ -151,7 +151,7 @@ org.apache.geronimo.javamail - xbean-asm5-shaded + xbean-asm6-shaded org.apache.xbean http://git-wip-us.apache.org/repos/asf/tomee/blob/65a131e4/arquillian/arquillian-tomee-webapp-remote/pom.xml -- diff --git a/arquillian/arquillian-tomee-webapp-remote/pom.xml b/arquillian/arquillian-tomee-webapp-remote/pom.xml index ccfbaa3..534745a 100644 --- a/arquillian/arquillian-tomee-webapp-remote/pom.xml +++ b/arquillian/arquillian-tomee-webapp-remote/pom.xml @@ -170,7 +170,7 @@ org.apache.geronimo.javamail - xbean-asm5-shaded + xbean-asm6-shaded org.apache.xbean http://git-wip-us.apache.org/repos/asf/tomee/blob/65a131e4/container/openejb-core/pom.xml -- diff --git a/container/openejb-core/pom.xml b/container/openejb-core/pom.xml index be1e710..3655f3b 100644 --- a/container/openejb-core/pom.xml +++ b/container/openejb-core/pom.xml @@ -399,7 +399,7 @@ openejb-loader-${project.version}.jar openejb-client-${project.version}.jar -xbean-finder-shaded-${xbeanVersion}.jar xbean-asm5-shaded-${xbeanVersion}.jar +xbean-finder-shaded-${xbeanVersion}.jar xbean-asm6-shaded-${xbeanVersion}.jar org.apache.openejb.config.VmDeploymentFactory @@ -558,7 +558,7 @@ org.apache.xbean - xbean-asm5-shaded + xbean-asm6-shaded org.apache.xbean http://git-wip-us.apache.org/repos/asf/tomee/blob/65a131e4/container/openejb-core/src/main/java/org/apache/openejb/config/PersistenceContextAnnFactory.java -- diff --git a/container/openejb-core/src/main/java/org/apache/openejb/config/PersistenceContextAnnFactory.java b/container/openejb-core/src/main/java/org/apache/openejb/config/PersistenceContextAnnFactory.java index ee9671c..12adae1 100644 --- a/container/openejb-core/src/main/java/org/apache/openejb/config/PersistenceContextAnnFactory.java +++
[02/32] tomee git commit: Preparation for Microprofile
Preparation for Microprofile Project: http://git-wip-us.apache.org/repos/asf/tomee/repo Commit: http://git-wip-us.apache.org/repos/asf/tomee/commit/36c9c47e Tree: http://git-wip-us.apache.org/repos/asf/tomee/tree/36c9c47e Diff: http://git-wip-us.apache.org/repos/asf/tomee/diff/36c9c47e Branch: refs/heads/fb_tomee8 Commit: 36c9c47eda2ecb2bdd7f5a4ff78b8610d83589df Parents: 118060d Author: Andy GumbrechtAuthored: Mon Feb 12 18:40:12 2018 +0100 Committer: Andy Gumbrecht Committed: Mon Feb 12 18:40:12 2018 +0100 -- arquillian/arquillian-common/pom.xml| 2 +- arquillian/arquillian-openejb-embedded/pom.xml | 2 +- .../pom.xml | 2 +- arquillian/arquillian-tck/pom.xml | 2 +- arquillian/arquillian-tomee-common/pom.xml | 2 +- arquillian/arquillian-tomee-embedded/pom.xml| 2 +- .../arquillian-tomee-moviefun-example/pom.xml | 2 +- arquillian/arquillian-tomee-remote/pom.xml | 2 +- .../arquillian-tomee-codi-tests/pom.xml | 2 +- .../arquillian-tomee-config-tests/pom.xml | 2 +- .../arquillian-tomee-jaxrs-tests/pom.xml| 2 +- .../arquillian-tomee-jaxws-tests/pom.xml| 2 +- .../arquillian-tomee-jms-tests/pom.xml | 2 +- .../arquillian-tomee-webprofile-tests/pom.xml | 2 +- arquillian/arquillian-tomee-tests/pom.xml | 2 +- .../arquillian-tomee-webapp-remote/pom.xml | 2 +- arquillian/pom.xml | 2 +- arquillian/ziplock/pom.xml | 2 +- examples/access-timeout-meta/pom.xml| 2 +- examples/access-timeout/pom.xml | 2 +- examples/alternate-descriptors/pom.xml | 2 +- examples/applet/pom.xml | 2 +- examples/application-composer/pom.xml | 2 +- examples/applicationcomposer-jaxws-cdi/pom.xml | 2 +- examples/applicationexception/pom.xml | 2 +- examples/arquillian-jpa/pom.xml | 2 +- examples/async-methods/pom.xml | 2 +- examples/async-postconstruct/pom.xml| 2 +- .../bean-validation-design-by-contract/pom.xml | 2 +- .../cdi-alternative-and-stereotypes/pom.xml | 2 +- examples/cdi-application-scope/pom.xml | 2 +- examples/cdi-basic/pom.xml | 2 +- examples/cdi-ejbcontext-jaas/pom.xml| 2 +- examples/cdi-events/pom.xml | 2 +- examples/cdi-interceptors/pom.xml | 2 +- examples/cdi-produces-disposes/pom.xml | 2 +- examples/cdi-produces-field/pom.xml | 2 +- examples/cdi-realm/pom.xml | 2 +- examples/cdi-request-scope/pom.xml | 2 +- examples/cdi-session-scope/pom.xml | 2 +- examples/change-jaxws-url/pom.xml | 2 +- examples/client-resource-lookup-preview/pom.xml | 2 +- examples/component-interfaces/pom.xml | 2 +- examples/cucumber-jvm/pom.xml | 2 +- examples/custom-injection/pom.xml | 2 +- examples/datasource-ciphered-password/pom.xml | 2 +- examples/datasource-definition/pom.xml | 2 +- examples/datasource-versioning/pom.xml | 2 +- examples/decorators/pom.xml | 2 +- examples/deltaspike-configproperty/pom.xml | 2 +- examples/deltaspike-exception-handling/pom.xml | 2 +- examples/deltaspike-fullstack/pom.xml | 2 +- examples/deltaspike-i18n/pom.xml| 2 +- examples/dynamic-dao-implementation/pom.xml | 2 +- examples/dynamic-datasource-routing/pom.xml | 2 +- examples/dynamic-implementation/pom.xml | 2 +- examples/dynamic-proxy-to-access-mbean/pom.xml | 2 +- examples/ear-testing/business-logic/pom.xml | 2 +- examples/ear-testing/business-model/pom.xml | 2 +- examples/ear-testing/pom.xml| 2 +- examples/ejb-examples/pom.xml | 2 +- examples/ejb-webservice/pom.xml | 2 +- examples/groovy-cdi/pom.xml | 2 +- examples/groovy-jpa/pom.xml | 2 +- examples/groovy-spock/pom.xml | 2 +- examples/helloworld-weblogic/pom.xml| 2 +- examples/injection-of-connectionfactory/pom.xml | 2 +- examples/injection-of-datasource/pom.xml| 2 +- examples/injection-of-ejbs/pom.xml | 2 +- examples/injection-of-entitymanager/pom.xml | 2 +- examples/injection-of-env-entry/pom.xml | 2 +- examples/interceptors/pom.xml | 2 +- examples/javamail/pom.xml | 2 +- examples/jpa-eclipselink/pom.xml| 2 +- examples/jpa-enumerated/pom.xml | 2 +- examples/jpa-hibernate/pom.xml | 2 +-
[05/32] tomee git commit: Revert "Preparation for Microprofile"
http://git-wip-us.apache.org/repos/asf/tomee/blob/bcce7086/examples/rest-applicationcomposer/pom.xml -- diff --git a/examples/rest-applicationcomposer/pom.xml b/examples/rest-applicationcomposer/pom.xml index c6691f3..f3ef044 100644 --- a/examples/rest-applicationcomposer/pom.xml +++ b/examples/rest-applicationcomposer/pom.xml @@ -24,7 +24,7 @@ rest-applicationcomposer jar 1.1.0-SNAPSHOT - TomEE :: Examples :: REST and Application Composer + OpenEJB :: Examples :: REST and Application Composer UTF-8 http://git-wip-us.apache.org/repos/asf/tomee/blob/bcce7086/examples/rest-cdi/pom.xml -- diff --git a/examples/rest-cdi/pom.xml b/examples/rest-cdi/pom.xml index d9d363d..4e15f22 100644 --- a/examples/rest-cdi/pom.xml +++ b/examples/rest-cdi/pom.xml @@ -23,7 +23,7 @@ org.superbiz rest-cdi 1.1.0-SNAPSHOT - TomEE :: Examples :: REST XML JSON + OpenEJB :: Examples :: REST XML JSON UTF-8 http://git-wip-us.apache.org/repos/asf/tomee/blob/bcce7086/examples/rest-example-with-application/pom.xml -- diff --git a/examples/rest-example-with-application/pom.xml b/examples/rest-example-with-application/pom.xml index 77b923d..9036b84 100644 --- a/examples/rest-example-with-application/pom.xml +++ b/examples/rest-example-with-application/pom.xml @@ -25,7 +25,7 @@ rest-example-with-application war 1.1.0-SNAPSHOT - TomEE :: Examples ::REST Example With Application + OpenEJB :: Web Examples :: REST Example With Application UTF-8 http://git-wip-us.apache.org/repos/asf/tomee/blob/bcce7086/examples/rest-example/pom.xml -- diff --git a/examples/rest-example/pom.xml b/examples/rest-example/pom.xml index be16fba..fd9c366 100644 --- a/examples/rest-example/pom.xml +++ b/examples/rest-example/pom.xml @@ -25,7 +25,7 @@ rest-example war 1.1.0-SNAPSHOT - TomEE :: Examples ::REST Example + OpenEJB :: Web Examples :: REST Example UTF-8 http://git-wip-us.apache.org/repos/asf/tomee/blob/bcce7086/examples/rest-jaas/pom.xml -- diff --git a/examples/rest-jaas/pom.xml b/examples/rest-jaas/pom.xml index bd9d41b..5f655a2 100644 --- a/examples/rest-jaas/pom.xml +++ b/examples/rest-jaas/pom.xml @@ -25,7 +25,7 @@ rest-jaas 1.1.0-SNAPSHOT war - TomEE :: Examples :: JAXRS and JAAS + OpenEJB :: Examples :: JAXRS and JAAS http://git-wip-us.apache.org/repos/asf/tomee/blob/bcce7086/examples/rest-on-ejb/pom.xml -- diff --git a/examples/rest-on-ejb/pom.xml b/examples/rest-on-ejb/pom.xml index 844d900..a3e62bf 100644 --- a/examples/rest-on-ejb/pom.xml +++ b/examples/rest-on-ejb/pom.xml @@ -28,7 +28,7 @@ rest-on-ejb jar 1.1.0-SNAPSHOT - TomEE :: Examples :: REST and EJB + OpenEJB :: Examples :: REST and EJB UTF-8 http://git-wip-us.apache.org/repos/asf/tomee/blob/bcce7086/examples/rest-xml-json/pom.xml -- diff --git a/examples/rest-xml-json/pom.xml b/examples/rest-xml-json/pom.xml index d3f2a40..586edc2 100644 --- a/examples/rest-xml-json/pom.xml +++ b/examples/rest-xml-json/pom.xml @@ -23,7 +23,7 @@ org.superbiz rest-xml-json 1.1.0-SNAPSHOT - TomEE :: Examples :: REST XML JSON + OpenEJB :: Examples :: REST XML JSON UTF-8 http://git-wip-us.apache.org/repos/asf/tomee/blob/bcce7086/examples/scala-basic/pom.xml -- diff --git a/examples/scala-basic/pom.xml b/examples/scala-basic/pom.xml index ebd6bce..76eb930 100644 --- a/examples/scala-basic/pom.xml +++ b/examples/scala-basic/pom.xml @@ -25,7 +25,7 @@ scala-basic jar 1.1.0-SNAPSHOT - TomEE :: Examples :: Basic Scala + OpenEJB :: Examples :: Basic Scala UTF-8 http://git-wip-us.apache.org/repos/asf/tomee/blob/bcce7086/examples/schedule-events/pom.xml -- diff --git a/examples/schedule-events/pom.xml b/examples/schedule-events/pom.xml index 26b4aa6..2b9a29c 100644 --- a/examples/schedule-events/pom.xml +++ b/examples/schedule-events/pom.xml @@ -26,7 +26,7 @@ schedule-events jar 1.1.0-SNAPSHOT - TomEE :: Examples :: @Schedule Events + OpenEJB :: Examples :: @Schedule Events UTF-8 http://git-wip-us.apache.org/repos/asf/tomee/blob/bcce7086/examples/schedule-expression/pom.xml -- diff --git a/examples/schedule-expression/pom.xml b/examples/schedule-expression/pom.xml index 7b0e07b..905478d 100644 --- a/examples/schedule-expression/pom.xml +++
[10/32] tomee git commit: Revert "upgrating amq from 5.14.5 to 5.15.2"
Revert "upgrating amq from 5.14.5 to 5.15.2" This reverts commit a049ad484eb061884d0c4a0c85bbe4b250a390ff. Project: http://git-wip-us.apache.org/repos/asf/tomee/repo Commit: http://git-wip-us.apache.org/repos/asf/tomee/commit/eb8199f1 Tree: http://git-wip-us.apache.org/repos/asf/tomee/tree/eb8199f1 Diff: http://git-wip-us.apache.org/repos/asf/tomee/diff/eb8199f1 Branch: refs/heads/fb_tomee8 Commit: eb8199f1dc33b2675ba2ac0af504d5ad46e9f979 Parents: a049ad4 Author: Jonathan GallimoreAuthored: Thu Feb 15 12:33:04 2018 + Committer: Jonathan Gallimore Committed: Thu Feb 15 12:33:04 2018 + -- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/tomee/blob/eb8199f1/pom.xml -- diff --git a/pom.xml b/pom.xml index 0670dd2..6fc6360 100644 --- a/pom.xml +++ b/pom.xml @@ -169,7 +169,7 @@ 3.3 1.1.2 -5.15.2 +5.14.5 3.1.4.RELEASE 4.12 1.4.1
[03/32] tomee git commit: Resolve conflict
Resolve conflict Project: http://git-wip-us.apache.org/repos/asf/tomee/repo Commit: http://git-wip-us.apache.org/repos/asf/tomee/commit/d5607fcb Tree: http://git-wip-us.apache.org/repos/asf/tomee/tree/d5607fcb Diff: http://git-wip-us.apache.org/repos/asf/tomee/diff/d5607fcb Branch: refs/heads/fb_tomee8 Commit: d5607fcb467b1e1e13baeedf8d29943e6e12b206 Parents: 715e7f2 36c9c47 Author: Andy GumbrechtAuthored: Mon Feb 12 18:46:39 2018 +0100 Committer: Andy Gumbrecht Committed: Mon Feb 12 18:46:39 2018 +0100 -- arquillian/arquillian-common/pom.xml| 2 +- arquillian/arquillian-openejb-embedded/pom.xml | 2 +- .../pom.xml | 2 +- arquillian/arquillian-tck/pom.xml | 2 +- arquillian/arquillian-tomee-common/pom.xml | 2 +- arquillian/arquillian-tomee-embedded/pom.xml| 2 +- .../arquillian-tomee-moviefun-example/pom.xml | 2 +- arquillian/arquillian-tomee-remote/pom.xml | 2 +- .../arquillian-tomee-codi-tests/pom.xml | 2 +- .../arquillian-tomee-config-tests/pom.xml | 2 +- .../arquillian-tomee-jaxrs-tests/pom.xml| 2 +- .../arquillian-tomee-jaxws-tests/pom.xml| 2 +- .../arquillian-tomee-jms-tests/pom.xml | 2 +- .../arquillian-tomee-webprofile-tests/pom.xml | 2 +- arquillian/arquillian-tomee-tests/pom.xml | 2 +- .../arquillian-tomee-webapp-remote/pom.xml | 2 +- arquillian/pom.xml | 2 +- arquillian/ziplock/pom.xml | 2 +- examples/access-timeout-meta/pom.xml| 2 +- examples/access-timeout/pom.xml | 2 +- examples/alternate-descriptors/pom.xml | 2 +- examples/applet/pom.xml | 2 +- examples/application-composer/pom.xml | 2 +- examples/applicationcomposer-jaxws-cdi/pom.xml | 2 +- examples/applicationexception/pom.xml | 2 +- examples/arquillian-jpa/pom.xml | 2 +- examples/async-methods/pom.xml | 2 +- examples/async-postconstruct/pom.xml| 2 +- .../bean-validation-design-by-contract/pom.xml | 2 +- .../cdi-alternative-and-stereotypes/pom.xml | 2 +- examples/cdi-application-scope/pom.xml | 2 +- examples/cdi-basic/pom.xml | 2 +- examples/cdi-ejbcontext-jaas/pom.xml| 2 +- examples/cdi-events/pom.xml | 2 +- examples/cdi-interceptors/pom.xml | 2 +- examples/cdi-produces-disposes/pom.xml | 2 +- examples/cdi-produces-field/pom.xml | 2 +- examples/cdi-realm/pom.xml | 2 +- examples/cdi-request-scope/pom.xml | 2 +- examples/cdi-session-scope/pom.xml | 2 +- examples/change-jaxws-url/pom.xml | 2 +- examples/client-resource-lookup-preview/pom.xml | 2 +- examples/component-interfaces/pom.xml | 2 +- examples/cucumber-jvm/pom.xml | 2 +- examples/custom-injection/pom.xml | 2 +- examples/datasource-ciphered-password/pom.xml | 2 +- examples/datasource-definition/pom.xml | 2 +- examples/datasource-versioning/pom.xml | 2 +- examples/decorators/pom.xml | 2 +- examples/deltaspike-configproperty/pom.xml | 2 +- examples/deltaspike-exception-handling/pom.xml | 2 +- examples/deltaspike-fullstack/pom.xml | 2 +- examples/deltaspike-i18n/pom.xml| 2 +- examples/dynamic-dao-implementation/pom.xml | 2 +- examples/dynamic-datasource-routing/pom.xml | 2 +- examples/dynamic-implementation/pom.xml | 2 +- examples/dynamic-proxy-to-access-mbean/pom.xml | 2 +- examples/ear-testing/business-logic/pom.xml | 2 +- examples/ear-testing/business-model/pom.xml | 2 +- examples/ear-testing/pom.xml| 2 +- examples/ejb-examples/pom.xml | 2 +- examples/ejb-webservice/pom.xml | 2 +- examples/groovy-cdi/pom.xml | 2 +- examples/groovy-jpa/pom.xml | 2 +- examples/groovy-spock/pom.xml | 2 +- examples/helloworld-weblogic/pom.xml| 2 +- examples/injection-of-connectionfactory/pom.xml | 2 +- examples/injection-of-datasource/pom.xml| 2 +- examples/injection-of-ejbs/pom.xml | 2 +- examples/injection-of-entitymanager/pom.xml | 2 +- examples/injection-of-env-entry/pom.xml | 2 +- examples/interceptors/pom.xml | 2 +- examples/javamail/pom.xml | 2 +- examples/jpa-eclipselink/pom.xml| 2 +- examples/jpa-enumerated/pom.xml | 2 +- examples/jpa-hibernate/pom.xml | 2 +-
[27/32] tomee git commit: Added MicroProfile Geronimo Configuration to reload system properties.
Added MicroProfile Geronimo Configuration to reload system properties. Project: http://git-wip-us.apache.org/repos/asf/tomee/repo Commit: http://git-wip-us.apache.org/repos/asf/tomee/commit/4c9a987f Tree: http://git-wip-us.apache.org/repos/asf/tomee/tree/4c9a987f Diff: http://git-wip-us.apache.org/repos/asf/tomee/diff/4c9a987f Branch: refs/heads/fb_tomee8 Commit: 4c9a987f0e49fc1c62c150b638eca00f094974c7 Parents: 6c8604c Author: Roberto CortezAuthored: Tue Mar 6 01:01:54 2018 + Committer: Roberto Cortez Committed: Tue Mar 6 01:01:54 2018 + -- tck/microprofile-tck/config/src/test/resources/arquillian.xml | 1 - .../java/org/apache/tomee/microprofile/MicroProfileService.java | 5 + 2 files changed, 5 insertions(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/tomee/blob/4c9a987f/tck/microprofile-tck/config/src/test/resources/arquillian.xml -- diff --git a/tck/microprofile-tck/config/src/test/resources/arquillian.xml b/tck/microprofile-tck/config/src/test/resources/arquillian.xml index ecddd0c..629d71d 100644 --- a/tck/microprofile-tck/config/src/test/resources/arquillian.xml +++ b/tck/microprofile-tck/config/src/test/resources/arquillian.xml @@ -33,7 +33,6 @@ true config.test = SUCCESS - org.apache.geronimo.config.configsource.SystemPropertyConfigSource.copy = false http://git-wip-us.apache.org/repos/asf/tomee/blob/4c9a987f/tomee/tomee-microprofile/src/main/java/org/apache/tomee/microprofile/MicroProfileService.java -- diff --git a/tomee/tomee-microprofile/src/main/java/org/apache/tomee/microprofile/MicroProfileService.java b/tomee/tomee-microprofile/src/main/java/org/apache/tomee/microprofile/MicroProfileService.java index d669b88..70448c6 100644 --- a/tomee/tomee-microprofile/src/main/java/org/apache/tomee/microprofile/MicroProfileService.java +++ b/tomee/tomee-microprofile/src/main/java/org/apache/tomee/microprofile/MicroProfileService.java @@ -42,5 +42,10 @@ public class MicroProfileService implements Service { .getOptions() .getProperties() .setProperty(TOMEE_WEBAPP_CLASSLOADER_ENRICHMENT_PREFIXES, prefixes); + +final String microProfileReloadConfig = + System.getProperty("org.apache.geronimo.config.configsource.SystemPropertyConfigSource.copy", "false"); + System.setProperty("org.apache.geronimo.config.configsource.SystemPropertyConfigSource.copy", + microProfileReloadConfig); } }
[04/32] tomee git commit: Tomcat version
Tomcat version Project: http://git-wip-us.apache.org/repos/asf/tomee/repo Commit: http://git-wip-us.apache.org/repos/asf/tomee/commit/13881399 Tree: http://git-wip-us.apache.org/repos/asf/tomee/tree/13881399 Diff: http://git-wip-us.apache.org/repos/asf/tomee/diff/13881399 Branch: refs/heads/fb_tomee8 Commit: 138813998d419899e8f4a0bf30ff261a383f498a Parents: d5607fc Author: Andy GumbrechtAuthored: Mon Feb 12 18:48:10 2018 +0100 Committer: Andy Gumbrecht Committed: Mon Feb 12 18:48:10 2018 +0100 -- pom.xml | 1 - 1 file changed, 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/tomee/blob/13881399/pom.xml -- diff --git a/pom.xml b/pom.xml index 1ba0b74..53bb0f1 100644 --- a/pom.xml +++ b/pom.xml @@ -126,7 +126,6 @@ ${project.groupId}.${project.artifactId} 0.4-incubating 3.1.13 -8.5.24 1.2.6 2.0.0 1.1.13.Final
[07/32] tomee git commit: Auto stash before revert of "Preparation for Microprofile"
Auto stash before revert of "Preparation for Microprofile" Project: http://git-wip-us.apache.org/repos/asf/tomee/repo Commit: http://git-wip-us.apache.org/repos/asf/tomee/commit/f39497fe Tree: http://git-wip-us.apache.org/repos/asf/tomee/tree/f39497fe Diff: http://git-wip-us.apache.org/repos/asf/tomee/diff/f39497fe Branch: refs/heads/fb_tomee8 Commit: f39497febab7a1edff4b9e96931a570dfbda5939 Parents: bcce708 Author: Andy GumbrechtAuthored: Mon Feb 12 21:23:20 2018 +0100 Committer: Andy Gumbrecht Committed: Mon Feb 12 21:23:20 2018 +0100 -- microprofile/microprofile-config/pom.xml| 41 + .../config/MicroprofileConfigTest.java | 37 .../java/org/superbiz/config/BeanAppScoped.java | 20 + .../src/test/resources/arquillian.xml | 33 ++ microprofile/pom.xml| 46 5 files changed, 177 insertions(+) -- http://git-wip-us.apache.org/repos/asf/tomee/blob/f39497fe/microprofile/microprofile-config/pom.xml -- diff --git a/microprofile/microprofile-config/pom.xml b/microprofile/microprofile-config/pom.xml new file mode 100644 index 000..cce11b2 --- /dev/null +++ b/microprofile/microprofile-config/pom.xml @@ -0,0 +1,41 @@ + + +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/xsd/maven-4.0.0.xsd;> + + 4.0.0 + + +microprofile +org.apache.tomee +7.0.5-SNAPSHOT + + + microprofile-config + Microprofile :: Config + + + + org.apache.geronimo.config + geronimo-config-impl + + + + \ No newline at end of file http://git-wip-us.apache.org/repos/asf/tomee/blob/f39497fe/microprofile/microprofile-config/src/test/java/org/apache/tomee/microprofile/config/MicroprofileConfigTest.java -- diff --git a/microprofile/microprofile-config/src/test/java/org/apache/tomee/microprofile/config/MicroprofileConfigTest.java b/microprofile/microprofile-config/src/test/java/org/apache/tomee/microprofile/config/MicroprofileConfigTest.java new file mode 100644 index 000..25f2fc0 --- /dev/null +++ b/microprofile/microprofile-config/src/test/java/org/apache/tomee/microprofile/config/MicroprofileConfigTest.java @@ -0,0 +1,37 @@ +package org.apache.tomee.microprofile.config; + +import org.jboss.arquillian.container.test.api.Deployment; +import org.jboss.arquillian.junit.Arquillian; +import org.jboss.arquillian.test.api.ArquillianResource; +import org.jboss.shrinkwrap.api.Archive; +import org.jboss.shrinkwrap.api.ShrinkWrap; +import org.jboss.shrinkwrap.api.asset.EmptyAsset; +import org.jboss.shrinkwrap.api.spec.WebArchive; +import org.junit.Assert; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.superbiz.config.BeanAppScoped; + +import java.net.URL; + +@RunWith(Arquillian.class) +public class MicroprofileConfigTest { + +@Deployment +public static Archive createDeployment() { +final WebArchive war = ShrinkWrap.create(WebArchive.class) +.addClass(BeanAppScoped.class) +.addAsManifestResource(EmptyAsset.INSTANCE, "beans.xml"); + +System.out.println(war.toString(true)); +return war; +} + +@ArquillianResource +private URL url; + +@Test +public void should_get_config_parameter() { +Assert.fail("Not yet implemented for " + url); +} +} http://git-wip-us.apache.org/repos/asf/tomee/blob/f39497fe/microprofile/microprofile-config/src/test/java/org/superbiz/config/BeanAppScoped.java -- diff --git a/microprofile/microprofile-config/src/test/java/org/superbiz/config/BeanAppScoped.java b/microprofile/microprofile-config/src/test/java/org/superbiz/config/BeanAppScoped.java new file mode 100644 index 000..efe40ff --- /dev/null +++ b/microprofile/microprofile-config/src/test/java/org/superbiz/config/BeanAppScoped.java @@ -0,0 +1,20 @@ +package org.superbiz.config; + +import org.eclipse.microprofile.config.inject.ConfigProperty; +import javax.enterprise.context.ApplicationScoped; +import org.jboss.arquillian.core.api.annotation.Inject; + +import javax.annotation.PostConstruct; + +@ApplicationScoped +public class BeanAppScoped { + +@PostConstruct +public void postConstruct() { +System.out.println("BeanAppScoped created"); +} + +@Inject +@ConfigProperty(name="my.string.value", defaultValue = "nothing") +private String myString; +}
[09/32] tomee git commit: upgrating amq from 5.14.5 to 5.15.2
upgrating amq from 5.14.5 to 5.15.2 Project: http://git-wip-us.apache.org/repos/asf/tomee/repo Commit: http://git-wip-us.apache.org/repos/asf/tomee/commit/a049ad48 Tree: http://git-wip-us.apache.org/repos/asf/tomee/tree/a049ad48 Diff: http://git-wip-us.apache.org/repos/asf/tomee/diff/a049ad48 Branch: refs/heads/fb_tomee8 Commit: a049ad484eb061884d0c4a0c85bbe4b250a390ff Parents: 0a0ddab Author: Thiago VeroneziAuthored: Wed Feb 14 09:14:49 2018 -0200 Committer: Thiago Veronezi Committed: Wed Feb 14 09:14:49 2018 -0200 -- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/tomee/blob/a049ad48/pom.xml -- diff --git a/pom.xml b/pom.xml index 6fc6360..0670dd2 100644 --- a/pom.xml +++ b/pom.xml @@ -169,7 +169,7 @@ 3.3 1.1.2 -5.14.5 +5.15.2 3.1.4.RELEASE 4.12 1.4.1
tomee git commit: TOMEE-2174 ensure nested parameters don't break interceptors resolution
Repository: tomee Updated Branches: refs/heads/fb_tomee8 32c8164ad -> 27639abc7 TOMEE-2174 ensure nested parameters don't break interceptors resolution Project: http://git-wip-us.apache.org/repos/asf/tomee/repo Commit: http://git-wip-us.apache.org/repos/asf/tomee/commit/27639abc Tree: http://git-wip-us.apache.org/repos/asf/tomee/tree/27639abc Diff: http://git-wip-us.apache.org/repos/asf/tomee/diff/27639abc Branch: refs/heads/fb_tomee8 Commit: 27639abc74cd60ae945a29fcae61abbca50df3db Parents: 32c8164 Author: Romain Manni-BucauAuthored: Sun Feb 25 16:23:25 2018 +0100 Committer: Romain Manni-Bucau Committed: Sun Feb 25 16:23:25 2018 +0100 -- .../assembler/classic/MethodInfoUtil.java | 2 +- .../NestedParamInterceptorTest.java | 60 2 files changed, 61 insertions(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/tomee/blob/27639abc/container/openejb-core/src/main/java/org/apache/openejb/assembler/classic/MethodInfoUtil.java -- diff --git a/container/openejb-core/src/main/java/org/apache/openejb/assembler/classic/MethodInfoUtil.java b/container/openejb-core/src/main/java/org/apache/openejb/assembler/classic/MethodInfoUtil.java index c284644..998e18d 100644 --- a/container/openejb-core/src/main/java/org/apache/openejb/assembler/classic/MethodInfoUtil.java +++ b/container/openejb-core/src/main/java/org/apache/openejb/assembler/classic/MethodInfoUtil.java @@ -550,7 +550,7 @@ public class MethodInfoUtil { for (int i = 0; i < parameterTypes.length; i++) { final Class parameterType = parameterTypes[i]; final String methodParam = methodParams.get(i); -if (!methodParam.equals(getName(parameterType)) && !methodParam.equals(parameterType.getName())) { +if (!methodParam.equals(getName(parameterType).replace('$', '.')) && !methodParam.equals(parameterType.getName())) { return false; } } http://git-wip-us.apache.org/repos/asf/tomee/blob/27639abc/container/openejb-core/src/test/java/org/apache/openejb/interceptors/NestedParamInterceptorTest.java -- diff --git a/container/openejb-core/src/test/java/org/apache/openejb/interceptors/NestedParamInterceptorTest.java b/container/openejb-core/src/test/java/org/apache/openejb/interceptors/NestedParamInterceptorTest.java new file mode 100644 index 000..1b0cbbb --- /dev/null +++ b/container/openejb-core/src/test/java/org/apache/openejb/interceptors/NestedParamInterceptorTest.java @@ -0,0 +1,60 @@ +/** + * 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.apache.openejb.interceptors; + +import static org.junit.Assert.assertEquals; + +import javax.ejb.EJB; +import javax.ejb.Stateless; +import javax.interceptor.AroundInvoke; +import javax.interceptor.Interceptors; +import javax.interceptor.InvocationContext; + +import org.apache.openejb.junit.ApplicationComposer; +import org.apache.openejb.testing.Classes; +import org.junit.Test; +import org.junit.runner.RunWith; + +@RunWith(ApplicationComposer.class) +@Classes(NestedParamInterceptorTest.Intercepted.class) +public class NestedParamInterceptorTest { +@EJB +private Intercepted bean; + +@Test +public void run() { +assertEquals("success", bean.value(null)); +} + +@Stateless +public static class Intercepted { +@Interceptors(InterceptorImpl.class) +public String value(final Nested param) { +return "failed"; +} +} + +public static class InterceptorImpl { +@AroundInvoke +public Object invoke(final InvocationContext ctx) throws Exception { +return "success"; +} +} + +public static class Nested { +} +}
tomee git commit: some forgotten ASM upgrades
Repository: tomee Updated Branches: refs/heads/fb_tomee8 220648eef -> 32c8164ad some forgotten ASM upgrades Project: http://git-wip-us.apache.org/repos/asf/tomee/repo Commit: http://git-wip-us.apache.org/repos/asf/tomee/commit/32c8164a Tree: http://git-wip-us.apache.org/repos/asf/tomee/tree/32c8164a Diff: http://git-wip-us.apache.org/repos/asf/tomee/diff/32c8164a Branch: refs/heads/fb_tomee8 Commit: 32c8164ad47dfa49c29ff91f339e541ac129a695 Parents: 220648e Author: Romain Manni-BucauAuthored: Tue Feb 20 17:52:43 2018 +0100 Committer: Romain Manni-Bucau Committed: Tue Feb 20 17:52:43 2018 +0100 -- .../apache/openejb/config/PersistenceContextAnnFactory.java| 2 +- .../src/main/java/org/apache/openejb/dyni/DynamicSubclass.java | 6 +++--- .../main/java/org/apache/openejb/util/AnnotationFinder.java| 2 +- .../src/test/java/org/apache/openejb/DependencyVisitor.java| 2 +- .../src/test/java/org/apache/openejb/core/cmp/jpa/JpaTest.java | 2 +- 5 files changed, 7 insertions(+), 7 deletions(-) -- http://git-wip-us.apache.org/repos/asf/tomee/blob/32c8164a/container/openejb-core/src/main/java/org/apache/openejb/config/PersistenceContextAnnFactory.java -- diff --git a/container/openejb-core/src/main/java/org/apache/openejb/config/PersistenceContextAnnFactory.java b/container/openejb-core/src/main/java/org/apache/openejb/config/PersistenceContextAnnFactory.java index 12adae1..66e2361 100644 --- a/container/openejb-core/src/main/java/org/apache/openejb/config/PersistenceContextAnnFactory.java +++ b/container/openejb-core/src/main/java/org/apache/openejb/config/PersistenceContextAnnFactory.java @@ -248,7 +248,7 @@ public class PersistenceContextAnnFactory { private final AsmPersistenceContext persistenceContext = new AsmPersistenceContext(); public PersistenceContextVisitor(final String className, final String memberName, final Map contexts) { -super(Opcodes.ASM5); +super(Opcodes.ASM6); this.contexts = contexts; persistenceContext.name = className + "/" + memberName; } http://git-wip-us.apache.org/repos/asf/tomee/blob/32c8164a/container/openejb-core/src/main/java/org/apache/openejb/dyni/DynamicSubclass.java -- diff --git a/container/openejb-core/src/main/java/org/apache/openejb/dyni/DynamicSubclass.java b/container/openejb-core/src/main/java/org/apache/openejb/dyni/DynamicSubclass.java index fc0ff9a..c9dd53b 100644 --- a/container/openejb-core/src/main/java/org/apache/openejb/dyni/DynamicSubclass.java +++ b/container/openejb-core/src/main/java/org/apache/openejb/dyni/DynamicSubclass.java @@ -297,7 +297,7 @@ public class DynamicSubclass implements Opcodes { private final MethodVisitor newMethod; public MoveAnnotationsVisitor(final MethodVisitor movedMethod, final MethodVisitor newMethod) { -super(Opcodes.ASM5, movedMethod); +super(Opcodes.ASM6, movedMethod); this.newMethod = newMethod; } @@ -323,7 +323,7 @@ public class DynamicSubclass implements Opcodes { private final ClassVisitor newClass; public CopyClassAnnotations(final ClassVisitor newClass) { -super(Opcodes.ASM5); +super(Opcodes.ASM6); this.newClass = newClass; } @@ -337,7 +337,7 @@ public class DynamicSubclass implements Opcodes { private final Map visitors; public CopyMethodAnnotations(final Map visitors) { -super(Opcodes.ASM5); +super(Opcodes.ASM6); this.visitors = visitors; } http://git-wip-us.apache.org/repos/asf/tomee/blob/32c8164a/container/openejb-core/src/main/java/org/apache/openejb/util/AnnotationFinder.java -- diff --git a/container/openejb-core/src/main/java/org/apache/openejb/util/AnnotationFinder.java b/container/openejb-core/src/main/java/org/apache/openejb/util/AnnotationFinder.java index eb4587c..3f29b3a 100644 --- a/container/openejb-core/src/main/java/org/apache/openejb/util/AnnotationFinder.java +++ b/container/openejb-core/src/main/java/org/apache/openejb/util/AnnotationFinder.java @@ -327,7 +327,7 @@ public class AnnotationFinder { private final Filter filter; public Visitor(final Filter filter) { -super(Opcodes.ASM5); +super(Opcodes.ASM6); this.filter = filter; try {
tomee git commit: validating EJB producers/disposes in case of remote declaration
Repository: tomee Updated Branches: refs/heads/fb_tomee8 3c2703a8e -> 32c0c60d5 validating EJB producers/disposes in case of remote declaration Project: http://git-wip-us.apache.org/repos/asf/tomee/repo Commit: http://git-wip-us.apache.org/repos/asf/tomee/commit/32c0c60d Tree: http://git-wip-us.apache.org/repos/asf/tomee/tree/32c0c60d Diff: http://git-wip-us.apache.org/repos/asf/tomee/diff/32c0c60d Branch: refs/heads/fb_tomee8 Commit: 32c0c60d55a9b765c4eb9265169ecc76fb436ddc Parents: 3c2703a Author: Romain Manni-BucauAuthored: Thu Feb 1 14:43:01 2018 +0100 Committer: Romain Manni-Bucau Committed: Thu Feb 1 14:43:01 2018 +0100 -- .../src/main/java/org/apache/openejb/cdi/CdiPlugin.java | 11 +++ tck/cdi-embedded/src/test/resources/failing.xml | 2 +- 2 files changed, 8 insertions(+), 5 deletions(-) -- http://git-wip-us.apache.org/repos/asf/tomee/blob/32c0c60d/container/openejb-core/src/main/java/org/apache/openejb/cdi/CdiPlugin.java -- diff --git a/container/openejb-core/src/main/java/org/apache/openejb/cdi/CdiPlugin.java b/container/openejb-core/src/main/java/org/apache/openejb/cdi/CdiPlugin.java index 5a2042c..af39cd6 100644 --- a/container/openejb-core/src/main/java/org/apache/openejb/cdi/CdiPlugin.java +++ b/container/openejb-core/src/main/java/org/apache/openejb/cdi/CdiPlugin.java @@ -501,8 +501,9 @@ public class CdiPlugin extends AbstractOwbPlugin implements OpenWebBeansJavaEEPl for (final ProducerMethodBean m : methods) { final Method method = m.getCreatorMethod(); -if (doResolveViewMethod(bean, method) == null) { -throw new WebBeansConfigurationException("@Produces " + method + " not in the ejb view of ejb " + beanContext.getEjbName()); +final Method viewMethod = doResolveViewMethod(bean, method); +if (viewMethod == null || beanContext.getBusinessRemoteInterfaces().contains(viewMethod.getDeclaringClass())) { +throw new WebBeansConfigurationException("@Produces " + method + " not in a local ejb view of ejb " + beanContext.getEjbName()); } } } @@ -529,8 +530,10 @@ public class CdiPlugin extends AbstractOwbPlugin implements OpenWebBeansJavaEEPl if (m.getParameterTypes().length > 0) { for (final Annotation[] a : m.getParameterAnnotations()) { for (final Annotation ann : a) { -if (ann.annotationType().equals(Disposes.class) && doResolveViewMethod(bean, m) == null) { -throw new WebBeansConfigurationException("@Disposes is forbidden on non business EJB methods"); +final Method method = doResolveViewMethod(bean, m); +if (ann.annotationType().equals(Disposes.class) && +(method == null || bean.getBeanContext().getBusinessRemoteInterfaces().contains(method.getDeclaringClass( { +throw new WebBeansConfigurationException("@Disposes is forbidden on non business or remote EJB methods"); } } } http://git-wip-us.apache.org/repos/asf/tomee/blob/32c0c60d/tck/cdi-embedded/src/test/resources/failing.xml -- diff --git a/tck/cdi-embedded/src/test/resources/failing.xml b/tck/cdi-embedded/src/test/resources/failing.xml index 15aa7cc..814e116 100644 --- a/tck/cdi-embedded/src/test/resources/failing.xml +++ b/tck/cdi-embedded/src/test/resources/failing.xml @@ -39,7 +39,7 @@ TODO these are tests we finally need to pass! --> - +
tomee git commit: wiring OWB async default pool
Repository: tomee Updated Branches: refs/heads/fb_tomee8 c2f603d38 -> 3c2703a8e wiring OWB async default pool Project: http://git-wip-us.apache.org/repos/asf/tomee/repo Commit: http://git-wip-us.apache.org/repos/asf/tomee/commit/3c2703a8 Tree: http://git-wip-us.apache.org/repos/asf/tomee/tree/3c2703a8 Diff: http://git-wip-us.apache.org/repos/asf/tomee/diff/3c2703a8 Branch: refs/heads/fb_tomee8 Commit: 3c2703a8e85af07315279ce2a384e1ce2dc70060 Parents: c2f603d Author: Romain Manni-BucauAuthored: Thu Feb 1 14:33:22 2018 +0100 Committer: Romain Manni-Bucau Committed: Thu Feb 1 14:33:22 2018 +0100 -- .../openejb/assembler/classic/Assembler.java| 3 ++ .../openejb/cdi/ThreadSingletonServiceImpl.java | 39 tck/cdi-embedded/src/test/resources/failing.xml | 2 +- 3 files changed, 43 insertions(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/tomee/blob/3c2703a8/container/openejb-core/src/main/java/org/apache/openejb/assembler/classic/Assembler.java -- diff --git a/container/openejb-core/src/main/java/org/apache/openejb/assembler/classic/Assembler.java b/container/openejb-core/src/main/java/org/apache/openejb/assembler/classic/Assembler.java index 853e05c..e831240 100644 --- a/container/openejb-core/src/main/java/org/apache/openejb/assembler/classic/Assembler.java +++ b/container/openejb-core/src/main/java/org/apache/openejb/assembler/classic/Assembler.java @@ -121,6 +121,7 @@ import org.apache.openejb.resource.jdbc.DataSourceFactory; import org.apache.openejb.spi.ApplicationServer; import org.apache.openejb.spi.ContainerSystem; import org.apache.openejb.spi.SecurityService; +import org.apache.openejb.threads.impl.ManagedExecutorServiceImpl; import org.apache.openejb.util.Contexts; import org.apache.openejb.util.DaemonThreadFactory; import org.apache.openejb.util.Duration; @@ -246,6 +247,7 @@ import java.util.concurrent.ExecutionException; import java.util.concurrent.Executor; import java.util.concurrent.ExecutorService; import java.util.concurrent.Executors; +import java.util.concurrent.ForkJoinPool; import java.util.concurrent.TimeoutException; import java.util.concurrent.atomic.AtomicBoolean; import java.util.concurrent.atomic.AtomicReference; @@ -1734,6 +1736,7 @@ public class Assembler extends AssemblerTool implements org.apache.openejb.spi.A final Map services = new HashMap (); +services.put(Executor.class, new ManagedExecutorServiceImpl(ForkJoinPool.commonPool())); services.put(JNDIService.class, new OpenEJBJndiService()); services.put(AppContext.class, appContext); services.put(ScannerService.class, new CdiScanner()); http://git-wip-us.apache.org/repos/asf/tomee/blob/3c2703a8/container/openejb-core/src/main/java/org/apache/openejb/cdi/ThreadSingletonServiceImpl.java -- diff --git a/container/openejb-core/src/main/java/org/apache/openejb/cdi/ThreadSingletonServiceImpl.java b/container/openejb-core/src/main/java/org/apache/openejb/cdi/ThreadSingletonServiceImpl.java index afcfc5f..a911e40 100644 --- a/container/openejb-core/src/main/java/org/apache/openejb/cdi/ThreadSingletonServiceImpl.java +++ b/container/openejb-core/src/main/java/org/apache/openejb/cdi/ThreadSingletonServiceImpl.java @@ -22,7 +22,11 @@ import org.apache.openejb.assembler.classic.AppInfo; import org.apache.openejb.assembler.classic.EjbJarInfo; import org.apache.openejb.cdi.transactional.TransactionContext; import org.apache.openejb.loader.SystemInstance; +import org.apache.openejb.threads.impl.ManagedExecutorServiceImpl; +import org.apache.openejb.threads.impl.ManagedThreadFactoryImpl; import org.apache.openejb.util.AppFinder; +import org.apache.openejb.util.DaemonThreadFactory; +import org.apache.openejb.util.ExecutorBuilder; import org.apache.openejb.util.LogCategory; import org.apache.openejb.util.Logger; import org.apache.openejb.util.classloader.MultipleClassLoader; @@ -53,6 +57,8 @@ import java.util.HashMap; import java.util.Map; import java.util.Properties; import java.util.concurrent.ConcurrentHashMap; +import java.util.concurrent.Executor; +import java.util.concurrent.atomic.AtomicReference; /** * @version $Rev:$ $Date:$ @@ -123,6 +129,39 @@ public class ThreadSingletonServiceImpl implements ThreadSingletonService { // NOTE: ensure user can extend/override all the services = set it only if not present in properties, see WebBeansContext#getService() final Map services = new HashMap<>(); services.put(AppContext.class, appContext); +if
tomee git commit: no observer in remote interfaces
Repository: tomee Updated Branches: refs/heads/fb_tomee8 ac1e695a8 -> c2f603d38 no observer in remote interfaces Project: http://git-wip-us.apache.org/repos/asf/tomee/repo Commit: http://git-wip-us.apache.org/repos/asf/tomee/commit/c2f603d3 Tree: http://git-wip-us.apache.org/repos/asf/tomee/tree/c2f603d3 Diff: http://git-wip-us.apache.org/repos/asf/tomee/diff/c2f603d3 Branch: refs/heads/fb_tomee8 Commit: c2f603d388e99f956cd307ae2379ab027532cff1 Parents: ac1e695 Author: Romain Manni-BucauAuthored: Thu Feb 1 14:10:43 2018 +0100 Committer: Romain Manni-Bucau Committed: Thu Feb 1 14:10:51 2018 +0100 -- .../src/main/java/org/apache/openejb/cdi/CdiPlugin.java | 10 -- tck/cdi-embedded/src/test/resources/failing.xml | 2 +- 2 files changed, 9 insertions(+), 3 deletions(-) -- http://git-wip-us.apache.org/repos/asf/tomee/blob/c2f603d3/container/openejb-core/src/main/java/org/apache/openejb/cdi/CdiPlugin.java -- diff --git a/container/openejb-core/src/main/java/org/apache/openejb/cdi/CdiPlugin.java b/container/openejb-core/src/main/java/org/apache/openejb/cdi/CdiPlugin.java index bdf7486..5a2042c 100644 --- a/container/openejb-core/src/main/java/org/apache/openejb/cdi/CdiPlugin.java +++ b/container/openejb-core/src/main/java/org/apache/openejb/cdi/CdiPlugin.java @@ -478,8 +478,14 @@ public class CdiPlugin extends AbstractOwbPlugin implements OpenWebBeansJavaEEPl for (final Map.Entry m : methods.entrySet()) { final Method method = m.getValue().getJavaMember(); -if (!Modifier.isStatic(method.getModifiers()) && doResolveViewMethod(bean, method) == null) { -throw new WebBeansConfigurationException("@Observes " + method + " neither in the ejb view of ejb " + bean.getBeanContext().getEjbName() + " nor static"); +if (!Modifier.isStatic(method.getModifiers())) { +final Method viewMethod = doResolveViewMethod(bean, method); +if (viewMethod == null) { +throw new WebBeansConfigurationException( +"@Observes " + method + " neither in the ejb view of ejb " + bean.getBeanContext().getEjbName() + " nor static"); +} else if (beanContext.getBusinessRemoteInterfaces().contains(viewMethod.getDeclaringClass())) { +throw new WebBeansConfigurationException(viewMethod + " observer is defined in a @Remote interface"); +} } if (m.getValue().getParameters().stream().anyMatch(p -> p.isAnnotationPresent(ObservesAsync.class))) { throw new WebBeansConfigurationException("@ObservesAsync " + method + " not supported on EJB in CDI 2"); http://git-wip-us.apache.org/repos/asf/tomee/blob/c2f603d3/tck/cdi-embedded/src/test/resources/failing.xml -- diff --git a/tck/cdi-embedded/src/test/resources/failing.xml b/tck/cdi-embedded/src/test/resources/failing.xml index 15aa7cc..836410d 100644 --- a/tck/cdi-embedded/src/test/resources/failing.xml +++ b/tck/cdi-embedded/src/test/resources/failing.xml @@ -39,7 +39,7 @@ TODO these are tests we finally need to pass! --> - +
tomee git commit: validating @ObservesAsync in EJB contract
Repository: tomee Updated Branches: refs/heads/fb_tomee8 74b2cad62 -> d8bfd0565 validating @ObservesAsync in EJB contract Project: http://git-wip-us.apache.org/repos/asf/tomee/repo Commit: http://git-wip-us.apache.org/repos/asf/tomee/commit/d8bfd056 Tree: http://git-wip-us.apache.org/repos/asf/tomee/tree/d8bfd056 Diff: http://git-wip-us.apache.org/repos/asf/tomee/diff/d8bfd056 Branch: refs/heads/fb_tomee8 Commit: d8bfd05659fd2915399ed5575ba015f9bb52d7e0 Parents: 74b2cad Author: Romain Manni-BucauAuthored: Thu Feb 1 10:05:39 2018 +0100 Committer: Romain Manni-Bucau Committed: Thu Feb 1 10:05:39 2018 +0100 -- .../src/main/java/org/apache/openejb/cdi/CdiPlugin.java | 4 tck/cdi-embedded/src/test/resources/failing.xml | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/tomee/blob/d8bfd056/container/openejb-core/src/main/java/org/apache/openejb/cdi/CdiPlugin.java -- diff --git a/container/openejb-core/src/main/java/org/apache/openejb/cdi/CdiPlugin.java b/container/openejb-core/src/main/java/org/apache/openejb/cdi/CdiPlugin.java index edac247..bdf7486 100644 --- a/container/openejb-core/src/main/java/org/apache/openejb/cdi/CdiPlugin.java +++ b/container/openejb-core/src/main/java/org/apache/openejb/cdi/CdiPlugin.java @@ -55,6 +55,7 @@ import javax.enterprise.context.Dependent; import javax.enterprise.context.spi.Context; import javax.enterprise.context.spi.Contextual; import javax.enterprise.context.spi.CreationalContext; +import javax.enterprise.event.ObservesAsync; import javax.enterprise.inject.Disposes; import javax.enterprise.inject.Specializes; import javax.enterprise.inject.Vetoed; @@ -480,6 +481,9 @@ public class CdiPlugin extends AbstractOwbPlugin implements OpenWebBeansJavaEEPl if (!Modifier.isStatic(method.getModifiers()) && doResolveViewMethod(bean, method) == null) { throw new WebBeansConfigurationException("@Observes " + method + " neither in the ejb view of ejb " + bean.getBeanContext().getEjbName() + " nor static"); } +if (m.getValue().getParameters().stream().anyMatch(p -> p.isAnnotationPresent(ObservesAsync.class))) { +throw new WebBeansConfigurationException("@ObservesAsync " + method + " not supported on EJB in CDI 2"); +} } } http://git-wip-us.apache.org/repos/asf/tomee/blob/d8bfd056/tck/cdi-embedded/src/test/resources/failing.xml -- diff --git a/tck/cdi-embedded/src/test/resources/failing.xml b/tck/cdi-embedded/src/test/resources/failing.xml index cec8f40..15aa7cc 100644 --- a/tck/cdi-embedded/src/test/resources/failing.xml +++ b/tck/cdi-embedded/src/test/resources/failing.xml @@ -39,7 +39,7 @@ TODO these are tests we finally need to pass! --> - +
tomee git commit: TOMEE-2160 Thomas Andraschko patch to upgrade to tomcat 9
Repository: tomee Updated Branches: refs/heads/fb_tomee8 acc6a5cb6 -> cb8ec5b9c TOMEE-2160 Thomas Andraschko patch to upgrade to tomcat 9 Project: http://git-wip-us.apache.org/repos/asf/tomee/repo Commit: http://git-wip-us.apache.org/repos/asf/tomee/commit/cb8ec5b9 Tree: http://git-wip-us.apache.org/repos/asf/tomee/tree/cb8ec5b9 Diff: http://git-wip-us.apache.org/repos/asf/tomee/diff/cb8ec5b9 Branch: refs/heads/fb_tomee8 Commit: cb8ec5b9c77f0e49da1fa9fa1ba2552327e21b2e Parents: acc6a5c Author: Romain Manni-BucauAuthored: Mon Jan 8 16:48:38 2018 +0100 Committer: Romain Manni-Bucau Committed: Mon Jan 8 16:48:38 2018 +0100 -- .../apache/openejb/arquillian/tests/realm/HardCodedRealm.java | 6 -- .../arquillian/tests/realm/MyCdiRealmBaseLazyRealm.java| 5 - pom.xml| 4 ++-- .../java/org/apache/tomee/catalina/realm/CdiEventRealm.java| 5 - 4 files changed, 2 insertions(+), 18 deletions(-) -- http://git-wip-us.apache.org/repos/asf/tomee/blob/cb8ec5b9/arquillian/arquillian-tomee-tests/arquillian-tomee-webprofile-tests/src/test/java/org/apache/openejb/arquillian/tests/realm/HardCodedRealm.java -- diff --git a/arquillian/arquillian-tomee-tests/arquillian-tomee-webprofile-tests/src/test/java/org/apache/openejb/arquillian/tests/realm/HardCodedRealm.java b/arquillian/arquillian-tomee-tests/arquillian-tomee-webprofile-tests/src/test/java/org/apache/openejb/arquillian/tests/realm/HardCodedRealm.java index fb58415..3a5f36c 100644 --- a/arquillian/arquillian-tomee-tests/arquillian-tomee-webprofile-tests/src/test/java/org/apache/openejb/arquillian/tests/realm/HardCodedRealm.java +++ b/arquillian/arquillian-tomee-tests/arquillian-tomee-webprofile-tests/src/test/java/org/apache/openejb/arquillian/tests/realm/HardCodedRealm.java @@ -26,12 +26,6 @@ import static java.util.Arrays.asList; public class HardCodedRealm extends RealmBase { @Override -protected String getName() -{ -return "hard-coded"; -} - -@Override protected String getPassword(final String username) { return "tom".equals(username)? "ee" : null; http://git-wip-us.apache.org/repos/asf/tomee/blob/cb8ec5b9/arquillian/arquillian-tomee-tests/arquillian-tomee-webprofile-tests/src/test/java/org/apache/openejb/arquillian/tests/realm/MyCdiRealmBaseLazyRealm.java -- diff --git a/arquillian/arquillian-tomee-tests/arquillian-tomee-webprofile-tests/src/test/java/org/apache/openejb/arquillian/tests/realm/MyCdiRealmBaseLazyRealm.java b/arquillian/arquillian-tomee-tests/arquillian-tomee-webprofile-tests/src/test/java/org/apache/openejb/arquillian/tests/realm/MyCdiRealmBaseLazyRealm.java index f1b5e30..81f94ae 100644 --- a/arquillian/arquillian-tomee-tests/arquillian-tomee-webprofile-tests/src/test/java/org/apache/openejb/arquillian/tests/realm/MyCdiRealmBaseLazyRealm.java +++ b/arquillian/arquillian-tomee-tests/arquillian-tomee-webprofile-tests/src/test/java/org/apache/openejb/arquillian/tests/realm/MyCdiRealmBaseLazyRealm.java @@ -26,11 +26,6 @@ import static java.util.Arrays.asList; // no scope cause RealmBase is not proxyable, realm impl would put a scope + implement Realm, Lifecycle public class MyCdiRealmBaseLazyRealm extends RealmBase { @Override -protected String getName() { -return "user"; -} - -@Override protected String getPassword(final String username) { return "pwd"; } http://git-wip-us.apache.org/repos/asf/tomee/blob/cb8ec5b9/pom.xml -- diff --git a/pom.xml b/pom.xml index 35a1cb8..14c07b8 100644 --- a/pom.xml +++ b/pom.xml @@ -126,13 +126,13 @@ ${openejb.osgi.dynamic.import.pkg} ${project.groupId}.${project.artifactId} -0.4-incubating +0.5-incubating 1.1.13.Final 2.0.0-alpha-10 1.2.6 -8.5.23 +9.0.2 3.2.1 2.10.3 http://git-wip-us.apache.org/repos/asf/tomee/blob/cb8ec5b9/tomee/tomee-catalina/src/main/java/org/apache/tomee/catalina/realm/CdiEventRealm.java -- diff --git a/tomee/tomee-catalina/src/main/java/org/apache/tomee/catalina/realm/CdiEventRealm.java b/tomee/tomee-catalina/src/main/java/org/apache/tomee/catalina/realm/CdiEventRealm.java index ce5725f..c7d4286 100644 --- a/tomee/tomee-catalina/src/main/java/org/apache/tomee/catalina/realm/CdiEventRealm.java +++ b/tomee/tomee-catalina/src/main/java/org/apache/tomee/catalina/realm/CdiEventRealm.java @@ -125,11 +125,6 @@ public class CdiEventRealm extends RealmBase { } @Override -
tomee git commit: TOMEE-2159 Thomas Andraschko patch to upgrade to mf 2.3
Repository: tomee Updated Branches: refs/heads/fb_tomee8 c6aed8e87 -> acc6a5cb6 TOMEE-2159 Thomas Andraschko patch to upgrade to mf 2.3 Project: http://git-wip-us.apache.org/repos/asf/tomee/repo Commit: http://git-wip-us.apache.org/repos/asf/tomee/commit/acc6a5cb Tree: http://git-wip-us.apache.org/repos/asf/tomee/tree/acc6a5cb Diff: http://git-wip-us.apache.org/repos/asf/tomee/diff/acc6a5cb Branch: refs/heads/fb_tomee8 Commit: acc6a5cb68aac67546eca48e7e5fa37c8233f1e9 Parents: c6aed8e Author: Romain Manni-BucauAuthored: Mon Jan 8 16:42:02 2018 +0100 Committer: Romain Manni-Bucau Committed: Mon Jan 8 16:42:02 2018 +0100 -- .../org/apache/openejb/util/classloader/URLClassLoaderFirst.java | 2 +- examples/deltaspike-fullstack/pom.xml| 2 +- pom.xml | 4 ++-- .../apache/tomee/myfaces/TomEEMyFacesContainerInitializer.java | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) -- http://git-wip-us.apache.org/repos/asf/tomee/blob/acc6a5cb/container/openejb-core/src/main/java/org/apache/openejb/util/classloader/URLClassLoaderFirst.java -- diff --git a/container/openejb-core/src/main/java/org/apache/openejb/util/classloader/URLClassLoaderFirst.java b/container/openejb-core/src/main/java/org/apache/openejb/util/classloader/URLClassLoaderFirst.java index 7280e1b..c6c9bcf 100644 --- a/container/openejb-core/src/main/java/org/apache/openejb/util/classloader/URLClassLoaderFirst.java +++ b/container/openejb-core/src/main/java/org/apache/openejb/util/classloader/URLClassLoaderFirst.java @@ -349,7 +349,7 @@ public class URLClassLoaderFirst extends URLClassLoader { if (myfaces.startsWith("shared.")) { return true; } -if (myfaces.startsWith("ee6.")) { +if (myfaces.startsWith("ee.")) { return true; } if (myfaces.startsWith("lifecycle.")) { http://git-wip-us.apache.org/repos/asf/tomee/blob/acc6a5cb/examples/deltaspike-fullstack/pom.xml -- diff --git a/examples/deltaspike-fullstack/pom.xml b/examples/deltaspike-fullstack/pom.xml index 6c8b925..d0ebfa6 100644 --- a/examples/deltaspike-fullstack/pom.xml +++ b/examples/deltaspike-fullstack/pom.xml @@ -22,7 +22,7 @@ UTF-8 -2.2.7 +2.3.0-SNAPSHOT 1.3.0 2.0.8 8.0.0-SNAPSHOT http://git-wip-us.apache.org/repos/asf/tomee/blob/acc6a5cb/pom.xml -- diff --git a/pom.xml b/pom.xml index a557e90..35a1cb8 100644 --- a/pom.xml +++ b/pom.xml @@ -175,8 +175,8 @@ 3.1.4 1.1 1.9.0-alpha-2 -2.2.12 -2.2.12 +2.3.0-SNAPSHOT +2.3.3 1.7.21 1.2.17 2.0.1 http://git-wip-us.apache.org/repos/asf/tomee/blob/acc6a5cb/tomee/tomee-myfaces/src/main/java/org/apache/tomee/myfaces/TomEEMyFacesContainerInitializer.java -- diff --git a/tomee/tomee-myfaces/src/main/java/org/apache/tomee/myfaces/TomEEMyFacesContainerInitializer.java b/tomee/tomee-myfaces/src/main/java/org/apache/tomee/myfaces/TomEEMyFacesContainerInitializer.java index cc62cbd..1a985d4 100644 --- a/tomee/tomee-myfaces/src/main/java/org/apache/tomee/myfaces/TomEEMyFacesContainerInitializer.java +++ b/tomee/tomee-myfaces/src/main/java/org/apache/tomee/myfaces/TomEEMyFacesContainerInitializer.java @@ -22,7 +22,7 @@ import org.apache.catalina.Wrapper; import org.apache.catalina.core.ApplicationContext; import org.apache.catalina.core.ApplicationContextFacade; import org.apache.catalina.core.StandardContext; -import org.apache.myfaces.ee6.MyFacesContainerInitializer; +import org.apache.myfaces.ee.MyFacesContainerInitializer; import org.apache.myfaces.webapp.AbstractFacesInitializer; import org.apache.myfaces.webapp.StartupServletContextListener; import org.apache.openejb.loader.SystemInstance;
tomee git commit: Upgrade HSQLDB to 2.3.5
Repository: tomee Updated Branches: refs/heads/master ff5254f75 -> 7b1ad5f0a Upgrade HSQLDB to 2.3.5 HSQLDB 2.3.2 has regression that prevent: > multiple rows with partial null values could not be inserted in UNIQUE indexes See http://hsqldb.org/doc/2.0/changelist_2_0.txt 2.3.3 CHANGE_LOG I would update to latest JRE 6 compatible HSQLDB version (except 2.4.0 that is required JRE 8) Fixes TOMEE-2155 Project: http://git-wip-us.apache.org/repos/asf/tomee/repo Commit: http://git-wip-us.apache.org/repos/asf/tomee/commit/7b1ad5f0 Tree: http://git-wip-us.apache.org/repos/asf/tomee/tree/7b1ad5f0 Diff: http://git-wip-us.apache.org/repos/asf/tomee/diff/7b1ad5f0 Branch: refs/heads/master Commit: 7b1ad5f0aedcc2cad68b67604f0ec33acd3b511d Parents: ff5254f Author: Thibaud LeprêtreAuthored: Thu Dec 14 13:37:27 2017 +0100 Committer: Thibaud Leprêtre Committed: Thu Dec 14 13:37:27 2017 +0100 -- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/tomee/blob/7b1ad5f0/pom.xml -- diff --git a/pom.xml b/pom.xml index b560208..04fa2a1 100644 --- a/pom.xml +++ b/pom.xml @@ -180,7 +180,7 @@ 1.2.17 2.0.1 4.2.0 -2.3.2 +2.3.5 1.2.20 2.7.2 4.2.18.Final
tomee git commit: we use our own AMQ wrapper, fixing test
Repository: tomee Updated Branches: refs/heads/master b071814bf -> ff5254f75 we use our own AMQ wrapper, fixing test Project: http://git-wip-us.apache.org/repos/asf/tomee/repo Commit: http://git-wip-us.apache.org/repos/asf/tomee/commit/ff5254f7 Tree: http://git-wip-us.apache.org/repos/asf/tomee/tree/ff5254f7 Diff: http://git-wip-us.apache.org/repos/asf/tomee/diff/ff5254f7 Branch: refs/heads/master Commit: ff5254f75be43fe337fae5dc1b06211eb9264287 Parents: b071814 Author: Romain Manni-BucauAuthored: Wed Dec 6 15:39:48 2017 +0100 Committer: Romain Manni-Bucau Committed: Wed Dec 6 15:39:48 2017 +0100 -- .../test/java/org/apache/openejb/config/AppInfoBuilderTest.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) -- http://git-wip-us.apache.org/repos/asf/tomee/blob/ff5254f7/container/openejb-core/src/test/java/org/apache/openejb/config/AppInfoBuilderTest.java -- diff --git a/container/openejb-core/src/test/java/org/apache/openejb/config/AppInfoBuilderTest.java b/container/openejb-core/src/test/java/org/apache/openejb/config/AppInfoBuilderTest.java index a58fd07..6a65694 100644 --- a/container/openejb-core/src/test/java/org/apache/openejb/config/AppInfoBuilderTest.java +++ b/container/openejb-core/src/test/java/org/apache/openejb/config/AppInfoBuilderTest.java @@ -17,7 +17,6 @@ package org.apache.openejb.config; import junit.framework.TestCase; -import org.apache.activemq.ra.ActiveMQActivationSpec; import org.apache.openejb.assembler.classic.AppInfo; import org.apache.openejb.assembler.classic.ContainerInfo; import org.apache.openejb.assembler.classic.EjbJarInfo; @@ -30,6 +29,7 @@ import org.apache.openejb.jee.oejb2.AuthMethodType; import org.apache.openejb.jee.oejb2.TransportGuaranteeType; import org.apache.openejb.jee.oejb3.EjbDeployment; import org.apache.openejb.jee.oejb3.OpenejbJar; +import org.apache.openejb.resource.activemq.TomEEMessageActivationSpec; import javax.jms.MessageListener; import java.util.List; @@ -170,7 +170,7 @@ public class AppInfoBuilderTest extends TestCase { assertEquals(MdbContainer.class.getName(), containerInfo.className); assertEquals("Default JMS Resource Adapter", containerInfo.properties.get("ResourceAdapter")); assertEquals(MessageListener.class.getName(), containerInfo.properties.get("MessageListenerInterface")); -assertEquals(ActiveMQActivationSpec.class.getName(), containerInfo.properties.get("ActivationSpecClass")); +assertEquals(TomEEMessageActivationSpec.class.getName(), containerInfo.properties.get("ActivationSpecClass")); assertEquals("10", containerInfo.properties.get("InstanceLimit")); assertEquals("true", containerInfo.properties.get("FailOnUnknownActivationSpec")); }
tomee git commit: style
Repository: tomee Updated Branches: refs/heads/master 0eea136c7 -> b071814bf style Project: http://git-wip-us.apache.org/repos/asf/tomee/repo Commit: http://git-wip-us.apache.org/repos/asf/tomee/commit/b071814b Tree: http://git-wip-us.apache.org/repos/asf/tomee/tree/b071814b Diff: http://git-wip-us.apache.org/repos/asf/tomee/diff/b071814b Branch: refs/heads/master Commit: b071814bf6300bc33e314d8212488acdf9d86488 Parents: 0eea136 Author: Romain Manni-BucauAuthored: Wed Dec 6 14:39:55 2017 +0100 Committer: Romain Manni-Bucau Committed: Wed Dec 6 14:39:55 2017 +0100 -- .../src/main/java/org/apache/openejb/config/AppInfoBuilder.java | 3 +-- .../src/main/java/org/apache/openejb/config/AutoConfig.java | 1 - 2 files changed, 1 insertion(+), 3 deletions(-) -- http://git-wip-us.apache.org/repos/asf/tomee/blob/b071814b/container/openejb-core/src/main/java/org/apache/openejb/config/AppInfoBuilder.java -- diff --git a/container/openejb-core/src/main/java/org/apache/openejb/config/AppInfoBuilder.java b/container/openejb-core/src/main/java/org/apache/openejb/config/AppInfoBuilder.java index 3c79cff..6d112e1 100644 --- a/container/openejb-core/src/main/java/org/apache/openejb/config/AppInfoBuilder.java +++ b/container/openejb-core/src/main/java/org/apache/openejb/config/AppInfoBuilder.java @@ -370,8 +370,7 @@ class AppInfoBuilder { private void buildAppContainers(final AppModule module, final AppInfo info) throws OpenEJBException { final List containerInfos = getContainerInfos(module); -if (containerInfos == null) return; - +if (containerInfos == null) { return; } info.containers.addAll(containerInfos); } http://git-wip-us.apache.org/repos/asf/tomee/blob/b071814b/container/openejb-core/src/main/java/org/apache/openejb/config/AutoConfig.java -- diff --git a/container/openejb-core/src/main/java/org/apache/openejb/config/AutoConfig.java b/container/openejb-core/src/main/java/org/apache/openejb/config/AutoConfig.java index 689fd23..5f1ec3f 100644 --- a/container/openejb-core/src/main/java/org/apache/openejb/config/AutoConfig.java +++ b/container/openejb-core/src/main/java/org/apache/openejb/config/AutoConfig.java @@ -22,7 +22,6 @@ import org.apache.openejb.OpenEJBException; import org.apache.openejb.assembler.classic.ContainerInfo; import org.apache.openejb.assembler.classic.MdbContainerInfo; import org.apache.openejb.assembler.classic.ResourceInfo; -import org.apache.openejb.config.sys.Container; import org.apache.openejb.config.sys.Resource; import org.apache.openejb.jee.ActivationConfig; import org.apache.openejb.jee.ActivationConfigProperty;
tomee git commit: TOMEE-2133 tomcat 8.5.24
Repository: tomee Updated Branches: refs/heads/master 512524b34 -> 0eea136c7 TOMEE-2133 tomcat 8.5.24 Project: http://git-wip-us.apache.org/repos/asf/tomee/repo Commit: http://git-wip-us.apache.org/repos/asf/tomee/commit/0eea136c Tree: http://git-wip-us.apache.org/repos/asf/tomee/tree/0eea136c Diff: http://git-wip-us.apache.org/repos/asf/tomee/diff/0eea136c Branch: refs/heads/master Commit: 0eea136c798dcf18c9883ebf56f18a8d6da07737 Parents: 512524b Author: Romain Manni-BucauAuthored: Wed Dec 6 13:08:12 2017 +0100 Committer: Romain Manni-Bucau Committed: Wed Dec 6 13:08:12 2017 +0100 -- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/tomee/blob/0eea136c/pom.xml -- diff --git a/pom.xml b/pom.xml index 51f568d..b560208 100644 --- a/pom.xml +++ b/pom.xml @@ -131,7 +131,7 @@ 2.0.0 1.2.6 -8.5.23 +8.5.24 3.1.14 2.10.3
tomee git commit: TOMEE-2146 system usage configuration for AMQ broker
Repository: tomee Updated Branches: refs/heads/master 108abf0ff -> 118060ddc TOMEE-2146 system usage configuration for AMQ broker Project: http://git-wip-us.apache.org/repos/asf/tomee/repo Commit: http://git-wip-us.apache.org/repos/asf/tomee/commit/118060dd Tree: http://git-wip-us.apache.org/repos/asf/tomee/tree/118060dd Diff: http://git-wip-us.apache.org/repos/asf/tomee/diff/118060dd Branch: refs/heads/master Commit: 118060ddc20ae38dbfd5695ef1eb8ecf29abedcb Parents: 108abf0 Author: Romain Manni-BucauAuthored: Wed Nov 1 18:53:55 2017 +0100 Committer: Romain Manni-Bucau Committed: Wed Nov 1 18:53:55 2017 +0100 -- .../resource/activemq/ActiveMQ5Factory.java | 52 .../resource/activemq/ActiveMQ5FactoryTest.java | 27 ++ 2 files changed, 70 insertions(+), 9 deletions(-) -- http://git-wip-us.apache.org/repos/asf/tomee/blob/118060dd/container/openejb-core/src/main/java/org/apache/openejb/resource/activemq/ActiveMQ5Factory.java -- diff --git a/container/openejb-core/src/main/java/org/apache/openejb/resource/activemq/ActiveMQ5Factory.java b/container/openejb-core/src/main/java/org/apache/openejb/resource/activemq/ActiveMQ5Factory.java index ffcd8cb..ae5fc43 100644 --- a/container/openejb-core/src/main/java/org/apache/openejb/resource/activemq/ActiveMQ5Factory.java +++ b/container/openejb-core/src/main/java/org/apache/openejb/resource/activemq/ActiveMQ5Factory.java @@ -28,6 +28,7 @@ import org.apache.activemq.store.PersistenceAdapter; import org.apache.activemq.store.PersistenceAdapterFactory; import org.apache.activemq.store.jdbc.JDBCPersistenceAdapter; import org.apache.activemq.store.memory.MemoryPersistenceAdapter; +import org.apache.activemq.usage.SystemUsage; import org.apache.activemq.util.IntrospectionSupport; import org.apache.activemq.util.URISupport; import org.apache.openejb.loader.SystemInstance; @@ -94,12 +95,24 @@ public class ActiveMQ5Factory implements BrokerFactoryHandler { persistenceAdapter = null; } +final String systemUsage = params.remove("systemUsage"); +final SystemUsage systemUsageInstance; +if ("true".equalsIgnoreCase(systemUsage)) { +systemUsageInstance = newSystemUsage(params); +} else { +systemUsageInstance = null; +} + final BrokerPlugin[] plugins = createPlugins(params); final URI uri = new URI(cleanUpUri(brokerURI.getRawSchemeSpecificPart(), compositeData.getParameters(), params)); broker = "broker".equals(uri.getScheme()) ? newDefaultBroker(uri) : BrokerFactory.createBroker(uri); if (plugins != null) { broker.setPlugins(plugins); } + +if (systemUsageInstance != null) { +broker.setSystemUsage(systemUsageInstance); +} brokers.put(brokerURI, broker); if (persistenceAdapter != null) { @@ -259,6 +272,45 @@ public class ActiveMQ5Factory implements BrokerFactoryHandler { return broker; } +private SystemUsage newSystemUsage(final Map params) { +final SystemUsage systemUsage = new SystemUsage(); + +{ +final String memory = params.remove("systemUsage.memory.limit"); +if (memory != null) { + systemUsage.getMemoryUsage().setLimit(Integer.parseInt(memory.trim())); +} else { +systemUsage.getMemoryUsage().setLimit(1024L * 1024 * 1024); +} +} +{ +final String memory = params.remove("systemUsage.temp.limit"); +if (memory != null) { + systemUsage.getTempUsage().setLimit(Integer.parseInt(memory.trim())); +} else { +systemUsage.getTempUsage().setLimit(1024L * 1024 * 1024 * 50); +} +} +{ +final String memory = params.remove("systemUsage.store.limit"); +if (memory != null) { + systemUsage.getStoreUsage().setLimit(Integer.parseInt(memory.trim())); +} else { +systemUsage.getStoreUsage().setLimit(1024L * 1024 * 1024 * 100); +} +} +{ +final String memory = params.remove("systemUsage.scheduler.limit"); +if (memory != null) { + systemUsage.getJobSchedulerUsage().setLimit(Integer.parseInt(memory.trim())); +} else { +systemUsage.getJobSchedulerUsage().setLimit(1024L * 1024 * 1024); +} +} + +return systemUsage; +} + // forking org.apache.activemq.broker.DefaultBrokerFactory.createBroker() to
tomee git commit: TOMEE-2131 ensure we eagerly init the batchee ServicesManager when the context is available if needed
Repository: tomee Updated Branches: refs/heads/master 37513d132 -> 884e2a13e TOMEE-2131 ensure we eagerly init the batchee ServicesManager when the context is available if needed Project: http://git-wip-us.apache.org/repos/asf/tomee/repo Commit: http://git-wip-us.apache.org/repos/asf/tomee/commit/884e2a13 Tree: http://git-wip-us.apache.org/repos/asf/tomee/tree/884e2a13 Diff: http://git-wip-us.apache.org/repos/asf/tomee/diff/884e2a13 Branch: refs/heads/master Commit: 884e2a13e9f1b62507b3db6f872468854514d44c Parents: 37513d1 Author: Romain Manni-BucauAuthored: Thu Oct 5 16:34:39 2017 +0200 Committer: Romain Manni-Bucau Committed: Thu Oct 5 16:34:39 2017 +0200 -- .../openejb/batchee/BatchEEServiceManager.java| 18 +- 1 file changed, 13 insertions(+), 5 deletions(-) -- http://git-wip-us.apache.org/repos/asf/tomee/blob/884e2a13/container/openejb-core/src/main/java/org/apache/openejb/batchee/BatchEEServiceManager.java -- diff --git a/container/openejb-core/src/main/java/org/apache/openejb/batchee/BatchEEServiceManager.java b/container/openejb-core/src/main/java/org/apache/openejb/batchee/BatchEEServiceManager.java index 096861c..e0060f9 100644 --- a/container/openejb-core/src/main/java/org/apache/openejb/batchee/BatchEEServiceManager.java +++ b/container/openejb-core/src/main/java/org/apache/openejb/batchee/BatchEEServiceManager.java @@ -36,19 +36,26 @@ import java.util.Properties; public class BatchEEServiceManager implements ServicesManagerLocator { public void initEnvironment(@Observes final ObserverAdded event) { -if (event.getObserver() == this) { +if (event.getObserver() == this && !Boolean.getBoolean("openejb.batchee.integration.skip")) { ServicesManager.setServicesManagerLocator(this); } } public void storeClassLoader(@Observes final AssemblerAfterApplicationCreated init) { -final Properties properties = new Properties(SystemInstance.get().getProperties()); -properties.putAll(init.getApp().properties); +doInit(init.getContext()); +} + +private void doInit(final AppContext context) { +if (context.get(ServicesManager.class) != null) { +return; +} final Thread thread = Thread.currentThread(); final ClassLoader current = thread.getContextClassLoader(); -thread.setContextClassLoader(init.getContext().getClassLoader()); +thread.setContextClassLoader(context.getClassLoader()); final ServicesManager servicesManager = new ServicesManager(); +final Properties properties = new Properties(SystemInstance.get().getProperties()); +properties.putAll(context.getProperties()); try { if (properties.getProperty(BatchArtifactFactory.class.getName()) == null) { properties.setProperty(BatchThreadPoolService.class.getName(), TomEEThreadPoolService.class.getName()); @@ -61,7 +68,7 @@ public class BatchEEServiceManager implements ServicesManagerLocator { thread.setContextClassLoader(current); } -init.getContext().set(ServicesManager.class, servicesManager); +context.set(ServicesManager.class, servicesManager); } @Override @@ -69,6 +76,7 @@ public class BatchEEServiceManager implements ServicesManagerLocator { final ClassLoader contextClassLoader = unwrap(Thread.currentThread().getContextClassLoader()); final AppContext context = AppFinder.findAppContextOrWeb(contextClassLoader, AppFinder.AppContextTransformer.INSTANCE); if (context != null) { +doInit(context); return context.get(ServicesManager.class); } throw new IllegalStateException("Can't find ServiceManager for " + contextClassLoader);
tomee git commit: TOMEE-2023 tomcat upgrade 8.5.20
Repository: tomee Updated Branches: refs/heads/master 1fcb7f948 -> bd1bc848e TOMEE-2023 tomcat upgrade 8.5.20 Project: http://git-wip-us.apache.org/repos/asf/tomee/repo Commit: http://git-wip-us.apache.org/repos/asf/tomee/commit/bd1bc848 Tree: http://git-wip-us.apache.org/repos/asf/tomee/tree/bd1bc848 Diff: http://git-wip-us.apache.org/repos/asf/tomee/diff/bd1bc848 Branch: refs/heads/master Commit: bd1bc848e1f29447444c201ea02ea94f23c6e718 Parents: 1fcb7f9 Author: rmannibucau <rmannibu...@apache.org> Authored: Wed Aug 9 07:24:32 2017 +0200 Committer: rmannibucau <rmannibu...@apache.org> Committed: Wed Aug 9 07:24:32 2017 +0200 -- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/tomee/blob/bd1bc848/pom.xml -- diff --git a/pom.xml b/pom.xml index 12dce9d..4599d27 100644 --- a/pom.xml +++ b/pom.xml @@ -131,7 +131,7 @@ 2.0.0 1.2.6 -8.5.19 +8.5.20 3.1.12 2.10.3
tomee git commit: TOMEE-2023 tomcat 8.5.19
Repository: tomee Updated Branches: refs/heads/master c54c0eaf5 -> b2973d759 TOMEE-2023 tomcat 8.5.19 Project: http://git-wip-us.apache.org/repos/asf/tomee/repo Commit: http://git-wip-us.apache.org/repos/asf/tomee/commit/b2973d75 Tree: http://git-wip-us.apache.org/repos/asf/tomee/tree/b2973d75 Diff: http://git-wip-us.apache.org/repos/asf/tomee/diff/b2973d75 Branch: refs/heads/master Commit: b2973d759259016f3bb86e709581a2a4badee04a Parents: c54c0ea Author: Romain Manni-BucauAuthored: Fri Jul 28 17:23:08 2017 +0200 Committer: Romain Manni-Bucau Committed: Fri Jul 28 17:23:08 2017 +0200 -- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/tomee/blob/b2973d75/pom.xml -- diff --git a/pom.xml b/pom.xml index 453a483..084314a 100644 --- a/pom.xml +++ b/pom.xml @@ -131,7 +131,7 @@ 2.0.0 1.2.6 -8.5.16 +8.5.19 3.1.11 2.10.3
tomee git commit: ignore @EjbModule in previous commit logic
Repository: tomee Updated Branches: refs/heads/master bdbc90564 -> c54c0eaf5 ignore @EjbModule in previous commit logic Project: http://git-wip-us.apache.org/repos/asf/tomee/repo Commit: http://git-wip-us.apache.org/repos/asf/tomee/commit/c54c0eaf Tree: http://git-wip-us.apache.org/repos/asf/tomee/tree/c54c0eaf Diff: http://git-wip-us.apache.org/repos/asf/tomee/diff/c54c0eaf Branch: refs/heads/master Commit: c54c0eaf565bd9bec46aa386c6767e4fd2224b59 Parents: bdbc905 Author: Romain Manni-BucauAuthored: Wed Jul 26 18:09:27 2017 +0200 Committer: Romain Manni-Bucau Committed: Wed Jul 26 18:09:27 2017 +0200 -- .../src/main/java/org/apache/tomee/embedded/Container.java| 7 +++ 1 file changed, 7 insertions(+) -- http://git-wip-us.apache.org/repos/asf/tomee/blob/c54c0eaf/tomee/tomee-embedded/src/main/java/org/apache/tomee/embedded/Container.java -- diff --git a/tomee/tomee-embedded/src/main/java/org/apache/tomee/embedded/Container.java b/tomee/tomee-embedded/src/main/java/org/apache/tomee/embedded/Container.java index 3ed2737..cb745a3 100644 --- a/tomee/tomee-embedded/src/main/java/org/apache/tomee/embedded/Container.java +++ b/tomee/tomee-embedded/src/main/java/org/apache/tomee/embedded/Container.java @@ -42,6 +42,7 @@ import org.apache.openejb.assembler.classic.Assembler; import org.apache.openejb.assembler.classic.BeansInfo; import org.apache.openejb.assembler.classic.EjbJarInfo; import org.apache.openejb.assembler.classic.EnterpriseBeanInfo; +import org.apache.openejb.assembler.classic.ManagedBeanInfo; import org.apache.openejb.assembler.classic.WebAppInfo; import org.apache.openejb.config.AnnotationDeployer; import org.apache.openejb.config.AppModule; @@ -890,6 +891,12 @@ public class Container implements AutoCloseable { appInfo = configurationFactory.configureApplication(file); // ensure to activate CDI for classpath deployment, we can desire to move it but it breaks less apps this way for (final EjbJarInfo jar : appInfo.ejbJars) { +if (jar.enterpriseBeans.size() == 1) { +final EnterpriseBeanInfo next = jar.enterpriseBeans.iterator().next(); +if (ManagedBeanInfo.class.isInstance(next) && ManagedBeanInfo.class.cast(next).hidden) { +continue; +} +} if (jar.beans == null) { if (!jar.enterpriseBeans.isEmpty()) { jar.beans = new BeansInfo();
tomee git commit: TOMEE-2103 forcing annotated mode by default with tomee embedded
Repository: tomee Updated Branches: refs/heads/master cf5ed054f -> bdbc90564 TOMEE-2103 forcing annotated mode by default with tomee embedded Project: http://git-wip-us.apache.org/repos/asf/tomee/repo Commit: http://git-wip-us.apache.org/repos/asf/tomee/commit/bdbc9056 Tree: http://git-wip-us.apache.org/repos/asf/tomee/tree/bdbc9056 Diff: http://git-wip-us.apache.org/repos/asf/tomee/diff/bdbc9056 Branch: refs/heads/master Commit: bdbc90564fb5b69b80d93313806c1f5c0bee3461 Parents: cf5ed05 Author: Romain Manni-BucauAuthored: Wed Jul 26 14:32:07 2017 +0200 Committer: Romain Manni-Bucau Committed: Wed Jul 26 14:33:02 2017 +0200 -- .../org/apache/tomee/embedded/Container.java| 21 1 file changed, 21 insertions(+) -- http://git-wip-us.apache.org/repos/asf/tomee/blob/bdbc9056/tomee/tomee-embedded/src/main/java/org/apache/tomee/embedded/Container.java -- diff --git a/tomee/tomee-embedded/src/main/java/org/apache/tomee/embedded/Container.java b/tomee/tomee-embedded/src/main/java/org/apache/tomee/embedded/Container.java index 06c9290..3ed2737 100644 --- a/tomee/tomee-embedded/src/main/java/org/apache/tomee/embedded/Container.java +++ b/tomee/tomee-embedded/src/main/java/org/apache/tomee/embedded/Container.java @@ -39,6 +39,7 @@ import org.apache.openejb.UndeployException; import org.apache.openejb.assembler.WebAppDeployer; import org.apache.openejb.assembler.classic.AppInfo; import org.apache.openejb.assembler.classic.Assembler; +import org.apache.openejb.assembler.classic.BeansInfo; import org.apache.openejb.assembler.classic.EjbJarInfo; import org.apache.openejb.assembler.classic.EnterpriseBeanInfo; import org.apache.openejb.assembler.classic.WebAppInfo; @@ -887,6 +888,26 @@ public class Container implements AutoCloseable { } } else { appInfo = configurationFactory.configureApplication(file); +// ensure to activate CDI for classpath deployment, we can desire to move it but it breaks less apps this way +for (final EjbJarInfo jar : appInfo.ejbJars) { +if (jar.beans == null) { +if (!jar.enterpriseBeans.isEmpty()) { +jar.beans = new BeansInfo(); +jar.beans.version = "1.1"; +jar.beans.discoveryMode = "annotated"; +final BeansInfo.BDAInfo info = new BeansInfo.BDAInfo(); +info.discoveryMode = "annotated"; +info.uri = jar.moduleUri; +jar.beans.noDescriptorBdas.add(info); +for (final EnterpriseBeanInfo bean : jar.enterpriseBeans) { +if (bean.ejbClass == null) { +continue; +} +info.managedClasses.add(bean.ejbClass); +} +} +} +} if (overrideName) { appInfo.appId = name; for (final EjbJarInfo ejbJar : appInfo.ejbJars) {
tomee git commit: TOMEE-2099 ensure properties are wired in jaxrs runtime
Repository: tomee Updated Branches: refs/heads/master bfaefb36e -> 5830c209a TOMEE-2099 ensure properties are wired in jaxrs runtime Project: http://git-wip-us.apache.org/repos/asf/tomee/repo Commit: http://git-wip-us.apache.org/repos/asf/tomee/commit/5830c209 Tree: http://git-wip-us.apache.org/repos/asf/tomee/tree/5830c209 Diff: http://git-wip-us.apache.org/repos/asf/tomee/diff/5830c209 Branch: refs/heads/master Commit: 5830c209a0fc287933e3a4e61484011cef96d9f7 Parents: bfaefb3 Author: Romain Manni-BucauAuthored: Wed Jul 19 14:17:04 2017 +0200 Committer: Romain Manni-Bucau Committed: Wed Jul 19 14:17:04 2017 +0200 -- .../cxf/rs/AppPropertiesPropagationTest.java| 131 +++ .../server/rest/InternalApplication.java| 7 + 2 files changed, 138 insertions(+) -- http://git-wip-us.apache.org/repos/asf/tomee/blob/5830c209/server/openejb-cxf-rs/src/test/java/org/apache/openejb/server/cxf/rs/AppPropertiesPropagationTest.java -- diff --git a/server/openejb-cxf-rs/src/test/java/org/apache/openejb/server/cxf/rs/AppPropertiesPropagationTest.java b/server/openejb-cxf-rs/src/test/java/org/apache/openejb/server/cxf/rs/AppPropertiesPropagationTest.java new file mode 100644 index 000..3a345e2 --- /dev/null +++ b/server/openejb-cxf-rs/src/test/java/org/apache/openejb/server/cxf/rs/AppPropertiesPropagationTest.java @@ -0,0 +1,131 @@ +/* + * 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.apache.openejb.server.cxf.rs; + +import static org.junit.Assert.assertEquals; + +import java.io.IOException; +import java.io.OutputStream; +import java.lang.annotation.Annotation; +import java.lang.reflect.Type; +import java.nio.charset.StandardCharsets; +import java.util.HashMap; +import java.util.Map; +import javax.ws.rs.ApplicationPath; +import javax.ws.rs.GET; +import javax.ws.rs.Path; +import javax.ws.rs.Produces; +import javax.ws.rs.WebApplicationException; +import javax.ws.rs.core.Application; +import javax.ws.rs.core.Context; +import javax.ws.rs.core.Feature; +import javax.ws.rs.core.FeatureContext; +import javax.ws.rs.core.MediaType; +import javax.ws.rs.core.MultivaluedMap; +import javax.ws.rs.ext.MessageBodyWriter; +import javax.ws.rs.ext.Provider; + +import org.apache.cxf.jaxrs.client.WebClient; +import org.apache.openejb.junit.ApplicationComposer; +import org.apache.openejb.testing.Classes; +import org.apache.openejb.testing.EnableServices; +import org.apache.openejb.testing.JaxrsProviders; +import org.apache.openejb.testing.RandomPort; +import org.junit.Test; +import org.junit.runner.RunWith; + +@EnableServices("jaxrs") +@JaxrsProviders(AppPropertiesPropagationTest.Registrator.class) +@RunWith(ApplicationComposer.class) +@Classes(innerClassesAsBean = true) +public class AppPropertiesPropagationTest { +@RandomPort("http") +private int port; + +@Test +public void checkStarIsNotAnIssue() { +assertEquals("yes", WebClient.create("http://localhost:; + port + "/openejb/") + .path("AppPropertiesPropagationTest/endpoint").get(String.class)); +assertEquals("yes", WebClient.create("http://localhost:; + port + "/openejb/") + .path("AppPropertiesPropagationTest/endpoint/2").get(String.class)); +} + +@Path("endpoint") +public static class MyEndpoint { +@GET +public String get(@Context final Application app) { +return String.valueOf(app.getProperties().get("AppPropertiesPropagationTest")); +} + +@GET +@Produces("AppPropertiesPropagationTest/1") +@Path("2") +public MyEndpoint provider(@Context final Application app) { +return this; +} +} + +@Provider +public static class Registrator implements Feature { +@Override +public boolean configure(final FeatureContext context) { +context.register(new
tomee git commit: TOMEE-2095 OWB 1.7.4
Repository: tomee Updated Branches: refs/heads/master fcf068e13 -> 8ed192c8e TOMEE-2095 OWB 1.7.4 Project: http://git-wip-us.apache.org/repos/asf/tomee/repo Commit: http://git-wip-us.apache.org/repos/asf/tomee/commit/8ed192c8 Tree: http://git-wip-us.apache.org/repos/asf/tomee/tree/8ed192c8 Diff: http://git-wip-us.apache.org/repos/asf/tomee/diff/8ed192c8 Branch: refs/heads/master Commit: 8ed192c8ead97dc70ca8115016786ee21531a8dc Parents: fcf068e Author: rmannibucau <rmannibu...@apache.org> Authored: Tue Jul 11 10:07:36 2017 +0200 Committer: rmannibucau <rmannibu...@apache.org> Committed: Tue Jul 11 10:07:36 2017 +0200 -- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/tomee/blob/8ed192c8/pom.xml -- diff --git a/pom.xml b/pom.xml index 506b966..453a483 100644 --- a/pom.xml +++ b/pom.xml @@ -101,7 +101,7 @@ 7.0-1 2.4.2 - 1.7.4-SNAPSHOT +1.7.4 2.1 1.0.0
tomee git commit: TOMEE-2086 typo in a previous patch on IvmContext#list, thanks Svetlin for the catch
Repository: tomee Updated Branches: refs/heads/master ccad627c0 -> 6557c439a TOMEE-2086 typo in a previous patch on IvmContext#list, thanks Svetlin for the catch Project: http://git-wip-us.apache.org/repos/asf/tomee/repo Commit: http://git-wip-us.apache.org/repos/asf/tomee/commit/6557c439 Tree: http://git-wip-us.apache.org/repos/asf/tomee/tree/6557c439 Diff: http://git-wip-us.apache.org/repos/asf/tomee/diff/6557c439 Branch: refs/heads/master Commit: 6557c439a627b515e6d5e8b4d46e1f866bdebc16 Parents: ccad627 Author: rmannibucau <rmannibu...@apache.org> Authored: Wed Jul 5 11:07:14 2017 +0200 Committer: rmannibucau <rmannibu...@apache.org> Committed: Wed Jul 5 11:07:14 2017 +0200 -- .../main/java/org/apache/openejb/core/ivm/naming/IvmContext.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/tomee/blob/6557c439/container/openejb-core/src/main/java/org/apache/openejb/core/ivm/naming/IvmContext.java -- diff --git a/container/openejb-core/src/main/java/org/apache/openejb/core/ivm/naming/IvmContext.java b/container/openejb-core/src/main/java/org/apache/openejb/core/ivm/naming/IvmContext.java index 078071d..e172743 100644 --- a/container/openejb-core/src/main/java/org/apache/openejb/core/ivm/naming/IvmContext.java +++ b/container/openejb-core/src/main/java/org/apache/openejb/core/ivm/naming/IvmContext.java @@ -583,7 +583,7 @@ public class IvmContext implements Context, Serializable { addInListIfNeeded(initiallyRequestedNode, node.getGrtrTree(), vect); addInListIfNeeded(initiallyRequestedNode, node.getSubTree(), vect); if (NameNode.Federation.class.isInstance(node.getObject())) { // tomcat mainly -for (final Context c : NameNode.Federation.class.cast(initiallyRequestedNode.getObject())) { +for (final Context c : NameNode.Federation.class.cast(node.getObject())) { if (c == IvmContext.this || !IvmContext.class.isInstance(c)) { continue; }
tomee-site-generator git commit: comment about prod deployment potential automotion
Repository: tomee-site-generator Updated Branches: refs/heads/master eb450892c -> affbff78c comment about prod deployment potential automotion Project: http://git-wip-us.apache.org/repos/asf/tomee-site-generator/repo Commit: http://git-wip-us.apache.org/repos/asf/tomee-site-generator/commit/affbff78 Tree: http://git-wip-us.apache.org/repos/asf/tomee-site-generator/tree/affbff78 Diff: http://git-wip-us.apache.org/repos/asf/tomee-site-generator/diff/affbff78 Branch: refs/heads/master Commit: affbff78c2328e9124b021f13da2e6d2af419b1d Parents: eb45089 Author: rmannibucau <rmannibu...@apache.org> Authored: Tue Jul 4 23:35:36 2017 +0200 Committer: rmannibucau <rmannibu...@apache.org> Committed: Tue Jul 4 23:35:36 2017 +0200 -- src/main/java/org/apache/tomee/website/SvnPub.java | 5 + 1 file changed, 5 insertions(+) -- http://git-wip-us.apache.org/repos/asf/tomee-site-generator/blob/affbff78/src/main/java/org/apache/tomee/website/SvnPub.java -- diff --git a/src/main/java/org/apache/tomee/website/SvnPub.java b/src/main/java/org/apache/tomee/website/SvnPub.java index 31d1c06..78c3d10 100644 --- a/src/main/java/org/apache/tomee/website/SvnPub.java +++ b/src/main/java/org/apache/tomee/website/SvnPub.java @@ -140,5 +140,10 @@ public class SvnPub { throw new IllegalStateException(commitInfo.getErrorMessage().toString()); } System.out.println(commitInfo.toString()); + +// do we want to POST https://cms.apache.org/tomee/publish?diff=1 \ +// message==Submit=commitInfo.getNewRevision()_url=https%3A%2F%2Fsvn.apache.org%2Frepos%2Fasf%2Ftomee%2Fsite= +// +// to automatically publish on prod? } }
tomee-site-generator git commit: working svnpub impl
Repository: tomee-site-generator Updated Branches: refs/heads/master 61cae98ed -> eb450892c working svnpub impl Project: http://git-wip-us.apache.org/repos/asf/tomee-site-generator/repo Commit: http://git-wip-us.apache.org/repos/asf/tomee-site-generator/commit/eb450892 Tree: http://git-wip-us.apache.org/repos/asf/tomee-site-generator/tree/eb450892 Diff: http://git-wip-us.apache.org/repos/asf/tomee-site-generator/diff/eb450892 Branch: refs/heads/master Commit: eb450892c3e1cb58ea302635dca9679b1961de28 Parents: 61cae98 Author: rmannibucau <rmannibu...@apache.org> Authored: Tue Jul 4 23:32:29 2017 +0200 Committer: rmannibucau <rmannibu...@apache.org> Committed: Tue Jul 4 23:32:29 2017 +0200 -- README.adoc | 13 +++- pom.xml | 19 +- .../java/org/apache/tomee/website/SvnPub.java | 65 +--- src/main/jbake/content/community/index.adoc | 8 ++- 4 files changed, 90 insertions(+), 15 deletions(-) -- http://git-wip-us.apache.org/repos/asf/tomee-site-generator/blob/eb450892/README.adoc -- diff --git a/README.adoc b/README.adoc index 0fefd33..8ee6431 100755 --- a/README.adoc +++ b/README.adoc @@ -71,11 +71,20 @@ Finally note that the site generation will rely on the cache as well to generate == Publish (needs an ASF account) -`SvnPub` is a main to push to the staging the site content once built, you need to set the system properties (`MAVEN_OPTS`) `site.password` -to your asf password and `site.username` if you user name is not `USER` environment variable for it to work. +`SvnPub` is a main to push to the staging the site content once built, you need to set the system properties (or properties in ~/.m2/settings.xml) +`site.password` to your asf password and `site.username` if you user name is not `USER` environment variable for it to work. It will checkout/update the site from svn then copy the site folder from target directory to synchronize it with the svn version and finally it will commit everything. You can set the system property `site.message` to not use the default commit message. +NOTE: `.content-site-checkout` will be the local copy of the website (if you need to modify manually the files or delete some old ones. + +NOTE: if the process fails unexpectedly (wrong update in the logic or anything) you can unlock the `.content-site-checkout` executing inside `svn cleanup`. + +To build and deploy on staging at once: `mvn clean compile pre-site`. + +Then to deploy to "prod": go on https://cms.apache.org/tomee/publish and hit "Submit" (note: you can review changes before if you want to check what the CMS took as changes). + +TIP: the staging is available when https://ci.apache.org/builders/tomee-site-staging build is done (triggered on commit), you can't deploy before. http://git-wip-us.apache.org/repos/asf/tomee-site-generator/blob/eb450892/pom.xml -- diff --git a/pom.xml b/pom.xml index 7a229e6..1b74108 100755 --- a/pom.xml +++ b/pom.xml @@ -14,7 +14,6 @@ false false -notset notset UTF-8 @@ -91,7 +90,7 @@ org.tmatesoft.svnkit svnkit - 1.8.9 + 1.8.15 @@ -109,7 +108,7 @@ org.codehaus.mojo exec-maven-plugin -1.5.0 +1.6.0 tomee-site @@ -147,4 +146,18 @@ + + + + svnkit + SVNKit + https://maven.tmatesoft.com/content/repositories/releases/ + +true + + +false + + + http://git-wip-us.apache.org/repos/asf/tomee-site-generator/blob/eb450892/src/main/java/org/apache/tomee/website/SvnPub.java -- diff --git a/src/main/java/org/apache/tomee/website/SvnPub.java b/src/main/java/org/apache/tomee/website/SvnPub.java index 9e3ec0a..31d1c06 100644 --- a/src/main/java/org/apache/tomee/website/SvnPub.java +++ b/src/main/java/org/apache/tomee/website/SvnPub.java @@ -20,12 +20,15 @@ import org.apache.commons.io.FileUtils; import org.tmatesoft.svn.core.SVNCommitInfo; import org.tmatesoft.svn.core.SVNDepth; import org.tmatesoft.svn.core.SVNException; -import org.tmatesoft.svn.core.SVNProperties; import org.tmatesoft.svn.core.SVNURL; import org.tmatesoft.svn.core.auth.ISVNAuthenticationManager; +import org.tmatesoft.svn.core.internal.util.jna.SVNJNAUtil; import org.tmatesoft.svn.core.internal.wc.DefaultSVNOptions; +import org.tmatesoft.svn.core.wc.ISVNStatusHandler; import org.tmatesoft.svn.core.wc.SVNClientManager; import org.tmatesoft.svn.core.wc.SVNRevision; +import org.tmate
svn commit: r1800825 - in /tomee/site/trunk/content/community: contributors.html index.html
Author: rmannibucau Date: Tue Jul 4 21:27:18 2017 New Revision: 1800825 URL: http://svn.apache.org/viewvc?rev=1800825=rev Log: notset Modified: tomee/site/trunk/content/community/contributors.html tomee/site/trunk/content/community/index.html Modified: tomee/site/trunk/content/community/contributors.html URL: http://svn.apache.org/viewvc/tomee/site/trunk/content/community/contributors.html?rev=1800825=1800824=1800825=diff == --- tomee/site/trunk/content/community/contributors.html (original) +++ tomee/site/trunk/content/community/contributors.html Tue Jul 4 21:27:18 2017 @@ -97,32 +97,24 @@ - http://www.gravatar.com/avatar/d46f3fc40e8ecba3bc3b250d5c0d1734?s=140; style="width:140px"> + http://www.gravatar.com/avatar/fea00dfa5f55664b225d9c072d9c6766?s=140; style="width:140px"> - David Blevins + Andy - http://people.apache.org/~dblevins;>Apache - - http://github.com/dblevins;>Github - - http://www.linkedin.com/in/dblevins;>linkedin - - http://twitter.com/dblevins;>twitter - - http://www.gravatar.com/avatar/9b67307a606e8dbc311c449cd4cae2aa?s=140; style="width:140px"> + http://www.gravatar.com/avatar/dd2ab408381395402fb0b183d002165c?s=140; style="width:140px"> - Dain Sundstrom + Jason van Zyl @@ -131,24 +123,32 @@ - http://www.gravatar.com/avatar/fea00dfa5f55664b225d9c072d9c6766?s=140; style="width:140px"> + http://www.gravatar.com/avatar/d46f3fc40e8ecba3bc3b250d5c0d1734?s=140; style="width:140px"> - Andy + David Blevins + http://people.apache.org/~dblevins;>Apache + + http://github.com/dblevins;>Github + + http://www.linkedin.com/in/dblevins;>linkedin + + http://twitter.com/dblevins;>twitter + - http://www.gravatar.com/avatar/dd2ab408381395402fb0b183d002165c?s=140; style="width:140px"> + http://www.gravatar.com/avatar/9b67307a606e8dbc311c449cd4cae2aa?s=140; style="width:140px"> - Jason van Zyl + Dain Sundstrom @@ -221,11 +221,11 @@ - + - Haihong Xu + Lajos Moczar @@ -234,11 +234,11 @@ - + https://twitter.com/kevanmiller/profile_image?size=bigger; style="width:140px"> - Lajos Moczar + Kevan Lee Miller @@ -247,11 +247,11 @@ - + https://twitter.com/KrnMal/profile_image?size=bigger; style="width:140px"> - Manu George + Karan Singh Malhi @@ -260,11 +260,11 @@ - https://twitter.com/KrnMal/profile_image?size=bigger;
[30/35] tomee-site-generator git commit: import from old website
http://git-wip-us.apache.org/repos/asf/tomee-site-generator/blob/972cc356/src/main/jbake/assets/css/bootstrap.css -- diff --git a/src/main/jbake/assets/css/bootstrap.css b/src/main/jbake/assets/css/bootstrap.css new file mode 100755 index 000..9910c44 --- /dev/null +++ b/src/main/jbake/assets/css/bootstrap.css @@ -0,0 +1,6782 @@ +/*! + * Bootstrap v3.3.4 (http://getbootstrap.com) + * Copyright 2011-2015 Twitter, Inc. + * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) + */ +/*! normalize.css v3.0.3 | MIT License | github.com/necolas/normalize.css */ +html { + font-family: sans-serif; + -webkit-text-size-adjust: 100%; + -ms-text-size-adjust: 100%; +} +body { + margin: 0; + color: #33; +} +article, +aside, +details, +figcaption, +figure, +footer, +header, +hgroup, +main, +menu, +nav, +section, +summary { + display: block; +} +audio, +canvas, +progress, +video { + display: inline-block; + vertical-align: baseline; +} +audio:not([controls]) { + display: none; + height: 0; +} +[hidden], +template { + display: none; +} +a { + background-color: transparent; +} +a:active, +a:hover { + outline: 0; +} +abbr[title] { + border-bottom: 1px dotted; +} +b, +strong { + font-weight: bold; +} +dfn { + font-style: italic; +} +h1 { + margin: .67em 0; + font-size: 2em; +} +mark { + color: #000; + background: #ff0; +} +small { + font-size: 80%; +} +sub, +sup { + position: relative; + font-size: 75%; + line-height: 0; + vertical-align: baseline; +} +sup { + top: -.5em; +} +sub { + bottom: -.25em; +} +img { + border: 0; +} +svg:not(:root) { + overflow: hidden; +} +figure { + margin: 1em 40px; +} +hr { + height: 0; + -webkit-box-sizing: content-box; + -moz-box-sizing: content-box; + box-sizing: content-box; +} +pre { + overflow: auto; +} +code, +kbd, +pre, +samp { + font-family: monospace, monospace; + font-size: 1em; +} +button, +input, +optgroup, +select, +textarea { + margin: 0; + font: inherit; + color: inherit; +} +button { + overflow: visible; +} +button, +select { + text-transform: none; +} +button, +html input[type="button"], +input[type="reset"], +input[type="submit"] { + -webkit-appearance: button; + cursor: pointer; +} +button[disabled], +html input[disabled] { + cursor: default; +} +button::-moz-focus-inner, +input::-moz-focus-inner { + padding: 0; + border: 0; +} +input { + line-height: normal; +} +input[type="checkbox"], +input[type="radio"] { + -webkit-box-sizing: border-box; + -moz-box-sizing: border-box; + box-sizing: border-box; + padding: 0; +} +input[type="number"]::-webkit-inner-spin-button, +input[type="number"]::-webkit-outer-spin-button { + height: auto; +} +input[type="search"] { + -webkit-box-sizing: content-box; + -moz-box-sizing: content-box; + box-sizing: content-box; + -webkit-appearance: textfield; +} +input[type="search"]::-webkit-search-cancel-button, +input[type="search"]::-webkit-search-decoration { + -webkit-appearance: none; +} +fieldset { + padding: .35em .625em .75em; + margin: 0 2px; + border: 1px solid #c0c0c0; +} +legend { + padding: 0; + border: 0; +} +textarea { + overflow: auto; +} +optgroup { + font-weight: bold; +} +table { + border-spacing: 0; + border-collapse: collapse; +} +td, +th { + padding: 0; +} +/*! Source: https://github.com/h5bp/html5-boilerplate/blob/master/src/css/main.css */ +@media print { + *, + *:before, + *:after { +color: #000 !important; +text-shadow: none !important; +background: transparent !important; +-webkit-box-shadow: none !important; +box-shadow: none !important; + } + a, + a:visited { +text-decoration: underline; + } + a[href]:after { +content: " (" attr(href) ")"; + } + abbr[title]:after { +content: " (" attr(title) ")"; + } + a[href^="#"]:after, + a[href^="javascript:"]:after { +content: ""; + } + pre, + blockquote { +border: 1px solid #999; + +page-break-inside: avoid; + } + thead { +display: table-header-group; + } + tr, + img { +page-break-inside: avoid; + } + img { +max-width: 100% !important; + } + p, + h2, + h3 { +orphans: 3; +widows: 3; + } + h2, + h3 { +page-break-after: avoid; + } + .navbar { +display: none; + } + .btn > .caret, + .dropup > .btn > .caret { +border-top-color: #000 !important; + } + .label { +border: 1px solid #000; + } + .table { +border-collapse: collapse !important; + } + .table td, + .table th { +background-color: #fff !important; + } + .table-bordered th, + .table-bordered td { +border: 1px solid #ddd !important; + } +} +@font-face { + font-family: 'Glyphicons Halflings'; + + src: url('../fonts/glyphicons-halflings-regular.eot'); + src: url('../fonts/glyphicons-halflings-regular.eot?#iefix') format('embedded-opentype'), url('../fonts/glyphicons-halflings-regular.woff2')
[05/35] tomee-site-generator git commit: import from old website
http://git-wip-us.apache.org/repos/asf/tomee-site-generator/blob/972cc356/src/main/jbake/content/examples/simple-stateful.adoc -- diff --git a/src/main/jbake/content/examples/simple-stateful.adoc b/src/main/jbake/content/examples/simple-stateful.adoc new file mode 100755 index 000..cc2b7d8 --- /dev/null +++ b/src/main/jbake/content/examples/simple-stateful.adoc @@ -0,0 +1,160 @@ += Simple Stateful +:jbake-date: 2016-09-06 +:jbake-type: page +:jbake-tomeepdf: +:jbake-status: published + +Example simple-stateful can be browsed at https://github.com/apache/tomee/tree/master/examples/simple-stateful + + +This example demonstrates a simple deployment of a Stateful session bean. + + +NOTE: "As its name suggests, a stateful session bean is similar to an interactive session. A stateful session bean is not shared; + +it can have only one client, in the same way that an interactive session can have only one user. +When the client terminates, its stateful session bean appears to terminate and is no longer associated with the client." + +The `Counter` class is a Stateful session bean that maintains a state in a form of a `count` integer field. +It exposes three methods: `count()`, `increment()` and `reset()` to manipulate and view its state. + +Typically, Stateful and Stateless beans implement Local and/or Remote interfaces to determine which methods should +be exposed. In this case, the bean is using a no-interface view, which means that all public methods are exposed +as a local view. + +== Counter + + +[source,java] + +package org.superbiz.counter; + +import javax.ejb.Stateful; + +/** + * This is an EJB 3 style pojo stateful session bean + * Every stateful session bean implementation must be annotated + * using the annotation @Stateful + * This EJB has 2 business interfaces: CounterRemote, a remote business + * interface, and CounterLocal, a local business interface + * + * Per EJB3 rules when the @Remote or @Local annotation isn't present + * in the bean class (this class), all interfaces are considered + * local unless explicitly annotated otherwise. If you look + * in the CounterRemote interface, you'll notice it uses the @Remote + * annotation while the CounterLocal interface is not annotated relying + * on the EJB3 default rules to make it a local interface. + */ +//START SNIPPET: code +@Stateful +public class Counter { + +private int count = 0; + +public int count() { +return count; +} + +public int increment() { +return ++count; +} + +public int reset() { +return (count = 0); +} +} + + + +== CounterTest + +The `Counter` class is tested by obtaining a `Context` object and performing a JNDI lookup on it, to retrieve +an instance of the `Counter` bean. After some state manipulation, a new instance is fetched from the container +and we can see that it's a new instance. + + +[source,java] + +package org.superbiz.counter; + +import junit.framework.TestCase; + +import javax.ejb.embeddable.EJBContainer; +import javax.naming.Context; + +public class CounterTest extends TestCase { + +//START SNIPPET: local +public void test() throws Exception { + +final Context context = EJBContainer.createEJBContainer().getContext(); + +Counter counterA = (Counter) context.lookup("java:global/simple-stateful/Counter"); + +assertEquals(0, counterA.count()); +assertEquals(0, counterA.reset()); +assertEquals(1, counterA.increment()); +assertEquals(2, counterA.increment()); +assertEquals(0, counterA.reset()); + +counterA.increment(); +counterA.increment(); +counterA.increment(); +counterA.increment(); + +assertEquals(4, counterA.count()); + +// Get a new counter +Counter counterB = (Counter) context.lookup("java:global/simple-stateful/Counter"); + +// The new bean instance starts out at 0 +assertEquals(0, counterB.count()); +} +//END SNIPPET: local +} + + + += Running + + + +[source] + +--- + T E S T S +--- +Running org.superbiz.counter.CounterTest +Apache OpenEJB 4.0.0-beta-1build: 20111002-04:06 +http://tomee.apache.org/ +INFO - openejb.home = /Users/dblevins/examples/simple-stateful +INFO - openejb.base = /Users/dblevins/examples/simple-stateful +INFO - Using 'javax.ejb.embeddable.EJBContainer=true' +INFO - Configuring Service(id=Default Security Service, type=SecurityService, provider-id=Default Security Service) +INFO - Configuring Service(id=Default Transaction Manager, type=TransactionManager, provider-id=Default Transaction Manager) +INFO - Found EjbModule in classpath: /Users/dblevins/examples/simple-stateful/target/classes +INFO - Beginning load: /Users/dblevins/examples/simple-stateful/target/classes +INFO -
[02/35] tomee-site-generator git commit: import from old website
http://git-wip-us.apache.org/repos/asf/tomee-site-generator/blob/972cc356/src/main/jbake/content/examples/webservice-holder.adoc -- diff --git a/src/main/jbake/content/examples/webservice-holder.adoc b/src/main/jbake/content/examples/webservice-holder.adoc new file mode 100755 index 000..bb4a5f4 --- /dev/null +++ b/src/main/jbake/content/examples/webservice-holder.adoc @@ -0,0 +1,201 @@ += @WebService OUT params via javax.xml.ws.Holder +:jbake-date: 2016-09-06 +:jbake-type: page +:jbake-tomeepdf: +:jbake-status: published + +Example webservice-holder can be browsed at https://github.com/apache/tomee/tree/master/examples/webservice-holder + + +With SOAP it is possible to return multiple values in a single request. This is impossible in Java as a method can only return one object. + +JAX-WS solves this problem with the concept of Holders. A `javax.xml.ws.Holder` is a simple wrapper object that can be passed into the `@WebService` method as a parameter. The application sets the value of the holder during the request and the server will send the value back as an OUT parameter. + +== Using @WebParam and javax.xml.ws.Holder + +The `@WebParam` annotation allows us to declare the `sum` and `multiply` Holders as `WebParam.Mode.OUT` parameters. As mentioned, these holders are simply empty buckets the application can fill in with data to have sent to the client. The server will pass them in uninitialized. + + +[source,java] + +@Stateless +@WebService( +portName = "CalculatorPort", +serviceName = "CalculatorService", +targetNamespace = "http://superbiz.org/wsdl;, +endpointInterface = "org.superbiz.ws.out.CalculatorWs") +public class Calculator implements CalculatorWs { + +public void sumAndMultiply(int a, int b, + @WebParam(name = "sum", mode = WebParam.Mode.OUT) Holder sum, + @WebParam(name = "multiply", mode = WebParam.Mode.OUT) Holder multiply) { +sum.value = a + b; +multiply.value = a * b; +} +} + + + +If the Holders were specified as `WebParam.Mode.INOUT` params, then the client could use them to send data and the application as well. The `Holder` instances would then be initialized with the data from the client request. The application could check the data before eventually overriting it with the response values. + +== The WSDL + +The above JAX-WS `@WebService` component results in the folliwing WSDL that will be created automatically. Note the `sumAndMultiplyResponse` complext type returns two elements. These match the `@WebParam` declarations and our two `Holder` params. + + +[source,xml] + + +http://schemas.xmlsoap.org/wsdl/; + name="CalculatorService" + targetNamespace="http://superbiz.org/wsdl; + xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/; + xmlns:tns="http://superbiz.org/wsdl; + xmlns:xsd="http://www.w3.org/2001/XMLSchema;> + +http://superbiz.org/wsdl; +xmlns:tns="http://superbiz.org/wsdl; +xmlns:xsd="http://www.w3.org/2001/XMLSchema;> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +http://schemas.xmlsoap.org/soap/http"/> + + + + + + + + + + + + + http://127.0.0.1:4204/Calculator?wsdl"/> + + + + + + +== Testing the OUT params + +Here we see a JAX-WS client executing the `sumAndMultiply` operation. Two empty `Holder` instances are created and passed in as parameters. The data from the `sumAndMultiplyResponse` is placed in the `Holder` instances and is then available to the client after the operation completes. + +The holders themselves are not actually sent in the request unless they are configured as INOUT params via WebParam.Mode.INOUT on `@WebParam` + + +[source,java] + +import org.junit.BeforeClass; +import org.junit.Test; + +import javax.ejb.embeddable.EJBContainer; +import javax.xml.namespace.QName; +import javax.xml.ws.Holder; +import javax.xml.ws.Service; +import java.net.URL; +import java.util.Properties; + +import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertNotNull; + +public class CalculatorTest { + +@BeforeClass +public static void setUp() throws Exception { +Properties properties = new Properties(); +properties.setProperty("openejb.embedded.remotable", "true"); +//properties.setProperty("httpejbd.print", "true"); +//properties.setProperty("httpejbd.indent.xml", "true"); +EJBContainer.createEJBContainer(properties); +} + +@Test +public void outParams() throws Exception { +final Service
[22/35] tomee-site-generator git commit: import from old website
http://git-wip-us.apache.org/repos/asf/tomee-site-generator/blob/972cc356/src/main/jbake/assets/js/jquery.onepagenav.js -- diff --git a/src/main/jbake/assets/js/jquery.onepagenav.js b/src/main/jbake/assets/js/jquery.onepagenav.js new file mode 100755 index 000..8668b46 --- /dev/null +++ b/src/main/jbake/assets/js/jquery.onepagenav.js @@ -0,0 +1,223 @@ +/* + * jQuery One Page Nav Plugin + * http://github.com/davist11/jQuery-One-Page-Nav + * + * Copyright (c) 2010 Trevor Davis (http://trevordavis.net) + * Dual licensed under the MIT and GPL licenses. + * Uses the same license as jQuery, see: + * http://jquery.org/license + * + * @version 3.0.0 + * + * Example usage: + * $('#nav').onePageNav({ + * currentClass: 'current', + * changeHash: false, + * scrollSpeed: 750 + * }); + */ + +;(function($, window, document, undefined){ + + // our plugin constructor + var OnePageNav = function(elem, options){ + this.elem = elem; + this.$elem = $(elem); + this.options = options; + this.metadata = this.$elem.data('plugin-options'); + this.$win = $(window); + this.sections = {}; + this.didScroll = false; + this.$doc = $(document); + this.docHeight = this.$doc.height(); + }; + + // the plugin prototype + OnePageNav.prototype = { + defaults: { + navItems: 'a', + currentClass: 'current', + changeHash: false, + easing: 'swing', + filter: '', + scrollSpeed: 750, + scrollThreshold: 0.5, + begin: false, + end: false, + scrollChange: false + }, + + init: function() { + // Introduce defaults that can be extended either + // globally or using an object literal. + this.config = $.extend({}, this.defaults, this.options, this.metadata); + + this.$nav = this.$elem.find(this.config.navItems); + + //Filter any links out of the nav + if(this.config.filter !== '') { + this.$nav = this.$nav.filter(this.config.filter); + } + + //Handle clicks on the nav + this.$nav.on('click.onePageNav', $.proxy(this.handleClick, this)); + + //Get the section positions + this.getPositions(); + + //Handle scroll changes + this.bindInterval(); + + //Update the positions on resize too + this.$win.on('resize.onePageNav', $.proxy(this.getPositions, this)); + + return this; + }, + + adjustNav: function(self, $parent) { + self.$elem.find('.' + self.config.currentClass).removeClass(self.config.currentClass); + $parent.addClass(self.config.currentClass); + }, + + bindInterval: function() { + var self = this; + var docHeight; + + self.$win.on('scroll.onePageNav', function() { + self.didScroll = true; + }); + + self.t = setInterval(function() { + docHeight = self.$doc.height(); + + //If it was scrolled + if(self.didScroll) { + self.didScroll = false; + self.scrollChange(); + } + + //If the document height changes + if(docHeight !== self.docHeight) { + self.docHeight = docHeight; + self.getPositions(); + } + }, 250); + }, + + getHash: function($link) { + return $link.attr('href').split('#')[1]; + }, + + getPositions: function() { + var self = this; + var linkHref; + var topPos; + var $target; + + self.$nav.each(function() { + linkHref = self.getHash($(this)); + $target = $('#' + linkHref); + + if($target.length) { + topPos = $target.offset().top; +
[06/35] tomee-site-generator git commit: import from old website
http://git-wip-us.apache.org/repos/asf/tomee-site-generator/blob/972cc356/src/main/jbake/content/examples/simple-cdi-interceptor.adoc -- diff --git a/src/main/jbake/content/examples/simple-cdi-interceptor.adoc b/src/main/jbake/content/examples/simple-cdi-interceptor.adoc new file mode 100755 index 000..f29d9be --- /dev/null +++ b/src/main/jbake/content/examples/simple-cdi-interceptor.adoc @@ -0,0 +1,127 @@ += simple-cdi-interceptor +:jbake-date: 2016-09-06 +:jbake-type: page +:jbake-tomeepdf: +:jbake-status: published + +Example simple-cdi-interceptor can be browsed at https://github.com/apache/tomee/tree/master/examples/simple-cdi-interceptor + += Simple CDI Interceptor + +Let's write a simple application that would allow us to book tickets for a movie show. As with all applications, logging is one cross-cutting concern that we have. + +(Relevant snippets are inlined but you can check out the complete code, from the links provided) + +How do we mark which methods are to be intercepted ? Wouldn't it be handy to annotate a method like + + +[source,java] + +@Log +public void aMethod(){...} + +Let's create an annotation that would "mark" a method for interception. + +@InterceptorBinding +@Target({ TYPE, METHOD }) +@Retention(RUNTIME) +public @interface Log { +} + + + +Sure, you haven't missed the @InterceptorBinding annotation above ! Now that our custom annotation is created, lets attach it (or to use a better term for it, "bind it" ) +to an interceptor. + +So here's our logging interceptor. An @AroundInvoke method and we are almost done. + + +[source,java] + +@Interceptor +@Log //binding the interceptor here. now any method annotated with @Log would be intercepted by logMethodEntry +public class LoggingInterceptor { +@AroundInvoke +public Object logMethodEntry(InvocationContext ctx) throws Exception { +System.out.println("Entering method: " + ctx.getMethod().getName()); +//or logger.info statement +return ctx.proceed(); +} +} + + + +Now the @Log annotation we created is bound to this interceptor. + +That done, let's annotate at class-level or method-level and have fun intercepting ! + + +[source,java] + +@Log +@Stateful +public class BookShow implements Serializable { +private static final long serialVersionUID = 6350400892234496909L; +public List getMoviesList() { +List moviesAvailable = new ArrayList(); +moviesAvailable.add("12 Angry Men"); +moviesAvailable.add("Kings speech"); +return moviesAvailable; +} +public Integer getDiscountedPrice(int ticketPrice) { +return ticketPrice - 50; +} +// assume more methods are present +} + + + +The `@Log` annotation applied at class level denotes that all the methods should be intercepted with `LoggingInterceptor`. + +Before we say "all done" there's one last thing we are left with ! To enable the interceptors ! + +Lets quickly put up a [beans.xml file] + + +[source,xml] + + + +org.superbiz.cdi.bookshow.interceptors.LoggingInterceptor + + + + + + + in META-INF + + +Those lines in beans.xml not only "enable" the interceptors, but also define the "order of execution" of the interceptors. +But we'll see that in another example on multiple-cdi-interceptors. + +Fire up the test, and we should see a 'Entering method: getMoviesList' printed in the console. + += Tests +Apache OpenEJB 4.0.0-beta-2build: 2003-01:00 +http://tomee.apache.org/ +INFO - openejb.home = /media/fthree/Workspace/open4/openejb/examples/cdi-simple-interceptors +INFO - openejb.base = /media/fthree/Workspace/open4/openejb/examples/cdi-simple-interceptors +INFO - Using 'javax.ejb.embeddable.EJBContainer=true' +INFO - Configuring Service(id=Default Security Service, type=SecurityService, provider-id=Default Security Service) +INFO - Configuring Service(id=Default Transaction Manager, type=TransactionManager, provider-id=Default Transaction Manager) +INFO - Found EjbModule in classpath: /media/fthree/Workspace/open4/openejb/examples/cdi-simple-interceptors/target/classes +INFO - Beginning load: /media/fthree/Workspace/open4/openejb/examples/cdi-simple-interceptors/target/classes +INFO - Configuring enterprise application: /media/fthree/Workspace/open4/openejb/examples/cdi-simple-interceptors +INFO - Configuring Service(id=Default Managed Container, type=Container, provider-id=Default Managed Container) +INFO - Auto-creating a container for bean cdi-simple-interceptors.Comp: Container(type=MANAGED, id=Default Managed Container) +INFO - Configuring Service(id=Default Stateful Container, type=Container, provider-id=Default Stateful Container) +INFO - Auto-creating a container for bean BookShow: Container(type=STATEFUL, id=Default Stateful Container) +INFO - Enterprise application
[16/35] tomee-site-generator git commit: import from old website
http://git-wip-us.apache.org/repos/asf/tomee-site-generator/blob/972cc356/src/main/jbake/content/download-ng.adoc -- diff --git a/src/main/jbake/content/download-ng.adoc b/src/main/jbake/content/download-ng.adoc new file mode 100755 index 000..0610a06 --- /dev/null +++ b/src/main/jbake/content/download-ng.adoc @@ -0,0 +1,280 @@ += Downloads +:jbake-date: 2015-04-05 +:jbake-type: page +:jbake-status: published +:jbake-tomeepdf: +:icons: font + +IMPORTANT: only TomEE 1.x WebProfile and JAX-RS distributions are certified. + +[.table.table-bordered,options="header"] +|=== +|Name|Version|Date|Size|Type|Links +|Apache TomEE plume|7.0.3|Tue, 07 Mar 2017 21:47:50 GMT|55 MB |tar.gz| http://repo.maven.apache.org/maven2/org/apache/tomee/apache-tomee/7.0.3/apache-tomee-7.0.3-plume.tar.gz[icon:download[] tar.gz] http://repo.maven.apache.org/maven2/org/apache/tomee/apache-tomee/7.0.3/apache-tomee-7.0.3-plume.tar.gz.sha1[icon:download[] sha1] http://repo.maven.apache.org/maven2/org/apache/tomee/apache-tomee/7.0.3/apache-tomee-7.0.3-plume.tar.gz.md5[icon:download[] md5] http://repo.maven.apache.org/maven2/org/apache/tomee/apache-tomee/7.0.3/apache-tomee-7.0.3-plume.tar.gz.asc[icon:download[] asc] +|Apache TomEE plume|7.0.3|Tue, 07 Mar 2017 21:45:35 GMT|55 MB |zip| http://repo.maven.apache.org/maven2/org/apache/tomee/apache-tomee/7.0.3/apache-tomee-7.0.3-plume.zip[icon:download[] zip] http://repo.maven.apache.org/maven2/org/apache/tomee/apache-tomee/7.0.3/apache-tomee-7.0.3-plume.zip.sha1[icon:download[] sha1] http://repo.maven.apache.org/maven2/org/apache/tomee/apache-tomee/7.0.3/apache-tomee-7.0.3-plume.zip.md5[icon:download[] md5] http://repo.maven.apache.org/maven2/org/apache/tomee/apache-tomee/7.0.3/apache-tomee-7.0.3-plume.zip.asc[icon:download[] asc] +|Apache TomEE plus|7.0.3|Tue, 07 Mar 2017 21:43:39 GMT|48 MB |tar.gz| http://repo.maven.apache.org/maven2/org/apache/tomee/apache-tomee/7.0.3/apache-tomee-7.0.3-plus.tar.gz[icon:download[] tar.gz] http://repo.maven.apache.org/maven2/org/apache/tomee/apache-tomee/7.0.3/apache-tomee-7.0.3-plus.tar.gz.sha1[icon:download[] sha1] http://repo.maven.apache.org/maven2/org/apache/tomee/apache-tomee/7.0.3/apache-tomee-7.0.3-plus.tar.gz.md5[icon:download[] md5] http://repo.maven.apache.org/maven2/org/apache/tomee/apache-tomee/7.0.3/apache-tomee-7.0.3-plus.tar.gz.asc[icon:download[] asc] +|Apache TomEE plus|7.0.3|Tue, 07 Mar 2017 21:41:45 GMT|48 MB |zip| http://repo.maven.apache.org/maven2/org/apache/tomee/apache-tomee/7.0.3/apache-tomee-7.0.3-plus.zip[icon:download[] zip] http://repo.maven.apache.org/maven2/org/apache/tomee/apache-tomee/7.0.3/apache-tomee-7.0.3-plus.zip.sha1[icon:download[] sha1] http://repo.maven.apache.org/maven2/org/apache/tomee/apache-tomee/7.0.3/apache-tomee-7.0.3-plus.zip.md5[icon:download[] md5] http://repo.maven.apache.org/maven2/org/apache/tomee/apache-tomee/7.0.3/apache-tomee-7.0.3-plus.zip.asc[icon:download[] asc] +|Apache TomEE webprofile|7.0.3|Tue, 07 Mar 2017 21:40:27 GMT|33 MB |tar.gz| http://repo.maven.apache.org/maven2/org/apache/tomee/apache-tomee/7.0.3/apache-tomee-7.0.3-webprofile.tar.gz[icon:download[] tar.gz] http://repo.maven.apache.org/maven2/org/apache/tomee/apache-tomee/7.0.3/apache-tomee-7.0.3-webprofile.tar.gz.sha1[icon:download[] sha1] http://repo.maven.apache.org/maven2/org/apache/tomee/apache-tomee/7.0.3/apache-tomee-7.0.3-webprofile.tar.gz.md5[icon:download[] md5] http://repo.maven.apache.org/maven2/org/apache/tomee/apache-tomee/7.0.3/apache-tomee-7.0.3-webprofile.tar.gz.asc[icon:download[] asc] +|Apache TomEE webprofile|7.0.3|Tue, 07 Mar 2017 21:39:18 GMT|34 MB |zip| http://repo.maven.apache.org/maven2/org/apache/tomee/apache-tomee/7.0.3/apache-tomee-7.0.3-webprofile.zip[icon:download[] zip] http://repo.maven.apache.org/maven2/org/apache/tomee/apache-tomee/7.0.3/apache-tomee-7.0.3-webprofile.zip.sha1[icon:download[] sha1] http://repo.maven.apache.org/maven2/org/apache/tomee/apache-tomee/7.0.3/apache-tomee-7.0.3-webprofile.zip.md5[icon:download[] md5] http://repo.maven.apache.org/maven2/org/apache/tomee/apache-tomee/7.0.3/apache-tomee-7.0.3-webprofile.zip.asc[icon:download[] asc] +|Apache TomEE plume|7.0.2|Sun, 06 Nov 2016 19:13:59 GMT|55 MB |tar.gz| http://repo.maven.apache.org/maven2/org/apache/tomee/apache-tomee/7.0.2/apache-tomee-7.0.2-plume.tar.gz[icon:download[] tar.gz] http://repo.maven.apache.org/maven2/org/apache/tomee/apache-tomee/7.0.2/apache-tomee-7.0.2-plume.tar.gz.sha1[icon:download[] sha1] http://repo.maven.apache.org/maven2/org/apache/tomee/apache-tomee/7.0.2/apache-tomee-7.0.2-plume.tar.gz.md5[icon:download[] md5] http://repo.maven.apache.org/maven2/org/apache/tomee/apache-tomee/7.0.2/apache-tomee-7.0.2-plume.tar.gz.asc[icon:download[] asc] +|Apache TomEE plume|7.0.2|Sun, 06 Nov 2016 19:05:57 GMT|55 MB |zip|
[27/35] tomee-site-generator git commit: import from old website
http://git-wip-us.apache.org/repos/asf/tomee-site-generator/blob/972cc356/src/main/jbake/assets/fonts/eleganticons/ElegantIcons.svg -- diff --git a/src/main/jbake/assets/fonts/eleganticons/ElegantIcons.svg b/src/main/jbake/assets/fonts/eleganticons/ElegantIcons.svg new file mode 100755 index 000..93538d7 --- /dev/null +++ b/src/main/jbake/assets/fonts/eleganticons/ElegantIcons.svg @@ -0,0 +1,1832 @@ + +http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd; > +http://www.w3.org/2000/svg;> + +This is a custom SVG font generated by IcoMoon. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +http://git-wip-us.apache.org/repos/asf/tomee-site-generator/blob/972cc356/src/main/jbake/assets/fonts/eleganticons/ElegantIcons.ttf -- diff --git a/src/main/jbake/assets/fonts/eleganticons/ElegantIcons.ttf b/src/main/jbake/assets/fonts/eleganticons/ElegantIcons.ttf new file mode 100755 index 000..12ff680 Binary files /dev/null and b/src/main/jbake/assets/fonts/eleganticons/ElegantIcons.ttf differ
[07/35] tomee-site-generator git commit: import from old website
e.APPLICATION_XML_TYPE) +.post(new Request("Hi REST!"), Response.class).getValue(); +assertEquals("hi rest!", message); +} + +@Test +public void getJson() throws IOException { +final String message = WebClient.create("http://localhost:4204;).path("/test/greeting/") +.accept(MediaType.APPLICATION_JSON_TYPE) + .get(Response.class).getValue(); +assertEquals("Hi REST!", message); +} + +@Test +public void postJson() throws IOException { + final String message = WebClient.create("http://localhost:4204;).path("/test/greeting/") +.accept(MediaType.APPLICATION_JSON_TYPE) +.post(new Request("Hi REST!"), Response.class).getValue(); +assertEquals("hi rest!", message); +} +} + + + + += Running + +Running the example is fairly simple. In the "rest-xml-json" directory run: + +$ mvn clean install + +Which should create output like the following. + +/opt/softs/java/jdk1.6.0_30/bin/java -ea -Didea.launcher.port=7534 -Didea.launcher.bin.path=/opt/softs/idea/bin -Dfile.encoding=UTF-8 -classpath /opt/softs/idea/lib/idea_rt.jar:/opt/softs/idea/plugins/junit/lib/junit-rt.jar:/opt/softs/java/jdk1.6.0_30/jre/lib/plugin.jar:/opt/softs/java/jdk1.6.0_30/jre/lib/javaws.jar:/opt/softs/java/jdk1.6.0_30/jre/lib/jce.jar:/opt/softs/java/jdk1.6.0_30/jre/lib/charsets.jar:/opt/softs/java/jdk1.6.0_30/jre/lib/resources.jar:/opt/softs/java/jdk1.6.0_30/jre/lib/deploy.jar:/opt/softs/java/jdk1.6.0_30/jre/lib/management-agent.jar:/opt/softs/java/jdk1.6.0_30/jre/lib/jsse.jar:/opt/softs/java/jdk1.6.0_30/jre/lib/rt.jar:/opt/softs/java/jdk1.6.0_30/jre/lib/ext/localedata.jar:/opt/softs/java/jdk1.6.0_30/jre/lib/ext/sunjce_provider.jar:/opt/softs/java/jdk1.6.0_30/jre/lib/ext/sunpkcs11.jar:/opt/softs/java/jdk1.6.0_30/jre/lib/ext/dnsns.jar:/opt/dev/openejb/openejb-trunk/examples/rest-xml-json/target/test-classes:/opt/dev/openejb/openejb-trunk/examples/rest-xm l-json/target/classes:/home/rmannibucau/.m2/repository/org/apache/openejb/javaee-api/6.0-4/javaee-api-6.0-4.jar:/home/rmannibucau/.m2/repository/junit/junit/4.10/junit-4.10.jar:/home/rmannibucau/.m2/repository/org/hamcrest/hamcrest-core/1.1/hamcrest-core-1.1.jar:/home/rmannibucau/.m2/repository/org/apache/openejb/openejb-cxf-rs/4.5.1/openejb-cxf-rs-4.5.1.jar:/home/rmannibucau/.m2/repository/org/apache/openejb/openejb-http/4.5.1/openejb-http-4.5.1.jar:/home/rmannibucau/.m2/repository/org/apache/openejb/openejb-core/4.5.1/openejb-core-4.5.1.jar:/home/rmannibucau/.m2/repository/org/apache/openejb/mbean-annotation-api/4.5.1/mbean-annotation-api-4.5.1.jar:/home/rmannibucau/.m2/repository/org/apache/openejb/openejb-jpa-integration/4.5.1/openejb-jpa-integration-4.5.1.jar:/home/rmannibucau/.m2/repository/org/apache/commons/commons-lang3/3.1/commons-lang3-3.1.jar:/home/rmannibucau/.m2/repository/org/apache/openejb/openejb-api/4.5.1/openejb-api-4.5.1.jar:/home/rmannibucau/.m2/repository/org/a pache/openejb/openejb-loader/4.5.1/openejb-loader-4.5.1.jar:/home/rmannibucau/.m2/repository/org/apache/openejb/openejb-javaagent/4.5.1/openejb-javaagent-4.5.1.jar:/home/rmannibucau/.m2/repository/org/apache/openejb/openejb-jee/4.5.1/openejb-jee-4.5.1.jar:/home/rmannibucau/.m2/repository/com/sun/xml/bind/jaxb-impl/2.1.13/jaxb-impl-2.1.13.jar:/home/rmannibucau/.m2/repository/commons-cli/commons-cli/1.2/commons-cli-1.2.jar:/home/rmannibucau/.m2/repository/org/apache/activemq/activemq-ra/5.7.0/activemq-ra-5.7.0.jar:/home/rmannibucau/.m2/repository/org/apache/activemq/activemq-core/5.7.0/activemq-core-5.7.0.jar:/home/rmannibucau/.m2/repository/org/slf4j/slf4j-api/1.7.2/slf4j-api-1.7.2.jar:/home/rmannibucau/.m2/repository/org/apache/activemq/kahadb/5.7.0/kahadb-5.7.0.jar:/home/rmannibucau/.m2/repository/org/apache/activemq/protobuf/activemq-protobuf/1.1/activemq-protobuf-1.1.jar:/home/rmannibucau/.m2/repository/commons-logging/commons-logging/1.1.1/commons-logging-1.1.1.jar:/home/rmannib ucau/.m2/repository/commons-net/commons-net/3.1/commons-net-3.1.jar:/home/rmannibucau/.m2/repository/org/apache/geronimo/components/geronimo-connector/3.1.1/geronimo-connector-3.1.1.jar:/home/rmannibucau/.m2/repository/org/apache/geronimo/components/geronimo-transaction/3.1.1/geronimo-transaction-3.1.1.jar:/home/rmannibucau/.m2/repository/org/apache/geronimo/specs/geronimo-j2ee-connector_1.6_spec/1.0/geronimo-j2ee-connector_1.6_spec-1.0.jar:/home/rmannibucau/.m2/repository/org/objectweb/howl/howl/1.0.1-1/howl-1.0.1-1.jar:/home/rmannibucau/.m2/repository/org/apache/geronimo/javamail/geronimo-javamail_1.4_mail/1.8.2/geronimo-javamail_1.4_mail-1.8.2.jar:/home/rmannibucau/.m2/repository/org/apache/xbean/xbean-asm-shaded/3.12/xbean-asm-shaded-3.12.jar:/home/rmannibucau/.m2/repository/org/apache/xbean/xbean-finder-shaded/3.12/xbean-finder-shaded-3.12.jar:/home/rmannibucau/.m2/repository/org/apache/xbean
[14/35] tomee-site-generator git commit: import from old website
http://git-wip-us.apache.org/repos/asf/tomee-site-generator/blob/972cc356/src/main/jbake/content/examples/cdi-alternative-and-stereotypes.adoc -- diff --git a/src/main/jbake/content/examples/cdi-alternative-and-stereotypes.adoc b/src/main/jbake/content/examples/cdi-alternative-and-stereotypes.adoc new file mode 100755 index 000..2f5e99d --- /dev/null +++ b/src/main/jbake/content/examples/cdi-alternative-and-stereotypes.adoc @@ -0,0 +1,138 @@ += cdi-alternative-and-stereotypes +:jbake-date: 2016-09-06 +:jbake-type: page +:jbake-tomeepdf: +:jbake-status: published + +Example cdi-alternative-and-stereotypes can be browsed at https://github.com/apache/tomee/tree/master/examples/cdi-alternative-and-stereotypes + += Introduction + +CDI is a revolution for Java EE world. This specification is the best one to avoid coupling between classes. + +This example simply aims to override bindings at runtime to simplify mocking work. + +It uses two kind of mocks: +1) a mock with no implementation in the classloader +2) a mock with an implementation in the classloader + +The mock answer from CDI is called *alternative*. + +Annotating `@Alternative` a class will mean it will replace any implementation if there is no other implementation +or if it is forced (through `META-INF/beans.xml`). + += Code explanation +== main code + +We use an EJB `Jouney` to modelize a journey where the vehicle and the society can change. Here an EJB is used simply +because it simplifies the test. A jouney wraps the vehicle and society information. + +We define then two interfaces to inject it in the `Journey` EJB: `Vehicle` and `Society`. + +Finally we add an implementation for `Scociety` interface: `LowCostCompanie`. + +If we don't go further `Journey` object will not be able to be created because no `Vehicle` implementation is available. + +Note: if we suppose we have a `Vehicle` implementation, the injected Society should be `LowCostCompanie`. + +== test code + +The goal here is to test our `Journey` EJB. So we have to provide a `Vehicle` implementation: `SuperCar`. + +We want to force the `Society` implementation (for any reason) by our test implementation: `AirOpenEJB`. + +One solution could simply be to add `@Alternative` annotation on `AirOpenEJB` and activate it through +the `META-INF/beans.xml` file. + +Here we want to write more explicit code. So we want to replace the `@Alternative` annotation by `@Mock` one. + +So we simply define an `@Mock` annotation for classes, resolvable at runtime which is a stereotype (`@Stereotype`) +which replace `@Alternative`. + +Here is the annotation: + + +[source,java] + +@Stereotype // we define a stereotype +@Retention(RUNTIME) // resolvable at runtime +@Target(TYPE) // this annotation is a class level one +@Alternative // it replace @Alternative +public @interface Mock {} + +Note: you can add more CDI annotations after `@Alternative` and it will get the behavior expected (the scope for instance). + +So now we have our `@Mock` annotation which is a stereotype able to replace `@Alternative` annotation +we simply add this annotation to our mocks. + +If you run it now you'll have this exception: + +javax.enterprise.inject.UnsatisfiedResolutionException: Api type [org.superbiz.cdi.stereotype.Vehicle] is not found with the qualifiers +Qualifiers: [@javax.enterprise.inject.Default()] +for injection into Field Injection Point, field name : vehicle, Bean Owner : [Journey, Name:null, WebBeans Type:ENTERPRISE, API Types:[java.lang.Object,org.superbiz.cdi.stereotype.Journey], Qualifiers:[javax.enterprise.inject.Any,javax.enterprise.inject.Default]] + +It means the stereotype is not activated. To do it simply add it to your `META-INF/beans.xml`: + + + org.superbiz.cdi.stereotype.Mock + + +Note: if you don't specify `AirOpenEJB` as `@Alternative` (done through our mock annotation) you'll get this exception: + +Caused by: javax.enterprise.inject.AmbiguousResolutionException: There is more than one api type with : org.superbiz.cdi.stereotype.Society with qualifiers : Qualifiers: [@javax.enterprise.inject.Default()] +for injection into Field Injection Point, field name : society, Bean Owner : [Journey, Name:null, WebBeans Type:ENTERPRISE, API Types:[org.superbiz.cdi.stereotype.Journey,java.lang.Object], Qualifiers:[javax.enterprise.inject.Any,javax.enterprise.inject.Default]] +found beans: +AirOpenEJB, Name:null, WebBeans Type:MANAGED, API Types:[org.superbiz.cdi.stereotype.Society,org.superbiz.cdi.stereotype.AirOpenEJB,java.lang.Object], Qualifiers:[javax.enterprise.inject.Any,javax.enterprise.inject.Default] +LowCostCompanie, Name:null, WebBeans Type:MANAGED, API Types:[org.superbiz.cdi.stereotype.Society,org.superbiz.cdi.stereotype.LowCostCompanie,java.lang.Object], Qualifiers:[javax.enterprise.inject.Any,javax.enterprise.inject.Default] + +which simply means two implementations are available for the
[28/35] tomee-site-generator git commit: import from old website
http://git-wip-us.apache.org/repos/asf/tomee-site-generator/blob/972cc356/src/main/jbake/assets/css/cardio.css -- diff --git a/src/main/jbake/assets/css/cardio.css b/src/main/jbake/assets/css/cardio.css new file mode 100755 index 000..71c6ad6 --- /dev/null +++ b/src/main/jbake/assets/css/cardio.css @@ -0,0 +1,1173 @@ +@import url(http://fonts.googleapis.com/css?family=Roboto:300,400,500,700); +body { + font-family: 'Roboto', 'Helvetica Neue', 'Segoe UI', Helvetica, Arial, sans-serif; + font-size: 14px; + overflow-x: hidden; + color: #2a3237; + -webkit-font-smoothing: antialiased; + -moz-osx-font-smoothing: grayscale; +} + +.parallax { + position: absolute; + overflow: hidden; + width: 100%; + -webkit-transform: translateZ(0); + -ms-transform: translateZ(0); + transform: translateZ(0); +} + +.parallax img { + width: 100%; + height: 100%; +} +/* Preloader */ + +.preloader { + position: fixed; + z-index: ; + width: 100%; + height: 100%; + background-color: white; +} + +.preloader img { + position: absolute; + top: calc(50% - 32px); + left: calc(50% - 32px); +} + +.preloader div { + display: none; + /* Preload the Second Pricing Image */ + background: url(../img/pricing2.jpg) no-repeat px px; + background-position: px px; +} + +/* Typography */ + +.bigp { + font-size: 18px; + line-height: 1.5; + color: #80287a; +} + +h1, +h2, +h3, +h4, +h5, +h6 { + font-family: 'Roboto', 'Avenir Next', 'Helvetica Neue', 'Segoe UI', Helvetica, Arial, sans-serif; + position: relative; + margin: 10px 0; +} + +h1 { + font-size: 60px; +} + +h2 { + font-size: 48px; +} + +h3 { + font-size: 30px; +} + +h4 { + font-size: 24px; +} + +h5 { + font-size: 18px; +} + +h6 { + font-size: 16px; +} + +ul.white-list { + padding: 0; + list-style-type: none; +} + +ul.white-list li { + font-size: 18px; + margin: 10px 0; + color: #fff; +} + +ul.white-list li:before { + content: ' '; + position: relative; + top: -3px; + display: inline-block; + width: 6px; + height: 6px; + margin-right: 15px; + background: white; +} + +header { + position: relative; + width: 100%; + color: #80287a; + background: rgba(28, 36, 65, 0.93); + background: url('../img/header.jpg'); + background-size: cover; +} + +header .table { + display: table; + height: 100%; +} + +header .container { + height: 100%; +} + +header .header-text { + display: table-cell; + text-align: center; + vertical-align: middle; + color: #80287a; +} + +header .typed { + display: inline-block; + margin: 0; +} + +header .typed-cursor { + font-size: 60px; + display: inline-block; + margin: 0 10px; + color: #80287a; + -webkit-animation-name: flash; + animation-name: flash; + -webkit-animation-duration: 1s; + animation-duration: 1s; + -webkit-animation-iteration-count: infinite; + animation-iteration-count: infinite; +} + +a { + text-decoration: none; + color: #80287a; + -webkit-transition: all 0.3s ease; + transition: all 0.3s ease; +} +/* Navigation Bar ( Navbar ) */ + +nav.navbar { + position: absolute; + z-index: 9500; + width: 100%; + width: 100vw; + -webkit-transition: all 0.3s ease; + transition: all 0.3s ease; +} + +nav.navbar .navbar-nav li.active a:not(.btn) { + color: #80287a !important; +} + +nav.navbar-fixed-top { + z-index: 9499; + top: 0; + padding-top: 10px; + padding-bottom: 10px; + opacity: 1; + background: white; + box-shadow: 0px 4px 3px rgba(0, 0, 0, 0.05); +} + +nav.navbar-fixed-top .navbar-nav > li > a:not(.btn) { + color: #bbb; +} + +.icon-bar { + background: #bbb; +} +/* Buttons */ + +.btn { + font-size: 18px; + display: inline-block; + padding: 15px 30px; + color: #80287a; + border: 2px solid transparent; + border-radius: 2px; + background: transparent; + -webkit-transition: all 0.3s ease; + transition: all 0.3s ease; +} + +.btn:hover, +.btn:focus { + color: #CE2D34; +} + +.btn.btn-blue { + background: #80287a; + color: #fff; +} + +.btn.btn-blue:hover { + background: #31b9ff; +} + +.btn.btn-blue-fill { + color: #80287a; + border-color: #80287a; + background: transparent; +} + +.btn.btn-blue-fill:hover { + color: white; + background: #80287a; +} + +.btn.btn-white-fill { + color: #fff; + border-color: #fff; + background: transparent; +} + +.btn.btn-white-fill:hover { + color: #80287a; +
[24/35] tomee-site-generator git commit: import from old website
http://git-wip-us.apache.org/repos/asf/tomee-site-generator/blob/972cc356/src/main/jbake/assets/fonts/font-awesome-4.1.0/fonts/fontawesome-webfont.ttf -- diff --git a/src/main/jbake/assets/fonts/font-awesome-4.1.0/fonts/fontawesome-webfont.ttf b/src/main/jbake/assets/fonts/font-awesome-4.1.0/fonts/fontawesome-webfont.ttf new file mode 100755 index 000..96a3639 Binary files /dev/null and b/src/main/jbake/assets/fonts/font-awesome-4.1.0/fonts/fontawesome-webfont.ttf differ http://git-wip-us.apache.org/repos/asf/tomee-site-generator/blob/972cc356/src/main/jbake/assets/fonts/font-awesome-4.1.0/fonts/fontawesome-webfont.woff -- diff --git a/src/main/jbake/assets/fonts/font-awesome-4.1.0/fonts/fontawesome-webfont.woff b/src/main/jbake/assets/fonts/font-awesome-4.1.0/fonts/fontawesome-webfont.woff new file mode 100755 index 000..628b6a5 Binary files /dev/null and b/src/main/jbake/assets/fonts/font-awesome-4.1.0/fonts/fontawesome-webfont.woff differ http://git-wip-us.apache.org/repos/asf/tomee-site-generator/blob/972cc356/src/main/jbake/assets/img/gdamour.jpg -- diff --git a/src/main/jbake/assets/img/gdamour.jpg b/src/main/jbake/assets/img/gdamour.jpg new file mode 100644 index 000..148cc7b Binary files /dev/null and b/src/main/jbake/assets/img/gdamour.jpg differ http://git-wip-us.apache.org/repos/asf/tomee-site-generator/blob/972cc356/src/main/jbake/assets/img/genspring.jpg -- diff --git a/src/main/jbake/assets/img/genspring.jpg b/src/main/jbake/assets/img/genspring.jpg new file mode 100644 index 000..a7bd1db Binary files /dev/null and b/src/main/jbake/assets/img/genspring.jpg differ http://git-wip-us.apache.org/repos/asf/tomee-site-generator/blob/972cc356/src/main/jbake/assets/img/header.jpg -- diff --git a/src/main/jbake/assets/img/header.jpg b/src/main/jbake/assets/img/header.jpg new file mode 100755 index 000..56da914 Binary files /dev/null and b/src/main/jbake/assets/img/header.jpg differ http://git-wip-us.apache.org/repos/asf/tomee-site-generator/blob/972cc356/src/main/jbake/assets/img/jgenender.jpg -- diff --git a/src/main/jbake/assets/img/jgenender.jpg b/src/main/jbake/assets/img/jgenender.jpg new file mode 100644 index 000..06c40dd Binary files /dev/null and b/src/main/jbake/assets/img/jgenender.jpg differ http://git-wip-us.apache.org/repos/asf/tomee-site-generator/blob/972cc356/src/main/jbake/assets/img/loader.gif -- diff --git a/src/main/jbake/assets/img/loader.gif b/src/main/jbake/assets/img/loader.gif new file mode 100755 index 000..ab26baa Binary files /dev/null and b/src/main/jbake/assets/img/loader.gif differ http://git-wip-us.apache.org/repos/asf/tomee-site-generator/blob/972cc356/src/main/jbake/assets/img/logo-active.png -- diff --git a/src/main/jbake/assets/img/logo-active.png b/src/main/jbake/assets/img/logo-active.png new file mode 100755 index 000..2352448 Binary files /dev/null and b/src/main/jbake/assets/img/logo-active.png differ http://git-wip-us.apache.org/repos/asf/tomee-site-generator/blob/972cc356/src/main/jbake/assets/img/logo.png -- diff --git a/src/main/jbake/assets/img/logo.png b/src/main/jbake/assets/img/logo.png new file mode 100755 index 000..05dc2e7 Binary files /dev/null and b/src/main/jbake/assets/img/logo.png differ http://git-wip-us.apache.org/repos/asf/tomee-site-generator/blob/972cc356/src/main/jbake/assets/img/manugeorge.jpg -- diff --git a/src/main/jbake/assets/img/manugeorge.jpg b/src/main/jbake/assets/img/manugeorge.jpg new file mode 100644 index 000..f69f4f7 Binary files /dev/null and b/src/main/jbake/assets/img/manugeorge.jpg differ http://git-wip-us.apache.org/repos/asf/tomee-site-generator/blob/972cc356/src/main/jbake/assets/img/mnour.jpg -- diff --git a/src/main/jbake/assets/img/mnour.jpg b/src/main/jbake/assets/img/mnour.jpg new file mode 100644 index 000..e797b8b Binary files /dev/null and b/src/main/jbake/assets/img/mnour.jpg differ http://git-wip-us.apache.org/repos/asf/tomee-site-generator/blob/972cc356/src/main/jbake/assets/img/noimg.png -- diff --git a/src/main/jbake/assets/img/noimg.png b/src/main/jbake/assets/img/noimg.png new file mode 100644 index 000..f779c8f Binary files
[11/35] tomee-site-generator git commit: import from old website
http://git-wip-us.apache.org/repos/asf/tomee-site-generator/blob/972cc356/src/main/jbake/content/examples/helloworld-weblogic.adoc -- diff --git a/src/main/jbake/content/examples/helloworld-weblogic.adoc b/src/main/jbake/content/examples/helloworld-weblogic.adoc new file mode 100755 index 000..dd8279e --- /dev/null +++ b/src/main/jbake/content/examples/helloworld-weblogic.adoc @@ -0,0 +1,169 @@ += Helloworld Weblogic +:jbake-date: 2016-09-06 +:jbake-type: page +:jbake-tomeepdf: +:jbake-status: published + +Example helloworld-weblogic can be browsed at https://github.com/apache/tomee/tree/master/examples/helloworld-weblogic + + +*Help us document this example! Click the blue pencil icon in the upper right to edit this page.* + +== HelloBean + + +[source,java] + +package org.superbiz.hello; + +import javax.ejb.LocalHome; +import javax.ejb.Stateless; + +/** + * @version $Revision: 607077 $ $Date: 2007-12-27 06:55:23 -0800 (Thu, 27 Dec 2007) $ + */ +@Stateless +@LocalHome(HelloEjbLocalHome.class) +public class HelloBean { + +public String sayHello() { +return "Hello, World!"; +} +} + + + +== HelloEjbLocal + + +[source,java] + +package org.superbiz.hello; + +import javax.ejb.EJBLocalObject; + +/** + * @version $Revision: 607077 $ $Date: 2007-12-27 06:55:23 -0800 (Thu, 27 Dec 2007) $ + */ +public interface HelloEjbLocal extends EJBLocalObject { + +String sayHello(); +} + + + +== HelloEjbLocalHome + + +[source,java] + +package org.superbiz.hello; + +import javax.ejb.CreateException; +import javax.ejb.EJBLocalHome; + +/** + * @version $Revision: 1090810 $ $Date: 2011-04-10 07:49:26 -0700 (Sun, 10 Apr 2011) $ + */ +public interface HelloEjbLocalHome extends EJBLocalHome { +HelloEjbLocal create() throws CreateException; +} + + + +== ejb-jar.xml + + +[source,xml] + + + + + +== weblogic-ejb-jar.xml + + +[source,xml] + + + +HelloBean +MyHello + + + + + + + +== HelloTest + + +[source,java] + +package org.superbiz.hello; + +import junit.framework.TestCase; + +import javax.naming.Context; +import javax.naming.InitialContext; +import java.util.Properties; + +/** + * @version $Revision: 1090810 $ $Date: 2011-04-10 07:49:26 -0700 (Sun, 10 Apr 2011) $ + */ +public class HelloTest extends TestCase { + +public void test() throws Exception { +Properties properties = new Properties(); +properties.setProperty(Context.INITIAL_CONTEXT_FACTORY, "org.apache.openejb.core.LocalInitialContextFactory"); +InitialContext initialContext = new InitialContext(properties); + +HelloEjbLocalHome localHome = (HelloEjbLocalHome) initialContext.lookup("MyHello"); +HelloEjbLocal helloEjb = localHome.create(); + +String message = helloEjb.sayHello(); + +assertEquals(message, "Hello, World!"); +} +} + + + += Running + + + +[source] + +--- + T E S T S +--- +Running org.superbiz.hello.HelloTest +Apache OpenEJB 4.0.0-beta-1build: 20111002-04:06 +http://tomee.apache.org/ +INFO - openejb.home = /Users/dblevins/examples/helloworld-weblogic +INFO - openejb.base = /Users/dblevins/examples/helloworld-weblogic +INFO - Configuring Service(id=Default Security Service, type=SecurityService, provider-id=Default Security Service) +INFO - Configuring Service(id=Default Transaction Manager, type=TransactionManager, provider-id=Default Transaction Manager) +INFO - Found EjbModule in classpath: /Users/dblevins/examples/helloworld-weblogic/target/classes +INFO - Beginning load: /Users/dblevins/examples/helloworld-weblogic/target/classes +INFO - Configuring enterprise application: /Users/dblevins/examples/helloworld-weblogic/classpath.ear +INFO - Configuring Service(id=Default Stateless Container, type=Container, provider-id=Default Stateless Container) +INFO - Auto-creating a container for bean HelloBean: Container(type=STATELESS, id=Default Stateless Container) +INFO - Enterprise application "/Users/dblevins/examples/helloworld-weblogic/classpath.ear" loaded. +INFO - Assembling app: /Users/dblevins/examples/helloworld-weblogic/classpath.ear +INFO - Jndi(name=MyHello) --> Ejb(deployment-id=HelloBean) +INFO - Jndi(name=global/classpath.ear/helloworld-weblogic/HelloBean!org.superbiz.hello.HelloEjbLocalHome) --> Ejb(deployment-id=HelloBean) +INFO - Jndi(name=global/classpath.ear/helloworld-weblogic/HelloBean) --> Ejb(deployment-id=HelloBean) +INFO - Created Ejb(deployment-id=HelloBean, ejb-name=HelloBean, container=Default Stateless Container) +INFO - Started Ejb(deployment-id=HelloBean, ejb-name=HelloBean, container=Default Stateless Container) +INFO - Deployed Application(path=/Users/dblevins/examples/helloworld-weblogic/classpath.ear) +Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed:
[01/35] tomee-site-generator git commit: import from old website
Repository: tomee-site-generator Updated Branches: refs/heads/master [created] 61cae98ed http://git-wip-us.apache.org/repos/asf/tomee-site-generator/blob/972cc356/src/main/jbake/templates/footer.gsp -- diff --git a/src/main/jbake/templates/footer.gsp b/src/main/jbake/templates/footer.gsp new file mode 100755 index 000..2c24dc9 --- /dev/null +++ b/src/main/jbake/templates/footer.gsp @@ -0,0 +1,80 @@ + + + + + Apache TomEE the little great server. + "A good application in a good server" + + https://fr-fr.facebook.com/ApacheTomEE/;> + https://twitter.com/apachetomee;> + https://plus.google.com/communities/105208241852045684449;> + + + + + + Administration + + Cluster + Configuration + + + + Developer + + Classloading + IDE + Testing + Tools + + + + Advanced + + Application Composer + Setup + Shading + TomEE Embedded + + + + Community + + Contributors + Social + Sources + + + + + + + + Copyright 1999-2016 The Apache Software Foundation, Licensed under the Apache License, Version 2.0. Apache TomEE, TomEE, Apache, the Apache feather logo, and the Apache TomEE project logo are trademarks of The Apache Software Foundation. All other marks mentioned may be trademarks or registered trademarks of their respective owners. + + + + + + + + Administrators + Developers + Advanced + Community + + + + + + + + + + + + + + + + http://git-wip-us.apache.org/repos/asf/tomee-site-generator/blob/972cc356/src/main/jbake/templates/header.gsp -- diff --git a/src/main/jbake/templates/header.gsp b/src/main/jbake/templates/header.gsp new file mode 100755 index 000..649d759 --- /dev/null +++ b/src/main/jbake/templates/header.gsp @@ -0,0 +1,45 @@ + + + + + + + + Apache TomEE + + + + + + + + + + + + + + + + + + + + var _gaq = _gaq || []; + _gaq.push(['_setAccount', 'UA-2717626-1']); + _gaq.push(['_setDomainName', 'apache.org']); + _gaq.push(['_trackPageview']); + + (function() { +var ga = document.createElement('script'); ga.type
[35/35] tomee-site-generator git commit: starting to impl svn pub sub - to finish
starting to impl svn pub sub - to finish Project: http://git-wip-us.apache.org/repos/asf/tomee-site-generator/repo Commit: http://git-wip-us.apache.org/repos/asf/tomee-site-generator/commit/61cae98e Tree: http://git-wip-us.apache.org/repos/asf/tomee-site-generator/tree/61cae98e Diff: http://git-wip-us.apache.org/repos/asf/tomee-site-generator/diff/61cae98e Branch: refs/heads/master Commit: 61cae98edd940d8117f70ad12915a599f814bb24 Parents: 972cc35 Author: rmannibucau <rmannibu...@apache.org> Authored: Tue Jul 4 20:21:23 2017 +0200 Committer: rmannibucau <rmannibu...@apache.org> Committed: Tue Jul 4 20:21:23 2017 +0200 -- .gitignore | 3 +- README.adoc | 11 +++ pom.xml | 43 ++--- .../java/org/apache/tomee/website/SvnPub.java | 95 4 files changed, 141 insertions(+), 11 deletions(-) -- http://git-wip-us.apache.org/repos/asf/tomee-site-generator/blob/61cae98e/.gitignore -- diff --git a/.gitignore b/.gitignore index 8291ee8..5c494ca 100755 --- a/.gitignore +++ b/.gitignore @@ -12,4 +12,5 @@ dependency-reduced-pom.xml buildNumber.properties .mvn/timing.properties *~ -examples.cache.old \ No newline at end of file +examples.cache.old +.content-site-checkout http://git-wip-us.apache.org/repos/asf/tomee-site-generator/blob/61cae98e/README.adoc -- diff --git a/README.adoc b/README.adoc index eb2a308..0fefd33 100755 --- a/README.adoc +++ b/README.adoc @@ -68,3 +68,14 @@ in `src/main/jbake/content/examples`. If you want to take into account another e need to delete the cache before re-running the generation. Finally note that the site generation will rely on the cache as well to generate the examples home page. + +== Publish (needs an ASF account) + +`SvnPub` is a main to push to the staging the site content once built, you need to set the system properties (`MAVEN_OPTS`) `site.password` +to your asf password and `site.username` if you user name is not `USER` environment variable for it to work. + +It will checkout/update the site from svn then copy the site folder from target directory to synchronize it with the svn version +and finally it will commit everything. + +You can set the system property `site.message` to not use the default commit message. + http://git-wip-us.apache.org/repos/asf/tomee-site-generator/blob/61cae98e/pom.xml -- diff --git a/pom.xml b/pom.xml index a479edc..7a229e6 100755 --- a/pom.xml +++ b/pom.xml @@ -14,6 +14,9 @@ false false +notset +notset + UTF-8 @@ -85,6 +88,11 @@ pegdown 1.6.0 + + org.tmatesoft.svnkit + svnkit + 1.8.9 + @@ -109,18 +117,33 @@ java + + true + org.apache.tomee.website.JBake + +${project.basedir}/src/main/jbake/ + ${project.build.directory}/${project.build.finalName} +${jbake.http} +${jbake.pdf} + + + + +publish +pre-site + + java + + + true + org.apache.tomee.website.SvnPub + +${site.password} +${site.message} + + - - true - org.apache.tomee.website.JBake - -${project.basedir}/src/main/jbake/ - ${project.build.directory}/${project.build.finalName} -${jbake.http} -${jbake.pdf} - - http://git-wip-us.apache.org/repos/asf/tomee-site-generator/blob/61cae98e/src/main/java/org/apache/tomee/website/SvnPub.java -- diff --git a/src/main/java/org/apache/tomee/website/SvnPub.java b/src/main/java/org/apache/tomee/website/SvnPub.java new file mode 100644 index 000..9e3ec0a --- /dev/null +++ b/src/main/java/org/apache/tomee/website/SvnPub.java @@ -0,0 +1,95 @@ +/* + * 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://w
[18/35] tomee-site-generator git commit: import from old website
http://git-wip-us.apache.org/repos/asf/tomee-site-generator/blob/972cc356/src/main/jbake/content/advanced/tomee-embedded/index.adoc -- diff --git a/src/main/jbake/content/advanced/tomee-embedded/index.adoc b/src/main/jbake/content/advanced/tomee-embedded/index.adoc new file mode 100755 index 000..8664ade --- /dev/null +++ b/src/main/jbake/content/advanced/tomee-embedded/index.adoc @@ -0,0 +1,223 @@ += TomEE Embedded +:jbake-date: 2016-03-16 +:jbake-type: page +:jbake-status: published +:jbake-tomeepdf: + +TomEE Embedded is based on Tomcat embedded and starts a real TomEE in the launching JVM. It is also +able to deploy the classpath as a webapp and to use either `META-INF/resources` or a folder as web resources. + +Here is a basic programmatic usage based on `org.apache.tomee.embedded.Container` class: + +[source,java] + +try (final Container container = new Container(new Configuration()).deployClasspathAsWebApp()) { +System.out.println("Started on http://localhost:; + container.getConfiguration().getHttpPort()); + +// do something or wait until the end of the application +} + + +All EE features are then accessible directly in the same JVM. + +== TomEE Embedded Configuration + +The default configuration allows to start tomee without issue but you can desire to customize some of them. + +[.table.table-bordered,options="header"] +|=== +| Name | Default | Description +|httpPort | 8080| http port +|stopPort | 8005| shutdown port +|host |localhost| host +|dir|-|where to create a file hierarchy for tomee (conf, temp, ...) +|serverXml|-|which server.xml to use +|keepServerXmlAsThis|false|don't adjust ports/host from the configuration and keep the ones in server.xml +|properties|-|container properties +|quickSession | true|use Random instead of SecureRandom (for dev) +|skipHttp|false|don't use the http connector +|httpsPort | 8443|https potr +|ssl|false| activate https +|withEjbRemote|false|use EJBd +|keystoreFile|-|https keystore location +|keystorePass|-|https keystore password +|keystoreType |JKS|https keystore type +|clientAuth|-|https client auth +|keyAlias|-|https alias +|sslProtocol|-|SSL protocol for https connector +|webXml|-|default web.xml to use +|loginConfig|-|which LoginConfig to use, relies on `org.apache.tomee.embedded.LoginConfigBuilder` to create it +|securityConstraints|-|add some security constraints, use `org.apache.tomee.embedded.SecurityConstaintBuilder` to build them +|realm|-|which realm to use (useful to switch to `JAASRealm` for instance) without modifying the application +|deployOpenEjbApp|false|should internal openejb application be delpoyed +|users|-|a map of user/password +|roles|-|a map of role/users +|tempDir|${java.io.tmpdir}/tomee-embedded_${timestamp}|tomcat needs a docBase, in case you don't provide one one will be created there +|webResourceCached |true|should web resources be cached by tomcat (set false in frontend dev) +|configuration-location|-|location (classpath or file) to a .properties to configure the server +[pre-task|-|Runnable or org.apache.tomee.embedded.LifecycleTask implementations to execute before the container starts +|classes-filter|-|implementation of a custom xbean Filter to ignore not desired classes during scanning +|basic|-|set /* under BASIC authentication for the realm "Security", authentication role being "*" +|=== + +Note: passing to `Container` constructor a `Configuration` it will start the container automatically but using `setup(Configuration)` +to initialize the configuration you will need to call `start()`. + +You can also pass through the properties `connector.xxx` and `connector.attributes.xxx` to customize connector(s) +configuration directly. + +== Standalone applications or TomEE Embedded provided main(String[]) + +Deploying an application in a server is very nice cause the application is generally small and it allows to update the +container without touching the application (typically insanely important in case of security issues for instance). + +However sometimes you don't have the choice so TomEE Embedded provides a built-in `main(String[])`. Here are its options: + +NOTE: this is still a TomEE so all system properties work (for instance to create a resource). + +[.table.table-bordered,options="header"] +|=== +|Name|Default|Description +|--path|-|location of application(s) to deploy +|--context|-|Context name for applications (same order than paths) +|-p or --port|8080|http port +|-s or --shutdown|8005|shutdown port +|-d or --directory|./.apache-tomee|tomee work directory +|-c or --as-war|-|deploy classpath as a war +|-b or --doc-base|-|where web resources are for classpath deployment +|--renaming|-|for fat war only, is renaming of the context supported +|--serverxml|-|the server.xml location +|--tomeexml|-|the server.xml location +|--property|-|a list of container properties (values follow the format x=y) +|=== + +Note that
[20/35] tomee-site-generator git commit: import from old website
http://git-wip-us.apache.org/repos/asf/tomee-site-generator/blob/972cc356/src/main/jbake/assets/js/typeahead.bundle.min.js -- diff --git a/src/main/jbake/assets/js/typeahead.bundle.min.js b/src/main/jbake/assets/js/typeahead.bundle.min.js new file mode 100755 index 000..ffd98f3 --- /dev/null +++ b/src/main/jbake/assets/js/typeahead.bundle.min.js @@ -0,0 +1,8 @@ +/*! + * typeahead.js 0.11.1 + * https://github.com/twitter/typeahead.js + * Copyright 2013-2015 Twitter, Inc. and other contributors; Licensed MIT + */ + +!function(a,b){"function"==typeof define&?define("bloodhound",["jquery"],function(c){return a.Bloodhound=b(c)}):"object"==typeof exports?module.exports=b(require("jquery")):a.Bloodhound=b(jQuery)}(this,function(a){var b=function(){"use strict";return{isMsie:function(){return/(msie|trident)/i.test(navigator.userAgent)?navigator.userAgent.match(/(msie |rv:)(\d+(.\d+)?)/i)[2]:!1},isBlankString:function(a){return!a||/^\s*$/.test(a)},escapeRegExChars:function(a){return a.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&")},isString:function(a){return"string"==typeof a},isNumber:function(a){return"number"==typeof a},isArray:a.isArray,isFunction:a.isFunction,isObject:a.isPlainObject,isUndefined:function(a){return"undefined"==typeof a},isElement:function(a){return!(!a||1!==a.nodeType)},isJQuery:function(b){return b instanceof a},toStr:function(a){return b.isUndefined(a)||null===a?"":a+""},bind:a.proxy,each:function(b,c){function d(a,b){return c(b,a)}a.each(b,d)},map:a.map,filte r:a.grep,every:function(b,c){var d=!0;return b?(a.each(b,function(a,e){return(d=c.call(null,e,a,b))?void 0:!1}),!!d):d},some:function(b,c){var d=!1;return b?(a.each(b,function(a,e){return(d=c.call(null,e,a,b))?!1:void 0}),!!d):d},mixin:a.extend,identity:function(a){return a},clone:function(b){return a.extend(!0,{},b)},getIdGenerator:function(){var a=0;return function(){return a++}},templatify:function(b){function c(){return String(b)}return a.isFunction(b)?b:c},defer:function(a){setTimeout(a,0)},debounce:function(a,b,c){var d,e;return function(){var f,g,h=this,i=arguments;return f=function(){d=null,c||(e=a.apply(h,i))},g=c&&!d,clearTimeout(d),d=setTimeout(f,b),g&&(e=a.apply(h,i)),e}},throttle:function(a,b){var c,d,e,f,g,h;return g=0,h=function(){g=new Date,e=null,f=a.apply(c,d)},function(){var i=new Date,j=b-(i-g);return c=this,d=arguments,0>=j?(clearTimeout(e),e=null,g=i,f=a.apply(c,d)):e||(e=setTimeout(h,j)),f}},stringify:function(a){return b.isString(a)?a:JSON.stringify(a)},noop: function(){}}}(),c="0.11.1",d=function(){"use strict";function a(a){return a=b.toStr(a),a?a.split(/\s+/):[]}function c(a){return a=b.toStr(a),a?a.split(/\W+/):[]}function d(a){return function(c){return c=b.isArray(c)?c:[].slice.call(arguments,0),function(d){var e=[];return b.each(c,function(c){e=e.concat(a(b.toStr(d[c])))}),e}}}return{nonword:c,whitespace:a,obj:{nonword:d(c),whitespace:d(a)}}}(),e=function(){"use strict";function c(c){this.maxSize=b.isNumber(c)?c:100,this.reset(),this.maxSize<=0&&(this.set=this.get=a.noop)}function d(){this.head=this.tail=null}function e(a,b){this.key=a,this.val=b,this.prev=this.next=null}return b.mixin(c.prototype,{set:function(a,b){var c,d=this.list.tail;this.size>=this.maxSize&&(this.list.remove(d),delete this.hash[d.key],this.size--),(c=this.hash[a])?(c.val=b,this.list.moveToFront(c)):(c=new e(a,b),this.list.add(c),this.hash[a]=c,this.size++)},get:function(a){var b=this.hash[a];return b?(this.list.moveToFront(b),b.val):void 0},reset:function(){t his.size=0,this.hash={},this.list=new d}}),b.mixin(d.prototype,{add:function(a){this.head&&(a.next=this.head,this.head.prev=a),this.head=a,this.tail=this.tail||a},remove:function(a){a.prev?a.prev.next=a.next:this.head=a.next,a.next?a.next.prev=a.prev:this.tail=a.prev},moveToFront:function(a){this.remove(a),this.add(a)}}),c}(),f=function(){"use strict";function c(a,c){this.prefix=["__",a,"__"].join(""),this.ttlKey="__ttl__",this.keyMatcher=new RegExp("^"+b.escapeRegExChars(this.prefix)),this.ls=c||h,!this.ls&_noop()}function d(){return(new Date).getTime()}function e(a){return JSON.stringify(b.isUndefined(a)?null:a)}function f(b){return a.parseJSON(b)}function g(a){var b,c,d=[],e=h.length;for(b=0;e>b;b++)(c=h.key(b)).match(a)&(c.replace(a,""));return d}var h;try{h=window.localStorage,h.setItem("~~~","!"),h.removeItem("~~~")}catch(i){h=null}return b.mixin(c.prototype,{_prefix:function(a){return this.prefix+a},_ttlKey:function(a){return this._prefix(a)+this.ttlKey},_noop:fu nction(){this.get=this.set=this.remove=this.clear=this.isExpired=b.noop},_safeSet:function(a,b){try{this.ls.setItem(a,b)}catch(c){"QuotaExceededError"===c.name&&(this.clear(),this._noop())}},get:function(a){return this.isExpired(a)&(a),f(this.ls.getItem(this._prefix(a)))},set:function(a,c,f){return
[26/35] tomee-site-generator git commit: import from old website
http://git-wip-us.apache.org/repos/asf/tomee-site-generator/blob/972cc356/src/main/jbake/assets/fonts/eleganticons/ElegantIcons.woff -- diff --git a/src/main/jbake/assets/fonts/eleganticons/ElegantIcons.woff b/src/main/jbake/assets/fonts/eleganticons/ElegantIcons.woff new file mode 100755 index 000..3933052 Binary files /dev/null and b/src/main/jbake/assets/fonts/eleganticons/ElegantIcons.woff differ http://git-wip-us.apache.org/repos/asf/tomee-site-generator/blob/972cc356/src/main/jbake/assets/fonts/eleganticons/et-icons.css -- diff --git a/src/main/jbake/assets/fonts/eleganticons/et-icons.css b/src/main/jbake/assets/fonts/eleganticons/et-icons.css new file mode 100755 index 000..26f2053 --- /dev/null +++ b/src/main/jbake/assets/fonts/eleganticons/et-icons.css @@ -0,0 +1,1159 @@ +@font-face { + font-family: 'ElegantIcons'; + src:url('ElegantIcons.eot'); + src:url('ElegantIcons.eot?#iefix') format('embedded-opentype'), + url('ElegantIcons.woff') format('woff'), + url('ElegantIcons.ttf') format('truetype'), + url('ElegantIcons.svg#ElegantIcons') format('svg'); + font-weight: normal; + font-style: normal; +} + +/* Use the following CSS code if you want to use data attributes for inserting your icons */ +[data-icon]:before { + font-family: 'ElegantIcons'; + content: attr(data-icon); + speak: none; + font-weight: normal; + font-variant: normal; + text-transform: none; + line-height: 1; + -webkit-font-smoothing: antialiased; + -moz-osx-font-smoothing: grayscale; +} + +/* Use the following CSS code if you want to have a class per icon */ +/* +Instead of a list of all class selectors, +you can use the generic selector below, but it's slower: +[class*="your-class-prefix"] { +*/ +.arrow_up, .arrow_down, .arrow_left, .arrow_right, .arrow_left-up, .arrow_right-up, .arrow_right-down, .arrow_left-down, .arrow-up-down, .arrow_up-down_alt, .arrow_left-right_alt, .arrow_left-right, .arrow_expand_alt2, .arrow_expand_alt, .arrow_condense, .arrow_expand, .arrow_move, .arrow_carrot-up, .arrow_carrot-down, .arrow_carrot-left, .arrow_carrot-right, .arrow_carrot-2up, .arrow_carrot-2down, .arrow_carrot-2left, .arrow_carrot-2right, .arrow_carrot-up_alt2, .arrow_carrot-down_alt2, .arrow_carrot-left_alt2, .arrow_carrot-right_alt2, .arrow_carrot-2up_alt2, .arrow_carrot-2down_alt2, .arrow_carrot-2left_alt2, .arrow_carrot-2right_alt2, .arrow_triangle-up, .arrow_triangle-down, .arrow_triangle-left, .arrow_triangle-right, .arrow_triangle-up_alt2, .arrow_triangle-down_alt2, .arrow_triangle-left_alt2, .arrow_triangle-right_alt2, .arrow_back, .icon_minus-06, .icon_plus, .icon_close, .icon_check, .icon_minus_alt2, .icon_plus_alt2, .icon_close_alt2, .icon_check_alt2, .icon_zoom-out_alt , .icon_zoom-in_alt, .icon_search, .icon_box-empty, .icon_box-selected, .icon_minus-box, .icon_plus-box, .icon_box-checked, .icon_circle-empty, .icon_circle-slelected, .icon_stop_alt2, .icon_stop, .icon_pause_alt2, .icon_pause, .icon_menu, .icon_menu-square_alt2, .icon_menu-circle_alt2, .icon_ul, .icon_ol, .icon_adjust-horiz, .icon_adjust-vert, .icon_document_alt, .icon_documents_alt, .icon_pencil, .icon_pencil-edit_alt, .icon_pencil-edit, .icon_folder-alt, .icon_folder-open_alt, .icon_folder-add_alt, .icon_info_alt, .icon_error-oct_alt, .icon_error-circle_alt, .icon_error-triangle_alt, .icon_question_alt2, .icon_question, .icon_comment_alt, .icon_chat_alt, .icon_vol-mute_alt, .icon_volume-low_alt, .icon_volume-high_alt, .icon_quotations, .icon_quotations_alt2, .icon_clock_alt, .icon_lock_alt, .icon_lock-open_alt, .icon_key_alt, .icon_cloud_alt, .icon_cloud-upload_alt, .icon_cloud-download_alt, .icon_image, .icon_images, .icon_lightbulb_alt, .icon_gift_alt, .icon_house_alt, .icon_ge nius, .icon_mobile, .icon_tablet, .icon_laptop, .icon_desktop, .icon_camera_alt, .icon_mail_alt, .icon_cone_alt, .icon_ribbon_alt, .icon_bag_alt, .icon_creditcard, .icon_cart_alt, .icon_paperclip, .icon_tag_alt, .icon_tags_alt, .icon_trash_alt, .icon_cursor_alt, .icon_mic_alt, .icon_compass_alt, .icon_pin_alt, .icon_pushpin_alt, .icon_map_alt, .icon_drawer_alt, .icon_toolbox_alt, .icon_book_alt, .icon_calendar, .icon_film, .icon_table, .icon_contacts_alt, .icon_headphones, .icon_lifesaver, .icon_piechart, .icon_refresh, .icon_link_alt, .icon_link, .icon_loading, .icon_blocked, .icon_archive_alt, .icon_heart_alt, .icon_star_alt, .icon_star-half_alt, .icon_star, .icon_star-half, .icon_tools, .icon_tool, .icon_cog, .icon_cogs, .arrow_up_alt, .arrow_down_alt, .arrow_left_alt, .arrow_right_alt, .arrow_left-up_alt, .arrow_right-up_alt, .arrow_right-down_alt, .arrow_left-down_alt, .arrow_condense_alt, .arrow_expand_alt3, .arrow_carrot_up_alt, .arrow_carrot-down_alt,
[13/35] tomee-site-generator git commit: import from old website
http://git-wip-us.apache.org/repos/asf/tomee-site-generator/blob/972cc356/src/main/jbake/content/examples/custom-injection.adoc -- diff --git a/src/main/jbake/content/examples/custom-injection.adoc b/src/main/jbake/content/examples/custom-injection.adoc new file mode 100755 index 000..7edf520 --- /dev/null +++ b/src/main/jbake/content/examples/custom-injection.adoc @@ -0,0 +1,256 @@ += Custom Injection +:jbake-date: 2016-09-06 +:jbake-type: page +:jbake-tomeepdf: +:jbake-status: published + +Example custom-injection can be browsed at https://github.com/apache/tomee/tree/master/examples/custom-injection + + +*Help us document this example! Click the blue pencil icon in the upper right to edit this page.* + +== Pickup + + +[source,java] + +package org.superbiz.enventries; + + +//START SNIPPET: code + +import java.beans.PropertyEditorManager; + +public enum Pickup { + +HUMBUCKER, +SINGLE_COIL; + +// Here's the little magic where we register the PickupEditor +// which knows how to create this object from a string. +// You can add any of your own Property Editors in the same way. +static { +PropertyEditorManager.registerEditor(Pickup.class, PickupEditor.class); +} +} + + + +== PickupEditor + + +[source,java] + +package org.superbiz.enventries; + +/** + * With a java.beans.PropertyEditor, you can go way beyond the built-in + * types that OpenEJB supports and can extend dependency injection to + * just about anywhere. + * + * In the world of electric guitars, two types of pickups are used: humbucking, and single-coil. + * Guitarists often refer to their guitars as HSS, meaning a guitar with 1 humbucker and + * 2 single coil pickups, and so on. This little PropertyEditor supports that shorthand notation. + * + * @version $Revision$ $Date$ + */ +//START SNIPPET: code +public class PickupEditor extends java.beans.PropertyEditorSupport { + +public void setAsText(String text) throws IllegalArgumentException { +text = text.trim(); + +if (text.equalsIgnoreCase("H")) setValue(Pickup.HUMBUCKER); +else if (text.equalsIgnoreCase("S")) setValue(Pickup.SINGLE_COIL); +else throw new IllegalStateException("H and S are the only supported Pickup aliases"); +} +} + + + +== Stratocaster + + +[source,java] + +package org.superbiz.enventries; + +import javax.annotation.Resource; +import javax.ejb.Stateless; +import java.io.File; +import java.util.Date; +import java.util.List; +import java.util.Map; + +/** + * In addition to the standard env-entry types (String, Integer, Long, Short, Byte, Boolean, Double, Float, Character) + * OpenEJB supports many other types. + */ +//START SNIPPET: code +@Stateless +public class Stratocaster { + + +@Resource(name = "pickups") +private List pickups; + +@Resource(name = "style") +private Style style; + +@Resource(name = "dateCreated") +private Date dateCreated; + +@Resource(name = "guitarStringGuages") +private MapguitarStringGuages; + +@Resource(name = "certificateOfAuthenticity") +private File certificateOfAuthenticity; + +public Date getDateCreated() { +return dateCreated; +} + +/** + * Gets the guage of the electric guitar strings + * used in this guitar. + * + * @param string + * @return + */ +public float getStringGuage(String string) { +return guitarStringGuages.get(string); +} + +public List getPickups() { +return pickups; +} + +public Style getStyle() { +return style; +} + +public File getCertificateOfAuthenticity() { +return certificateOfAuthenticity; +} +} + + + +== Style + + +[source,java] + +package org.superbiz.enventries; + +/** + * @version $Revision$ $Date$ + */ +//START SNIPPET: code +public enum Style { + +STANDARD, +DELUX, +VINTAGE; +} + + + +== StratocasterTest + + +[source,java] + +package org.superbiz.enventries; + +import junit.framework.TestCase; + +import javax.ejb.EJB; +import javax.ejb.embeddable.EJBContainer; +import java.io.File; +import java.text.DateFormat; +import java.util.Date; +import java.util.List; +import java.util.Locale; + +import static java.util.Arrays.asList; + +/** + * @version $Rev: 1090810 $ $Date: 2011-04-10 07:49:26 -0700 (Sun, 10 Apr 2011) $ + */ +//START SNIPPET: code +public class StratocasterTest extends TestCase { + +@EJB +private Stratocaster strat; + +public void test() throws Exception { +EJBContainer.createEJBContainer().getContext().bind("inject", this); + +Date date = DateFormat.getDateInstance(DateFormat.MEDIUM, Locale.US).parse("Mar 1, 1962"); +assertEquals("Strat.getDateCreated()", date, strat.getDateCreated()); + +List pickups = asList(Pickup.SINGLE_COIL, Pickup.SINGLE_COIL, Pickup.SINGLE_COIL); +
[34/35] tomee-site-generator git commit: import from old website
import from old website Project: http://git-wip-us.apache.org/repos/asf/tomee-site-generator/repo Commit: http://git-wip-us.apache.org/repos/asf/tomee-site-generator/commit/972cc356 Tree: http://git-wip-us.apache.org/repos/asf/tomee-site-generator/tree/972cc356 Diff: http://git-wip-us.apache.org/repos/asf/tomee-site-generator/diff/972cc356 Branch: refs/heads/master Commit: 972cc3567a8009690445f18ffc10ce8b14e962ab Parents: Author: rmannibucau <rmannibu...@apache.org> Authored: Tue Jul 4 18:32:47 2017 +0200 Committer: rmannibucau <rmannibu...@apache.org> Committed: Tue Jul 4 18:32:47 2017 +0200 -- .gitignore | 15 + README.adoc | 70 + examples.cache | 1653 + pom.xml | 127 + .../org/apache/tomee/website/Contributors.java | 222 + .../org/apache/tomee/website/Downloads.java | 247 + .../java/org/apache/tomee/website/Examples.java | 319 + .../java/org/apache/tomee/website/JBake.java| 181 + .../java/org/apache/tomee/website/PDFify.java | 76 + .../apache/tomee/website/ServiceJarHelper.java | 192 + .../org/slf4j/bridge/SLF4JBridgeHandler.java|7 + src/main/jbake/assets/bash | 147 + src/main/jbake/assets/css/animate.css | 3391 + src/main/jbake/assets/css/bootstrap.css | 6782 ++ src/main/jbake/assets/css/bootstrap.css.map |1 + src/main/jbake/assets/css/cardio.css| 1173 +++ src/main/jbake/assets/css/et-icons.css | 1159 +++ src/main/jbake/assets/css/idea.css | 123 + src/main/jbake/assets/css/jqtree.css| 132 + src/main/jbake/assets/css/normalize.css | 432 ++ src/main/jbake/assets/css/owl.css | 208 + src/main/jbake/assets/favicon.ico | Bin 0 -> 12322 bytes src/main/jbake/assets/favicon.png | Bin 0 -> 1983 bytes .../assets/fonts/eleganticons/ElegantIcons.eot | Bin 0 -> 59572 bytes .../assets/fonts/eleganticons/ElegantIcons.svg | 1832 + .../assets/fonts/eleganticons/ElegantIcons.ttf | Bin 0 -> 59388 bytes .../assets/fonts/eleganticons/ElegantIcons.woff | Bin 0 -> 63664 bytes .../assets/fonts/eleganticons/et-icons.css | 1159 +++ .../font-awesome-4.1.0/css/font-awesome.min.css |4 + .../font-awesome-4.1.0/fonts/FontAwesome.otf| Bin 0 -> 85908 bytes .../fonts/fontawesome-webfont.eot | Bin 0 -> 56006 bytes .../fonts/fontawesome-webfont.svg | 520 ++ .../fonts/fontawesome-webfont.ttf | Bin 0 -> 112160 bytes .../fonts/fontawesome-webfont.woff | Bin 0 -> 65452 bytes src/main/jbake/assets/img/gdamour.jpg | Bin 0 -> 6288 bytes src/main/jbake/assets/img/genspring.jpg | Bin 0 -> 5115 bytes src/main/jbake/assets/img/header.jpg| Bin 0 -> 192314 bytes src/main/jbake/assets/img/jgenender.jpg | Bin 0 -> 9440 bytes src/main/jbake/assets/img/loader.gif| Bin 0 -> 20788 bytes src/main/jbake/assets/img/logo-active.png | Bin 0 -> 1983 bytes src/main/jbake/assets/img/logo.png | Bin 0 -> 2015 bytes src/main/jbake/assets/img/manugeorge.jpg| Bin 0 -> 7240 bytes src/main/jbake/assets/img/mnour.jpg | Bin 0 -> 23758 bytes src/main/jbake/assets/img/noimg.png | Bin 0 -> 4777 bytes src/main/jbake/assets/img/popup.jpg | Bin 0 -> 71172 bytes src/main/jbake/assets/img/pricing1.jpg | Bin 0 -> 176192 bytes src/main/jbake/assets/img/pricing2.jpg | Bin 0 -> 138505 bytes src/main/jbake/assets/img/rickmcguire.jpg | Bin 0 -> 21599 bytes src/main/jbake/assets/img/table-1-hover.jpg | Bin 0 -> 50138 bytes src/main/jbake/assets/img/table-1.jpg | Bin 0 -> 39889 bytes src/main/jbake/assets/img/table-2-hover.jpg | Bin 0 -> 19219 bytes src/main/jbake/assets/img/table-2.jpg | Bin 0 -> 18293 bytes src/main/jbake/assets/img/table-3-hover.jpg | Bin 0 -> 26828 bytes src/main/jbake/assets/img/table-3.jpg | Bin 0 -> 34756 bytes src/main/jbake/assets/img/xuhaihong.jpg | Bin 0 -> 20528 bytes src/main/jbake/assets/js/bootstrap.min.js |7 + src/main/jbake/assets/js/highlight.pack.js |3 + src/main/jbake/assets/js/jquery-1.11.1.min.js |4 + src/main/jbake/assets/js/jquery.onepagenav.js | 223 + src/main/jbake/assets/js/main.js| 178 + src/main/jbake/assets/js/owl.carousel.min.js| 47 + src/main/jbake/assets/js/tooltip.js | 304 + src/main/jbake/assets/js/tree.jquery.js | 3542 + .../jbake/assets/js/typeahead.bundle.min.js |8 + src/main/jb
[23/35] tomee-site-generator git commit: import from old website
http://git-wip-us.apache.org/repos/asf/tomee-site-generator/blob/972cc356/src/main/jbake/assets/js/jquery-1.11.1.min.js -- diff --git a/src/main/jbake/assets/js/jquery-1.11.1.min.js b/src/main/jbake/assets/js/jquery-1.11.1.min.js new file mode 100755 index 000..d1608e3 --- /dev/null +++ b/src/main/jbake/assets/js/jquery-1.11.1.min.js @@ -0,0 +1,4 @@ +/*! jQuery v1.11.1 | (c) 2005, 2014 jQuery Foundation, Inc. | jquery.org/license */ +!function(a,b){"object"==typeof module&&"object"==typeof module.exports?module.exports=a.document?b(a,!0):function(a){if(!a.document)throw new Error("jQuery requires a window with a document");return b(a)}:b(a)}("undefined"!=typeof window?window:this,function(a,b){var c=[],d=c.slice,e=c.concat,f=c.push,g=c.indexOf,h={},i=h.toString,j=h.hasOwnProperty,k={},l="1.11.1",m=function(a,b){return new m.fn.init(a,b)},n=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,o=/^-ms-/,p=/-([\da-z])/gi,q=function(a,b){return b.toUpperCase()};m.fn=m.prototype={jquery:l,constructor:m,selector:"",length:0,toArray:function(){return d.call(this)},get:function(a){return null!=a?0>a?this[a+this.length]:this[a]:d.call(this)},pushStack:function(a){var b=m.merge(this.constructor(),a);return b.prevObject=this,b.context=this.context,b},each:function(a,b){return m.each(this,a,b)},map:function(a){return this.pushStack(m.map(this,function(b,c){return a.call(b,c,b)}))},slice:function(){return this.pushStack(d.apply(this,argumen ts))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},eq:function(a){var b=this.length,c=+a+(0>a?b:0);return this.pushStack(c>=0&>c?[this[c]]:[])},end:function(){return this.prevObject||this.constructor(null)},push:f,sort:c.sort,splice:c.splice},m.extend=m.fn.extend=function(){var a,b,c,d,e,f,g=arguments[0]||{},h=1,i=arguments.length,j=!1;for("boolean"==typeof g&&(j=g,g=arguments[h]||{},h++),"object"==typeof g||m.isFunction(g)||(g={}),h===i&&(g=this,h--);i>h;h++)if(null!=(e=arguments[h]))for(d in e)a=g[d],c=e[d],g!==c&&(j&&&(m.isPlainObject(c)||(b=m.isArray(c)))?(b?(b=!1,f=a&(a)?a:[]):f=a&(a)?a:{},g[d]=m.extend(j,f,c)):void 0!==c&&(g[d]=c));return g},m.extend({expando:"jQuery"+(l+Math.random()).replace(/\D/g,""),isReady:!0,error:function(a){throw new Error(a)},noop:function(){},isFunction:function(a){return"function"===m.type(a)},isArray:Array.isArray||function(a){return"array"===m.type(a)},isWindow:function(a){return null!=a&= =a.window},isNumeric:function(a){return!m.isArray(a)&(a)>=0},isEmptyObject:function(a){var b;for(b in a)return!1;return!0},isPlainObject:function(a){var b;if(!a||"object"!==m.type(a)||a.nodeType||m.isWindow(a))return!1;try{if(a.constructor&&!j.call(a,"constructor")&&!j.call(a.constructor.prototype,"isPrototypeOf"))return!1}catch(c){return!1}if(k.ownLast)for(b in a)return j.call(a,b);for(b in a);return void 0===b||j.call(a,b)},type:function(a){return null==a?a+"":"object"==typeof a||"function"==typeof a?h[i.call(a)]||"object":typeof a},globalEval:function(b){b&(b)&&(a.execScript||function(b){a.eval.call(a,b)})(b)},camelCase:function(a){return a.replace(o,"ms-").replace(p,q)},nodeName:function(a,b){return a.nodeName&()===b.toLowerCase()},each:function(a,b,c){var d,e=0,f=a.length,g=r(a);if(c){if(g){for(;f>e;e++)if(d=b.apply(a[e],c),d===!1)break}else for(e in a)if(d=b.apply(a[e],c),d===!1)break}else if(g){for(;f>e;e++)if(d=b.call(a[e],e,a[e]),d ===!1)break}else for(e in a)if(d=b.call(a[e],e,a[e]),d===!1)break;return a},trim:function(a){return null==a?"":(a+"").replace(n,"")},makeArray:function(a,b){var c=b||[];return null!=a&&(r(Object(a))?m.merge(c,"string"==typeof a?[a]:a):f.call(c,a)),c},inArray:function(a,b,c){var d;if(b){if(g)return g.call(b,a,c);for(d=b.length,c=c?0>c?Math.max(0,d+c):c:0;d>c;c++)if(c in b&[c]===a)return c}return-1},merge:function(a,b){var c=+b.length,d=0,e=a.length;while(c>d)a[e++]=b[d++];if(c!==c)while(void 0!==b[d])a[e++]=b[d++];return a.length=e,a},grep:function(a,b,c){for(var d,e=[],f=0,g=a.length,h=!c;g>f;f++)d=!b(a[f],f),d!==h&(a[f]);return e},map:function(a,b,c){var d,f=0,g=a.length,h=r(a),i=[];if(h)for(;g>f;f++)d=b(a[f],f,c),null!=d&(d);else for(f in a)d=b(a[f],f,c),null!=d&(d);return e.apply([],i)},guid:1,proxy:function(a,b){var c,e,f;return"string"==typeof b&&(f=a[b],b=a,a=f),m.isFunction(a)?(c=d.call(arguments,2),e=function(){return a.apply(b||this,c.concat(d.call(ar guments)))},e.guid=a.guid=a.guid||m.guid++,e):void 0},now:function(){return+new Date},support:k}),m.each("Boolean Number String Function Array Date RegExp Object Error".split(" "),function(a,b){h["[object "+b+"]"]=b.toLowerCase()});function r(a){var b=a.length,c=m.type(a);return"function"===c||m.isWindow(a)?!1:1===a.nodeType&?!0:"array"===c||0===b||"number"==typeof b&>0& in a}var s=function(a){var b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u="sizzle"+-new Date,v=a.document,w=0,x=0,y=gb(),z=gb(),A=gb(),B=function(a,b){return
[08/35] tomee-site-generator git commit: import from old website
http://git-wip-us.apache.org/repos/asf/tomee-site-generator/blob/972cc356/src/main/jbake/content/examples/resources-jmx-example.adoc -- diff --git a/src/main/jbake/content/examples/resources-jmx-example.adoc b/src/main/jbake/content/examples/resources-jmx-example.adoc new file mode 100755 index 000..99f35b6 --- /dev/null +++ b/src/main/jbake/content/examples/resources-jmx-example.adoc @@ -0,0 +1,746 @@ += Custom resources in an EAR archive +:jbake-date: 2016-09-06 +:jbake-type: page +:jbake-tomeepdf: +:jbake-status: published + +Example resources-jmx-example can be browsed at https://github.com/apache/tomee/tree/master/examples/resources-jmx-example + + +TomEE allows you to define your own resources within your application, and declare them in `META-INF/resources.xml`. This allows you do inject these resource into any managed component within your application. + +In addition to this, you can also define a `create` method on either the resource itself, or on a POJO that acts as a factory. This example demonstrates using the `create` method to additionally register the resource as a JMX MBean, as well as make it available for injection. + +== Resource + +Custom resources can be defined using very simple Java classes. In this particular instance, as the application also wants to register this resource as an MBean, the resource class needs to follow the MBean specification. + + public class Hello implements HelloMBean { + + private AtomicInteger count = new AtomicInteger(0); + + @Override + public String greet(String name) { + if (name == null) { + throw new NullPointerException("Name cannot be null"); + } + + return "Hello, " + name; + } + + @Override + public int getCount() { + return count.get(); + } + + @Override + public void setCount(int value) { + count.set(value); + } + + @Override + public void increment() { + count.incrementAndGet(); + } + } + + public interface HelloMBean { + + public String greet(final String name); + + public int getCount(); + + public void setCount(int count); + + public void increment(); + + } + +== Create method + +To avoid adding the logic to register the resource as an MBean in every resource, the application provides a single class with a create() method that takes care of this logic for us. + + public class JMXBeanCreator { + + private static Logger LOGGER = Logger.getLogger(JMXBeanCreator.class.getName()); + private Properties properties; + + public Object create() throws MBeanRegistrationException { + // instantiate the bean + + final String code = properties.getProperty("code"); + final String name = properties.getProperty("name"); + + requireNotNull(code); + requireNotNull(name); + + try { + final Class cls = Class.forName(code, true, Thread.currentThread().getContextClassLoader()); + final Object instance = cls.newInstance(); + + final Field[] fields = cls.getDeclaredFields(); + for (final Field field : fields) { + + final String property = properties.getProperty(field.getName()); + if (property == null) { + continue; + } + + try { + field.setAccessible(true); + field.set(instance, Converter.convert(property, field.getType(), field.getName())); + } catch (Exception e) { + LOGGER.info(String.format("Unable to set value %s on field %s", property, field.getName())); + } + } + + final MBeanServer mbs = ManagementFactory.getPlatformMBeanServer(); + final ObjectName objectName = new ObjectName(name); + mbs.registerMBean(instance, objectName); + + return instance; + + } catch (final ClassNotFoundException e) { + LOGGER.severe("Unable to find class " + code); + throw new MBeanRegistrationException(e); + } catch (final InstantiationException e) { + LOGGER.severe("Unable to create instance of class " + code); + throw new MBeanRegistrationException(e); + } catch (final IllegalAccessException e) { + LOGGER.severe("Illegal access: " + code); + throw new MBeanRegistrationException(e); + } catch (final
[03/35] tomee-site-generator git commit: import from old website
http://git-wip-us.apache.org/repos/asf/tomee-site-generator/blob/972cc356/src/main/jbake/content/examples/transaction-rollback.adoc -- diff --git a/src/main/jbake/content/examples/transaction-rollback.adoc b/src/main/jbake/content/examples/transaction-rollback.adoc new file mode 100755 index 000..6b8088d --- /dev/null +++ b/src/main/jbake/content/examples/transaction-rollback.adoc @@ -0,0 +1,584 @@ += Transaction Rollback +:jbake-date: 2016-09-06 +:jbake-type: page +:jbake-tomeepdf: +:jbake-status: published + +Example transaction-rollback can be browsed at https://github.com/apache/tomee/tree/master/examples/transaction-rollback + + +*Help us document this example! Click the blue pencil icon in the upper right to edit this page.* + +== CustomRuntimeException + + +[source,java] + +package org.superbiz.txrollback; + +import javax.ejb.ApplicationException; + +@ApplicationException +public class CustomRuntimeException extends RuntimeException { + +public CustomRuntimeException() { +} + +public CustomRuntimeException(String s) { +super(s); +} + +public CustomRuntimeException(String s, Throwable throwable) { +super(s, throwable); +} + +public CustomRuntimeException(Throwable throwable) { +super(throwable); +} +} + + + +== Movie + + +[source,java] + +package org.superbiz.txrollback; + +import javax.persistence.Entity; +import javax.persistence.GeneratedValue; +import javax.persistence.GenerationType; +import javax.persistence.Id; + +@Entity(name = "Movie") +public class Movie { + +@Id +@GeneratedValue(strategy = GenerationType.AUTO) +private long id; + +private String director; +private String title; +private int year; + +public Movie() { +} + +public Movie(String director, String title, int year) { +this.director = director; +this.title = title; +this.year = year; +} + +public String getDirector() { +return director; +} + +public void setDirector(String director) { +this.director = director; +} + +public String getTitle() { +return title; +} + +public void setTitle(String title) { +this.title = title; +} + +public int getYear() { +return year; +} + +public void setYear(int year) { +this.year = year; +} + +} + + + +== Movies + + +[source,java] + +package org.superbiz.txrollback; + +import javax.annotation.Resource; +import javax.ejb.SessionContext; +import javax.ejb.Stateless; +import javax.persistence.EntityManager; +import javax.persistence.PersistenceContext; +import javax.persistence.PersistenceContextType; +import javax.persistence.Query; +import java.util.List; + +//START SNIPPET: code +@Stateless +public class Movies { + +@PersistenceContext(unitName = "movie-unit", type = PersistenceContextType.TRANSACTION) +private EntityManager entityManager; + +@Resource +private SessionContext sessionContext; + +public void addMovie(Movie movie) throws Exception { +entityManager.persist(movie); +} + +public void deleteMovie(Movie movie) throws Exception { +entityManager.remove(movie); +} + +public List getMovies() throws Exception { +Query query = entityManager.createQuery("SELECT m from Movie as m"); +return query.getResultList(); +} + +public void callSetRollbackOnly() { +sessionContext.setRollbackOnly(); +} + +public void throwUncheckedException() { +throw new RuntimeException("Throwing unchecked exceptions will rollback a transaction"); +} + +public void throwApplicationException() { +throw new CustomRuntimeException("This is marked @ApplicationException, so no TX rollback"); +} +} + + + +== persistence.xml + + +[source,xml] + +http://java.sun.com/xml/ns/persistence; version="1.0"> + + +movieDatabase +movieDatabaseUnmanaged +org.superbiz.testinjection.MoviesTest.Movie + + + + + + + + + +== MoviesTest + + +[source,java] + +package org.superbiz.txrollback; + +import junit.framework.TestCase; + +import javax.annotation.Resource; +import javax.ejb.EJB; +import javax.ejb.embeddable.EJBContainer; +import javax.persistence.EntityManager; +import javax.persistence.PersistenceContext; +import javax.transaction.RollbackException; +import javax.transaction.UserTransaction; +import java.util.List; +import java.util.Properties; + +//START SNIPPET: code +public class MoviesTest extends TestCase { + +@EJB +private Movies movies; + +@Resource +private UserTransaction userTransaction; + +@PersistenceContext +private EntityManager entityManager; + +private EJBContainer ejbContainer; + +public void setUp() throws Exception { +Properties p = new Properties(); +p.put("movieDatabase",
[12/35] tomee-site-generator git commit: import from old website
rows IOException { +// no-op +} + +@Override public void setAttribute(Attribute attribute) throws Exception { +before(); +connection.setAttribute(objectName, attribute); +after(); +} + +@Override public Object getAttribute(String attribute) throws Exception { +before(); +try { +return connection.getAttribute(objectName, attribute); +} finally { +after(); +} +} + +@Override +public Object invoke(String operationName, Object[] params, String[] signature) throws Exception { +before(); +try { +return connection.invoke(objectName, operationName, params, signature); +} finally { +after(); +} +} + +@Override public MBeanInfo getMBeanInfo() throws Exception { +before(); +try { +return connection.getMBeanInfo(objectName); +} finally { +after(); +} +} + +@Override public void clean() { +try { +connector.close(); +} catch (IOException e) { +// no-op +} +} +} +} + + + +== Dynamic Proxies + +=== DynamicMBeanClient (the dynamic JMX client) + + package org.superbiz.dynamic.mbean; + + import org.apache.openejb.api.Proxy; + import org.superbiz.dynamic.mbean.DynamicMBeanHandler; + import org.superbiz.dynamic.mbean.ObjectName; + + import javax.ejb.Singleton; + + /** +* @author rmannibucau +*/ + @Singleton + @Proxy(DynamicMBeanHandler.class) + @ObjectName(DynamicMBeanClient.OBJECT_NAME) + public interface DynamicMBeanClient { + static final String OBJECT_NAME = "test:group=DynamicMBeanClientTest"; + + int getCounter(); + void setCounter(int i); + int length(String aString); + } + +=== DynamicMBeanClient (the dynamic JMX client) + +[source,java] + +package org.superbiz.dynamic.mbean; + +import org.apache.openejb.api.Proxy; + +import javax.annotation.PreDestroy; +import javax.ejb.Singleton; + + +@Singleton +@Proxy(DynamicMBeanHandler.class) +@ObjectName(value = DynamicRemoteMBeanClient.OBJECT_NAME, url = "service:jmx:rmi:///jndi/rmi://localhost:8243/jmxrmi") +public interface DynamicRemoteMBeanClient { +static final String OBJECT_NAME = "test:group=DynamicMBeanClientTest"; + +int getCounter(); +void setCounter(int i); +int length(String aString); + +@PreDestroy void clean(); +} + + + +== The MBean used for the test + +=== SimpleMBean + + package org.superbiz.dynamic.mbean.simple; + + public interface SimpleMBean { + int length(String s); + + int getCounter(); + void setCounter(int c); + } + +== Simple + + package org.superbiz.dynamic.mbean.simple; + + public class Simple implements SimpleMBean { + private int counter = 0; + + @Override public int length(String s) { + if (s == null) { + return 0; + } + return s.length(); + } + + @Override public int getCounter() { + return counter; + } + + @Override public void setCounter(int c) { + counter = c; + } + } + +== DynamicMBeanClientTest (The test) + + +[source,java] + +package org.superbiz.dynamic.mbean; + +import org.junit.After; +import org.junit.AfterClass; +import org.junit.Before; +import org.junit.BeforeClass; +import org.junit.Test; +import org.superbiz.dynamic.mbean.simple.Simple; + +import javax.ejb.EJB; +import javax.ejb.embeddable.EJBContainer; +import javax.management.Attribute; +import javax.management.ObjectName; +import java.lang.management.ManagementFactory; + +import static junit.framework.Assert.assertEquals; + +public class DynamicMBeanClientTest { +private static ObjectName objectName; +private static EJBContainer container; + +@EJB private DynamicMBeanClient localClient; +@EJB private DynamicRemoteMBeanClient remoteClient; + +@BeforeClass public static void start() { +container = EJBContainer.createEJBContainer(); +} + +@Before public void injectAndRegisterMBean() throws Exception { +container.getContext().bind("inject", this); +objectName = new ObjectName(DynamicMBeanClient.OBJECT_NAME); +ManagementFactory.getPlatformMBeanServer().registerMBean(new Simple(), objectName); +} + +@After public void unregisterMBean() throws Exception { +if (objectName != null) { + ManagementFactory.getPlatformMBeanServer().unregist
[17/35] tomee-site-generator git commit: import from old website
http://git-wip-us.apache.org/repos/asf/tomee-site-generator/blob/972cc356/src/main/jbake/content/developer/tools/maven/tomee.adoc -- diff --git a/src/main/jbake/content/developer/tools/maven/tomee.adoc b/src/main/jbake/content/developer/tools/maven/tomee.adoc new file mode 100755 index 000..e4f5896 --- /dev/null +++ b/src/main/jbake/content/developer/tools/maven/tomee.adoc @@ -0,0 +1,183 @@ += TomEE Maven Plugin +:jbake-date: 2016-03-16 +:jbake-type: page +:jbake-status: published +:jbake-tomeepdf: + +TomEE Maven Plugin is a set of goals for the development and to prepare to go in production: + +- `tomee:build` +- `tomee:exec` +- `tomee:configtest` +- `tomee:debug` +- `tomee:deploy` +- `tomee:exec` +- `tomee:list` +- `tomee:run` +- `tomee:start` +- `tomee:stop` +- `tomee:undeploy` + +=== Run + +The most commonly used goal, it allows to start a tomee with applications. Here is its configuration: + +[.table.table-bordered,options="header"] +|=== +|Name|Default|Description + +|synchronization|-|a synchronization (see after the table) +|synchronizations|-|list of synchronizations +|reloadOnUpdate|-|should the application be redeployed when a synchronization is triggered + +|skipCurrentProject|false|should current project not be considered as a deployable even if its packaging is compatible (war typically) +|tomeeVersion|auto, plugin one|which version of TomEE to use +|tomeeGroupId|org.apache.tomee|TomEE artifact groupId +|tomeeArtifactId|apache-tomee|TomEE artifact artifactId +|tomeeType|zip| the type of the TomEE artifact , only zip supported at the moment +|tomeeClassifier|webprofile|which flavor of TomEE to use (classifier) +|tomeeShutdownPort|read from server.xml|the shutdown port +|tomeeShutdownAttempts|60|how many times to wait for startup/shutdown (waits 1s in between) +|tomeeShutdownCommand|SHUTDOWN|the shutdown command +|tomeeAjpPort|read from the pom|the AJP port if needed +|tomeeHttpsPort|read from the pom|the HTTPS port if needed +|args|-|command line arguments (system properties, javaagent, JVM options ...) +|debug|-|start and wait for a remote debugger to connect +|debugPort|5005|used when debug to change the default port +|simpleLog|false|use one line logs +|extractWars|false|explode wars before starting +|stripWarVersion|true|remove the version from the war name +|stripVersion|false|remove the version from the artifact name whatever it is (even jar) +|webappResources|${project.basedir}/src/main/webapp|where web resources are +|webappClasses and classes|${project.build.outputDirectory}|where artifact binaries are +|catalinaBase|${project.build.directory}/apache-tomee|where to create the tomee instance +|context|-|name of the current artifact (rename the war from the maven name to this one) +|webappDir|webapps|path to webapps folder from tomee.base +|appDir|apps|path to apps folder from tomee.base +|libDir|lib|where is lib folder +|mainDir|${project.basedir}/src/main|used in openejb mode to change default config of conf/lib/bin folders to openejb instead of tomee +|config|${project.basedir}/src/main/tomee/conf|a conf folder synchronized with TomEE one +|bin|${project.basedir}/src/main/tomee/bin|a bin folder synchronized with TomEE one +|lib|${project.basedir}/src/main/tomee/lib|a lib folder synchronized with TomEE one +|systemVariables|-|a map of system properties +|classpaths|-|a list of additional entries for the startup classpath +|customizers|-|a list of customizers +|jsCustomizers|-|a list of js customizers (js scripts) +|groovyCustomizers|-|a list of groovy customizers (groovy scripts) +|webappDefaultConfig|false|auto config war oriented +|quickSession|true|session generation will use `Random` instead of `SecureRandom` (for dev) +|forceReloadable|false|ensure TomEE supports reloading/redeployment +|forceJspDevelopment|true|JSP will be auto-recompiled on changes +|libs|-|dependencies to add in lib, see after this table for advanced usage +|endorsedLibs|-|dependencies to add in endorsed, see after this table for advanced usage +|javaagents|-|javaagents to add on the JVM, supports maven coordinates +|persistJavaagents|false|should javaagent be saved or just use for this plugin run +|webapps|-|additional applicatinos to deploy +|warFile|${project.build.directory}/${project.build.finalName}.${project.packaging}|the war to deploy +|workWarFile|${project.build.directory}/${project.build.finalName}"|the exploded war to deploy +|removeDefaultWebapps|true| should default webapps (ROOT, docs, ...) be deleted +|deployOpenEjbApplication|false|should openejb internal application be deployed +|removeTomeeWebapp|true|should tomee webapp (with EJBd adapter) be deployed +|tomeeAlreadyInstalled|false|skip all the setup configuration +|ejbRemote|true|should EJBd be activated +|checkStarted|false|should the plugin check the server is up (useful when used with `pre-integration` phase +|useConsole|true|wait for the end
[19/35] tomee-site-generator git commit: import from old website
http://git-wip-us.apache.org/repos/asf/tomee-site-generator/blob/972cc356/src/main/jbake/content/admin/configuration/containers.adoc -- diff --git a/src/main/jbake/content/admin/configuration/containers.adoc b/src/main/jbake/content/admin/configuration/containers.adoc new file mode 100755 index 000..3d86272 --- /dev/null +++ b/src/main/jbake/content/admin/configuration/containers.adoc @@ -0,0 +1,585 @@ += Resources +:jbake-date: 2016-03-16 +:jbake-type: page +:jbake-status: published +:jbake-tomeepdf: + +All containers will be created automatically - which means you don't need to define them +if you don't need to tune their configuration - when a bean of their type if found. + +To avoid that use `openejb.offline` property and set it to `true`. See link:server.html[Server Configuration] for more detail. + +=== @Stateless + +A `@Stateless` container. + +Declarable in tomee.xml via + +[source,xml] + + +AccessTimeout = 30 seconds +MaxSize = 10 +MinSize = 0 +StrictPooling = true +MaxAge = 0 hours +ReplaceAged = true +ReplaceFlushed = false +MaxAgeOffset = -1 +IdleTimeout = 0 minutes +GarbageCollection = false +SweepInterval = 5 minutes +CallbackThreads = 5 +CloseTimeout = 5 minutes +UseOneSchedulerThreadByBean = false +EvictionThreads = 1 + + + +Declarable in properties via + +[source,bash] + +Foo = new://Container?type=STATELESS +Foo.AccessTimeout = 30 seconds +Foo.MaxSize = 10 +Foo.MinSize = 0 +Foo.StrictPooling = true +Foo.MaxAge = 0 hours +Foo.ReplaceAged = true +Foo.ReplaceFlushed = false +Foo.MaxAgeOffset = -1 +Foo.IdleTimeout = 0 minutes +Foo.GarbageCollection = false +Foo.SweepInterval = 5 minutes +Foo.CallbackThreads = 5 +Foo.CloseTimeout = 5 minutes +Foo.UseOneSchedulerThreadByBean = false +Foo.EvictionThreads = 1 + + + Configuration + += AccessTimeout + +Specifies the time an invokation should wait for an instance +of the pool to become available. + +After the timeout is reached, if an instance in the pool cannot +be obtained, the method invocation will fail. + +Usable time units: nanoseconds, microsecons, milliseconds, +seconds, minutes, hours, days. Or any combination such as +"1 hour and 27 minutes and 10 seconds" + +Any usage of the `javax.ejb.AccessTimeout` annotation will +override this setting for the bean or method where the +annotation is used. + += MaxSize + +Specifies the size of the bean pools for this stateless +SessionBean container. If StrictPooling is not used, instances +will still be created beyond this number if there is demand, but +they will not be returned to the pool and instead will be +immediately destroyed. + += MinSize + +Specifies the minimum number of bean instances that should be in +the pool for each bean. Pools are prefilled to the minimum on +startup. Note this will create start order dependencies between +other beans that also eagerly start, such as other `@Stateless` +beans with a minimum or `@Singleton` beans using `@Startup`. The +start order. + +The minimum pool size is rigidly maintained. Instances in the +minimum side of the pool are not eligible for `IdleTimeout` or +`GarbageCollection`, but are subject to `MaxAge` and flushing. + +If the pool is flushed it is immediately refilled to the minimum +size with `MaxAgeOffset` applied. If an instance from the minimum +side of the pool reaches its `MaxAge`, it is also immediately +replaced. Replacement is done in a background queue using the +number of threads specified by `CallbackThreads`. + += StrictPooling + +StrictPooling tells the container what to do when the pool +reaches it's maximum size and there are incoming requests that +need instances. + +With strict pooling, requests will have to wait for instances to +become available. The pool size will never grow beyond the the +set `MaxSize` value. The maximum amount of time a request should +wait is specified via the `AccessTimeout` setting. + +Without strict pooling, the container will create temporary +instances to meet demand. The instances will last for just one +method invocation and then are removed. + +Setting `StrictPooling` to `false` and `MaxSize` to `0` will result in +no pooling. Instead instances will be created on demand and live +for exactly one method call before being removed. + += MaxAge + +Specifies the maximum time that an instance should live before +it should be retired and removed from use. This will happen +gracefully. Useful for situations where bean instances are +designed to hold potentially expensive resources such as memory +or file handles and need to be periodically cleared out. + +Usable time units: nanoseconds, microsecons, milliseconds, +seconds, minutes, hours, days. Or any combination such as +`1 hour and 27 minutes and 10 seconds` + += ReplaceAged + +When `ReplaceAged` is enabled, any instances in the pool that +expire due to reaching
[21/35] tomee-site-generator git commit: import from old website
http://git-wip-us.apache.org/repos/asf/tomee-site-generator/blob/972cc356/src/main/jbake/assets/js/tree.jquery.js -- diff --git a/src/main/jbake/assets/js/tree.jquery.js b/src/main/jbake/assets/js/tree.jquery.js new file mode 100755 index 000..71290b1 --- /dev/null +++ b/src/main/jbake/assets/js/tree.jquery.js @@ -0,0 +1,3542 @@ +/* +JqTree 1.3.2 + +Copyright 2015 Marco Braak + +Licensed 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. +*/ +(function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&if(!u&)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&for(var o=0;o
[09/35] tomee-site-generator git commit: import from old website
http://git-wip-us.apache.org/repos/asf/tomee-site-generator/blob/972cc356/src/main/jbake/content/examples/moviefun.adoc -- diff --git a/src/main/jbake/content/examples/moviefun.adoc b/src/main/jbake/content/examples/moviefun.adoc new file mode 100755 index 000..bd2ccd9 --- /dev/null +++ b/src/main/jbake/content/examples/moviefun.adoc @@ -0,0 +1,385 @@ += Movies Complete +:jbake-date: 2016-09-06 +:jbake-type: page +:jbake-tomeepdf: +:jbake-status: published + +Example moviefun can be browsed at https://github.com/apache/tomee/tree/master/examples/moviefun + + +*Help us document this example! Click the blue pencil icon in the upper right to edit this page.* + +== AddInterceptor + + +[source,java] + +package org.superbiz.injection.tx; + +import javax.interceptor.AroundInvoke; +import javax.interceptor.InvocationContext; + +/** + * @version $Revision$ $Date$ + */ +public class AddInterceptor { + +@AroundInvoke +public Object invoke(InvocationContext context) throws Exception { +// Log Add +return context.proceed(); +} +} + + + +== DeleteInterceptor + + +[source,java] + +package org.superbiz.injection.tx; + +import javax.interceptor.AroundInvoke; +import javax.interceptor.InvocationContext; + +/** + * @version $Revision$ $Date$ + */ +public class DeleteInterceptor { + +@AroundInvoke +public Object invoke(InvocationContext context) throws Exception { +// Log Delete +return context.proceed(); +} +} + + + +== Movie + + +[source,java] + +package org.superbiz.injection.tx; + +import javax.persistence.Entity; + +@Entity +public class Movie { + +private String director; +private String title; +private int year; + +public Movie() { +} + +public Movie(String director, String title, int year) { +this.director = director; +this.title = title; +this.year = year; +} + +public String getDirector() { +return director; +} + +public void setDirector(String director) { +this.director = director; +} + +public String getTitle() { +return title; +} + +public void setTitle(String title) { +this.title = title; +} + +public int getYear() { +return year; +} + +public void setYear(int year) { +this.year = year; +} + +} + + + +== Movies + + +[source,java] + +package org.superbiz.injection.tx; + +import javax.annotation.security.PermitAll; +import javax.annotation.security.RolesAllowed; +import javax.ejb.Stateful; +import javax.ejb.TransactionAttribute; +import javax.ejb.TransactionAttributeType; +import javax.interceptor.Interceptors; +import javax.persistence.EntityManager; +import javax.persistence.PersistenceContext; +import javax.persistence.PersistenceContextType; +import javax.persistence.Query; +import java.util.List; + +//START SNIPPET: code +@Stateful +public class Movies { + +@PersistenceContext(unitName = "movie-unit", type = PersistenceContextType.TRANSACTION) +private EntityManager entityManager; + +@RolesAllowed({"Employee", "Manager"}) +@TransactionAttribute(TransactionAttributeType.REQUIRED) +@Interceptors(AddInterceptor.class) +public void addMovie(Movie movie) throws Exception { +entityManager.persist(movie); +} + +@RolesAllowed({"Manager"}) +@TransactionAttribute(TransactionAttributeType.MANDATORY) +@Interceptors(DeleteInterceptor.class) +public void deleteMovie(Movie movie) throws Exception { +entityManager.remove(movie); +} + +@PermitAll +@TransactionAttribute(TransactionAttributeType.SUPPORTS) +public List getMovies() throws Exception { +Query query = entityManager.createQuery("SELECT m from Movie as m"); +return query.getResultList(); +} +} + + + +== ReadInterceptor + + +[source,java] + +package org.superbiz.injection.tx; + +import javax.interceptor.AroundInvoke; +import javax.interceptor.InvocationContext; + +/** + * @version $Revision$ $Date$ + */ +public class ReadInterceptor { + +@AroundInvoke +public Object invoke(InvocationContext context) throws Exception { +// Log Delete +return context.proceed(); +} +} + + + +== persistence.xml + + +[source,xml] + +http://java.sun.com/xml/ns/persistence; version="1.0"> + + +movieDatabase +movieDatabaseUnmanaged +org.superbiz.injection.tx.Movie + + + + + + + + + +== MoviesTest + + +[source,java] + +package org.superbiz.injection.tx; + +import junit.framework.TestCase; + +import javax.annotation.security.RunAs; +import javax.ejb.EJB; +import javax.ejb.Stateless; +import javax.ejb.TransactionAttribute; +import javax.ejb.TransactionAttributeType; +import javax.ejb.embeddable.EJBContainer; +import java.util.List; +import java.util.Properties; +import java.util.concurrent.Callable; + +import
[29/35] tomee-site-generator git commit: import from old website
http://git-wip-us.apache.org/repos/asf/tomee-site-generator/blob/972cc356/src/main/jbake/assets/css/bootstrap.css.map -- diff --git a/src/main/jbake/assets/css/bootstrap.css.map b/src/main/jbake/assets/css/bootstrap.css.map new file mode 100755 index 000..f944af4 --- /dev/null +++ b/src/main/jbake/assets/css/bootstrap.css.map @@ -0,0 +1 @@ +{"version":3,"sources":["bootstrap.css","less/normalize.less","less/print.less","less/glyphicons.less","less/scaffolding.less","less/mixins/vendor-prefixes.less","less/mixins/tab-focus.less","less/mixins/image.less","less/type.less","less/mixins/text-emphasis.less","less/mixins/background-variant.less","less/mixins/text-overflow.less","less/code.less","less/grid.less","less/mixins/grid.less","less/mixins/grid-framework.less","less/tables.less","less/mixins/table-row.less","less/forms.less","less/mixins/forms.less","less/buttons.less","less/mixins/buttons.less","less/mixins/opacity.less","less/component-animations.less","less/dropdowns.less","less/mixins/nav-divider.less","less/mixins/reset-filter.less","less/button-groups.less","less/mixins/border-radius.less","less/input-groups.less","less/navs.less","less/navbar.less","less/mixins/nav-vertical-align.less","less/utilities.less","less/breadcrumbs.less","less/pagination.less","less/mixins/pagination.less","less/pager.less","less/labe ls.less","less/mixins/labels.less","less/badges.less","less/jumbotron.less","less/thumbnails.less","less/alerts.less","less/mixins/alerts.less","less/progress-bars.less","less/mixins/gradients.less","less/mixins/progress-bar.less","less/media.less","less/list-group.less","less/mixins/list-group.less","less/panels.less","less/mixins/panels.less","less/responsive-embed.less","less/wells.less","less/close.less","less/modals.less","less/tooltip.less","less/mixins/reset-text.less","less/popovers.less","less/carousel.less","less/mixins/clearfix.less","less/mixins/center-block.less","less/mixins/hide-text.less","less/responsive-utilities.less","less/mixins/responsive-visibility.less"],"names":[],"mappings":"GAIG;AACH,4EAA4E;ACG5E;EACE,wBAAA;EACA,2BAAA;EACA,+BAAA;CDDD;ACQD;EACE,UAAA;CDND;ACmBD;EAaE,eAAA;CDjBD;ACyBDEAIE,sBAAA;EACA,yBAAA;CDvBD;AC+BD;EACE,cAAA;EACA,UAAA;CD7BD;ACqCD;;EAEE,cAAA;CDnCD;AC6CD;EACE,8BAAA;CD3CD;ACmDD;;EAEE,WAAA;CDjDD;AC2DD;EACE,0BAAA;CDzDD;ACg ED;;EAEE,kBAAA;CD9DD;ACqED;EACE,mBAAA;CDnED;AC2ED;EACE,eAAA;EACA,iBAAA;CDzED;ACgFD;EACE,iBAAA;EACA,YAAA;CD9ED;ACqFD;EACE,eAAA;CDnFD;AC0FD;;EAEE,eAAA;EACA,eAAA;EACA,mBAAA;EACA,yBAAA;CDxFD;AC2FD;EACE,YAAA;CDzFD;AC4FD;EACE,gBAAA;CD1FD;ACoGD;EACE,UAAA;CDlGD;ACyGD;EACE,iBAAA;CDvGD;ACiHD;EACE,iBAAA;CD/GD;ACsHD;EACE,gCAAA;KAAA,6BAAA;UAAA,wBAAA;EACA,UAAA;CDpHD;AC2HD;EACE,eAAA;CDzHD;ACgIDEAIE,kCAAA;EACA,eAAA;CD9HD;ACgJD;EAKE,eAAA;EACA,cAAA;EACA,UAAA;CD9ID;ACqJD;EACE,kBAAA;CDnJD;AC6JD;;EAEE,qBAAA;CD3JD;ACsKDEAIE,2BAAA;EACA,gBAAA;CDpKD;AC2KD;;EAEE,gBAAA;CDzKD;ACgLD;;EAEE,UAAA;EACA,WAAA;CD9KD;ACsLD;EACE,oBAAA;CDpLD;AC+LD;;EAEE,+BAAA;KAAA,4BAAA;UAAA,uBAAA;EACA,WAAA;CD7LD;ACsMD;;EAEE,aAAA;CDpMD;AC4MD;EACE,8BAAA;EACA,gCAAA;KAAA,6BAAA;UAAA,wBAAA;CD1MD;ACmND;;EAEE,yBAAA;CDjND;ACwND;EACE,0BAAA;EACA,cAAA;EACA,+BAAA;CDtND;AC8ND;EACE,UAAA;EACA,WAAA;CD5ND;ACmOD;EACE,eAAA;CDjOD;ACyOD;EACE,kBAAA;CDvOD;ACiPD;EACE,0BAAA;EACA,kBAAA;CD/OD;ACkPD;;EAEE,WAAA;CDhPD;AACD,qFAAqF;AElFrF;EA7FI;;;IAGI,mCAAA ;IACA,uBAAA;IACA,oCAAA;YAAA,4BAAA;IACA,6BAAA;GFkLL;EE/KC;;IAEI,2BAAA;GFiLL;EE9KC;IACI,6BAAA;GFgLL;EE7KC;IACI,8BAAA;GF+KL;EE1KC;;IAEI,YAAA;GF4KL;EEzKC;;IAEI,uBAAA;IACA,yBAAA;GF2KL;EExKC;IACI,4BAAA;GF0KL;EEvKC;;IAEI,yBAAA;GFyKL;EEtKC;IACI,2BAAA;GFwKL;EErKC;;;IAGI,WAAA;IACA,UAAA;GFuKL;EEpKC;;IAEI,wBAAA;GFsKL;EEhKC;IACI,cAAA;GFkKL;EEhKC;;IAGQ,kCAAA;GFiKT;EE9JC;IACI,uBAAA;GFgKL;EE7JC;IACI,qCAAA;GF+JL;EEhKC;;IAKQ,kCAAA;GF+JT;EE5JC;;IAGQ,kCAAA;GF6JT;CACF;AGnPD;EACE,oCAAA;EACA,sDAAA;EACA,gYAAA;CHqPD;AG7OD;EACE,mBAAA;EACA,SAAA;EACA,sBAAA;EACA,oCAAA;EACA,mBAAA;EACA,oBAAA;EACA,eAAA;EACA,oCAAA;EACA,mCAAA;CH+OD;AG3OmC;EAAW,eAAA;CH8O9C;AG7OmC;EAAW,eAAA;CHgP9C;AG9OmC;;EAAW,iBAAA;CHkP9C;AGjPmC;EAAW,iBAAA;CHoP9C;AGnPmC;EAAW,iBAAA;CHsP9C;AGrPmC;EAAW,iBAAA;CHwP9C;AGvPmC;EAAW,iBAAA;CH0P9C;AGzPmC;EAAW,iBAAA;CH4P9C;AG3PmC;EAAW,iBAAA;CH8P9C;AG7PmC;EAAW,iBAAA;CHgQ9C;AG/PmC;EAAW,iBAAA;CHkQ9C;AGjQmC;EAAW,iBAAA;CHoQ9C;AGnQmC;EAAW,iBAAA;CHsQ9C;AGrQmC;EAAW,iBAAA;CHwQ9C;AGvQmC;EAAW,iBAAA;CH0Q9C;AGzQmC;EAAW,iBAAA
[04/35] tomee-site-generator git commit: import from old website
http://git-wip-us.apache.org/repos/asf/tomee-site-generator/blob/972cc356/src/main/jbake/content/examples/testing-security-2.adoc -- diff --git a/src/main/jbake/content/examples/testing-security-2.adoc b/src/main/jbake/content/examples/testing-security-2.adoc new file mode 100755 index 000..c8a2491 --- /dev/null +++ b/src/main/jbake/content/examples/testing-security-2.adoc @@ -0,0 +1,306 @@ += Testing Security 2 +:jbake-date: 2016-09-06 +:jbake-type: page +:jbake-tomeepdf: +:jbake-status: published + +Example testing-security-2 can be browsed at https://github.com/apache/tomee/tree/master/examples/testing-security-2 + + +*Help us document this example! Click the blue pencil icon in the upper right to edit this page.* + +== Movie + + +[source,java] + +package org.superbiz.injection.secure; + +import javax.persistence.Entity; + +@Entity +public class Movie { + +private String director; +private String title; +private int year; + +public Movie() { +} + +public Movie(String director, String title, int year) { +this.director = director; +this.title = title; +this.year = year; +} + +public String getDirector() { +return director; +} + +public void setDirector(String director) { +this.director = director; +} + +public String getTitle() { +return title; +} + +public void setTitle(String title) { +this.title = title; +} + +public int getYear() { +return year; +} + +public void setYear(int year) { +this.year = year; +} + +} + + + +== Movies + + +[source,java] + +package org.superbiz.injection.secure; + +//START SNIPPET: code + +import javax.annotation.security.PermitAll; +import javax.annotation.security.RolesAllowed; +import javax.ejb.Stateful; +import javax.ejb.TransactionAttribute; +import javax.ejb.TransactionAttributeType; +import javax.persistence.EntityManager; +import javax.persistence.PersistenceContext; +import javax.persistence.PersistenceContextType; +import javax.persistence.Query; +import java.util.List; + +@Stateful +public class Movies { + +@PersistenceContext(unitName = "movie-unit", type = PersistenceContextType.EXTENDED) +private EntityManager entityManager; + +@RolesAllowed({"Employee", "Manager"}) +public void addMovie(Movie movie) throws Exception { +entityManager.persist(movie); +} + +@RolesAllowed({"Manager"}) +public void deleteMovie(Movie movie) throws Exception { +entityManager.remove(movie); +} + +@PermitAll +@TransactionAttribute(TransactionAttributeType.SUPPORTS) +public List getMovies() throws Exception { +Query query = entityManager.createQuery("SELECT m from Movie as m"); +return query.getResultList(); +} +} + + + +== persistence.xml + + +[source,xml] + +http://java.sun.com/xml/ns/persistence; version="1.0"> + + +movieDatabase +movieDatabaseUnmanaged +org.superbiz.injection.secure.Movie + + + + + + + + + +== MovieTest + + +[source,java] + +package org.superbiz.injection.secure; + +import junit.framework.TestCase; + +import javax.ejb.EJB; +import javax.ejb.EJBAccessException; +import javax.ejb.embeddable.EJBContainer; +import javax.naming.Context; +import javax.naming.InitialContext; +import java.util.List; +import java.util.Properties; + +//START SNIPPET: code +public class MovieTest extends TestCase { + +@EJB +private Movies movies; + +protected void setUp() throws Exception { + +// Uncomment this line to set the login/logout functionality on Debug +//System.setProperty("log4j.category.OpenEJB.security", "debug"); + +Properties p = new Properties(); +p.put("movieDatabase", "new://Resource?type=DataSource"); +p.put("movieDatabase.JdbcDriver", "org.hsqldb.jdbcDriver"); +p.put("movieDatabase.JdbcUrl", "jdbc:hsqldb:mem:moviedb"); + +EJBContainer.createEJBContainer(p).getContext().bind("inject", this); +} + +public void testAsManager() throws Exception { +Properties p = new Properties(); +p.put(Context.INITIAL_CONTEXT_FACTORY, "org.apache.openejb.core.LocalInitialContextFactory"); +p.put(Context.SECURITY_PRINCIPAL, "jane"); +p.put(Context.SECURITY_CREDENTIALS, "waterfall"); + +InitialContext context = new InitialContext(p); + +try { +movies.addMovie(new Movie("Quentin Tarantino", "Reservoir Dogs", 1992)); +movies.addMovie(new Movie("Joel Coen", "Fargo", 1996)); +movies.addMovie(new Movie("Joel Coen", "The Big Lebowski", 1998)); + +List list = movies.getMovies(); +assertEquals("List.size()", 3, list.size()); + +for (Movie movie : list) { +movies.deleteMovie(movie); +} + +
[33/35] tomee-site-generator git commit: import from old website
http://git-wip-us.apache.org/repos/asf/tomee-site-generator/blob/972cc356/examples.cache -- diff --git a/examples.cache b/examples.cache new file mode 100755 index 000..ba5ccce --- /dev/null +++ b/examples.cache @@ -0,0 +1,1653 @@ +{ + "all":{ +"adapters":[ + { +"name":"multiple-arquillian-adapters", +"readme":"No README.md yet, be the first to contribute one!", + "url":"https://github.com/apache/tomee/tree/master/examples/multiple-arquillian-adapters; + } +], +"alternate":[ + { +"name":"alternate-descriptors", +"readme":"No README.md yet, be the first to contribute one!", + "url":"https://github.com/apache/tomee/tree/master/examples/alternate-descriptors; + } +], +"alternative":[ + { +"name":"cdi-alternative-and-stereotypes", +"readme":"No README.md yet, be the first to contribute one!", + "url":"https://github.com/apache/tomee/tree/master/examples/cdi-alternative-and-stereotypes; + } +], +"applet":[ + { +"name":"applet", +"readme":"No README.md yet, be the first to contribute one!", +"url":"https://github.com/apache/tomee/tree/master/examples/applet; + } +], +"applicationcomposer":[ + { +"name":"applicationcomposer-jaxws-cdi", +"readme":"No README.md yet, be the first to contribute one!", + "url":"https://github.com/apache/tomee/tree/master/examples/applicationcomposer-jaxws-cdi; + }, + { +"name":"rest-applicationcomposer", +"readme":"No README.md yet, be the first to contribute one!", + "url":"https://github.com/apache/tomee/tree/master/examples/rest-applicationcomposer; + }, + { +"name":"application-composer", +"readme":"No README.md yet, be the first to contribute one!", + "url":"https://github.com/apache/tomee/tree/master/examples/application-composer; + }, + { +"name":"rest-applicationcomposer-mockito", +"readme":"No README.md yet, be the first to contribute one!", + "url":"https://github.com/apache/tomee/tree/master/examples/rest-applicationcomposer-mockito; + } +], +"applicationexception":[ + { +"name":"applicationexception", +"readme":"No README.md yet, be the first to contribute one!", + "url":"https://github.com/apache/tomee/tree/master/examples/applicationexception; + } +], +"arquillian":[ + { +"name":"arquillian-jpa", +"readme":"No README.md yet, be the first to contribute one!", + "url":"https://github.com/apache/tomee/tree/master/examples/arquillian-jpa; + }, + { +"name":"multiple-tomee-arquillian", +"readme":"No README.md yet, be the first to contribute one!", + "url":"https://github.com/apache/tomee/tree/master/examples/multiple-tomee-arquillian; + }, + { +"name":"multiple-arquillian-adapters", +"readme":"No README.md yet, be the first to contribute one!", + "url":"https://github.com/apache/tomee/tree/master/examples/multiple-arquillian-adapters; + } +], +"async":[ + { +"name":"async-postconstruct", +"readme":"No README.md yet, be the first to contribute one!", + "url":"https://github.com/apache/tomee/tree/master/examples/async-postconstruct; + }, + { +"name":"async-methods", +"readme":"No README.md yet, be the first to contribute one!", + "url":"https://github.com/apache/tomee/tree/master/examples/async-methods; + } +], +"attachments":[ + { +"name":"webservice-attachments", +"readme":"Title: Webservice Attachments\n\n*Help us document this example! Click the blue pencil icon in the upper right to edit this page.*\n\n## AttachmentImpl\n\npackage org.superbiz.attachment;\n\n import javax.activation.DataHandler;\nimport javax.activation.DataSource;\n import javax.ejb.Stateless;\nimport javax.jws.WebService;\nimport javax.xml.ws.BindingType;\nimport javax.xml.ws.soap.SOAPBinding;\n import java.io.IOException;\nimport java.io.InputStream;\n\n/**\n * This is an EJB 3 style pojo stateless session bean\n * Every stateless session bean implementation must be annotated\n * using the annotation @Stateless\n * This EJB has a single interface: {@link AttachmentWs} a webservice interface.\n */\n@Stateless\n@WebService(\n portName = \"AttachmentPort\",\nserviceName = \"AttachmentWsService\",\ntargetNamespace = \"http://superbiz.org/wsdl\",\ne ndpointInterface = \"org.superbiz.attachment.AttachmentWs\")\n @BindingType(value = SOAPBinding.SOAP12HTTP_MTOM_BINDING)\npublic class AttachmentImpl implements AttachmentWs {\n\n
[31/35] tomee-site-generator git commit: import from old website
http://git-wip-us.apache.org/repos/asf/tomee-site-generator/blob/972cc356/src/main/jbake/assets/css/animate.css -- diff --git a/src/main/jbake/assets/css/animate.css b/src/main/jbake/assets/css/animate.css new file mode 100755 index 000..e1a54e2 --- /dev/null +++ b/src/main/jbake/assets/css/animate.css @@ -0,0 +1,3391 @@ +@charset "UTF-8"; + +/*! +Animate.css - http://daneden.me/animate +Licensed under the MIT license - http://opensource.org/licenses/MIT + +Copyright (c) 2015 Daniel Eden +*/ + +.animated { + -webkit-animation-duration: .3s; + animation-duration: .3s; + -webkit-animation-fill-mode: both; + animation-fill-mode: both; +} + +.animated.infinite { + -webkit-animation-iteration-count: infinite; + -webkit-animation-duration: 1s; + animation-duration: 1s; + animation-iteration-count: infinite; +} + +.animated.hinge { + -webkit-animation-duration: 2s; + animation-duration: 2s; +} + +@-webkit-keyframes bounce { + 0%, 20%, 53%, 80%, 100% { +-webkit-transition-timing-function: cubic-bezier(0.215, 0.610, 0.355, 1.000); +transition-timing-function: cubic-bezier(0.215, 0.610, 0.355, 1.000); +-webkit-transform: translate3d(0,0,0); +transform: translate3d(0,0,0); + } + + 40%, 43% { +-webkit-transition-timing-function: cubic-bezier(0.755, 0.050, 0.855, 0.060); +transition-timing-function: cubic-bezier(0.755, 0.050, 0.855, 0.060); +-webkit-transform: translate3d(0, -30px, 0); +transform: translate3d(0, -30px, 0); + } + + 70% { +-webkit-transition-timing-function: cubic-bezier(0.755, 0.050, 0.855, 0.060); +transition-timing-function: cubic-bezier(0.755, 0.050, 0.855, 0.060); +-webkit-transform: translate3d(0, -15px, 0); +transform: translate3d(0, -15px, 0); + } + + 90% { +-webkit-transform: translate3d(0,-4px,0); +transform: translate3d(0,-4px,0); + } +} + +@keyframes bounce { + 0%, 20%, 53%, 80%, 100% { +-webkit-transition-timing-function: cubic-bezier(0.215, 0.610, 0.355, 1.000); +transition-timing-function: cubic-bezier(0.215, 0.610, 0.355, 1.000); +-webkit-transform: translate3d(0,0,0); +-ms-transform: translate3d(0,0,0); +transform: translate3d(0,0,0); + } + + 40%, 43% { +-webkit-transition-timing-function: cubic-bezier(0.755, 0.050, 0.855, 0.060); +transition-timing-function: cubic-bezier(0.755, 0.050, 0.855, 0.060); +-webkit-transform: translate3d(0, -30px, 0); +-ms-transform: translate3d(0, -30px, 0); +transform: translate3d(0, -30px, 0); + } + + 70% { +-webkit-transition-timing-function: cubic-bezier(0.755, 0.050, 0.855, 0.060); +transition-timing-function: cubic-bezier(0.755, 0.050, 0.855, 0.060); +-webkit-transform: translate3d(0, -15px, 0); +-ms-transform: translate3d(0, -15px, 0); +transform: translate3d(0, -15px, 0); + } + + 90% { +-webkit-transform: translate3d(0,-4px,0); +-ms-transform: translate3d(0,-4px,0); +transform: translate3d(0,-4px,0); + } +} + +.bounce { + -webkit-animation-name: bounce; + animation-name: bounce; + -webkit-transform-origin: center bottom; + -ms-transform-origin: center bottom; + transform-origin: center bottom; +} + +@-webkit-keyframes flash { + 0%, 100% { +opacity: 1; + } + + 50% { +opacity: 0; + } +} + +@keyframes flash { + 0%, 100% { +opacity: 1; + } + + 50% { +opacity: 0; + } +} + +.flash { + -webkit-animation-name: flash; + animation-name: flash; +} + +/* originally authored by Nick Pettit - https://github.com/nickpettit/glide */ + +@-webkit-keyframes pulse { + 0% { +-webkit-transform: scale3d(1, 1, 1); +transform: scale3d(1, 1, 1); + } + + 50% { +-webkit-transform: scale3d(1.05, 1.05, 1.05); +transform: scale3d(1.05, 1.05, 1.05); + } + + 100% { +-webkit-transform: scale3d(1, 1, 1); +transform: scale3d(1, 1, 1); + } +} + +@keyframes pulse { + 0% { +-webkit-transform: scale3d(1, 1, 1); +-ms-transform: scale3d(1, 1, 1); +transform: scale3d(1, 1, 1); + } + + 50% { +-webkit-transform: scale3d(1.05, 1.05, 1.05); +-ms-transform: scale3d(1.05, 1.05, 1.05); +transform: scale3d(1.05, 1.05, 1.05); + } + + 100% { +-webkit-transform: scale3d(1, 1, 1); +-ms-transform: scale3d(1, 1, 1); +transform: scale3d(1, 1, 1); + } +} + +.pulse { + -webkit-animation-name: pulse; + animation-name: pulse; +} + +@-webkit-keyframes rubberBand { + 0% { +-webkit-transform: scale3d(1, 1, 1); +transform: scale3d(1, 1, 1); + } + + 30% { +-webkit-transform: scale3d(1.25, 0.75, 1); +transform: scale3d(1.25, 0.75, 1); + } + + 40% { +-webkit-transform: scale3d(0.75, 1.25, 1); +transform: scale3d(0.75, 1.25, 1); + } + + 50% { +-webkit-transform: scale3d(1.15, 0.85, 1); +transform: scale3d(1.15, 0.85, 1); + } + + 65% { +-webkit-transform: scale3d(.95, 1.05, 1); +transform: scale3d(.95, 1.05, 1); + } + + 75% { +
[32/35] tomee-site-generator git commit: import from old website
http://git-wip-us.apache.org/repos/asf/tomee-site-generator/blob/972cc356/pom.xml -- diff --git a/pom.xml b/pom.xml new file mode 100755 index 000..a479edc --- /dev/null +++ b/pom.xml @@ -0,0 +1,127 @@ + +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/xsd/maven-4.0.0.xsd;> + 4.0.0 + + org.apache.tomee + site + 1.0-SNAPSHOT + Apache TomEE :: WebSite NG + + +7.0.3 +false +false + +UTF-8 + + + + + org.asciidoctor + asciidoctorj-pdf + 1.5.0-alpha.11 + + + org.asciidoctor + asciidoctorj + 1.5.4 + + + org.projectlombok + lombok + 1.16.12 + provided + + + org.apache.geronimo.specs + geronimo-json_1.0_spec + 1.0-alpha-1 + + + org.apache.johnzon + johnzon-jaxrs + 0.9.5 + + + org.apache.cxf + cxf-rt-rs-client + 3.1.8 + + + org.apache.tomee + javaee-api + 7.0-1 + + + org.apache.tomee + tomee-embedded + ${tomee.version} + + + org.jbake + jbake-core + 2.4.0 + + + org.slf4j + jul-to-slf4j + + + + + org.codehaus.groovy + groovy + 2.3.11 + + + org.codehaus.groovy + groovy-templates + 2.3.11 + + + org.pegdown + pegdown + 1.6.0 + + + + + + +org.apache.maven.plugins +maven-compiler-plugin +3.5.1 + + 1.8 + 1.8 + + + +org.codehaus.mojo +exec-maven-plugin +1.5.0 + + +tomee-site +compile + + java + + + + + true + org.apache.tomee.website.JBake + +${project.basedir}/src/main/jbake/ + ${project.build.directory}/${project.build.finalName} +${jbake.http} +${jbake.pdf} + + + + + + http://git-wip-us.apache.org/repos/asf/tomee-site-generator/blob/972cc356/src/main/java/org/apache/tomee/website/Contributors.java -- diff --git a/src/main/java/org/apache/tomee/website/Contributors.java b/src/main/java/org/apache/tomee/website/Contributors.java new file mode 100755 index 000..fb4d0bf --- /dev/null +++ b/src/main/java/org/apache/tomee/website/Contributors.java @@ -0,0 +1,222 @@ +/* + * 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.apache.tomee.website; + +import lombok.Builder; +import lombok.Data; +import org.apache.johnzon.jaxrs.JohnzonProvider; + +import javax.net.ssl.HttpsURLConnection; +import javax.ws.rs.client.ClientBuilder; +import javax.ws.rs.client.WebTarget; +import javax.ws.rs.core.MediaType; +import javax.ws.rs.core.Response; +import java.io.BufferedReader; +import java.io.IOException; +import java.io.StringReader; +import java.io.UnsupportedEncodingException; +import java.security.MessageDigest; +import java.security.NoSuchAlgorithmException; +import java.util.ArrayList; +import java.util.Collection; +import java.util.Collections; +import java.util.List; +import java.util.concurrent.ExecutorService; +import java.util.concurrent.Executors; +import java.util.concurrent.TimeUnit; +import java.util.stream.Stream; + +import static java.util.Collections.emptyList; +import static java.util.Optional.ofNullable; +import static java.util.stream.Collectors.toList; + +public class Contributors { +private static final String GRAVATAR_BASE = "http://fr.gravatar.com/;; + +private Contributors() { +// no-op +} + +public static Contributor singleLoad(final WebTarget target, final String input) throws IOException { +try { +return ofNullable(loadGravatar(target, input)).orElse(loadStatic(input)); +} catch (Exception e) { +e.printStackTrace(); +return
[15/35] tomee-site-generator git commit: import from old website
+} + + + +By default, @ApplicationException is inherited + + +[source,java] + +public class ValueRequiredException extends BusinessException { +} + + + += In the bean code + + +[source,java] + +@Stateless +public class ThrowBusinessExceptionImpl implements ThrowBusinessException { + +public void throwValueRequiredException() throws BusinessException { +throw new ValueRequiredException(); +} + +} + + + +Normally throwing a `RuntimeException` would cause the container to both rollback the transaction and destroy the bean instance that threw the exception. + +As `BusinessException` has been annotated `@ApplicationException(rollback = true)` only the transaction rollback will occur and the bean will not get destroyed. + += The TestCase + + +[source,java] + +import org.junit.Assert; +import org.junit.Before; +import org.junit.Test; + +import javax.naming.Context; +import javax.naming.InitialContext; +import java.util.Properties; + +public class ThrowBusinessExceptionImplTest { + +private InitialContext initialContext; + +@Before +public void setUp() throws Exception { +Properties properties = new Properties(); +properties.setProperty(Context.INITIAL_CONTEXT_FACTORY, "org.apache.openejb.core.LocalInitialContextFactory"); + +initialContext = new InitialContext(properties); +} + +@Test(expected = ValueRequiredException.class) +public void testCounterViaRemoteInterface() throws Exception { +Object object = initialContext.lookup("ThrowBusinessExceptionImplRemote"); + +Assert.assertNotNull(object); +Assert.assertTrue(object instanceof ThrowBusinessException); +ThrowBusinessException bean = (ThrowBusinessException) object; +bean.throwValueRequiredException(); +} +} + + + += Running + + +[source] + +--- + T E S T S +--- +Running org.superbiz.appexception.ThrowBusinessExceptionImplTest +Apache OpenEJB 4.0.0-beta-1build: 20111002-04:06 +http://tomee.apache.org/ +INFO - openejb.home = /Users/dblevins/examples/applicationexception +INFO - openejb.base = /Users/dblevins/examples/applicationexception +INFO - Configuring Service(id=Default Security Service, type=SecurityService, provider-id=Default Security Service) +INFO - Configuring Service(id=Default Transaction Manager, type=TransactionManager, provider-id=Default Transaction Manager) +INFO - Found EjbModule in classpath: /Users/dblevins/examples/applicationexception/target/classes +INFO - Beginning load: /Users/dblevins/examples/applicationexception/target/classes +INFO - Configuring enterprise application: /Users/dblevins/examples/applicationexception/classpath.ear +INFO - Configuring Service(id=Default Stateless Container, type=Container, provider-id=Default Stateless Container) +INFO - Auto-creating a container for bean ThrowBusinessExceptionImpl: Container(type=STATELESS, id=Default Stateless Container) +INFO - Enterprise application "/Users/dblevins/examples/applicationexception/classpath.ear" loaded. +INFO - Assembling app: /Users/dblevins/examples/applicationexception/classpath.ear +INFO - Jndi(name=ThrowBusinessExceptionImplRemote) --> Ejb(deployment-id=ThrowBusinessExceptionImpl) +INFO - Jndi(name=global/classpath.ear/applicationexception/ThrowBusinessExceptionImpl!org.superbiz.appexception.ThrowBusinessException) --> Ejb(deployment-id=ThrowBusinessExceptionImpl) +INFO - Jndi(name=global/classpath.ear/applicationexception/ThrowBusinessExceptionImpl) --> Ejb(deployment-id=ThrowBusinessExceptionImpl) +INFO - Created Ejb(deployment-id=ThrowBusinessExceptionImpl, ejb-name=ThrowBusinessExceptionImpl, container=Default Stateless Container) +INFO - Started Ejb(deployment-id=ThrowBusinessExceptionImpl, ejb-name=ThrowBusinessExceptionImpl, container=Default Stateless Container) +INFO - Deployed Application(path=/Users/dblevins/examples/applicationexception/classpath.ear) +Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 1.434 sec + +Results : + +Tests run: 1, Failures: 0, Errors: 0, Skipped: 0 + + + http://git-wip-us.apache.org/repos/asf/tomee-site-generator/blob/972cc356/src/main/jbake/content/examples/arquillian-jpa.adoc -- diff --git a/src/main/jbake/content/examples/arquillian-jpa.adoc b/src/main/jbake/content/examples/arquillian-jpa.adoc new file mode 100755 index 000..287e933 --- /dev/null +++ b/src/main/jbake/content/examples/arquillian-jpa.adoc @@ -0,0 +1,180 @@ += Arquillian Persistence Extension +:jbake-date: 2016-09-06 +:jbake-type: page +:jbake-tomeepdf: +:jbake-status: published + +Example arquillian-jpa can be browsed at https://github.com/apache/tomee/tree/master/examples/arquillian-jpa + + +A sample showing how to use TomEE, Arquillian and its Persistence Extension
[25/35] tomee-site-generator git commit: import from old website
http://git-wip-us.apache.org/repos/asf/tomee-site-generator/blob/972cc356/src/main/jbake/assets/fonts/font-awesome-4.1.0/fonts/fontawesome-webfont.svg -- diff --git a/src/main/jbake/assets/fonts/font-awesome-4.1.0/fonts/fontawesome-webfont.svg b/src/main/jbake/assets/fonts/font-awesome-4.1.0/fonts/fontawesome-webfont.svg new file mode 100755 index 000..d907b25 --- /dev/null +++ b/src/main/jbake/assets/fonts/font-awesome-4.1.0/fonts/fontawesome-webfont.svg @@ -0,0 +1,520 @@ + +http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd; > +http://www.w3.org/2000/svg;> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
svn commit: r1800805 - /tomee/site/trunk/generators/site-tomee-ng/src/main/java/org/apache/tomee/website/JBake.java
Author: rmannibucau Date: Tue Jul 4 17:14:37 2017 New Revision: 1800805 URL: http://svn.apache.org/viewvc?rev=1800805=rev Log: fixing repo path Modified: tomee/site/trunk/generators/site-tomee-ng/src/main/java/org/apache/tomee/website/JBake.java Modified: tomee/site/trunk/generators/site-tomee-ng/src/main/java/org/apache/tomee/website/JBake.java URL: http://svn.apache.org/viewvc/tomee/site/trunk/generators/site-tomee-ng/src/main/java/org/apache/tomee/website/JBake.java?rev=1800805=1800804=1800805=diff == --- tomee/site/trunk/generators/site-tomee-ng/src/main/java/org/apache/tomee/website/JBake.java (original) +++ tomee/site/trunk/generators/site-tomee-ng/src/main/java/org/apache/tomee/website/JBake.java Tue Jul 4 17:14:37 2017 @@ -37,7 +37,7 @@ public class JBake { System.out.println(); System.out.println(); System.out.println(); -System.out.println("WARNING: site moved to https://git-wip-us.apache.org/repos/asf/tomee-tomee-site-generator.git;); +System.out.println("WARNING: site moved to https://git-wip-us.apache.org/repos/asf/tomee-site-generator.git;); System.out.println(); System.out.println("Think to use that repository, this one will be soon dropped off"); System.out.println();
svn commit: r1800804 - /tomee/site/trunk/generators/site-tomee-ng/src/main/java/org/apache/tomee/website/JBake.java
Author: rmannibucau Date: Tue Jul 4 16:39:05 2017 New Revision: 1800804 URL: http://svn.apache.org/viewvc?rev=1800804=rev Log: warning in generator since we moved to git Modified: tomee/site/trunk/generators/site-tomee-ng/src/main/java/org/apache/tomee/website/JBake.java Modified: tomee/site/trunk/generators/site-tomee-ng/src/main/java/org/apache/tomee/website/JBake.java URL: http://svn.apache.org/viewvc/tomee/site/trunk/generators/site-tomee-ng/src/main/java/org/apache/tomee/website/JBake.java?rev=1800804=1800803=1800804=diff == --- tomee/site/trunk/generators/site-tomee-ng/src/main/java/org/apache/tomee/website/JBake.java (original) +++ tomee/site/trunk/generators/site-tomee-ng/src/main/java/org/apache/tomee/website/JBake.java Tue Jul 4 16:39:05 2017 @@ -29,6 +29,28 @@ import static lombok.AccessLevel.PRIVATE @RequiredArgsConstructor(access = PRIVATE) public class JBake { public static void main(final String[] args) throws Exception { +System.out.println(); +System.out.println(); +System.out.println(); +System.out.println(); +System.out.println(); +System.out.println(); +System.out.println(); +System.out.println(); +System.out.println("WARNING: site moved to https://git-wip-us.apache.org/repos/asf/tomee-tomee-site-generator.git;); +System.out.println(); +System.out.println("Think to use that repository, this one will be soon dropped off"); +System.out.println(); +System.out.println(); +System.out.println(); +System.out.println(); +System.out.println(); +System.out.println(); +System.out.println(); +System.out.println(); +System.out.println(); +System.out.println(); + System.setProperty("java.util.concurrent.ForkJoinPool.common.parallelism", "64"); // try to have parallelStream better than default final File source = args == null || args.length < 1 ? new File("src/main/jbake") : new File(args[0]);
[32/35] tomee-tomee-site-generator git commit: import from old website
http://git-wip-us.apache.org/repos/asf/tomee-tomee-site-generator/blob/972cc356/src/main/jbake/assets/css/animate.css -- diff --git a/src/main/jbake/assets/css/animate.css b/src/main/jbake/assets/css/animate.css new file mode 100755 index 000..e1a54e2 --- /dev/null +++ b/src/main/jbake/assets/css/animate.css @@ -0,0 +1,3391 @@ +@charset "UTF-8"; + +/*! +Animate.css - http://daneden.me/animate +Licensed under the MIT license - http://opensource.org/licenses/MIT + +Copyright (c) 2015 Daniel Eden +*/ + +.animated { + -webkit-animation-duration: .3s; + animation-duration: .3s; + -webkit-animation-fill-mode: both; + animation-fill-mode: both; +} + +.animated.infinite { + -webkit-animation-iteration-count: infinite; + -webkit-animation-duration: 1s; + animation-duration: 1s; + animation-iteration-count: infinite; +} + +.animated.hinge { + -webkit-animation-duration: 2s; + animation-duration: 2s; +} + +@-webkit-keyframes bounce { + 0%, 20%, 53%, 80%, 100% { +-webkit-transition-timing-function: cubic-bezier(0.215, 0.610, 0.355, 1.000); +transition-timing-function: cubic-bezier(0.215, 0.610, 0.355, 1.000); +-webkit-transform: translate3d(0,0,0); +transform: translate3d(0,0,0); + } + + 40%, 43% { +-webkit-transition-timing-function: cubic-bezier(0.755, 0.050, 0.855, 0.060); +transition-timing-function: cubic-bezier(0.755, 0.050, 0.855, 0.060); +-webkit-transform: translate3d(0, -30px, 0); +transform: translate3d(0, -30px, 0); + } + + 70% { +-webkit-transition-timing-function: cubic-bezier(0.755, 0.050, 0.855, 0.060); +transition-timing-function: cubic-bezier(0.755, 0.050, 0.855, 0.060); +-webkit-transform: translate3d(0, -15px, 0); +transform: translate3d(0, -15px, 0); + } + + 90% { +-webkit-transform: translate3d(0,-4px,0); +transform: translate3d(0,-4px,0); + } +} + +@keyframes bounce { + 0%, 20%, 53%, 80%, 100% { +-webkit-transition-timing-function: cubic-bezier(0.215, 0.610, 0.355, 1.000); +transition-timing-function: cubic-bezier(0.215, 0.610, 0.355, 1.000); +-webkit-transform: translate3d(0,0,0); +-ms-transform: translate3d(0,0,0); +transform: translate3d(0,0,0); + } + + 40%, 43% { +-webkit-transition-timing-function: cubic-bezier(0.755, 0.050, 0.855, 0.060); +transition-timing-function: cubic-bezier(0.755, 0.050, 0.855, 0.060); +-webkit-transform: translate3d(0, -30px, 0); +-ms-transform: translate3d(0, -30px, 0); +transform: translate3d(0, -30px, 0); + } + + 70% { +-webkit-transition-timing-function: cubic-bezier(0.755, 0.050, 0.855, 0.060); +transition-timing-function: cubic-bezier(0.755, 0.050, 0.855, 0.060); +-webkit-transform: translate3d(0, -15px, 0); +-ms-transform: translate3d(0, -15px, 0); +transform: translate3d(0, -15px, 0); + } + + 90% { +-webkit-transform: translate3d(0,-4px,0); +-ms-transform: translate3d(0,-4px,0); +transform: translate3d(0,-4px,0); + } +} + +.bounce { + -webkit-animation-name: bounce; + animation-name: bounce; + -webkit-transform-origin: center bottom; + -ms-transform-origin: center bottom; + transform-origin: center bottom; +} + +@-webkit-keyframes flash { + 0%, 100% { +opacity: 1; + } + + 50% { +opacity: 0; + } +} + +@keyframes flash { + 0%, 100% { +opacity: 1; + } + + 50% { +opacity: 0; + } +} + +.flash { + -webkit-animation-name: flash; + animation-name: flash; +} + +/* originally authored by Nick Pettit - https://github.com/nickpettit/glide */ + +@-webkit-keyframes pulse { + 0% { +-webkit-transform: scale3d(1, 1, 1); +transform: scale3d(1, 1, 1); + } + + 50% { +-webkit-transform: scale3d(1.05, 1.05, 1.05); +transform: scale3d(1.05, 1.05, 1.05); + } + + 100% { +-webkit-transform: scale3d(1, 1, 1); +transform: scale3d(1, 1, 1); + } +} + +@keyframes pulse { + 0% { +-webkit-transform: scale3d(1, 1, 1); +-ms-transform: scale3d(1, 1, 1); +transform: scale3d(1, 1, 1); + } + + 50% { +-webkit-transform: scale3d(1.05, 1.05, 1.05); +-ms-transform: scale3d(1.05, 1.05, 1.05); +transform: scale3d(1.05, 1.05, 1.05); + } + + 100% { +-webkit-transform: scale3d(1, 1, 1); +-ms-transform: scale3d(1, 1, 1); +transform: scale3d(1, 1, 1); + } +} + +.pulse { + -webkit-animation-name: pulse; + animation-name: pulse; +} + +@-webkit-keyframes rubberBand { + 0% { +-webkit-transform: scale3d(1, 1, 1); +transform: scale3d(1, 1, 1); + } + + 30% { +-webkit-transform: scale3d(1.25, 0.75, 1); +transform: scale3d(1.25, 0.75, 1); + } + + 40% { +-webkit-transform: scale3d(0.75, 1.25, 1); +transform: scale3d(0.75, 1.25, 1); + } + + 50% { +-webkit-transform: scale3d(1.15, 0.85, 1); +transform: scale3d(1.15, 0.85, 1); + } + + 65% { +-webkit-transform: scale3d(.95, 1.05, 1); +transform: scale3d(.95, 1.05, 1); + } + + 75% { +
[04/35] tomee-tomee-site-generator git commit: import from old website
http://git-wip-us.apache.org/repos/asf/tomee-tomee-site-generator/blob/972cc356/src/main/jbake/content/examples/testing-security-2.adoc -- diff --git a/src/main/jbake/content/examples/testing-security-2.adoc b/src/main/jbake/content/examples/testing-security-2.adoc new file mode 100755 index 000..c8a2491 --- /dev/null +++ b/src/main/jbake/content/examples/testing-security-2.adoc @@ -0,0 +1,306 @@ += Testing Security 2 +:jbake-date: 2016-09-06 +:jbake-type: page +:jbake-tomeepdf: +:jbake-status: published + +Example testing-security-2 can be browsed at https://github.com/apache/tomee/tree/master/examples/testing-security-2 + + +*Help us document this example! Click the blue pencil icon in the upper right to edit this page.* + +== Movie + + +[source,java] + +package org.superbiz.injection.secure; + +import javax.persistence.Entity; + +@Entity +public class Movie { + +private String director; +private String title; +private int year; + +public Movie() { +} + +public Movie(String director, String title, int year) { +this.director = director; +this.title = title; +this.year = year; +} + +public String getDirector() { +return director; +} + +public void setDirector(String director) { +this.director = director; +} + +public String getTitle() { +return title; +} + +public void setTitle(String title) { +this.title = title; +} + +public int getYear() { +return year; +} + +public void setYear(int year) { +this.year = year; +} + +} + + + +== Movies + + +[source,java] + +package org.superbiz.injection.secure; + +//START SNIPPET: code + +import javax.annotation.security.PermitAll; +import javax.annotation.security.RolesAllowed; +import javax.ejb.Stateful; +import javax.ejb.TransactionAttribute; +import javax.ejb.TransactionAttributeType; +import javax.persistence.EntityManager; +import javax.persistence.PersistenceContext; +import javax.persistence.PersistenceContextType; +import javax.persistence.Query; +import java.util.List; + +@Stateful +public class Movies { + +@PersistenceContext(unitName = "movie-unit", type = PersistenceContextType.EXTENDED) +private EntityManager entityManager; + +@RolesAllowed({"Employee", "Manager"}) +public void addMovie(Movie movie) throws Exception { +entityManager.persist(movie); +} + +@RolesAllowed({"Manager"}) +public void deleteMovie(Movie movie) throws Exception { +entityManager.remove(movie); +} + +@PermitAll +@TransactionAttribute(TransactionAttributeType.SUPPORTS) +public List getMovies() throws Exception { +Query query = entityManager.createQuery("SELECT m from Movie as m"); +return query.getResultList(); +} +} + + + +== persistence.xml + + +[source,xml] + +http://java.sun.com/xml/ns/persistence; version="1.0"> + + +movieDatabase +movieDatabaseUnmanaged +org.superbiz.injection.secure.Movie + + + + + + + + + +== MovieTest + + +[source,java] + +package org.superbiz.injection.secure; + +import junit.framework.TestCase; + +import javax.ejb.EJB; +import javax.ejb.EJBAccessException; +import javax.ejb.embeddable.EJBContainer; +import javax.naming.Context; +import javax.naming.InitialContext; +import java.util.List; +import java.util.Properties; + +//START SNIPPET: code +public class MovieTest extends TestCase { + +@EJB +private Movies movies; + +protected void setUp() throws Exception { + +// Uncomment this line to set the login/logout functionality on Debug +//System.setProperty("log4j.category.OpenEJB.security", "debug"); + +Properties p = new Properties(); +p.put("movieDatabase", "new://Resource?type=DataSource"); +p.put("movieDatabase.JdbcDriver", "org.hsqldb.jdbcDriver"); +p.put("movieDatabase.JdbcUrl", "jdbc:hsqldb:mem:moviedb"); + +EJBContainer.createEJBContainer(p).getContext().bind("inject", this); +} + +public void testAsManager() throws Exception { +Properties p = new Properties(); +p.put(Context.INITIAL_CONTEXT_FACTORY, "org.apache.openejb.core.LocalInitialContextFactory"); +p.put(Context.SECURITY_PRINCIPAL, "jane"); +p.put(Context.SECURITY_CREDENTIALS, "waterfall"); + +InitialContext context = new InitialContext(p); + +try { +movies.addMovie(new Movie("Quentin Tarantino", "Reservoir Dogs", 1992)); +movies.addMovie(new Movie("Joel Coen", "Fargo", 1996)); +movies.addMovie(new Movie("Joel Coen", "The Big Lebowski", 1998)); + +List list = movies.getMovies(); +assertEquals("List.size()", 3, list.size()); + +for (Movie movie : list) { +movies.deleteMovie(movie); +} + +
[33/35] tomee-tomee-site-generator git commit: import from old website
http://git-wip-us.apache.org/repos/asf/tomee-tomee-site-generator/blob/972cc356/pom.xml -- diff --git a/pom.xml b/pom.xml new file mode 100755 index 000..a479edc --- /dev/null +++ b/pom.xml @@ -0,0 +1,127 @@ + +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/xsd/maven-4.0.0.xsd;> + 4.0.0 + + org.apache.tomee + site + 1.0-SNAPSHOT + Apache TomEE :: WebSite NG + + +7.0.3 +false +false + +UTF-8 + + + + + org.asciidoctor + asciidoctorj-pdf + 1.5.0-alpha.11 + + + org.asciidoctor + asciidoctorj + 1.5.4 + + + org.projectlombok + lombok + 1.16.12 + provided + + + org.apache.geronimo.specs + geronimo-json_1.0_spec + 1.0-alpha-1 + + + org.apache.johnzon + johnzon-jaxrs + 0.9.5 + + + org.apache.cxf + cxf-rt-rs-client + 3.1.8 + + + org.apache.tomee + javaee-api + 7.0-1 + + + org.apache.tomee + tomee-embedded + ${tomee.version} + + + org.jbake + jbake-core + 2.4.0 + + + org.slf4j + jul-to-slf4j + + + + + org.codehaus.groovy + groovy + 2.3.11 + + + org.codehaus.groovy + groovy-templates + 2.3.11 + + + org.pegdown + pegdown + 1.6.0 + + + + + + +org.apache.maven.plugins +maven-compiler-plugin +3.5.1 + + 1.8 + 1.8 + + + +org.codehaus.mojo +exec-maven-plugin +1.5.0 + + +tomee-site +compile + + java + + + + + true + org.apache.tomee.website.JBake + +${project.basedir}/src/main/jbake/ + ${project.build.directory}/${project.build.finalName} +${jbake.http} +${jbake.pdf} + + + + + + http://git-wip-us.apache.org/repos/asf/tomee-tomee-site-generator/blob/972cc356/src/main/java/org/apache/tomee/website/Contributors.java -- diff --git a/src/main/java/org/apache/tomee/website/Contributors.java b/src/main/java/org/apache/tomee/website/Contributors.java new file mode 100755 index 000..fb4d0bf --- /dev/null +++ b/src/main/java/org/apache/tomee/website/Contributors.java @@ -0,0 +1,222 @@ +/* + * 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.apache.tomee.website; + +import lombok.Builder; +import lombok.Data; +import org.apache.johnzon.jaxrs.JohnzonProvider; + +import javax.net.ssl.HttpsURLConnection; +import javax.ws.rs.client.ClientBuilder; +import javax.ws.rs.client.WebTarget; +import javax.ws.rs.core.MediaType; +import javax.ws.rs.core.Response; +import java.io.BufferedReader; +import java.io.IOException; +import java.io.StringReader; +import java.io.UnsupportedEncodingException; +import java.security.MessageDigest; +import java.security.NoSuchAlgorithmException; +import java.util.ArrayList; +import java.util.Collection; +import java.util.Collections; +import java.util.List; +import java.util.concurrent.ExecutorService; +import java.util.concurrent.Executors; +import java.util.concurrent.TimeUnit; +import java.util.stream.Stream; + +import static java.util.Collections.emptyList; +import static java.util.Optional.ofNullable; +import static java.util.stream.Collectors.toList; + +public class Contributors { +private static final String GRAVATAR_BASE = "http://fr.gravatar.com/;; + +private Contributors() { +// no-op +} + +public static Contributor singleLoad(final WebTarget target, final String input) throws IOException { +try { +return ofNullable(loadGravatar(target, input)).orElse(loadStatic(input)); +} catch (Exception e) { +e.printStackTrace(); +return