[tomee] branch master updated: Create README_es.adoc

2019-02-05 Thread dblevins
This is an automated email from the ASF dual-hosted git repository.

dblevins 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 a8211f1  Create README_es.adoc
 new 87cbe4c  Merge pull request #381 from fost14oct/TOMEE-2459
a8211f1 is described below

commit a8211f1747a4511ca2fea868efabaf07c4139e94
Author: fost14oct <36649784+fost14...@users.noreply.github.com>
AuthorDate: Sat Jan 26 14:39:04 2019 -0600

Create README_es.adoc
---
 examples/access-timeout-meta/README_es.adoc | 287 
 1 file changed, 287 insertions(+)

diff --git a/examples/access-timeout-meta/README_es.adoc 
b/examples/access-timeout-meta/README_es.adoc
new file mode 100644
index 000..8b7dac9
--- /dev/null
+++ b/examples/access-timeout-meta/README_es.adoc
@@ -0,0 +1,287 @@
+= @AccessTimeout la forma  Meta-Annotation 
+:index-group: Meta-Annotations
+:jbake-type: page
+:jbake-status: status=published
+ifdef::env-github[]
+:tip-caption: :bulb:
+:note-caption: :information_source:
+:important-caption: :heavy_exclamation_mark:
+:caution-caption: :fire:
+:stylesheet: ../github-stylesheet.css
+endif::[]
+
+== Introducción
+Cualquier anotación que reciba parámetros se puede beneficiar de las 
meta-annotations. Aquí obsvervamos cómo `@AccessTimeout` puede ser más facíl de 
comprender y administrar mediante meta-annotatios.
+Usaremos [access-timeout](../access-timeout/README.html) como nuestro ejemplo 
de caso de uso.
+
+El valor de los parámetros suministrador a `@AccessTimeout` tienen un efecto 
dramático en lo que la anotación realmente hace. Además, `@AccessTimeout` tiene 
uno de esos diseños
+donde `-1` y `0` tienen un significado totalmente diferente. Uno quiere decir 
"espera por siempre", el otro "nunca esperes". Solo algunos con suerte pueden 
recordar cual es cual.
+Para el resto de nosotros es una fuente constante de bugs.
+
+TIP: Meta-Annotations al rescate!
+
+
+== *_Creando Meta-Annotations_*
+
+Con respecto a las mejores prácticas, pondremos nuestras meta-annotations en 
el paquete llamado `api`, para este ejempo que nos da 
`org.superbiz.accesstimeout.api`. El paquete `org.superbiz.api` también 
funcionará.
+
+
+La idea básica es tener un paquete donde anotaciones "aprovadas" sean usadas y 
prohibr uso de versiones non-meta de anotaciones. Toda la configuración
+estará centralizada en el paquete `api`  y cambios en los valores de tiempo de 
espera estarán localizados en ese paquete y automaticamente reflejados a través 
de toda la aplicación.
+
+Un efecto secundario interesante de este enfoque es que si el paquete `api` 
donde las definiciones de meta-annotation  existe ubicado en un jar separado, 
entonces efectivamente alguien
+puede cambiar toda la configuración de una aplicación simplemente remplazando 
el jar `api`.
+
+
+=== @Metatype [.small]#La Meta-Annotation"  root"#
+
+Así como  con todo el uso meta-annotation, primero debes de crear tu propia 
meta-annotation "root". Esto es tan facil como crear una anotación
+llamada `Metatype` que esta anotada con esta misma anotación y tiene un 
`ElementType.ANNOTATION_TYPE` como su objetivo.
+
+
+[source,java,numbered]
+
+package org.superbiz.accesstimeout.api;
+
+import java.lang.annotation.ElementType;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.lang.annotation.Target;
+
+@Metatype
+@Retention(RetentionPolicy.RUNTIME)
+@Target(ElementType.ANNOTATION_TYPE)
+public @interface Metatype {
+}
+
+
+=== @AwaitNever
+
+Cuando la anotacion `@AccessTimeout` tiene el valor de `0` que tiene la 
implicación que nunca debe de esperar para acceder al bean. Si el bean esta 
ocupado, el que lo llama inmediatamente
+recibirá una `ConcurrentAccessException`. Esto es difícil de recordar y 
definitivamente no es auto-documentado para aquellos que nunca conocieron los 
detalles.
+
+Para crear una version de la meta-annotation `@AccessTimeout(0)` nosotros 
simplemente debemos pensar un buen nombre de anotación, crear esa anotación y 
anotarla con ambas `@AccessTimeout`
+y `@Metatype`
+
+
+[source,java,numbered]
+
+package org.superbiz.accesstimeout.api;
+
+import javax.ejb.AccessTimeout;
+import java.lang.annotation.ElementType;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.lang.annotation.Target;
+
+@Metatype
+@Retention(RetentionPolicy.RUNTIME)
+@Target(ElementType.METHOD)
+
+@AccessTimeout(0)
+public @interface AwaitNever {
+}
+
+
+=== @AwaitForever
+
+Así como `0` tiene su significado especial como "nunca esperes" , el valor de 
`-1` quiere decir "espera por siempre."
+
+Mientras seamos exigentes, lo que podemos hacer con las meta-anotaciones,
+técincamente "esperar por siempre" no es la mejor descripción. Actualmete los 
métodos de `javax.util.concurrent` APIs usan "await" en vez de "wait". Un 
(wait) probablemente 

[jira] [Updated] (TOMEE-2465) JDK 11 compatibility on Tomee 7.1.1

2019-02-05 Thread Lithi (JIRA)


 [ 
https://issues.apache.org/jira/browse/TOMEE-2465?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Lithi updated TOMEE-2465:
-
Summary: JDK 11 compatibility on Tomee 7.1.1  (was: JDK 11 compatibility)

> JDK 11 compatibility on Tomee 7.1.1
> ---
>
> Key: TOMEE-2465
> URL: https://issues.apache.org/jira/browse/TOMEE-2465
> Project: TomEE
>  Issue Type: Bug
>Affects Versions: 7.1.1
>Reporter: Lithi
>Priority: Major
>
> In order to make 7.1.1 version compatible with JDK 11, Do you plan to report 
> the fix done for 
> -TOMEE-2272
> -+ jdk 11 compatibility on LocalBeanProxyFactory.java (cf 
> 37e56343b92996ef3bed4535a2728c034f8d7725)
> ?
> Thanks



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Created] (TOMEE-2465) JDK 11 compatibility

2019-02-05 Thread Lithi (JIRA)
Lithi created TOMEE-2465:


 Summary: JDK 11 compatibility
 Key: TOMEE-2465
 URL: https://issues.apache.org/jira/browse/TOMEE-2465
 Project: TomEE
  Issue Type: Bug
Affects Versions: 7.1.1
Reporter: Lithi


In order to make 7.1.1 version compatible with JDK 11, Do you plan to report 
the fix done for 

-TOMEE-2272
-+ jdk 11 compatibility on LocalBeanProxyFactory.java (cf 
37e56343b92996ef3bed4535a2728c034f8d7725)

?

Thanks



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[tomee] branch master updated: TOMEE-2408 - Register MP Observers only one time.

2019-02-05 Thread radcortez
This is an automated email from the ASF dual-hosted git repository.

radcortez 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 0fbfd06  TOMEE-2408 - Register MP Observers only one time.
0fbfd06 is described below

commit 0fbfd0640b6397bb99336b2d5f8e277e25c99b94
Author: Roberto Cortez 
AuthorDate: Tue Feb 5 15:27:19 2019 +

TOMEE-2408 - Register MP Observers only one time.
---
 .../org/apache/tomee/catalina/TomcatLoader.java|  2 ++
 .../microprofile/TomEEMicroProfileService.java | 33 ++
 .../META-INF/org.apache.openejb.extension  |  1 -
 3 files changed, 35 insertions(+), 1 deletion(-)

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 79dcbee..b3dbb32 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
@@ -215,6 +215,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.TomEEMicroProfileService");
+
 // tomee webapp enricher
 final TomEEClassLoaderEnricher classLoaderEnricher = new 
TomEEClassLoaderEnricher();
 SystemInstance.get().setComponent(WebAppEnricher.class, 
classLoaderEnricher);
diff --git 
a/tomee/tomee-microprofile/mp-common/src/main/java/org/apache/tomee/microprofile/TomEEMicroProfileService.java
 
b/tomee/tomee-microprofile/mp-common/src/main/java/org/apache/tomee/microprofile/TomEEMicroProfileService.java
new file mode 100644
index 000..3601867
--- /dev/null
+++ 
b/tomee/tomee-microprofile/mp-common/src/main/java/org/apache/tomee/microprofile/TomEEMicroProfileService.java
@@ -0,0 +1,33 @@
+/*
+ * 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.loader.SystemInstance;
+import org.apache.openejb.spi.Service;
+
+import java.util.Properties;
+
+public class TomEEMicroProfileService implements Service {
+static {
+SystemInstance.get().addObserver(new TomEEMicroProfileListener());
+}
+
+@Override
+public void init(final Properties props) throws Exception {
+
+}
+}
diff --git 
a/tomee/tomee-microprofile/mp-common/src/main/resources/META-INF/org.apache.openejb.extension
 
b/tomee/tomee-microprofile/mp-common/src/main/resources/META-INF/org.apache.openejb.extension
deleted file mode 100644
index 3192713..000
--- 
a/tomee/tomee-microprofile/mp-common/src/main/resources/META-INF/org.apache.openejb.extension
+++ /dev/null
@@ -1 +0,0 @@
-org.apache.tomee.microprofile.TomEEMicroProfileListener



[jira] [Created] (TOMEE-2464) embedded-maven-plugin throws on exception on shutdown

2019-02-05 Thread Thomas Andraschko (JIRA)
Thomas Andraschko created TOMEE-2464:


 Summary: embedded-maven-plugin throws on exception on shutdown
 Key: TOMEE-2464
 URL: https://issues.apache.org/jira/browse/TOMEE-2464
 Project: TomEE
  Issue Type: Bug
  Components: TomEE Maven Plugin
Affects Versions: 8.0.0-M2, 8.0.0-M1
Reporter: Thomas Andraschko


[INFO] Pausing ProtocolHandler ["http-nio-8080"]
[INFO] Pausing ProtocolHandler ["ajp-nio-8009"]
[INFO] Stopping service [Catalina]
org.apache.catalina.LifecycleException: Failed to stop component 
[StandardEngine[Catalina]]
    at 
org.apache.catalina.util.LifecycleBase.handleSubClassException(LifecycleBase.java:441)
    at org.apache.catalina.util.LifecycleBase.stop(LifecycleBase.java:267)
    at 
org.apache.catalina.core.StandardService.stopInternal(StandardService.java:474)
    at org.apache.catalina.util.LifecycleBase.stop(LifecycleBase.java:257)
    at 
org.apache.catalina.core.StandardServer.stopInternal(StandardServer.java:791)
    at org.apache.catalina.util.LifecycleBase.stop(LifecycleBase.java:257)
    at org.apache.catalina.startup.Tomcat.stop(Tomcat.java:380)
    at org.apache.tomee.embedded.Container.stop(Container.java:846)
    at 
org.apache.openejb.maven.plugins.TomEEEmbeddedMojo$2.run(TomEEEmbeddedMojo.java:425)
Caused by: java.lang.NoClassDefFoundError: 
org/apache/catalina/core/ContainerBase$StopChild
    at 
org.apache.catalina.core.ContainerBase.stopInternal(ContainerBase.java:1001)
    at org.apache.catalina.util.LifecycleBase.stop(LifecycleBase.java:257)
    ... 7 more
Caused by: java.lang.ClassNotFoundException: 
org.apache.catalina.core.ContainerBase$StopChild
    at 
org.codehaus.plexus.classworlds.strategy.SelfFirstStrategy.loadClass(SelfFirstStrategy.java:50)
    at 
org.codehaus.plexus.classworlds.realm.ClassRealm.unsynchronizedLoadClass(ClassRealm.java:271)
    at 
org.codehaus.plexus.classworlds.realm.ClassRealm.loadClass(ClassRealm.java:247)
    at 
org.codehaus.plexus.classworlds.realm.ClassRealm.loadClass(ClassRealm.java:239)
    ... 9 more


Still on Java8.
It's a simple webapp, configured with tomee-embedded-maven-plugin M2 and a 
overwritten inlinedServerXml, to configure our own loginDataSource.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)