tomee git commit: Use fixed keystores instead of an Ant task to speed up build and make it more determinisic
Repository: tomee Updated Branches: refs/heads/tomee-1.7.x 679692347 -> bc00763ca Use fixed keystores instead of an Ant task to speed up build and make it more determinisic Project: http://git-wip-us.apache.org/repos/asf/tomee/repo Commit: http://git-wip-us.apache.org/repos/asf/tomee/commit/bc00763c Tree: http://git-wip-us.apache.org/repos/asf/tomee/tree/bc00763c Diff: http://git-wip-us.apache.org/repos/asf/tomee/diff/bc00763c Branch: refs/heads/tomee-1.7.x Commit: bc00763ca916a6e8d81b29edd35736635399b7c2 Parents: 6796923 Author: Jonathan S. FisherAuthored: Thu Jun 22 14:37:34 2017 -0500 Committer: Jonathan S. Fisher Committed: Thu Jun 22 14:37:34 2017 -0500 -- .../webservice-ws-security/create-keystores.xml | 198 --- examples/webservice-ws-security/pom.xml | 19 -- .../src/main/resources/META-INF/clientStore.jks | Bin 0 -> 2830 bytes .../src/main/resources/META-INF/serverStore.jks | Bin 0 -> 2830 bytes 4 files changed, 217 deletions(-) -- http://git-wip-us.apache.org/repos/asf/tomee/blob/bc00763c/examples/webservice-ws-security/create-keystores.xml -- diff --git a/examples/webservice-ws-security/create-keystores.xml b/examples/webservice-ws-security/create-keystores.xml deleted file mode 100644 index cfd0cbf..000 --- a/examples/webservice-ws-security/create-keystores.xml +++ /dev/null @@ -1,198 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - http://git-wip-us.apache.org/repos/asf/tomee/blob/bc00763c/examples/webservice-ws-security/pom.xml -- diff --git a/examples/webservice-ws-security/pom.xml b/examples/webservice-ws-security/pom.xml index 85956d7..5c0e9b0 100644 --- a/examples/webservice-ws-security/pom.xml +++ b/examples/webservice-ws-security/pom.xml @@ -112,25 +112,6 @@ - -org.apache.maven.plugins -maven-antrun-plugin -1.7 - - -generate-keys -process-test-resources - - run - - - - - - - - -
[jira] [Created] (TOMEE-2075) Don't try to close the entity manager if not created
Romain Manni-Bucau created TOMEE-2075: - Summary: Don't try to close the entity manager if not created Key: TOMEE-2075 URL: https://issues.apache.org/jira/browse/TOMEE-2075 Project: TomEE Issue Type: Improvement Reporter: Romain Manni-Bucau Assignee: Romain Manni-Bucau Fix For: 7.0.4 -- This message was sent by Atlassian JIRA (v6.4.14#64029)
[jira] [Resolved] (TOMEE-2075) Don't try to close the entity manager if not created
[ https://issues.apache.org/jira/browse/TOMEE-2075?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Romain Manni-Bucau resolved TOMEE-2075. --- Resolution: Fixed > Don't try to close the entity manager if not created > > > Key: TOMEE-2075 > URL: https://issues.apache.org/jira/browse/TOMEE-2075 > Project: TomEE > Issue Type: Improvement >Reporter: Romain Manni-Bucau >Assignee: Romain Manni-Bucau > Fix For: 7.0.4 > > -- This message was sent by Atlassian JIRA (v6.4.14#64029)
tomee git commit: TOMEE-2074 ensure JndiExceptionOnFailedWrite is propagated, patch from Svetlin Zarev
Repository: tomee Updated Branches: refs/heads/master 317a58069 -> 3536f0b2d TOMEE-2074 ensure JndiExceptionOnFailedWrite is propagated, patch from Svetlin Zarev Project: http://git-wip-us.apache.org/repos/asf/tomee/repo Commit: http://git-wip-us.apache.org/repos/asf/tomee/commit/3536f0b2 Tree: http://git-wip-us.apache.org/repos/asf/tomee/tree/3536f0b2 Diff: http://git-wip-us.apache.org/repos/asf/tomee/diff/3536f0b2 Branch: refs/heads/master Commit: 3536f0b2df3dc18b2fc501285e467f8384f1b642 Parents: 317a580 Author: rmannibucauAuthored: Thu Jun 22 17:01:56 2017 +0200 Committer: rmannibucau Committed: Thu Jun 22 17:01:56 2017 +0200 -- .../tests/tomcat/contextxml/NamingServlet.java | 70 +++ ...omcatNamingFailOnWriteConfigurationTest.java | 118 +++ .../tomcat/contextxml/do_not_fail_on_write.xml | 20 .../tests/tomcat/contextxml/fail_on_write.xml | 20 .../catalina/startup/OpenEJBContextConfig.java | 9 ++ 5 files changed, 237 insertions(+) -- http://git-wip-us.apache.org/repos/asf/tomee/blob/3536f0b2/arquillian/arquillian-tomee-tests/arquillian-tomee-webprofile-tests/src/test/java/org/apache/openejb/arquillian/tests/tomcat/contextxml/NamingServlet.java -- diff --git a/arquillian/arquillian-tomee-tests/arquillian-tomee-webprofile-tests/src/test/java/org/apache/openejb/arquillian/tests/tomcat/contextxml/NamingServlet.java b/arquillian/arquillian-tomee-tests/arquillian-tomee-webprofile-tests/src/test/java/org/apache/openejb/arquillian/tests/tomcat/contextxml/NamingServlet.java new file mode 100644 index 000..0f87fe4 --- /dev/null +++ b/arquillian/arquillian-tomee-tests/arquillian-tomee-webprofile-tests/src/test/java/org/apache/openejb/arquillian/tests/tomcat/contextxml/NamingServlet.java @@ -0,0 +1,70 @@ +/** + * 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.arquillian.tests.tomcat.contextxml; + + +import javax.naming.Context; +import javax.naming.InitialContext; +import javax.naming.OperationNotSupportedException; +import javax.servlet.ServletException; +import javax.servlet.http.HttpServlet; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; +import java.io.IOException; +import java.io.PrintWriter; +import java.lang.reflect.InvocationTargetException; +import java.lang.reflect.Method; + +public class NamingServlet extends HttpServlet { + +@Override +protected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException { +final PrintWriter writer = resp.getWriter(); +final String testToExecute = req.getParameter("test"); + +try { +final Method method = this.getClass().getDeclaredMethod(testToExecute); +method.invoke(this); +writer.println(testToExecute + "=true"); +} catch (Exception ex) { +final Throwable rootCause = ex instanceof InvocationTargetException ? ex.getCause() : ex; +writer.println(testToExecute + "=false"); +rootCause.printStackTrace(writer); +} +} + +public void closeNamingContextAndExpectNoException() throws Exception { +final InitialContext initialContext = new InitialContext(); +final Context compEnv = (Context) initialContext.lookup("java:comp/env"); +compEnv.close(); +} + +public void closeNamingContextAndExpectOperationNotSupportedException() throws Exception { +try { +final InitialContext initialContext = new InitialContext(); +final Context compEnv = (Context) initialContext.lookup("java:comp/env"); +compEnv.close(); + +throw new IllegalStateException("Context::close() should have thrown OperationNotSupportedException"); +} catch (OperationNotSupportedException ex) { +//Do nothing, expected +} catch (Exception ex) { +throw new
[jira] [Commented] (TOMEE-2074) TomcatWebAppBuilder does not correctly set NamingContextListener.setExceptionOnFailedWrite()
[ https://issues.apache.org/jira/browse/TOMEE-2074?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16059444#comment-16059444 ] ASF GitHub Bot commented on TOMEE-2074: --- GitHub user SvetlinZarev opened a pull request: https://github.com/apache/tomee/pull/77 TOMEE-2074: TomcatWebAppBuilder does not correctly set NamingContextListener.setExceptionOnFailedWrite() OpenEjbContextConfig should reconfigure the NamingContextListener after it process the context.xml Execution flow: 1. TomcatWebAppBuilder:890 creates new NamingContextLisener 2. TomcatWebAppBuilder sets the "exceptionOnFailedWrite" property on the NamingContextLisener to the value retrieved from the standard context - at this point in time it's the default value, because the context.xml has not been processed yet. 3. The context.xml is processed -> OpenEJBContextConfig::contextConfig() 4. The Digester sets that property on the StandardContext instance 5. The NamingContextListener configures the naming context namingContext.setExceptionOnFailedWrite(getExceptionOnFailedWrite()); Where getExceptionOnFailedWrite() returns the value we set in step 2 (i.e. it returns the default value). 6. As a result the naming context is not configured with the user-provided configuration in context.xml You can merge this pull request into a Git repository by running: $ git pull https://github.com/SvetlinZarev/tomee tomee-2074 Alternatively you can review and apply these changes as the patch at: https://github.com/apache/tomee/pull/77.patch To close this pull request, make a commit to your master/trunk branch with (at least) the following in the commit message: This closes #77 commit 9e2de13f3548a5ff31a9bd672a620a2fa1ab2e10 Author: Svetlin ZarevDate: 2017-06-22T13:23:03Z TOMEE-2074: Implement test which verifies that TomcatWebAppBuilder properly processes the jndiExceptionOnFailedWrite context attribute commit d38874d9a5a5e77a5e364bb909851ca07340d131 Author: Svetlin Zarev Date: 2017-06-22T14:03:01Z Fix TOMEE-2074 OpenEjbContextConfig should reconfigure the NamingContextListener --- 1. TomcatWebAppBuilder:890 creates new NamingContextLisener 2. TomcatWebAppBuilder sets the "exceptionOnFailedWrite" property on the NamingContextLisener to the value retrieved from the standard context - at this point in time it's the default value, because the context.xml has not been processed yet. 3. The context.xml is processed -> OpenEJBContextConfig::contextConfig() 4. The Digester sets that property on the StandardContext instance 5. The NamingContextListener configures the naming context namingContext.setExceptionOnFailedWrite(getExceptionOnFailedWrite()); Where getExceptionOnFailedWrite() returns the value we set in step 2 (i.e. it returns the default value). 6. As a result the naming context is not configured with the user-provided configuration in context.xml > TomcatWebAppBuilder does not correctly set > NamingContextListener.setExceptionOnFailedWrite() > -- > > Key: TOMEE-2074 > URL: https://issues.apache.org/jira/browse/TOMEE-2074 > Project: TomEE > Issue Type: Bug >Reporter: Svetlin Zarev > Attachments: sample.zip > > > The TomcatWebAppBuilder does not correctly set the > NamingContextListener.setExceptionOnFailedWrite() property - it always sets > the default value which is "true", instead of the one specified in the > context.xml > --- > *Execution flow:* > 1. TomcatWebAppBuilder:890 creates new NamingContextLisener > 2. TomcatWebAppBuilder sets the "exceptionOnFailedWrite" property on the > NamingContextLisener to the value retrieved from the standard context - at > this point in time it's the default value, because the context.xml has not > been processed yet. > 3. The context.xml is processed -> OpenEJBContextConfig::contextConfig() > 4. The Digester sets that property on the StandardContext instance > 5. The NamingContextListener configures the naming context > {code} > namingContext.setExceptionOnFailedWrite(getExceptionOnFailedWrite()); > {code} > Where getExceptionOnFailedWrite() returns the value we set in step 2 (i.e. it > returns the default value). > 6. As a result the naming context is not configured with the user-provided > configuration in context.xml > --- > *Steps to reproduce:* > 1. Edit /conf/context.xml and add > jndiExceptionOnFailedWrite='false' attribute to the context element. > {code} > > WEB-INF/web.xml > ${catalina.base}/conf/web.xml > > {code} > 2. Execute this simple servlet: > {code} >
buildbot success in on tomee-trunk-ubuntu-jvm8
The Buildbot has detected a restored build on builder tomee-trunk-ubuntu-jvm8 while building tomee. Full details are available at: https://ci.apache.org/builders/tomee-trunk-ubuntu-jvm8/builds/682 Buildbot URL: https://ci.apache.org/ Buildslave for this Build: bb_qnode5_ubuntu Build Reason: The SingleBranchScheduler scheduler named 'on-tomee-trunk-ubuntu-jvm8-commit' triggered this build Build Source Stamp: [branch master] 317a58069b1f12683354b1ea04419c0ba15500d1 Blamelist: rmannibucauBuild succeeded! Sincerely, -The Buildbot
[jira] [Updated] (TOMEE-2074) TomcatWebAppBuilder does not correctly set NamingContextListener.setExceptionOnFailedWrite()
[ https://issues.apache.org/jira/browse/TOMEE-2074?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Svetlin Zarev updated TOMEE-2074: - Description: The TomcatWebAppBuilder does not correctly set the NamingContextListener.setExceptionOnFailedWrite() property - it always sets the default value which is "true", instead of the one specified in the context.xml --- *Execution flow:* 1. TomcatWebAppBuilder:890 creates new NamingContextLisener 2. TomcatWebAppBuilder sets the "exceptionOnFailedWrite" property on the NamingContextLisener to the value retrieved from the standard context - at this point in time it's the default value, because the context.xml has not been processed yet. 3. The context.xml is processed -> OpenEJBContextConfig::contextConfig() 4. The Digester sets that property on the StandardContext instance 5. The NamingContextListener configures the naming context {code} namingContext.setExceptionOnFailedWrite(getExceptionOnFailedWrite()); {code} Where getExceptionOnFailedWrite() returns the value we set in step 2 (i.e. it returns the default value). 6. As a result the naming context is not configured with the user-provided configuration in context.xml --- *Steps to reproduce:* 1. Edit /conf/context.xml and add jndiExceptionOnFailedWrite='false' attribute to the context element. {code} WEB-INF/web.xml ${catalina.base}/conf/web.xml {code} 2. Execute this simple servlet: {code} @Override protected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException { resp.setContentType("text/plain"); final PrintWriter writer = resp.getWriter(); try { final InitialContext ctx = new InitialContext(); final Context compEnv = (Context) ctx.lookup("java:comp/env"); compEnv.close(); writer.println("Closed"); } catch (Exception ex) { writer.println("Failed to close context: "); ex.printStackTrace(writer); } } {code} WebApp is attached for convenience was: The TomcatWebAppBuilder does not correctly set the NamingContextListener.setExceptionOnFailedWrite() property - it always sets the default value which is "true", instead of the one specified in the context.xml --- *Execution flow:* 1. TomcatWebAppBuilder:890 creates new NamingContextLisener 2. TomcatWebAppBuilder sets the "exceptionOnFailedWrite" property on the NamingContextLisener to the value retrieved from the standard context - at this point in time it's the default value, because the context.xml has not been processed yet. 3. The context.xml is processed -> OpenEJBContextConfig::contextConfig() 4. The Digester sets that property on the StandardContext instance 5. The NamingContextListener configures the write-ability of the naming context {code} namingContext.setExceptionOnFailedWrite(getExceptionOnFailedWrite()); {code} Where getExceptionOnFailedWrite() returns the value we set in step 2 (i.e. it returns the default value). 6. As a result the naming context is not configured with the user-provided configuration in context.xml --- *Steps to reproduce:* 1. Edit /conf/context.xml and add jndiExceptionOnFailedWrite='false' attribute to the context element. {code} WEB-INF/web.xml ${catalina.base}/conf/web.xml {code} 2. Execute this simple servlet: {code} @Override protected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException { resp.setContentType("text/plain"); final PrintWriter writer = resp.getWriter(); try { final InitialContext ctx = new InitialContext(); final Context compEnv = (Context) ctx.lookup("java:comp/env"); compEnv.close(); writer.println("Closed"); } catch (Exception ex) { writer.println("Failed to close context: "); ex.printStackTrace(writer); } } {code} WebApp is attached for convenience > TomcatWebAppBuilder does not correctly set > NamingContextListener.setExceptionOnFailedWrite() > -- > > Key: TOMEE-2074 > URL: https://issues.apache.org/jira/browse/TOMEE-2074 > Project: TomEE > Issue Type: Bug >Reporter: Svetlin Zarev > Attachments: sample.zip > > > The TomcatWebAppBuilder does not correctly set the > NamingContextListener.setExceptionOnFailedWrite() property - it always sets > the default value which is "true", instead of the one specified in the > context.xml > --- > *Execution flow:* > 1. TomcatWebAppBuilder:890 creates new NamingContextLisener > 2. TomcatWebAppBuilder sets the "exceptionOnFailedWrite" property on the > NamingContextLisener to the value retrieved from the standard context - at > this point in
[jira] [Updated] (TOMEE-2074) TomcatWebAppBuilder does not correctly set NamingContextListener.setExceptionOnFailedWrite()
[ https://issues.apache.org/jira/browse/TOMEE-2074?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Svetlin Zarev updated TOMEE-2074: - Description: The TomcatWebAppBuilder does not correctly set the NamingContextListener.setExceptionOnFailedWrite() property - it always sets the default value which is "true", instead of the one specified in the context.xml --- *Execution flow:* 1. TomcatWebAppBuilder:890 creates new NamingContextLisener 2. TomcatWebAppBuilder sets the "exceptionOnFailedWrite" property on the NamingContextLisener to the value retrieved from the standard context - at this point in time it's the default value, because the context.xml has not been processed yet. 3. The context.xml is processed -> OpenEJBContextConfig::contextConfig() 4. The Digester sets that property on the StandardContext instance 5. The NamingContextListener configures the write-ability of the naming context {code} namingContext.setExceptionOnFailedWrite(getExceptionOnFailedWrite()); {code} Where getExceptionOnFailedWrite() returns the value we set in step 2 (i.e. it returns the default value). 6. As a result the naming context is not configured with the user-provided configuration in context.xml --- *Steps to reproduce:* 1. Edit /conf/context.xml and add jndiExceptionOnFailedWrite='false' attribute to the context element. {code} WEB-INF/web.xml ${catalina.base}/conf/web.xml {code} 2. Execute this simple servlet: {code} @Override protected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException { resp.setContentType("text/plain"); final PrintWriter writer = resp.getWriter(); try { final InitialContext ctx = new InitialContext(); final Context compEnv = (Context) ctx.lookup("java:comp/env"); compEnv.close(); writer.println("Closed"); } catch (Exception ex) { writer.println("Failed to close context: "); ex.printStackTrace(writer); } } {code} WebApp is attached for convenience was: The TomcatWebAppBuilder does not correctly set the NamingContextListener.setExceptionOnFailedWrite() property - it always sets the default value which is "true", instead of the one specified in the context.xml Execution flow: 1. TomcatWebAppBuilder:890 creates new NamingContextLisener 2. TomcatWebAppBuilder sets the "exceptionOnFailedWrite" property on the NamingContextLisener to the value retrieved from the standard context - at this point in time it's the default value, because the context.xml has not been processed yet. 3. The context.xml is processed -> OpenEJBContextConfig::contextConfig() 4. The Digester sets that property on the StandardContext instance 5. The NamingContextListener configures the write-ability of the naming context {code} namingContext.setExceptionOnFailedWrite(getExceptionOnFailedWrite()); {code} Where getExceptionOnFailedWrite() returns the value we set in step 2 (i.e. it returns the default value). 6. As a result the naming context is not configured with the user-provided configuration in context.xml Steps to reproduce: 1. Edit /conf/context.xml and add jndiExceptionOnFailedWrite='false' attribute to the context element. {code} WEB-INF/web.xml ${catalina.base}/conf/web.xml {code} 2. Execute this simple servlet: {code} @Override protected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException { resp.setContentType("text/plain"); final PrintWriter writer = resp.getWriter(); try { final InitialContext ctx = new InitialContext(); final Context compEnv = (Context) ctx.lookup("java:comp/env"); compEnv.close(); writer.println("Closed"); } catch (Exception ex) { writer.println("Failed to close context: "); ex.printStackTrace(writer); } } {code} WebApp is attached for convenience > TomcatWebAppBuilder does not correctly set > NamingContextListener.setExceptionOnFailedWrite() > -- > > Key: TOMEE-2074 > URL: https://issues.apache.org/jira/browse/TOMEE-2074 > Project: TomEE > Issue Type: Bug >Reporter: Svetlin Zarev > Attachments: sample.zip > > > The TomcatWebAppBuilder does not correctly set the > NamingContextListener.setExceptionOnFailedWrite() property - it always sets > the default value which is "true", instead of the one specified in the > context.xml > --- > *Execution flow:* > 1. TomcatWebAppBuilder:890 creates new NamingContextLisener > 2. TomcatWebAppBuilder sets the "exceptionOnFailedWrite" property on the > NamingContextLisener to the value retrieved from the standard context - at > this
[jira] [Created] (TOMEE-2074) TomcatWebAppBuilder does not correctly set NamingContextListener.setExceptionOnFailedWrite()
Svetlin Zarev created TOMEE-2074: Summary: TomcatWebAppBuilder does not correctly set NamingContextListener.setExceptionOnFailedWrite() Key: TOMEE-2074 URL: https://issues.apache.org/jira/browse/TOMEE-2074 Project: TomEE Issue Type: Bug Reporter: Svetlin Zarev Attachments: sample.zip The TomcatWebAppBuilder does not correctly set the NamingContextListener.setExceptionOnFailedWrite() property - it always sets the default value which is "true", instead of the one specified in the context.xml Execution flow: 1. TomcatWebAppBuilder:890 creates new NamingContextLisener 2. TomcatWebAppBuilder sets the "exceptionOnFailedWrite" property on the NamingContextLisener to the value retrieved from the standard context - at this point in time it's the default value, because the context.xml has not been processed yet. 3. The context.xml is processed -> OpenEJBContextConfig::contextConfig() 4. The Digester sets that property on the StandardContext instance 5. The NamingContextListener configures the write-ability of the naming context {code} namingContext.setExceptionOnFailedWrite(getExceptionOnFailedWrite()); {code} Where getExceptionOnFailedWrite() returns the value we set in step 2 (i.e. it returns the default value). 6. As a result the naming context is not configured with the user-provided configuration in context.xml Steps to reproduce: 1. Edit /conf/context.xml and add jndiExceptionOnFailedWrite='false' attribute to the context element. {code} WEB-INF/web.xml ${catalina.base}/conf/web.xml {code} 2. Execute this simple servlet: {code} @Override protected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException { resp.setContentType("text/plain"); final PrintWriter writer = resp.getWriter(); try { final InitialContext ctx = new InitialContext(); final Context compEnv = (Context) ctx.lookup("java:comp/env"); compEnv.close(); writer.println("Closed"); } catch (Exception ex) { writer.println("Failed to close context: "); ex.printStackTrace(writer); } } {code} WebApp is attached for convenience -- This message was sent by Atlassian JIRA (v6.4.14#64029)
tomee git commit: another patch from Svetlin to ensure EJB#beanName is used in any case - missing file
Repository: tomee Updated Branches: refs/heads/master ce3b5359b -> 317a58069 another patch from Svetlin to ensure EJB#beanName is used in any case - missing file Project: http://git-wip-us.apache.org/repos/asf/tomee/repo Commit: http://git-wip-us.apache.org/repos/asf/tomee/commit/317a5806 Tree: http://git-wip-us.apache.org/repos/asf/tomee/tree/317a5806 Diff: http://git-wip-us.apache.org/repos/asf/tomee/diff/317a5806 Branch: refs/heads/master Commit: 317a58069b1f12683354b1ea04419c0ba15500d1 Parents: ce3b535 Author: rmannibucauAuthored: Thu Jun 22 12:20:45 2017 +0200 Committer: rmannibucau Committed: Thu Jun 22 12:20:45 2017 +0200 -- ...DescriptorComplementsAnnotationsServlet.java | 95 1 file changed, 95 insertions(+) -- http://git-wip-us.apache.org/repos/asf/tomee/blob/317a5806/arquillian/arquillian-tomee-tests/arquillian-tomee-webprofile-tests/src/test/java/org/apache/openejb/arquillian/tests/core/ejb/ejbjar/DescriptorComplementsAnnotationsServlet.java -- diff --git a/arquillian/arquillian-tomee-tests/arquillian-tomee-webprofile-tests/src/test/java/org/apache/openejb/arquillian/tests/core/ejb/ejbjar/DescriptorComplementsAnnotationsServlet.java b/arquillian/arquillian-tomee-tests/arquillian-tomee-webprofile-tests/src/test/java/org/apache/openejb/arquillian/tests/core/ejb/ejbjar/DescriptorComplementsAnnotationsServlet.java new file mode 100644 index 000..60afec7 --- /dev/null +++ b/arquillian/arquillian-tomee-tests/arquillian-tomee-webprofile-tests/src/test/java/org/apache/openejb/arquillian/tests/core/ejb/ejbjar/DescriptorComplementsAnnotationsServlet.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://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.arquillian.tests.core.ejb.ejbjar; + + +import javax.ejb.EJB; +import javax.servlet.ServletException; +import javax.servlet.http.HttpServlet; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; +import java.io.IOException; +import java.io.PrintWriter; +import java.lang.reflect.InvocationTargetException; +import java.lang.reflect.Method; + +public class DescriptorComplementsAnnotationsServlet extends HttpServlet { + /* + * Check that the deployment descriptor will + * complement the information from the + * EJB annotation. For instance the bean interface + * is resolved from the EjbJar descriptor + */ + +@EJB(name = "ejb/first", beanName = "FirstBean") +Object first; + +@EJB(name = "ejb/second", beanName = "SecondBean") +Object second; + +//Check that the descriptor takes precedence over annotation -> override the bean name +@EJB(name = "ejb/override", beanName = "FirstBean") +Bean override; + +@Override +protected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException { +final PrintWriter writer = resp.getWriter(); +final String testToExecute = req.getParameter("test"); + +try { +final Method method = this.getClass().getDeclaredMethod(testToExecute); +method.invoke(this); +writer.println(testToExecute + "=true"); +} catch (Exception ex) { +final Throwable rootCause = ex instanceof InvocationTargetException ? ex.getCause() : ex; +writer.println(testToExecute + "=false"); +rootCause.printStackTrace(writer); +} +} + +public void verifyFirstBeanInjection() { +verifyBean(FirstBean.class, first); +} + +public void verifySecondBeanInjection() { +verifyBean(SecondBean.class, second); +} + +public void verifyOverridenBeanInjection() { +verifyBean(SecondBean.class, override); +} + +private void verifyBean(Class beanClass, Object beanInstance) { +if (null == beanInstance) { +throw new IllegalStateException("Expecting [" + beanClass + "] but the injected instance is null"); +} + +
[jira] [Commented] (TOMEE-2073) In some cases the EJB.beanName() is not processed
[ https://issues.apache.org/jira/browse/TOMEE-2073?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16059074#comment-16059074 ] Svetlin Zarev commented on TOMEE-2073: -- Added: https://github.com/apache/tomee/pull/76/commits/2d79425f6512a122d7264b1f47388b201c91fb64 > In some cases the EJB.beanName() is not processed > - > > Key: TOMEE-2073 > URL: https://issues.apache.org/jira/browse/TOMEE-2073 > Project: TomEE > Issue Type: Bug >Reporter: Svetlin Zarev > > In some cases the EJB.beanName() is not processed, which results in incorrect > bean resolution. > For instance in the test case from the PR, the ejb-jar descriptor should > complement the information from the EJB annotation. What actually happens is > that the value from the bean name attribute gets ignored, and a wrong bean > gets injected as a result -- This message was sent by Atlassian JIRA (v6.4.14#64029)
[jira] [Commented] (TOMEE-2073) In some cases the EJB.beanName() is not processed
[ https://issues.apache.org/jira/browse/TOMEE-2073?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16059026#comment-16059026 ] Romain Manni-Bucau commented on TOMEE-2073: --- looks like DescriptorComplementsAnnotationsServlet is missing > In some cases the EJB.beanName() is not processed > - > > Key: TOMEE-2073 > URL: https://issues.apache.org/jira/browse/TOMEE-2073 > Project: TomEE > Issue Type: Bug >Reporter: Svetlin Zarev > > In some cases the EJB.beanName() is not processed, which results in incorrect > bean resolution. > For instance in the test case from the PR, the ejb-jar descriptor should > complement the information from the EJB annotation. What actually happens is > that the value from the bean name attribute gets ignored, and a wrong bean > gets injected as a result -- This message was sent by Atlassian JIRA (v6.4.14#64029)
buildbot failure in on tomee-trunk-ubuntu
The Buildbot has detected a new failure on builder tomee-trunk-ubuntu while building tomee. Full details are available at: https://ci.apache.org/builders/tomee-trunk-ubuntu/builds/790 Buildbot URL: https://ci.apache.org/ Buildslave for this Build: bb_qnode5_ubuntu Build Reason: The SingleBranchScheduler scheduler named 'on-tomee-trunk-ubuntu-commit' triggered this build Build Source Stamp: [branch master] ce3b5359b27bf95bcf438a10b540ec2ca182dbff Blamelist: rmannibucauBUILD FAILED: failed compile Sincerely, -The Buildbot
buildbot success in on tomee-trunk-ubuntu
The Buildbot has detected a restored build on builder tomee-trunk-ubuntu while building tomee. Full details are available at: https://ci.apache.org/builders/tomee-trunk-ubuntu/builds/789 Buildbot URL: https://ci.apache.org/ Buildslave for this Build: bb_qnode5_ubuntu Build Reason: The SingleBranchScheduler scheduler named 'on-tomee-trunk-ubuntu-commit' triggered this build Build Source Stamp: [branch master] dd18844070db5eb8a75e76c267c4436fa25be2d9 Blamelist: rmannibucauBuild succeeded! Sincerely, -The Buildbot
[jira] [Commented] (TOMEE-2073) In some cases the EJB.beanName() is not processed
[ https://issues.apache.org/jira/browse/TOMEE-2073?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16058964#comment-16058964 ] Svetlin Zarev commented on TOMEE-2073: -- Sure, I'll try to figure it out after I get back from vacation, if someone does not do it before me :) > In some cases the EJB.beanName() is not processed > - > > Key: TOMEE-2073 > URL: https://issues.apache.org/jira/browse/TOMEE-2073 > Project: TomEE > Issue Type: Bug >Reporter: Svetlin Zarev > > In some cases the EJB.beanName() is not processed, which results in incorrect > bean resolution. > For instance in the test case from the PR, the ejb-jar descriptor should > complement the information from the EJB annotation. What actually happens is > that the value from the bean name attribute gets ignored, and a wrong bean > gets injected as a result -- This message was sent by Atlassian JIRA (v6.4.14#64029)
[jira] [Commented] (TOMEE-2073) In some cases the EJB.beanName() is not processed
[ https://issues.apache.org/jira/browse/TOMEE-2073?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16058961#comment-16058961 ] Romain Manni-Bucau commented on TOMEE-2073: --- applied, thanks Svetlin We can need to add an AppComposer test later. The biggest difference is the Context (jndi) is not 100% the same but both should behave the same (with and without tomcat) otherwise testing looses its main purpose. > In some cases the EJB.beanName() is not processed > - > > Key: TOMEE-2073 > URL: https://issues.apache.org/jira/browse/TOMEE-2073 > Project: TomEE > Issue Type: Bug >Reporter: Svetlin Zarev > > In some cases the EJB.beanName() is not processed, which results in incorrect > bean resolution. > For instance in the test case from the PR, the ejb-jar descriptor should > complement the information from the EJB annotation. What actually happens is > that the value from the bean name attribute gets ignored, and a wrong bean > gets injected as a result -- This message was sent by Atlassian JIRA (v6.4.14#64029)
[jira] [Commented] (TOMEE-2073) In some cases the EJB.beanName() is not processed
[ https://issues.apache.org/jira/browse/TOMEE-2073?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16058943#comment-16058943 ] Svetlin Zarev commented on TOMEE-2073: -- I've decided to go with the arquilian tests. There is very big difference in the behavior of the AppComposer & the arquilian tests. I'm sure it's something that I'm missing, but I'm quite limited on time for this one. > In some cases the EJB.beanName() is not processed > - > > Key: TOMEE-2073 > URL: https://issues.apache.org/jira/browse/TOMEE-2073 > Project: TomEE > Issue Type: Bug >Reporter: Svetlin Zarev > > In some cases the EJB.beanName() is not processed, which results in incorrect > bean resolution. > For instance in the test case from the PR, the ejb-jar descriptor should > complement the information from the EJB annotation. What actually happens is > that the value from the bean name attribute gets ignored, and a wrong bean > gets injected as a result -- This message was sent by Atlassian JIRA (v6.4.14#64029)
[jira] [Commented] (TOMEE-2073) In some cases the EJB.beanName() is not processed
[ https://issues.apache.org/jira/browse/TOMEE-2073?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16058940#comment-16058940 ] ASF GitHub Bot commented on TOMEE-2073: --- GitHub user SvetlinZarev opened a pull request: https://github.com/apache/tomee/pull/76 TOMEE-2073: The value of EJB.beanName() in some cases is ignored You can merge this pull request into a Git repository by running: $ git pull https://github.com/SvetlinZarev/tomee fixEjbLinkWitHArquiliantests Alternatively you can review and apply these changes as the patch at: https://github.com/apache/tomee/pull/76.patch To close this pull request, make a commit to your master/trunk branch with (at least) the following in the commit message: This closes #76 > In some cases the EJB.beanName() is not processed > - > > Key: TOMEE-2073 > URL: https://issues.apache.org/jira/browse/TOMEE-2073 > Project: TomEE > Issue Type: Bug >Reporter: Svetlin Zarev > > In some cases the EJB.beanName() is not processed, which results in incorrect > bean resolution. > For instance in the test case from the PR, the ejb-jar descriptor should > complement the information from the EJB annotation. What actually happens is > that the value from the bean name attribute gets ignored, and a wrong bean > gets injected as a result -- This message was sent by Atlassian JIRA (v6.4.14#64029)
[jira] [Created] (TOMEE-2073) In some cases the EJB.beanName() is not processed
Svetlin Zarev created TOMEE-2073: Summary: In some cases the EJB.beanName() is not processed Key: TOMEE-2073 URL: https://issues.apache.org/jira/browse/TOMEE-2073 Project: TomEE Issue Type: Bug Reporter: Svetlin Zarev In some cases the EJB.beanName() is not processed, which results in incorrect bean resolution. For instance in the test case from the PR, the ejb-jar descriptor should complement the information from the EJB annotation. What actually happens is that the value from the bean name attribute gets ignored, and a wrong bean gets injected as a result -- This message was sent by Atlassian JIRA (v6.4.14#64029)