[deltaspike] branch master updated: DELTASPIKE-1437 updated dependencies
This is an automated email from the ASF dual-hosted git repository. gpetracek pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/deltaspike.git The following commit(s) were added to refs/heads/master by this push: new 64d9d0af7 DELTASPIKE-1437 updated dependencies 64d9d0af7 is described below commit 64d9d0af71ecd30ba5454d8e84ce67e2060f5998 Author: gpetracek AuthorDate: Thu Feb 16 22:35:32 2023 +0100 DELTASPIKE-1437 updated dependencies --- deltaspike/modules/partial-bean/api/pom.xml | 1 + deltaspike/modules/partial-bean/impl/pom.xml | 5 + 2 files changed, 6 insertions(+) diff --git a/deltaspike/modules/partial-bean/api/pom.xml b/deltaspike/modules/partial-bean/api/pom.xml index f746e71ce..c24f229ae 100644 --- a/deltaspike/modules/partial-bean/api/pom.xml +++ b/deltaspike/modules/partial-bean/api/pom.xml @@ -47,6 +47,7 @@ org.apache.deltaspike.core deltaspike-core-api +${project.version} diff --git a/deltaspike/modules/partial-bean/impl/pom.xml b/deltaspike/modules/partial-bean/impl/pom.xml index 250ca5a16..9b7d9dcb6 100644 --- a/deltaspike/modules/partial-bean/impl/pom.xml +++ b/deltaspike/modules/partial-bean/impl/pom.xml @@ -53,26 +53,31 @@ org.apache.deltaspike.core deltaspike-core-api +${project.version} org.apache.deltaspike.core deltaspike-core-impl +${project.version} runtime org.apache.deltaspike.modules deltaspike-partial-bean-module-api +${project.version} org.apache.deltaspike.modules deltaspike-proxy-module-api +${project.version} org.apache.deltaspike.modules deltaspike-proxy-module-impl-asm +${project.version}
[deltaspike] 02/04: DELTASPIKE-1460 dropped outdated test-configs
This is an automated email from the ASF dual-hosted git repository. gpetracek pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/deltaspike.git commit 9ddb61ff1c9cf4c472fc67caf577969bde132a14 Author: gpetracek AuthorDate: Fri Feb 17 00:41:19 2023 +0100 DELTASPIKE-1460 dropped outdated test-configs --- .../src/test/resources/META-INF/apache-deltaspike.properties | 9 - .../test-control/impl/src/test/resources/META-INF/beans.xml | 1 - 2 files changed, 10 deletions(-) diff --git a/deltaspike/modules/test-control/impl/src/test/resources/META-INF/apache-deltaspike.properties b/deltaspike/modules/test-control/impl/src/test/resources/META-INF/apache-deltaspike.properties index d86331a86..6d077d15a 100644 --- a/deltaspike/modules/test-control/impl/src/test/resources/META-INF/apache-deltaspike.properties +++ b/deltaspike/modules/test-control/impl/src/test/resources/META-INF/apache-deltaspike.properties @@ -23,14 +23,5 @@ org.apache.deltaspike.core.spi.activation.ClassDeactivator=org.apache.deltaspike deltaspike.testcontrol.test-container.config-file.UnitTest=META-INF/test/dsTestContainerBootConfig.properties -labeledAlternatives[testLabelX].org.apache.deltaspike.test.testcontrol.uc014.TestService=org.apache.deltaspike.test.testcontrol.uc014.TestServiceLabelX -labeledAlternatives[y].org.apache.deltaspike.test.testcontrol.uc014.TestService=org.apache.deltaspike.test.testcontrol.uc014.TestServiceLabelY - -globalAlternatives.org.apache.deltaspike.test.testcontrol.uc015.TestService=org.apache.deltaspike.test.testcontrol.uc015.GlobalAlternativeTestService -labeledAlternatives[lbl].org.apache.deltaspike.test.testcontrol.uc015.TestService=org.apache.deltaspike.test.testcontrol.uc015.LabeledTestService - -labeledAlternatives[label].org.apache.deltaspike.test.testcontrol.uc017.DefaultTestServiceProducer=org.apache.deltaspike.test.testcontrol.uc017.LabeledTestServiceProducer -labeledAlternatives[label].org.apache.deltaspike.test.testcontrol.uc018.InterceptedTestServiceProducer=org.apache.deltaspike.test.testcontrol.uc018.LabeledTestServiceProducer - #only needed because our test-suite is based on cdi v1.0. with v1.1+ and @Priority (which is the target of this use-case) the following part isn't needed: org.apache.deltaspike.core.spi.filter.ClassFilter=org.apache.deltaspike.test.testcontrol.uc019.TestBeanClassFilter \ No newline at end of file diff --git a/deltaspike/modules/test-control/impl/src/test/resources/META-INF/beans.xml b/deltaspike/modules/test-control/impl/src/test/resources/META-INF/beans.xml index d22d69542..d8353857b 100644 --- a/deltaspike/modules/test-control/impl/src/test/resources/META-INF/beans.xml +++ b/deltaspike/modules/test-control/impl/src/test/resources/META-INF/beans.xml @@ -23,7 +23,6 @@ org.apache.deltaspike.test.testcontrol.uc011.TestInterceptorImplementation org.apache.deltaspike.test.testcontrol.mock.uc015.TestInterceptorImplementation - org.apache.deltaspike.test.testcontrol.uc018.TestUpperCaseInterceptorImplementation
[deltaspike] 03/04: DELTASPIKE-1460 dropped outdated dependencies
This is an automated email from the ASF dual-hosted git repository. gpetracek pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/deltaspike.git commit a15b16e64d1a47979bd4c03b2f41af122c4a6589 Author: gpetracek AuthorDate: Fri Feb 17 00:41:49 2023 +0100 DELTASPIKE-1460 dropped outdated dependencies --- deltaspike/modules/test-control/impl/pom.xml | 28 1 file changed, 28 deletions(-) diff --git a/deltaspike/modules/test-control/impl/pom.xml b/deltaspike/modules/test-control/impl/pom.xml index 2b882f576..037fa40a8 100644 --- a/deltaspike/modules/test-control/impl/pom.xml +++ b/deltaspike/modules/test-control/impl/pom.xml @@ -68,34 +68,6 @@ provided - -org.apache.myfaces.test -myfaces-test20 -${myfaces.version} -provided - - - -org.apache.myfaces.core -myfaces-impl-test -${myfaces.version} -provided - - - -org.apache.myfaces.core -myfaces-api -${myfaces.version} -provided - - - -org.apache.myfaces.core -myfaces-impl -${myfaces.version} -provided - - jakarta.el jakarta.el-api
[deltaspike] branch master updated (64d9d0af7 -> e51845ad6)
This is an automated email from the ASF dual-hosted git repository. gpetracek pushed a change to branch master in repository https://gitbox.apache.org/repos/asf/deltaspike.git from 64d9d0af7 DELTASPIKE-1437 updated dependencies new 538a075dd DELTASPIKE-1460 moved outdated parts new 9ddb61ff1 DELTASPIKE-1460 dropped outdated test-configs new a15b16e64 DELTASPIKE-1460 dropped outdated dependencies new e51845ad6 DELTASPIKE-1460 updated active modules The 4 revisions listed above as "new" are entirely new to this repository and will be described in separate emails. The revisions listed as "add" were already present in the repository and have only been added to this reference. Summary of changes: deltaspike/modules/pom.xml | 4 ++-- .../deltaspike/proxy/api/EnableInterceptors.java | 0 .../proxy/util/EnableInterceptorsInterceptor.java | 0 .../enableinterceptors/EnableInterceptorsTest.java | 0 .../proxy/impl/enableinterceptors/MyBean.java | 0 .../impl/enableinterceptors/MyBeanInterceptor.java | 0 .../MyBeanInterceptorBinding.java | 0 .../impl/enableinterceptors/MyBeanProducer.java| 0 .../dynamicbinding/MyRepository.java | 0 .../dynamicbinding/MyRepositoryProducer.java | 0 .../dynamicbinding/SimpleCache.java| 0 .../dynamicbinding/SimpleCacheExtension.java | 0 .../dynamicbinding/SimpleCacheInterceptor.java | 0 .../dynamicbinding/SimpleCacheManager.java | 0 .../dynamicbinding/SimpleCacheTest.java| 0 .../impl/jsf/MockedJsf2TestContainer.java | 0 .../impl/jsf/MockedJsfTestContainerAdapter.java| 0 .../impl/jsf/MyFacesContainerAdapter.java | 0 .../jsf/MyFacesContainerPerTestMethodAdapter.java | 0 .../impl/jsf/MyFacesTestBaseConfig.java| 0 .../TransactionStatementDecoratorFactory.java | 0 .../InternalMyFacesTestContainerAdapter.java | 0 .../mock/shared/ApplicationScopedBean.java | 0 .../test/testcontrol/mock/shared/MyQualifier.java | 0 .../testcontrol/mock/shared/RequestScopedBean.java | 0 .../testcontrol/mock/shared/SessionScopedBean.java | 0 .../mock/uc001/MockedRequestScopedBeanTest.java| 0 .../mock/uc002/MockedSessionScopedBeanTest.java| 0 .../mock/uc003/MockedSessionScopedBean.java| 0 .../MockedSessionScopedBeanAcrossMethodsTest.java | 0 .../mock/uc004/MockedApplicationScopedBean.java| 0 .../uc004/MockedApplicationScopedBeanTest.java | 0 .../mock/uc005/MockedProducedBeanTest.java | 0 .../test/testcontrol/mock/uc005/ProducedBean.java | 0 .../mock/uc005/ProducedBeanProducer.java | 0 .../MockedRequestScopedQualifiedBeanTest.java | 0 .../test/testcontrol/mock/uc006/QualifiedBean.java | 0 .../uc007/MockedProducedQualifiedBeanTest.java | 0 .../test/testcontrol/mock/uc007/ProducedBean.java | 0 .../mock/uc007/ProducedBeanProducer.java | 0 .../mock/uc008/MockedTypedBeanTest.java| 0 .../deltaspike/test/testcontrol/mock/uc008/T1.java | 0 .../deltaspike/test/testcontrol/mock/uc008/T2.java | 0 .../deltaspike/test/testcontrol/mock/uc008/T3.java | 0 .../testcontrol/mock/uc008/TypedBean1and2.java | 0 .../test/testcontrol/mock/uc008/TypedBean3.java| 0 .../mock/uc009/MockedTypedProducedBeanTest.java| 0 .../deltaspike/test/testcontrol/mock/uc009/T1.java | 0 .../deltaspike/test/testcontrol/mock/uc009/T2.java | 0 .../deltaspike/test/testcontrol/mock/uc009/T3.java | 0 .../testcontrol/mock/uc009/TypedBean1and2.java | 0 .../test/testcontrol/mock/uc009/TypedBean3.java| 0 .../testcontrol/mock/uc009/TypedBeanProducer.java | 0 .../mock/uc010/MockedRequestScopedBeanTest.java| 0 .../MockedRequestScopedBeanWithInjection.java | 0 .../MockedRequestScopedBeanWithInjectionTest.java | 0 .../MockedRequestScopedBeanWithInjection.java | 0 .../MockedRequestScopedBeanWithInjectionTest.java | 0 .../mock/uc013/MockedTypedProducedBeanTest.java| 0 .../deltaspike/test/testcontrol/mock/uc013/T1.java | 0 .../deltaspike/test/testcontrol/mock/uc013/T2.java | 0 .../deltaspike/test/testcontrol/mock/uc013/T3.java | 0 .../testcontrol/mock/uc013/TypedBean1and2.java | 0 .../test/testcontrol/mock/uc013/TypedBean3.java| 0 .../testcontrol/mock/uc013/TypedBeanProducer.java | 0 .../mock/uc014/MockedTypedProducedBeanTest.java| 0 .../deltaspike/test/testcontrol/mock/uc014/T1.java | 0 .../deltaspike/test/testcontrol/mock/uc014/T2.java | 0 .../deltaspike/test/testcontrol/mock/uc014/T3.java | 0 .../testcontrol/mock/uc014/TypedBean1and2.java | 0 .../test/testcontrol/mock/uc014/TypedBean3.java| 0 .../testcontrol/mock/uc014/TypedBeanProducer.java | 0 .../mock/uc016/CustomMockManagerTest.java | 0 .../testcontrol/uc005/MockedJsfContainerTest.java | 0 .../uc006/SkipExtern
[deltaspike] 04/04: DELTASPIKE-1460 updated active modules
This is an automated email from the ASF dual-hosted git repository. gpetracek pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/deltaspike.git commit e51845ad6d8f33bee4532539c433a228cda37962 Author: gpetracek AuthorDate: Fri Feb 17 00:42:27 2023 +0100 DELTASPIKE-1460 updated active modules --- deltaspike/modules/pom.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/deltaspike/modules/pom.xml b/deltaspike/modules/pom.xml index 0f61668cb..056446a4d 100644 --- a/deltaspike/modules/pom.xml +++ b/deltaspike/modules/pom.xml @@ -36,14 +36,14 @@ proxy -security scheduler +--> test-control
[deltaspike] 01/04: DELTASPIKE-1460 moved outdated parts
This is an automated email from the ASF dual-hosted git repository. gpetracek pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/deltaspike.git commit 538a075dd8908949880e02aad240bbed146f0daf Author: gpetracek AuthorDate: Fri Feb 17 00:39:58 2023 +0100 DELTASPIKE-1460 moved outdated parts --- .../src/main/java/org/apache/deltaspike/proxy/api/EnableInterceptors.java | 0 .../org/apache/deltaspike/proxy/util/EnableInterceptorsInterceptor.java | 0 .../deltaspike/proxy/impl/enableinterceptors/EnableInterceptorsTest.java | 0 .../java/org/apache/deltaspike/proxy/impl/enableinterceptors/MyBean.java | 0 .../deltaspike/proxy/impl/enableinterceptors/MyBeanInterceptor.java | 0 .../proxy/impl/enableinterceptors/MyBeanInterceptorBinding.java | 0 .../apache/deltaspike/proxy/impl/enableinterceptors/MyBeanProducer.java | 0 .../proxy/impl/enableinterceptors/dynamicbinding/MyRepository.java| 0 .../impl/enableinterceptors/dynamicbinding/MyRepositoryProducer.java | 0 .../proxy/impl/enableinterceptors/dynamicbinding/SimpleCache.java | 0 .../impl/enableinterceptors/dynamicbinding/SimpleCacheExtension.java | 0 .../impl/enableinterceptors/dynamicbinding/SimpleCacheInterceptor.java| 0 .../proxy/impl/enableinterceptors/dynamicbinding/SimpleCacheManager.java | 0 .../proxy/impl/enableinterceptors/dynamicbinding/SimpleCacheTest.java | 0 .../apache/deltaspike/testcontrol/impl/jsf/MockedJsf2TestContainer.java | 0 .../deltaspike/testcontrol/impl/jsf/MockedJsfTestContainerAdapter.java| 0 .../apache/deltaspike/testcontrol/impl/jsf/MyFacesContainerAdapter.java | 0 .../testcontrol/impl/jsf/MyFacesContainerPerTestMethodAdapter.java| 0 .../org/apache/deltaspike/testcontrol/impl/jsf/MyFacesTestBaseConfig.java | 0 .../impl/transaction/TransactionStatementDecoratorFactory.java| 0 .../deltaspike/test/testcontrol/InternalMyFacesTestContainerAdapter.java | 0 .../deltaspike/test/testcontrol/mock/shared/ApplicationScopedBean.java| 0 .../org/apache/deltaspike/test/testcontrol/mock/shared/MyQualifier.java | 0 .../apache/deltaspike/test/testcontrol/mock/shared/RequestScopedBean.java | 0 .../apache/deltaspike/test/testcontrol/mock/shared/SessionScopedBean.java | 0 .../test/testcontrol/mock/uc001/MockedRequestScopedBeanTest.java | 0 .../test/testcontrol/mock/uc002/MockedSessionScopedBeanTest.java | 0 .../deltaspike/test/testcontrol/mock/uc003/MockedSessionScopedBean.java | 0 .../testcontrol/mock/uc003/MockedSessionScopedBeanAcrossMethodsTest.java | 0 .../test/testcontrol/mock/uc004/MockedApplicationScopedBean.java | 0 .../test/testcontrol/mock/uc004/MockedApplicationScopedBeanTest.java | 0 .../deltaspike/test/testcontrol/mock/uc005/MockedProducedBeanTest.java| 0 .../org/apache/deltaspike/test/testcontrol/mock/uc005/ProducedBean.java | 0 .../deltaspike/test/testcontrol/mock/uc005/ProducedBeanProducer.java | 0 .../test/testcontrol/mock/uc006/MockedRequestScopedQualifiedBeanTest.java | 0 .../org/apache/deltaspike/test/testcontrol/mock/uc006/QualifiedBean.java | 0 .../test/testcontrol/mock/uc007/MockedProducedQualifiedBeanTest.java | 0 .../org/apache/deltaspike/test/testcontrol/mock/uc007/ProducedBean.java | 0 .../deltaspike/test/testcontrol/mock/uc007/ProducedBeanProducer.java | 0 .../deltaspike/test/testcontrol/mock/uc008/MockedTypedBeanTest.java | 0 .../test/java/org/apache/deltaspike/test/testcontrol/mock/uc008/T1.java | 0 .../test/java/org/apache/deltaspike/test/testcontrol/mock/uc008/T2.java | 0 .../test/java/org/apache/deltaspike/test/testcontrol/mock/uc008/T3.java | 0 .../org/apache/deltaspike/test/testcontrol/mock/uc008/TypedBean1and2.java | 0 .../org/apache/deltaspike/test/testcontrol/mock/uc008/TypedBean3.java | 0 .../test/testcontrol/mock/uc009/MockedTypedProducedBeanTest.java | 0 .../test/java/org/apache/deltaspike/test/testcontrol/mock/uc009/T1.java | 0 .../test/java/org/apache/deltaspike/test/testcontrol/mock/uc009/T2.java | 0 .../test/java/org/apache/deltaspike/test/testcontrol/mock/uc009/T3.java | 0 .../org/apache/deltaspike/test/testcontrol/mock/uc009/TypedBean1and2.java | 0 .../org/apache/deltaspike/test/testcontrol/mock/uc009/TypedBean3.java | 0 .../apache/deltaspike/test/testcontrol/mock/uc009/TypedBeanProducer.java | 0 .../test/testcontrol/mock/uc010/MockedRequestScopedBeanTest.java | 0 .../test/testcontrol/mock/uc011/MockedRequestScopedBeanWithInjection.java | 0 .../testcontrol/mock/uc011/MockedRequestScopedBeanWithInjectionTest.java | 0 .../test/testcontrol/mock/uc012/MockedRequestScopedBeanWithInjection.java | 0 .../testcontrol/mock/uc012/MockedRequestScopedBeanWithInjectionTest.java | 0 .../test/testcontrol/mock/uc013/MockedTypedProducedBeanTest.java | 0 .../test/java/org/apache/deltaspike/test/testcontrol/mock/uc013/T1.java | 0
[deltaspike] branch master updated: DELTASPIKE-1437 changed jdk version
This is an automated email from the ASF dual-hosted git repository. gpetracek pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/deltaspike.git The following commit(s) were added to refs/heads/master by this push: new 289fc67f8 DELTASPIKE-1437 changed jdk version 289fc67f8 is described below commit 289fc67f87f081a83c6384c97c85fffc10770c82 Author: gpetracek AuthorDate: Fri Feb 17 00:43:20 2023 +0100 DELTASPIKE-1437 changed jdk version --- deltaspike/parent/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/deltaspike/parent/pom.xml b/deltaspike/parent/pom.xml index 79b9440d2..edca8acd8 100644 --- a/deltaspike/parent/pom.xml +++ b/deltaspike/parent/pom.xml @@ -47,7 +47,7 @@ 2011 -17 +11 4.0.0-SNAPSHOT
[deltaspike] branch master updated: DELTASPIKE-1437 updated build configuration
This is an automated email from the ASF dual-hosted git repository. gpetracek pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/deltaspike.git The following commit(s) were added to refs/heads/master by this push: new 38ed117dd DELTASPIKE-1437 updated build configuration 38ed117dd is described below commit 38ed117dd31ab5de6624a94e13d6a1faa87d2a9a Author: gpetracek AuthorDate: Fri Feb 17 00:45:20 2023 +0100 DELTASPIKE-1437 updated build configuration --- deltaspike/parent/pom.xml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/deltaspike/parent/pom.xml b/deltaspike/parent/pom.xml index edca8acd8..06f332f14 100644 --- a/deltaspike/parent/pom.xml +++ b/deltaspike/parent/pom.xml @@ -706,8 +706,7 @@ maven-compiler-plugin ${maven.compiler.plugin.version} -${java.version} -${java.version} +${java.version}
[deltaspike] branch master updated: DELTASPIKE-1437 updated plugin version
This is an automated email from the ASF dual-hosted git repository. gpetracek pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/deltaspike.git The following commit(s) were added to refs/heads/master by this push: new cb0d4d07a DELTASPIKE-1437 updated plugin version cb0d4d07a is described below commit cb0d4d07a2ae8604f84eb4acaab89f4bd0504e72 Author: gpetracek AuthorDate: Fri Feb 17 00:46:10 2023 +0100 DELTASPIKE-1437 updated plugin version --- deltaspike/parent/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/deltaspike/parent/pom.xml b/deltaspike/parent/pom.xml index 06f332f14..e52a91b73 100644 --- a/deltaspike/parent/pom.xml +++ b/deltaspike/parent/pom.xml @@ -80,7 +80,7 @@ 3.1.2 2.4 2.16 -3.8.1 +3.10.1 3.2.0 3.0
svn commit: r1487613 - /deltaspike/site/trunk/content/deltaspike/source.mdtext
Author: gpetracek Date: Wed May 29 19:48:57 2013 New Revision: 1487613 URL: http://svn.apache.org/r1487613 Log: updated content Modified: deltaspike/site/trunk/content/deltaspike/source.mdtext Modified: deltaspike/site/trunk/content/deltaspike/source.mdtext URL: http://svn.apache.org/viewvc/deltaspike/site/trunk/content/deltaspike/source.mdtext?rev=1487613&r1=1487612&r2=1487613&view=diff == --- deltaspike/site/trunk/content/deltaspike/source.mdtext (original) +++ deltaspike/site/trunk/content/deltaspike/source.mdtext Wed May 29 19:48:57 2013 @@ -18,11 +18,11 @@ Notice:Licensed to the Apache Softwa # VCS / Repository -We are using GIT as a Version Control System. The official GIT repository of the project is available [here](https://git-wip-us.apache.org/repos/asf/incubator-deltaspike.git). +We are using GIT as a Version Control System. The official GIT repository of the project is available [here](https://git-wip-us.apache.org/repos/asf/deltaspike.git). ### Initial 'checkout' -git clone https://git-wip-us.apache.org/repos/asf/incubator-deltaspike.git +git clone https://git-wip-us.apache.org/repos/asf/deltaspike.git ### Update existing clone
svn commit: r863668 - /websites/production/deltaspike/content/
Author: gpetracek Date: Wed May 29 19:52:49 2013 New Revision: 863668 Log: Publishing svnmucc operation to deltaspike site by gpetracek Added: websites/production/deltaspike/content/ - copied from r863667, websites/staging/deltaspike/trunk/content/
git commit: DELTASPIKE-360 JsfSupportedLocaleAwareLocaleResolver added
Updated Branches: refs/heads/master d7929a405 -> 4ed338e7c DELTASPIKE-360 JsfSupportedLocaleAwareLocaleResolver added Project: http://git-wip-us.apache.org/repos/asf/deltaspike/repo Commit: http://git-wip-us.apache.org/repos/asf/deltaspike/commit/4ed338e7 Tree: http://git-wip-us.apache.org/repos/asf/deltaspike/tree/4ed338e7 Diff: http://git-wip-us.apache.org/repos/asf/deltaspike/diff/4ed338e7 Branch: refs/heads/master Commit: 4ed338e7c441d468fa59e2562fd248abda52065d Parents: d7929a4 Author: gpetracek Authored: Sun Jun 2 21:50:59 2013 +0200 Committer: gpetracek Committed: Mon Jun 3 11:33:40 2013 +0200 -- .../JsfSupportedLocaleAwareLocaleResolver.java | 67 +++ 1 files changed, 67 insertions(+), 0 deletions(-) -- http://git-wip-us.apache.org/repos/asf/deltaspike/blob/4ed338e7/deltaspike/modules/jsf/impl/src/main/java/org/apache/deltaspike/jsf/impl/message/JsfSupportedLocaleAwareLocaleResolver.java -- diff --git a/deltaspike/modules/jsf/impl/src/main/java/org/apache/deltaspike/jsf/impl/message/JsfSupportedLocaleAwareLocaleResolver.java b/deltaspike/modules/jsf/impl/src/main/java/org/apache/deltaspike/jsf/impl/message/JsfSupportedLocaleAwareLocaleResolver.java new file mode 100644 index 000..677e217 --- /dev/null +++ b/deltaspike/modules/jsf/impl/src/main/java/org/apache/deltaspike/jsf/impl/message/JsfSupportedLocaleAwareLocaleResolver.java @@ -0,0 +1,67 @@ +/* + * 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.deltaspike.jsf.impl.message; + +import org.apache.deltaspike.core.impl.message.DefaultLocaleResolver; + +import javax.enterprise.context.ApplicationScoped; +import javax.enterprise.inject.Alternative; +import javax.faces.component.UIViewRoot; +import javax.faces.context.FacesContext; +import java.util.Iterator; +import java.util.Locale; + +@ApplicationScoped +@Alternative +public class JsfSupportedLocaleAwareLocaleResolver extends DefaultLocaleResolver +{ +@Override +public Locale getLocale() +{ +FacesContext facesContext = FacesContext.getCurrentInstance(); +if (facesContext != null) +{ +UIViewRoot viewRoot = facesContext.getViewRoot(); +Locale result = null; +if (viewRoot != null) +{ +// if a ViewRoot is present we return the Locale from there +result = viewRoot.getLocale(); +} + +if (result != null) +{ +Iterator supportedLocale = facesContext.getApplication().getSupportedLocales(); + +while (supportedLocale.hasNext()) +{ +if (result.equals(supportedLocale.next())) +{ +return result; +} +} + +return facesContext.getApplication().getDefaultLocale(); +} +} + +// return the default Locale, if no Locale was found +return super.getLocale(); +} +}
svn commit: r1489631 - /deltaspike/site/trunk/content/deltaspike/source.mdtext
Author: gpetracek Date: Tue Jun 4 21:32:26 2013 New Revision: 1489631 URL: http://svn.apache.org/r1489631 Log: updated content Modified: deltaspike/site/trunk/content/deltaspike/source.mdtext Modified: deltaspike/site/trunk/content/deltaspike/source.mdtext URL: http://svn.apache.org/viewvc/deltaspike/site/trunk/content/deltaspike/source.mdtext?rev=1489631&r1=1489630&r2=1489631&view=diff == --- deltaspike/site/trunk/content/deltaspike/source.mdtext (original) +++ deltaspike/site/trunk/content/deltaspike/source.mdtext Tue Jun 4 21:32:26 2013 @@ -32,7 +32,7 @@ We are using GIT as a Version Control Sy ### GitHub-Mirror -git clone https://github.com/apache/incubator-deltaspike.git +git clone https://github.com/apache/deltaspike More information can be found [here](https://help.github.com/articles/which-remote-url-should-i-use).
svn commit: r864413 - /websites/production/deltaspike/content/
Author: gpetracek Date: Tue Jun 4 21:34:04 2013 New Revision: 864413 Log: Publishing svnmucc operation to deltaspike site by gpetracek Added: websites/production/deltaspike/content/ - copied from r864411, websites/staging/deltaspike/trunk/content/
git commit: DELTASPIKE-380 improved error-handling
Updated Branches: refs/heads/master 6d79d1fcd -> 776bfcff0 DELTASPIKE-380 improved error-handling Project: http://git-wip-us.apache.org/repos/asf/deltaspike/repo Commit: http://git-wip-us.apache.org/repos/asf/deltaspike/commit/776bfcff Tree: http://git-wip-us.apache.org/repos/asf/deltaspike/tree/776bfcff Diff: http://git-wip-us.apache.org/repos/asf/deltaspike/diff/776bfcff Branch: refs/heads/master Commit: 776bfcff0e36b1d8338a12f3144885e430296566 Parents: 6d79d1f Author: gpetracek Authored: Wed Jun 12 20:41:37 2013 +0200 Committer: gpetracek Committed: Wed Jun 12 20:41:37 2013 +0200 -- .../impl/PartialBeanBindingExtension.java | 37 +++- .../partialbean/impl/PartialBeanLifecycle.java | 21 ++- 2 files changed, 40 insertions(+), 18 deletions(-) -- http://git-wip-us.apache.org/repos/asf/deltaspike/blob/776bfcff/deltaspike/modules/partial-bean/impl/src/main/java/org/apache/deltaspike/partialbean/impl/PartialBeanBindingExtension.java -- diff --git a/deltaspike/modules/partial-bean/impl/src/main/java/org/apache/deltaspike/partialbean/impl/PartialBeanBindingExtension.java b/deltaspike/modules/partial-bean/impl/src/main/java/org/apache/deltaspike/partialbean/impl/PartialBeanBindingExtension.java index 140a819..18973a2 100644 --- a/deltaspike/modules/partial-bean/impl/src/main/java/org/apache/deltaspike/partialbean/impl/PartialBeanBindingExtension.java +++ b/deltaspike/modules/partial-bean/impl/src/main/java/org/apache/deltaspike/partialbean/impl/PartialBeanBindingExtension.java @@ -37,7 +37,6 @@ import java.lang.reflect.InvocationHandler; import java.lang.reflect.Modifier; import java.util.HashMap; import java.util.Map; -import java.util.Set; import java.util.logging.Logger; public class PartialBeanBindingExtension implements Extension, Deactivatable @@ -78,8 +77,7 @@ public class PartialBeanBindingExtension implements Extension, Deactivatable } else if (InvocationHandler.class.isAssignableFrom(beanClass)) { -validateInvocationHandler( -beanClass, bindingAnnotationClass, pat.getAnnotatedType().getAnnotations(), beanManager); +validateInvocationHandler(beanClass, bindingAnnotationClass); this.partialBeanHandlers.put(bindingAnnotationClass, (Class) beanClass); } @@ -106,20 +104,13 @@ public class PartialBeanBindingExtension implements Extension, Deactivatable for (Map.Entry, Class> partialBeanEntry : this.partialBeans.entrySet()) { -Bean partialBean = createPartialBean(partialBeanEntry.getKey(), partialBeanEntry.getValue(), beanManager); +Bean partialBean = createPartialBean( +partialBeanEntry.getKey(), partialBeanEntry.getValue(), afterBeanDiscovery, beanManager); if (partialBean != null) { afterBeanDiscovery.addBean(partialBean); } -else -{ -afterBeanDiscovery.addDefinitionError(new IllegalStateException("A class which implements " + -InvocationHandler.class.getName() + " and is annotated with @" + -partialBeanEntry.getValue().getName() + " is needed as a handler for " + -partialBeanEntry.getKey().getName() + ". See the documentation about @" + -PartialBeanBinding.class.getName() + ".")); -} } this.partialBeans.clear(); @@ -128,21 +119,35 @@ public class PartialBeanBindingExtension implements Extension, Deactivatable protected Bean createPartialBean(Class beanClass, Class bindingAnnotationClass, -BeanManager beanManager) +AfterBeanDiscovery afterBeanDiscovery, BeanManager beanManager) { Class invocationHandlerClass = partialBeanHandlers.get(bindingAnnotationClass); if (invocationHandlerClass == null) { +afterBeanDiscovery.addDefinitionError(new IllegalStateException("A class which implements " + +InvocationHandler.class.getName() + " and is annotated with @" + +bindingAnnotationClass.getName() + " is needed as a handler for " + +beanClass.getName() + ". See the documentation about @" + +PartialBeanBinding.class.getName() + ".")); + return null; } AnnotatedType annotatedType = new AnnotatedTypeBuilder().readFromType(beanClass).create(); +Partia
git commit: DELTASPIKE-384 improved creation of the view-config node-list
Updated Branches: refs/heads/master 0c3c2bb76 -> 7297d95bb DELTASPIKE-384 improved creation of the view-config node-list thx to Richard DiCroce Project: http://git-wip-us.apache.org/repos/asf/deltaspike/repo Commit: http://git-wip-us.apache.org/repos/asf/deltaspike/commit/7297d95b Tree: http://git-wip-us.apache.org/repos/asf/deltaspike/tree/7297d95b Diff: http://git-wip-us.apache.org/repos/asf/deltaspike/diff/7297d95b Branch: refs/heads/master Commit: 7297d95bb3b73401aff2c44e66b7ced163d8d886 Parents: 0c3c2bb Author: gpetracek Authored: Mon Jul 1 22:59:31 2013 +0200 Committer: gpetracek Committed: Mon Jul 1 22:59:37 2013 +0200 -- .../jsf/impl/util/ViewConfigUtils.java | 26 +++- 1 file changed, 3 insertions(+), 23 deletions(-) -- http://git-wip-us.apache.org/repos/asf/deltaspike/blob/7297d95b/deltaspike/modules/jsf/impl/src/main/java/org/apache/deltaspike/jsf/impl/util/ViewConfigUtils.java -- diff --git a/deltaspike/modules/jsf/impl/src/main/java/org/apache/deltaspike/jsf/impl/util/ViewConfigUtils.java b/deltaspike/modules/jsf/impl/src/main/java/org/apache/deltaspike/jsf/impl/util/ViewConfigUtils.java index 560f3e1..790f409 100644 --- a/deltaspike/modules/jsf/impl/src/main/java/org/apache/deltaspike/jsf/impl/util/ViewConfigUtils.java +++ b/deltaspike/modules/jsf/impl/src/main/java/org/apache/deltaspike/jsf/impl/util/ViewConfigUtils.java @@ -19,7 +19,6 @@ package org.apache.deltaspike.jsf.impl.util; import org.apache.deltaspike.core.api.config.view.ViewConfig; -import org.apache.deltaspike.core.util.ClassUtils; import org.apache.deltaspike.jsf.api.config.view.Folder; import java.lang.reflect.Modifier; @@ -28,12 +27,6 @@ import java.util.List; public abstract class ViewConfigUtils { -public static final String NODE_SEPARATOR = "$"; -private static final String CLASS_PREFIX = "class"; -private static final String INTERFACE_PREFIX = "interface"; -private static final int CLASS_PREFIX_LENGTH = CLASS_PREFIX.length(); -private static final int INTERFACE_PREFIX_LENGTH = INTERFACE_PREFIX.length(); - public static boolean isFolderConfig(Class configClass) { return configClass != null && ( @@ -48,23 +41,10 @@ public abstract class ViewConfigUtils public static List toNodeList(Class nodeClass) { List treePath = new ArrayList(); -String nodeClassName = nodeClass.toString(); - -if (nodeClassName.startsWith(CLASS_PREFIX)) -{ -nodeClassName = nodeClassName.substring(CLASS_PREFIX_LENGTH + 1); -} -else -{ -nodeClassName = nodeClassName.substring(INTERFACE_PREFIX_LENGTH + 1); -} - -treePath.add(nodeClass); - -while (nodeClassName.contains(NODE_SEPARATOR)) +while (nodeClass != null) { -nodeClassName = nodeClassName.substring(0, nodeClassName.lastIndexOf(NODE_SEPARATOR)); -treePath.add(0, ClassUtils.tryToLoadClassForName(nodeClassName)); +treePath.add(0, nodeClass); +nodeClass = nodeClass.getEnclosingClass(); } return treePath; }
git commit: updated developer section
Updated Branches: refs/heads/master 4a7dd5c94 -> 2b35b3834 updated developer section Project: http://git-wip-us.apache.org/repos/asf/deltaspike/repo Commit: http://git-wip-us.apache.org/repos/asf/deltaspike/commit/2b35b383 Tree: http://git-wip-us.apache.org/repos/asf/deltaspike/tree/2b35b383 Diff: http://git-wip-us.apache.org/repos/asf/deltaspike/diff/2b35b383 Branch: refs/heads/master Commit: 2b35b3834f803a5e8453d77f24daaf2395d574e1 Parents: 4a7dd5c Author: gpetracek Authored: Sun Jul 7 10:28:49 2013 +0200 Committer: gpetracek Committed: Sun Jul 7 10:28:49 2013 +0200 -- deltaspike/parent/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/deltaspike/blob/2b35b383/deltaspike/parent/pom.xml -- diff --git a/deltaspike/parent/pom.xml b/deltaspike/parent/pom.xml index 5ffcfc4..68ea69f 100644 --- a/deltaspike/parent/pom.xml +++ b/deltaspike/parent/pom.xml @@ -223,7 +223,7 @@ IRIAN.at, Austria http://www.irian.at/ -PPMC +PMC +1
svn commit: r1500426 - /deltaspike/site/trunk/content/jsf.mdtext
Author: gpetracek Date: Sun Jul 7 13:31:40 2013 New Revision: 1500426 URL: http://svn.apache.org/r1500426 Log: updated content Modified: deltaspike/site/trunk/content/jsf.mdtext Modified: deltaspike/site/trunk/content/jsf.mdtext URL: http://svn.apache.org/viewvc/deltaspike/site/trunk/content/jsf.mdtext?rev=1500426&r1=1500425&r2=1500426&view=diff == --- deltaspike/site/trunk/content/jsf.mdtext (original) +++ deltaspike/site/trunk/content/jsf.mdtext Sun Jul 7 13:31:40 2013 @@ -686,6 +686,10 @@ Via a `TargetViewConfigProvider` it's po ## Activation of custom naming conventions +DeltaSpike allows to customize the default naming convention via `View.DefaultBasePathBuilder` and/or `View.DefaultFileNameBuilder` and/or `View.DefaultExtensionBuilder`. +It's possible to change it for one usage via `View.basePathBuilder` and/or `View.fileNameBuilder` and/or `View.extensionBuilder` or globally via the config mechanism provided by DeltaSpike. +The same is supported for folders via `Folder.DefaultFolderNameBuilder`. In this case changing only one usage is possible via `Folder.folderNameBuilder`. + # Support of EAR deployments Before using features described by this page, please ensure that you are aware of [DELTASPIKE-335](https://issues.apache.org/jira/browse/DELTASPIKE-335) and the corresponding impact.
git commit: DELTASPIKE-390 support for (optional) custom ConfigPreProcessor for @ViewMetaData
Updated Branches: refs/heads/master 2b35b3834 -> ff93d559e DELTASPIKE-390 support for (optional) custom ConfigPreProcessor for @ViewMetaData Project: http://git-wip-us.apache.org/repos/asf/deltaspike/repo Commit: http://git-wip-us.apache.org/repos/asf/deltaspike/commit/ff93d559 Tree: http://git-wip-us.apache.org/repos/asf/deltaspike/tree/ff93d559 Diff: http://git-wip-us.apache.org/repos/asf/deltaspike/diff/ff93d559 Branch: refs/heads/master Commit: ff93d559eeed7a5b0fbcfcee95f1c5be49852bd3 Parents: 2b35b38 Author: gpetracek Authored: Sun Jul 7 15:57:22 2013 +0200 Committer: gpetracek Committed: Sun Jul 7 15:57:44 2013 +0200 -- .../config/view/DefaultConfigNodeConverter.java | 18 ++ 1 file changed, 18 insertions(+) -- http://git-wip-us.apache.org/repos/asf/deltaspike/blob/ff93d559/deltaspike/modules/jsf/impl/src/main/java/org/apache/deltaspike/jsf/impl/config/view/DefaultConfigNodeConverter.java -- diff --git a/deltaspike/modules/jsf/impl/src/main/java/org/apache/deltaspike/jsf/impl/config/view/DefaultConfigNodeConverter.java b/deltaspike/modules/jsf/impl/src/main/java/org/apache/deltaspike/jsf/impl/config/view/DefaultConfigNodeConverter.java index 6b5f0b3..c949dee 100644 --- a/deltaspike/modules/jsf/impl/src/main/java/org/apache/deltaspike/jsf/impl/config/view/DefaultConfigNodeConverter.java +++ b/deltaspike/modules/jsf/impl/src/main/java/org/apache/deltaspike/jsf/impl/config/view/DefaultConfigNodeConverter.java @@ -18,6 +18,7 @@ */ package org.apache.deltaspike.jsf.impl.config.view; +import org.apache.deltaspike.core.api.config.ConfigResolver; import org.apache.deltaspike.core.api.config.view.metadata.Aggregated; import org.apache.deltaspike.core.api.config.view.ViewConfig; import org.apache.deltaspike.core.api.config.view.metadata.ViewMetaData; @@ -207,6 +208,23 @@ public class DefaultConfigNodeConverter implements ConfigNodeConverter Class preProcessorClass = viewMetaData.preProcessor(); if (!ConfigPreProcessor.class.equals(preProcessorClass)) { +String customPreProcessorClassName = ConfigResolver.getPropertyValue(preProcessorClass.getName(), null); + +if (customPreProcessorClassName != null) +{ +Class customPreProcessorClass = + ClassUtils.tryToLoadClassForName(customPreProcessorClassName, ConfigPreProcessor.class); + +if (customPreProcessorClass != null) +{ +preProcessorClass = customPreProcessorClass; +} +else +{ +throw new IllegalStateException(customPreProcessorClassName + " is configured to replace " + +preProcessorClass.getName() + ", but it wasn't possible to load it."); +} +} ConfigPreProcessor preProcessor = ClassUtils.tryToInstantiateClass(preProcessorClass); result.add(preProcessor.beforeAddToConfig(annotation, node)); }
svn commit: r868697 - /websites/production/deltaspike/content/
Author: gpetracek Date: Sun Jul 7 14:08:03 2013 New Revision: 868697 Log: Publishing svnmucc operation to deltaspike site by gpetracek Added: websites/production/deltaspike/content/ - copied from r868696, websites/staging/deltaspike/trunk/content/
git commit: DELTASPIKE-390 custom ConfigPreProcessor test
Updated Branches: refs/heads/master ff93d559e -> 20e2cd0ec DELTASPIKE-390 custom ConfigPreProcessor test Project: http://git-wip-us.apache.org/repos/asf/deltaspike/repo Commit: http://git-wip-us.apache.org/repos/asf/deltaspike/commit/20e2cd0e Tree: http://git-wip-us.apache.org/repos/asf/deltaspike/tree/20e2cd0e Diff: http://git-wip-us.apache.org/repos/asf/deltaspike/diff/20e2cd0e Branch: refs/heads/master Commit: 20e2cd0ecc82c7a92283c60f0350bc602861b6e6 Parents: ff93d55 Author: gpetracek Authored: Sun Jul 7 16:56:35 2013 +0200 Committer: gpetracek Committed: Sun Jul 7 17:03:00 2013 +0200 -- .../impl/config/view/custom/uc006/Pages.java| 35 + .../custom/uc006/TestConfigPreProcessor.java| 34 + .../view/custom/uc006/ViewConfigTest.java | 142 +++ 3 files changed, 211 insertions(+) -- http://git-wip-us.apache.org/repos/asf/deltaspike/blob/20e2cd0e/deltaspike/modules/jsf/impl/src/test/java/org/apache/deltaspike/test/jsf/impl/config/view/custom/uc006/Pages.java -- diff --git a/deltaspike/modules/jsf/impl/src/test/java/org/apache/deltaspike/test/jsf/impl/config/view/custom/uc006/Pages.java b/deltaspike/modules/jsf/impl/src/test/java/org/apache/deltaspike/test/jsf/impl/config/view/custom/uc006/Pages.java new file mode 100644 index 000..5a05fa4 --- /dev/null +++ b/deltaspike/modules/jsf/impl/src/test/java/org/apache/deltaspike/test/jsf/impl/config/view/custom/uc006/Pages.java @@ -0,0 +1,35 @@ +/* + * 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.deltaspike.test.jsf.impl.config.view.custom.uc006; + +import org.apache.deltaspike.core.api.config.view.ViewConfig; +import org.apache.deltaspike.jsf.api.config.view.View; + +import static org.apache.deltaspike.jsf.api.config.view.View.ViewParameterMode.INCLUDE; + +interface Pages +{ +interface Public extends ViewConfig +{ +@View(viewParams = INCLUDE) +class Index implements Public +{ +} +} +} http://git-wip-us.apache.org/repos/asf/deltaspike/blob/20e2cd0e/deltaspike/modules/jsf/impl/src/test/java/org/apache/deltaspike/test/jsf/impl/config/view/custom/uc006/TestConfigPreProcessor.java -- diff --git a/deltaspike/modules/jsf/impl/src/test/java/org/apache/deltaspike/test/jsf/impl/config/view/custom/uc006/TestConfigPreProcessor.java b/deltaspike/modules/jsf/impl/src/test/java/org/apache/deltaspike/test/jsf/impl/config/view/custom/uc006/TestConfigPreProcessor.java new file mode 100644 index 000..fc077ea --- /dev/null +++ b/deltaspike/modules/jsf/impl/src/test/java/org/apache/deltaspike/test/jsf/impl/config/view/custom/uc006/TestConfigPreProcessor.java @@ -0,0 +1,34 @@ +/* + * 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.deltaspike.test.jsf.impl.config.view.custom.uc006; + +import org.apache.deltaspike.core.spi.config.view.ConfigPreProcessor; +import org.apache.deltaspike.core.spi.config.view.ViewConfigNode; +import org.apache.deltaspike.jsf.api.config.view.View; +import org.apache.deltaspike.jsf.api.literal.ViewLiteral; + +public class TestConfigPreProcessor implements ConfigPreProcessor +{ +@Override +
svn commit: r1500454 - /deltaspike/site/trunk/content/jsf.mdtext
Author: gpetracek Date: Sun Jul 7 15:36:15 2013 New Revision: 1500454 URL: http://svn.apache.org/r1500454 Log: updated content Modified: deltaspike/site/trunk/content/jsf.mdtext Modified: deltaspike/site/trunk/content/jsf.mdtext URL: http://svn.apache.org/viewvc/deltaspike/site/trunk/content/jsf.mdtext?rev=1500454&r1=1500453&r2=1500454&view=diff == --- deltaspike/site/trunk/content/jsf.mdtext (original) +++ deltaspike/site/trunk/content/jsf.mdtext Sun Jul 7 15:36:15 2013 @@ -684,6 +684,46 @@ Via a `TargetViewConfigProvider` it's po ## View-Config SPI [TODO] +### ConfigDescriptorValidator + +Allows to validate the final view-config descriptors before they get deployed. +Since the config-descriptor contains e.g. the final path, it's also possible to validate if the corresponding file exists. +Use `ViewConfigRoot` to configure 1-n validators. + +### ConfigNodeConverter + +Allows to provide custom strategies to process the nodes of the built config-tree. +Use `ViewConfigRoot` to configure a custom converter. + +### ConfigPreProcessor + +Allows to change the found meta-data (e.g. replace default values, callbacks,...) or the `ViewConfigNode` itself. + +### InlineMetaDataTransformer + +Allows to transform an annotation annotated with @InlineViewMetaData to an annotation annotated with @ViewMetaData. +This transformer is optional and only needed if it should result in the same at runtime, but the inline-meta-data needs a different syntax via a different annotation (compared to the view-config meta-data). +See e.g. `@ViewRef` vs. `@ViewControllerRef`. + +### TargetViewConfigProvider + +Allows to provide a custom reference to `ViewConfig` classes (see e.g. `@InlineViewMetaData` and `@ViewRef`) + +### ViewConfigInheritanceStrategy + +Allows to customize the inheritance-strategy for meta-data. +E.g. inheritance via std. java inheritance vs. inheritance via nested interfaces. +Use `ViewConfigRoot` to configure a custom inheritance-strategy. + +### ViewConfigNode + +Node-type used for building the meta-data-tree during the bootstrapping process. + +### @ViewConfigRoot + +Optional annotation which allows to provide custom implementations. +Only annotate one `ViewConfig` class which represents the root node. + ## Activation of custom naming conventions DeltaSpike allows to customize the default naming convention via `View.DefaultBasePathBuilder` and/or `View.DefaultFileNameBuilder` and/or `View.DefaultExtensionBuilder`.
svn commit: r1500457 - /deltaspike/site/trunk/content/jsf.mdtext
Author: gpetracek Date: Sun Jul 7 15:38:43 2013 New Revision: 1500457 URL: http://svn.apache.org/r1500457 Log: updated content Modified: deltaspike/site/trunk/content/jsf.mdtext Modified: deltaspike/site/trunk/content/jsf.mdtext URL: http://svn.apache.org/viewvc/deltaspike/site/trunk/content/jsf.mdtext?rev=1500457&r1=1500456&r2=1500457&view=diff == --- deltaspike/site/trunk/content/jsf.mdtext (original) +++ deltaspike/site/trunk/content/jsf.mdtext Sun Jul 7 15:38:43 2013 @@ -701,7 +701,7 @@ Allows to change the found meta-data (e. ### InlineMetaDataTransformer -Allows to transform an annotation annotated with @InlineViewMetaData to an annotation annotated with @ViewMetaData. +Allows to transform an annotation annotated with `@InlineViewMetaData` to an annotation annotated with `@ViewMetaData`. This transformer is optional and only needed if it should result in the same at runtime, but the inline-meta-data needs a different syntax via a different annotation (compared to the view-config meta-data). See e.g. `@ViewRef` vs. `@ViewControllerRef`.
svn commit: r1500458 - /deltaspike/site/trunk/content/jsf.mdtext
Author: gpetracek Date: Sun Jul 7 15:40:34 2013 New Revision: 1500458 URL: http://svn.apache.org/r1500458 Log: updated content Modified: deltaspike/site/trunk/content/jsf.mdtext Modified: deltaspike/site/trunk/content/jsf.mdtext URL: http://svn.apache.org/viewvc/deltaspike/site/trunk/content/jsf.mdtext?rev=1500458&r1=1500457&r2=1500458&view=diff == --- deltaspike/site/trunk/content/jsf.mdtext (original) +++ deltaspike/site/trunk/content/jsf.mdtext Sun Jul 7 15:40:34 2013 @@ -688,12 +688,12 @@ Via a `TargetViewConfigProvider` it's po Allows to validate the final view-config descriptors before they get deployed. Since the config-descriptor contains e.g. the final path, it's also possible to validate if the corresponding file exists. -Use `ViewConfigRoot` to configure 1-n validators. +Use `@ViewConfigRoot` to configure 1-n validators. ### ConfigNodeConverter Allows to provide custom strategies to process the nodes of the built config-tree. -Use `ViewConfigRoot` to configure a custom converter. +Use `@ViewConfigRoot` to configure a custom converter. ### ConfigPreProcessor @@ -713,7 +713,7 @@ Allows to provide a custom reference to Allows to customize the inheritance-strategy for meta-data. E.g. inheritance via std. java inheritance vs. inheritance via nested interfaces. -Use `ViewConfigRoot` to configure a custom inheritance-strategy. +Use `@ViewConfigRoot` to configure a custom inheritance-strategy. ### ViewConfigNode
svn commit: r868720 - /websites/production/deltaspike/content/
Author: gpetracek Date: Sun Jul 7 15:42:02 2013 New Revision: 868720 Log: Publishing svnmucc operation to deltaspike site by gpetracek Added: websites/production/deltaspike/content/ - copied from r868719, websites/staging/deltaspike/trunk/content/
git commit: DELTASPIKE-410 improved compatibility with mojarra
Updated Branches: refs/heads/master 109af9847 -> 6060db960 DELTASPIKE-410 improved compatibility with mojarra Project: http://git-wip-us.apache.org/repos/asf/deltaspike/repo Commit: http://git-wip-us.apache.org/repos/asf/deltaspike/commit/6060db96 Tree: http://git-wip-us.apache.org/repos/asf/deltaspike/tree/6060db96 Diff: http://git-wip-us.apache.org/repos/asf/deltaspike/diff/6060db96 Branch: refs/heads/master Commit: 6060db960d2e5eac128d43f95f92c5cb4baa0d4e Parents: 109af98 Author: gpetracek Authored: Tue Sep 10 12:33:40 2013 +0200 Committer: gpetracek Committed: Tue Sep 10 12:33:50 2013 +0200 -- .../deltaspike/jsf/api/config/JsfModuleConfig.java | 9 - .../navigation/DeltaSpikeNavigationHandler.java| 17 - 2 files changed, 26 deletions(-) -- http://git-wip-us.apache.org/repos/asf/deltaspike/blob/6060db96/deltaspike/modules/jsf/api/src/main/java/org/apache/deltaspike/jsf/api/config/JsfModuleConfig.java -- diff --git a/deltaspike/modules/jsf/api/src/main/java/org/apache/deltaspike/jsf/api/config/JsfModuleConfig.java b/deltaspike/modules/jsf/api/src/main/java/org/apache/deltaspike/jsf/api/config/JsfModuleConfig.java index 949d200..33c8341 100644 --- a/deltaspike/modules/jsf/api/src/main/java/org/apache/deltaspike/jsf/api/config/JsfModuleConfig.java +++ b/deltaspike/modules/jsf/api/src/main/java/org/apache/deltaspike/jsf/api/config/JsfModuleConfig.java @@ -45,15 +45,6 @@ public class JsfModuleConfig implements DeltaSpikeConfig } /** - * @return true for creating additional navigation-cases based on view configs for - * ConfigurableNavigationHandler#getNavigationCases - */ -public boolean isUseViewConfigsAsNavigationCasesEnabled() -{ -return true; -} - -/** * Per default all faces-messages are preserved for the next rendering process * @return true if the messages should be preserved automatically, false otherwise */ http://git-wip-us.apache.org/repos/asf/deltaspike/blob/6060db96/deltaspike/modules/jsf/impl/src/main/java/org/apache/deltaspike/jsf/impl/navigation/DeltaSpikeNavigationHandler.java -- diff --git a/deltaspike/modules/jsf/impl/src/main/java/org/apache/deltaspike/jsf/impl/navigation/DeltaSpikeNavigationHandler.java b/deltaspike/modules/jsf/impl/src/main/java/org/apache/deltaspike/jsf/impl/navigation/DeltaSpikeNavigationHandler.java index fd01bf6..cd0d1ed 100644 --- a/deltaspike/modules/jsf/impl/src/main/java/org/apache/deltaspike/jsf/impl/navigation/DeltaSpikeNavigationHandler.java +++ b/deltaspike/modules/jsf/impl/src/main/java/org/apache/deltaspike/jsf/impl/navigation/DeltaSpikeNavigationHandler.java @@ -22,11 +22,9 @@ import org.apache.deltaspike.core.api.config.view.DefaultErrorView; import org.apache.deltaspike.core.api.config.view.ViewConfig; import org.apache.deltaspike.core.api.config.view.metadata.ViewConfigDescriptor; import org.apache.deltaspike.core.api.config.view.metadata.ViewConfigResolver; -import org.apache.deltaspike.core.api.provider.BeanProvider; import org.apache.deltaspike.core.spi.activation.Deactivatable; import org.apache.deltaspike.core.util.ClassDeactivationUtils; import org.apache.deltaspike.core.util.ClassUtils; -import org.apache.deltaspike.jsf.api.config.JsfModuleConfig; import org.apache.deltaspike.jsf.api.config.view.View; import org.apache.deltaspike.jsf.impl.config.view.navigation.NavigationCaseMapWrapper; import org.apache.deltaspike.jsf.impl.config.view.navigation.ViewConfigAwareNavigationHandler; @@ -51,7 +49,6 @@ public class DeltaSpikeNavigationHandler extends ConfigurableNavigationHandler i private final NavigationHandler wrapped; private final boolean activated; -private final boolean addViewConfigsAsNavigationCase; /** * Constructor for wrapping the given {@link NavigationHandler} @@ -62,8 +59,6 @@ public class DeltaSpikeNavigationHandler extends ConfigurableNavigationHandler i { this.wrapped = navigationHandler; this.activated = ClassDeactivationUtils.isActivated(getClass()); - -this.addViewConfigsAsNavigationCase = this.activated && isAddViewConfigsAsNavigationCaseActivated(); } @Override @@ -171,18 +166,6 @@ public class DeltaSpikeNavigationHandler extends ConfigurableNavigationHandler i result = new HashMap>(); } -if (!this.addViewConfigsAsNavigationCase) -{ -return result; -} - return new NavigationCaseMapWrapper(result); } - -private boolean isAddViewConfigsAsNavigationCaseActivated() -{ -JsfModuleConfig config = BeanProvider.getContextualReference(JsfModu
[1/2] git commit: DELTASPIKE-415 fixed path-name in case of @Folder with default-name
Updated Branches: refs/heads/master e9038460f -> bdc9cdce6 DELTASPIKE-415 fixed path-name in case of @Folder with default-name Project: http://git-wip-us.apache.org/repos/asf/deltaspike/repo Commit: http://git-wip-us.apache.org/repos/asf/deltaspike/commit/c24b6823 Tree: http://git-wip-us.apache.org/repos/asf/deltaspike/tree/c24b6823 Diff: http://git-wip-us.apache.org/repos/asf/deltaspike/diff/c24b6823 Branch: refs/heads/master Commit: c24b6823795b5d1da7965f7d53308a654f76b975 Parents: e903846 Author: gpetracek Authored: Sat Oct 5 14:37:01 2013 +0200 Committer: gpetracek Committed: Sat Oct 5 14:42:55 2013 +0200 -- .../jsf/util/NamingConventionUtils.java | 6 + .../view/navigation/syntax/uc008/Pages.java | 36 .../navigation/syntax/uc008/ViewConfigTest.java | 165 +++ 3 files changed, 207 insertions(+) -- http://git-wip-us.apache.org/repos/asf/deltaspike/blob/c24b6823/deltaspike/modules/jsf/api/src/main/java/org/apache/deltaspike/jsf/util/NamingConventionUtils.java -- diff --git a/deltaspike/modules/jsf/api/src/main/java/org/apache/deltaspike/jsf/util/NamingConventionUtils.java b/deltaspike/modules/jsf/api/src/main/java/org/apache/deltaspike/jsf/util/NamingConventionUtils.java index b45e1f5..a933a00 100644 --- a/deltaspike/modules/jsf/api/src/main/java/org/apache/deltaspike/jsf/util/NamingConventionUtils.java +++ b/deltaspike/modules/jsf/api/src/main/java/org/apache/deltaspike/jsf/util/NamingConventionUtils.java @@ -39,6 +39,7 @@ public abstract class NamingConventionUtils if (Folder.class.isAssignableFrom(nodeMetaData.annotationType())) { folderMetaData = (Folder)nodeMetaData; +break; } } @@ -50,6 +51,11 @@ public abstract class NamingConventionUtils folderName = folderMetaData.name(); } +if (".".equals(folderName)) +{ +folderName = null; //default value -> fallback to the default naming +} + if (folderName == null) { folderName = node.getSource().getSimpleName(); http://git-wip-us.apache.org/repos/asf/deltaspike/blob/c24b6823/deltaspike/modules/jsf/impl/src/test/java/org/apache/deltaspike/test/jsf/impl/config/view/navigation/syntax/uc008/Pages.java -- diff --git a/deltaspike/modules/jsf/impl/src/test/java/org/apache/deltaspike/test/jsf/impl/config/view/navigation/syntax/uc008/Pages.java b/deltaspike/modules/jsf/impl/src/test/java/org/apache/deltaspike/test/jsf/impl/config/view/navigation/syntax/uc008/Pages.java new file mode 100644 index 000..0dff85f --- /dev/null +++ b/deltaspike/modules/jsf/impl/src/test/java/org/apache/deltaspike/test/jsf/impl/config/view/navigation/syntax/uc008/Pages.java @@ -0,0 +1,36 @@ +/* + * 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.deltaspike.test.jsf.impl.config.view.navigation.syntax.uc008; + +import org.apache.deltaspike.core.api.config.view.ViewConfig; +import org.apache.deltaspike.jsf.api.config.view.Folder; +import org.apache.deltaspike.jsf.api.config.view.View; + +@Folder +interface Pages extends ViewConfig +{ +@Folder +interface Admin extends Pages +{ +@View +class Index implements Admin +{ +} +} +} http://git-wip-us.apache.org/repos/asf/deltaspike/blob/c24b6823/deltaspike/modules/jsf/impl/src/test/java/org/apache/deltaspike/test/jsf/impl/config/view/navigation/syntax/uc008/ViewConfigTest.java -- diff --git a/deltaspike/modules/jsf/impl/src/test/java/org/apache/deltaspike/test/jsf/impl/config/view/navigation/syntax/uc008/ViewConfigTest.java b/deltaspike/modules/jsf/impl/src/test/java/org/apache/deltaspike/test/jsf/impl/config/view/navigation/syntax/uc008/ViewConfigTest.java new file mode 100644 index 000..a4573b9 --- /dev/null +++ b/delta
[2/2] git commit: DELTASPIKE-423 filter inherited @Folder meta-data
DELTASPIKE-423 filter inherited @Folder meta-data (DefaultViewPathConfigDescriptor provides the final value via @View#basePath) Project: http://git-wip-us.apache.org/repos/asf/deltaspike/repo Commit: http://git-wip-us.apache.org/repos/asf/deltaspike/commit/bdc9cdce Tree: http://git-wip-us.apache.org/repos/asf/deltaspike/tree/bdc9cdce Diff: http://git-wip-us.apache.org/repos/asf/deltaspike/diff/bdc9cdce Branch: refs/heads/master Commit: bdc9cdce6acae2df460897ff1df63e3265df67a3 Parents: c24b682 Author: gpetracek Authored: Sat Oct 5 14:38:18 2013 +0200 Committer: gpetracek Committed: Sat Oct 5 14:48:22 2013 +0200 -- .../config/view/DefaultConfigNodeConverter.java | 17 +++- .../navigation/syntax/uc003/ViewConfigTest.java | 11 ++ .../navigation/syntax/uc004/ViewConfigTest.java | 20 +++ .../navigation/syntax/uc005/ViewConfigTest.java | 17 .../navigation/syntax/uc006/ViewConfigTest.java | 1 + .../navigation/syntax/uc007/ViewConfigTest.java | 21 .../navigation/syntax/uc008/ViewConfigTest.java | 2 ++ 7 files changed, 88 insertions(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/deltaspike/blob/bdc9cdce/deltaspike/modules/jsf/impl/src/main/java/org/apache/deltaspike/jsf/impl/config/view/DefaultConfigNodeConverter.java -- diff --git a/deltaspike/modules/jsf/impl/src/main/java/org/apache/deltaspike/jsf/impl/config/view/DefaultConfigNodeConverter.java b/deltaspike/modules/jsf/impl/src/main/java/org/apache/deltaspike/jsf/impl/config/view/DefaultConfigNodeConverter.java index c949dee..d7e6b97 100644 --- a/deltaspike/modules/jsf/impl/src/main/java/org/apache/deltaspike/jsf/impl/config/view/DefaultConfigNodeConverter.java +++ b/deltaspike/modules/jsf/impl/src/main/java/org/apache/deltaspike/jsf/impl/config/view/DefaultConfigNodeConverter.java @@ -63,7 +63,7 @@ public class DefaultConfigNodeConverter implements ConfigNodeConverter View viewAnnotation = findMetaDataByType(mergedMetaData, View.class); String viewId = viewAnnotation.basePath() + viewAnnotation.name() + "." + viewAnnotation.extension(); return new DefaultViewPathConfigDescriptor(viewId, node.getSource(), -mergedMetaData, node.getCallbackDescriptors()); +filterInheritedFolderMetaData(mergedMetaData), node.getCallbackDescriptors()); } else { @@ -249,4 +249,19 @@ public class DefaultConfigNodeConverter implements ConfigNodeConverter } return null; } + +private List filterInheritedFolderMetaData(List mergedMetaData) +{ +List result = new ArrayList(); + +for (Annotation metaData : mergedMetaData) +{ +if (!Folder.class.equals(metaData.annotationType())) +{ +result.add(metaData); +} +} + +return result; +} } http://git-wip-us.apache.org/repos/asf/deltaspike/blob/bdc9cdce/deltaspike/modules/jsf/impl/src/test/java/org/apache/deltaspike/test/jsf/impl/config/view/navigation/syntax/uc003/ViewConfigTest.java -- diff --git a/deltaspike/modules/jsf/impl/src/test/java/org/apache/deltaspike/test/jsf/impl/config/view/navigation/syntax/uc003/ViewConfigTest.java b/deltaspike/modules/jsf/impl/src/test/java/org/apache/deltaspike/test/jsf/impl/config/view/navigation/syntax/uc003/ViewConfigTest.java index e8aa818..93ca3ef 100644 --- a/deltaspike/modules/jsf/impl/src/test/java/org/apache/deltaspike/test/jsf/impl/config/view/navigation/syntax/uc003/ViewConfigTest.java +++ b/deltaspike/modules/jsf/impl/src/test/java/org/apache/deltaspike/test/jsf/impl/config/view/navigation/syntax/uc003/ViewConfigTest.java @@ -207,6 +207,17 @@ public class ViewConfigTest Assert.assertEquals(View.Extension.XHTML, (viewConfigDescriptor.getMetaData(View.class).iterator().next()).extension()); +ConfigDescriptor folderDescriptor = viewConfigResolver.getConfigDescriptor(Pages.Admin.class); + +Assert.assertNotNull(folderDescriptor); +Assert.assertEquals("/pages/admin/", folderDescriptor.getPath()); +Assert.assertEquals(Pages.Admin.class, folderDescriptor.getConfigClass()); + +Assert.assertNotNull(folderDescriptor.getMetaData()); +Assert.assertEquals(1, folderDescriptor.getMetaData().size()); +Assert.assertEquals("/pages/admin/", ((Folder)folderDescriptor.getMetaData().iterator().next()).name()); + + viewConfigDescriptor = viewConfigResolver.getViewConfigDescriptor(Pages.Admin.Index.class); Assert.assertNotNull(viewConfigDescriptor); http://git-wip-us.apache.org/repo
git commit: DELTASPIKE-426 support for cdi beans as jsf converters and validators
Updated Branches: refs/heads/master 403ce9425 -> b209f589a DELTASPIKE-426 support for cdi beans as jsf converters and validators Project: http://git-wip-us.apache.org/repos/asf/deltaspike/repo Commit: http://git-wip-us.apache.org/repos/asf/deltaspike/commit/b209f589 Tree: http://git-wip-us.apache.org/repos/asf/deltaspike/tree/b209f589 Diff: http://git-wip-us.apache.org/repos/asf/deltaspike/diff/b209f589 Branch: refs/heads/master Commit: b209f589aaee5604ce01cb646118a2a43a08c5a9 Parents: 403ce94 Author: gpetracek Authored: Sun Oct 13 16:46:46 2013 +0200 Committer: gpetracek Committed: Sun Oct 13 17:42:09 2013 +0200 -- .../jsf/api/config/JsfModuleConfig.java | 18 +++ .../jsf/impl/injection/AbstractBeanStorage.java | 54 + .../AbstractContextualReferenceWrapper.java | 100 + .../jsf/impl/injection/ConverterWrapper.java| 44 .../jsf/impl/injection/DependentBeanEntry.java | 54 + .../InjectionAwareApplicationWrapper.java | 111 +++ .../impl/injection/ManagedArtifactResolver.java | 102 + .../injection/RequestDependentBeanStorage.java | 26 + .../jsf/impl/injection/ValidatorWrapper.java| 38 +++ .../injection/ViewDependentBeanStorage.java | 28 + .../request/DeltaSpikeFacesContextWrapper.java | 16 +++ 11 files changed, 591 insertions(+) -- http://git-wip-us.apache.org/repos/asf/deltaspike/blob/b209f589/deltaspike/modules/jsf/api/src/main/java/org/apache/deltaspike/jsf/api/config/JsfModuleConfig.java -- diff --git a/deltaspike/modules/jsf/api/src/main/java/org/apache/deltaspike/jsf/api/config/JsfModuleConfig.java b/deltaspike/modules/jsf/api/src/main/java/org/apache/deltaspike/jsf/api/config/JsfModuleConfig.java index 33c8341..b5b84b8 100644 --- a/deltaspike/modules/jsf/api/src/main/java/org/apache/deltaspike/jsf/api/config/JsfModuleConfig.java +++ b/deltaspike/modules/jsf/api/src/main/java/org/apache/deltaspike/jsf/api/config/JsfModuleConfig.java @@ -63,4 +63,22 @@ public class JsfModuleConfig implements DeltaSpikeConfig { return false; } + +/** + * Per default converters get wrapped to restore them properly during a postback (significant without overhead). + * @return true if converters should be handled as std. CDI beans, false otherwise + */ +public boolean isContainerManagedConvertersEnabled() +{ +return true; +} + +/** + * Per default validators get wrapped to restore them properly during a postback (significant without overhead). + * @return true if validators should be handled as std. CDI beans, false otherwise + */ +public boolean isContainerManagedValidatorsEnabled() +{ +return true; +} } http://git-wip-us.apache.org/repos/asf/deltaspike/blob/b209f589/deltaspike/modules/jsf/impl/src/main/java/org/apache/deltaspike/jsf/impl/injection/AbstractBeanStorage.java -- diff --git a/deltaspike/modules/jsf/impl/src/main/java/org/apache/deltaspike/jsf/impl/injection/AbstractBeanStorage.java b/deltaspike/modules/jsf/impl/src/main/java/org/apache/deltaspike/jsf/impl/injection/AbstractBeanStorage.java new file mode 100644 index 000..4f1c79d --- /dev/null +++ b/deltaspike/modules/jsf/impl/src/main/java/org/apache/deltaspike/jsf/impl/injection/AbstractBeanStorage.java @@ -0,0 +1,54 @@ +/* + * 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.deltaspike.jsf.impl.injection; + +import javax.annotation.PreDestroy; +import java.util.ArrayList; +import java.util.List; +import java.util.logging.Level; +import java.util.logging.Logger; + +abstract class AbstractBeanStorage +{ +private static final Logger LOG = Logger.getLogger(AbstractBeanStorage.class.getName()); + +private List dependentBeanEntries = new ArrayList(); + +void add(DependentBeanEntry dependentBeanEntry) +{ +this.dependentBeanEntries
git commit: DELTASPIKE-426 scope upgrade via extension
Updated Branches: refs/heads/master 38b99026b -> 21a309781 DELTASPIKE-426 scope upgrade via extension Project: http://git-wip-us.apache.org/repos/asf/deltaspike/repo Commit: http://git-wip-us.apache.org/repos/asf/deltaspike/commit/21a30978 Tree: http://git-wip-us.apache.org/repos/asf/deltaspike/tree/21a30978 Diff: http://git-wip-us.apache.org/repos/asf/deltaspike/diff/21a30978 Branch: refs/heads/master Commit: 21a3097818f0f9d6a11390dd4f370d04e688106d Parents: 38b9902 Author: gpetracek Authored: Tue Oct 15 23:03:32 2013 +0200 Committer: gpetracek Committed: Tue Oct 15 23:34:34 2013 +0200 -- .../jsf/api/literal/ViewScopedLiteral.java | 27 .../jsf/impl/injection/AbstractBeanStorage.java | 54 .../ConverterAndValidatorExtension.java | 122 +++ .../jsf/impl/injection/ConverterWrapper.java| 2 + .../jsf/impl/injection/DependentBeanEntry.java | 54 .../impl/injection/ManagedArtifactResolver.java | 47 +-- .../injection/RequestDependentBeanStorage.java | 26 .../jsf/impl/injection/ValidatorWrapper.java| 2 + .../injection/ViewDependentBeanStorage.java | 28 - .../javax.enterprise.inject.spi.Extension | 3 +- 10 files changed, 157 insertions(+), 208 deletions(-) -- http://git-wip-us.apache.org/repos/asf/deltaspike/blob/21a30978/deltaspike/modules/jsf/api/src/main/java/org/apache/deltaspike/jsf/api/literal/ViewScopedLiteral.java -- diff --git a/deltaspike/modules/jsf/api/src/main/java/org/apache/deltaspike/jsf/api/literal/ViewScopedLiteral.java b/deltaspike/modules/jsf/api/src/main/java/org/apache/deltaspike/jsf/api/literal/ViewScopedLiteral.java new file mode 100644 index 000..fadd0dc --- /dev/null +++ b/deltaspike/modules/jsf/api/src/main/java/org/apache/deltaspike/jsf/api/literal/ViewScopedLiteral.java @@ -0,0 +1,27 @@ +/* + * 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.deltaspike.jsf.api.literal; + +import javax.enterprise.util.AnnotationLiteral; +import javax.faces.bean.ViewScoped; + +public class ViewScopedLiteral extends AnnotationLiteral implements ViewScoped +{ +private static final long serialVersionUID = -6260027440277811767L; +} http://git-wip-us.apache.org/repos/asf/deltaspike/blob/21a30978/deltaspike/modules/jsf/impl/src/main/java/org/apache/deltaspike/jsf/impl/injection/AbstractBeanStorage.java -- diff --git a/deltaspike/modules/jsf/impl/src/main/java/org/apache/deltaspike/jsf/impl/injection/AbstractBeanStorage.java b/deltaspike/modules/jsf/impl/src/main/java/org/apache/deltaspike/jsf/impl/injection/AbstractBeanStorage.java deleted file mode 100644 index 4f1c79d..000 --- a/deltaspike/modules/jsf/impl/src/main/java/org/apache/deltaspike/jsf/impl/injection/AbstractBeanStorage.java +++ /dev/null @@ -1,54 +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.deltaspike.jsf.impl.injection; - -import javax.annotation.PreDestroy; -import java.util.ArrayList; -import java.util.List; -import java.util.logging.Level; -import java.util.logging.Logger; - -abstract class AbstractBeanStorage -{ -private
git commit: DELTASPIKE-426 switch back to the initial approach
Updated Branches: refs/heads/master 21a309781 -> 58f6d5463 DELTASPIKE-426 switch back to the initial approach (to keep one instance per component) Project: http://git-wip-us.apache.org/repos/asf/deltaspike/repo Commit: http://git-wip-us.apache.org/repos/asf/deltaspike/commit/58f6d546 Tree: http://git-wip-us.apache.org/repos/asf/deltaspike/tree/58f6d546 Diff: http://git-wip-us.apache.org/repos/asf/deltaspike/diff/58f6d546 Branch: refs/heads/master Commit: 58f6d546310a78f3445e35d6b97b584ee6c7395b Parents: 21a3097 Author: gpetracek Authored: Wed Oct 16 10:24:41 2013 +0200 Committer: gpetracek Committed: Wed Oct 16 10:29:33 2013 +0200 -- .../jsf/api/literal/ViewScopedLiteral.java | 27 .../jsf/impl/injection/AbstractBeanStorage.java | 54 .../ConverterAndValidatorExtension.java | 122 --- .../jsf/impl/injection/ConverterWrapper.java| 2 - .../jsf/impl/injection/DependentBeanEntry.java | 54 .../impl/injection/ManagedArtifactResolver.java | 47 ++- .../injection/RequestDependentBeanStorage.java | 26 .../jsf/impl/injection/ValidatorWrapper.java| 2 - .../injection/ViewDependentBeanStorage.java | 28 + .../javax.enterprise.inject.spi.Extension | 3 +- 10 files changed, 208 insertions(+), 157 deletions(-) -- http://git-wip-us.apache.org/repos/asf/deltaspike/blob/58f6d546/deltaspike/modules/jsf/api/src/main/java/org/apache/deltaspike/jsf/api/literal/ViewScopedLiteral.java -- diff --git a/deltaspike/modules/jsf/api/src/main/java/org/apache/deltaspike/jsf/api/literal/ViewScopedLiteral.java b/deltaspike/modules/jsf/api/src/main/java/org/apache/deltaspike/jsf/api/literal/ViewScopedLiteral.java deleted file mode 100644 index fadd0dc..000 --- a/deltaspike/modules/jsf/api/src/main/java/org/apache/deltaspike/jsf/api/literal/ViewScopedLiteral.java +++ /dev/null @@ -1,27 +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.deltaspike.jsf.api.literal; - -import javax.enterprise.util.AnnotationLiteral; -import javax.faces.bean.ViewScoped; - -public class ViewScopedLiteral extends AnnotationLiteral implements ViewScoped -{ -private static final long serialVersionUID = -6260027440277811767L; -} http://git-wip-us.apache.org/repos/asf/deltaspike/blob/58f6d546/deltaspike/modules/jsf/impl/src/main/java/org/apache/deltaspike/jsf/impl/injection/AbstractBeanStorage.java -- diff --git a/deltaspike/modules/jsf/impl/src/main/java/org/apache/deltaspike/jsf/impl/injection/AbstractBeanStorage.java b/deltaspike/modules/jsf/impl/src/main/java/org/apache/deltaspike/jsf/impl/injection/AbstractBeanStorage.java new file mode 100644 index 000..4f1c79d --- /dev/null +++ b/deltaspike/modules/jsf/impl/src/main/java/org/apache/deltaspike/jsf/impl/injection/AbstractBeanStorage.java @@ -0,0 +1,54 @@ +/* + * 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.deltaspike.jsf.impl.injection; + +import javax.annotation.PreDestroy; +import java.util.ArrayList; +import java.util.List; +import java.util.logging.Level; +import java.util.logging.Logger; + +abstract class Abstr
git commit: DELTASPIKE-428 updated dependencies for weld 2.1
Updated Branches: refs/heads/master 58f6d5463 -> dc0e5f556 DELTASPIKE-428 updated dependencies for weld 2.1 Project: http://git-wip-us.apache.org/repos/asf/deltaspike/repo Commit: http://git-wip-us.apache.org/repos/asf/deltaspike/commit/dc0e5f55 Tree: http://git-wip-us.apache.org/repos/asf/deltaspike/tree/dc0e5f55 Diff: http://git-wip-us.apache.org/repos/asf/deltaspike/diff/dc0e5f55 Branch: refs/heads/master Commit: dc0e5f556c7d5efc603c0418d6df4a079af4dfc8 Parents: 58f6d54 Author: gpetracek Authored: Thu Oct 17 12:39:38 2013 +0200 Committer: gpetracek Committed: Thu Oct 17 12:39:38 2013 +0200 -- deltaspike/parent/code/pom.xml | 1 + 1 file changed, 1 insertion(+) -- http://git-wip-us.apache.org/repos/asf/deltaspike/blob/dc0e5f55/deltaspike/parent/code/pom.xml -- diff --git a/deltaspike/parent/code/pom.xml b/deltaspike/parent/code/pom.xml index ca15960..bd33c72 100644 --- a/deltaspike/parent/code/pom.xml +++ b/deltaspike/parent/code/pom.xml @@ -303,6 +303,7 @@ org.slf4j slf4j-simple +1.7.2 test
git commit: DELTASPIKE-426 removed serializable check
Updated Branches: refs/heads/master dc0e5f556 -> 709f1edf5 DELTASPIKE-426 removed serializable check Project: http://git-wip-us.apache.org/repos/asf/deltaspike/repo Commit: http://git-wip-us.apache.org/repos/asf/deltaspike/commit/709f1edf Tree: http://git-wip-us.apache.org/repos/asf/deltaspike/tree/709f1edf Diff: http://git-wip-us.apache.org/repos/asf/deltaspike/diff/709f1edf Branch: refs/heads/master Commit: 709f1edf59ec3e2963d34c0cdca25f0ffcc9ffe8 Parents: dc0e5f5 Author: gpetracek Authored: Sat Oct 19 10:55:41 2013 +0200 Committer: gpetracek Committed: Sat Oct 19 10:55:41 2013 +0200 -- .../impl/injection/ManagedArtifactResolver.java | 12 + .../injection/RequestDependentBeanStorage.java | 1 + .../injection/ViewDependentBeanStorage.java | 28 3 files changed, 2 insertions(+), 39 deletions(-) -- http://git-wip-us.apache.org/repos/asf/deltaspike/blob/709f1edf/deltaspike/modules/jsf/impl/src/main/java/org/apache/deltaspike/jsf/impl/injection/ManagedArtifactResolver.java -- diff --git a/deltaspike/modules/jsf/impl/src/main/java/org/apache/deltaspike/jsf/impl/injection/ManagedArtifactResolver.java b/deltaspike/modules/jsf/impl/src/main/java/org/apache/deltaspike/jsf/impl/injection/ManagedArtifactResolver.java index 417b724..70567fe 100644 --- a/deltaspike/modules/jsf/impl/src/main/java/org/apache/deltaspike/jsf/impl/injection/ManagedArtifactResolver.java +++ b/deltaspike/modules/jsf/impl/src/main/java/org/apache/deltaspike/jsf/impl/injection/ManagedArtifactResolver.java @@ -28,7 +28,6 @@ import javax.enterprise.inject.spi.Bean; import javax.enterprise.inject.spi.BeanManager; import javax.faces.convert.Converter; import javax.faces.validator.Validator; -import java.io.Serializable; import java.util.Set; @Typed() @@ -82,16 +81,7 @@ public abstract class ManagedArtifactResolver if (bean.getScope().equals(Dependent.class)) { -AbstractBeanStorage beanStorage; - -if (Serializable.class.isAssignableFrom(bean.getBeanClass())) -{ -beanStorage = BeanProvider.getContextualReference(ViewDependentBeanStorage.class); -} -else -{ -beanStorage = BeanProvider.getContextualReference(RequestDependentBeanStorage.class); -} +AbstractBeanStorage beanStorage = BeanProvider.getContextualReference(RequestDependentBeanStorage.class); //noinspection unchecked beanStorage.add(new DependentBeanEntry(result, bean, creationalContext)); http://git-wip-us.apache.org/repos/asf/deltaspike/blob/709f1edf/deltaspike/modules/jsf/impl/src/main/java/org/apache/deltaspike/jsf/impl/injection/RequestDependentBeanStorage.java -- diff --git a/deltaspike/modules/jsf/impl/src/main/java/org/apache/deltaspike/jsf/impl/injection/RequestDependentBeanStorage.java b/deltaspike/modules/jsf/impl/src/main/java/org/apache/deltaspike/jsf/impl/injection/RequestDependentBeanStorage.java index 93a7299..55c4b97 100644 --- a/deltaspike/modules/jsf/impl/src/main/java/org/apache/deltaspike/jsf/impl/injection/RequestDependentBeanStorage.java +++ b/deltaspike/modules/jsf/impl/src/main/java/org/apache/deltaspike/jsf/impl/injection/RequestDependentBeanStorage.java @@ -20,6 +20,7 @@ package org.apache.deltaspike.jsf.impl.injection; import javax.enterprise.context.RequestScoped; +//TODO merge with AbstractBeanStorage if ViewDependentBeanStorage isn't needed (see MYFACES-3805) @RequestScoped public class RequestDependentBeanStorage extends AbstractBeanStorage { http://git-wip-us.apache.org/repos/asf/deltaspike/blob/709f1edf/deltaspike/modules/jsf/impl/src/main/java/org/apache/deltaspike/jsf/impl/injection/ViewDependentBeanStorage.java -- diff --git a/deltaspike/modules/jsf/impl/src/main/java/org/apache/deltaspike/jsf/impl/injection/ViewDependentBeanStorage.java b/deltaspike/modules/jsf/impl/src/main/java/org/apache/deltaspike/jsf/impl/injection/ViewDependentBeanStorage.java deleted file mode 100644 index 1a62f40..000 --- a/deltaspike/modules/jsf/impl/src/main/java/org/apache/deltaspike/jsf/impl/injection/ViewDependentBeanStorage.java +++ /dev/null @@ -1,28 +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
svn commit: r1535988 - /deltaspike/site/trunk/content/migration-guide.mdtext
Author: gpetracek Date: Sat Oct 26 13:03:30 2013 New Revision: 1535988 URL: http://svn.apache.org/r1535988 Log: updated content Modified: deltaspike/site/trunk/content/migration-guide.mdtext Modified: deltaspike/site/trunk/content/migration-guide.mdtext URL: http://svn.apache.org/viewvc/deltaspike/site/trunk/content/migration-guide.mdtext?rev=1535988&r1=1535987&r2=1535988&view=diff == --- deltaspike/site/trunk/content/migration-guide.mdtext (original) +++ deltaspike/site/trunk/content/migration-guide.mdtext Sat Oct 26 13:03:30 2013 @@ -16,7 +16,6 @@ Notice:Licensed to the Apache Softwa specific language governing permissions and limitations under the License. - [TOC] *** @@ -25,6 +24,10 @@ Notice:Licensed to the Apache Softwa # Apache MyFaces CODI to Apache DeltaSpike +## Example Overview + + - [Fullstack CODI to DeltaSpike @ os890](http://s.apache.org/Ymz) + ## Basically unchanged parts Here you can see features which were added and the concept itself didn't change (only the packages, config keys,...) @@ -79,14 +82,8 @@ We couldn't agree on these features. If ### Type-safe view config -Changed names: - - - @View -> @ViewRef - - @Page -> @View - - @PageBean -> @ViewControllerBean - - @PrePageAction -> @PreViewAction - - @PageParameter -> @NavigationParameter - - PageParameterContext -> NavigationParameterContext + - Changed names + - Annotations are optional ... ([TODO]) @@ -96,4 +93,4 @@ Changed names: # JBoss Seam3 to Apache DeltaSpike -[TODO] +[TODO] \ No newline at end of file
svn commit: r884215 - /websites/production/deltaspike/content/
Author: gpetracek Date: Sat Oct 26 13:04:18 2013 New Revision: 884215 Log: Publishing svnmucc operation to deltaspike site by gpetracek Added: websites/production/deltaspike/content/ - copied from r884214, websites/staging/deltaspike/trunk/content/
svn commit: r1535989 - /deltaspike/site/trunk/content/news.mdtext
Author: gpetracek Date: Sat Oct 26 13:16:57 2013 New Revision: 1535989 URL: http://svn.apache.org/r1535989 Log: updated content Modified: deltaspike/site/trunk/content/news.mdtext Modified: deltaspike/site/trunk/content/news.mdtext URL: http://svn.apache.org/viewvc/deltaspike/site/trunk/content/news.mdtext?rev=1535989&r1=1535988&r2=1535989&view=diff == --- deltaspike/site/trunk/content/news.mdtext (original) +++ deltaspike/site/trunk/content/news.mdtext Sat Oct 26 13:16:57 2013 @@ -16,16 +16,21 @@ Notice:Licensed to the Apache Softwa specific language governing permissions and limitations under the License. - [TOC] *** # Introduction +## 5th Release (0.5) (18.09.2013) + +The Apache DeltaSpike team is pleased to announce the 5th release (v0.5). + +The [release notes][15] contains 29 JIRA tickets. + ## 4th Release (0.4) (31.05.2013) -The Apache DeltaSpike team is pleased to announce the fourth release (v0.4). This is our first release as a top level project! +The Apache DeltaSpike team is pleased to announce the fourth release (v0.4). This is our first release as a top level project! The [release notes][14] contains a large list of bug fixes and new features. @@ -183,3 +188,4 @@ After some discussions between the teams [12]: http://s.apache.org/DeltaSpike_02incubating [13]: http://s.apache.org/DeltaSpike_03incubating [14]: http://s.apache.org/DS-0.4-RNotes + [15]: http://s.apache.org/DS-0.5-RNotes
svn commit: r884219 - /websites/production/deltaspike/content/
Author: gpetracek Date: Sat Oct 26 13:17:06 2013 New Revision: 884219 Log: Publishing svnmucc operation to deltaspike site by gpetracek Added: websites/production/deltaspike/content/ - copied from r884217, websites/staging/deltaspike/trunk/content/
git commit: DELTASPIKE-256 optional transaction config
Updated Branches: refs/heads/master c1c3fa353 -> e49b9d387 DELTASPIKE-256 optional transaction config Project: http://git-wip-us.apache.org/repos/asf/deltaspike/repo Commit: http://git-wip-us.apache.org/repos/asf/deltaspike/commit/e49b9d38 Tree: http://git-wip-us.apache.org/repos/asf/deltaspike/tree/e49b9d38 Diff: http://git-wip-us.apache.org/repos/asf/deltaspike/diff/e49b9d38 Branch: refs/heads/master Commit: e49b9d387c0b868a986a288c9c661d1818b186b1 Parents: c1c3fa3 Author: gpetracek Authored: Sat Oct 26 16:06:53 2013 +0200 Committer: gpetracek Committed: Sat Oct 26 16:08:44 2013 +0200 -- .../jpa/api/transaction/TransactionConfig.java | 32 +++ .../BeanManagedUserTransactionStrategy.java | 41 +++- 2 files changed, 71 insertions(+), 2 deletions(-) -- http://git-wip-us.apache.org/repos/asf/deltaspike/blob/e49b9d38/deltaspike/modules/jpa/api/src/main/java/org/apache/deltaspike/jpa/api/transaction/TransactionConfig.java -- diff --git a/deltaspike/modules/jpa/api/src/main/java/org/apache/deltaspike/jpa/api/transaction/TransactionConfig.java b/deltaspike/modules/jpa/api/src/main/java/org/apache/deltaspike/jpa/api/transaction/TransactionConfig.java new file mode 100644 index 000..5a0f888 --- /dev/null +++ b/deltaspike/modules/jpa/api/src/main/java/org/apache/deltaspike/jpa/api/transaction/TransactionConfig.java @@ -0,0 +1,32 @@ +/* + * 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.deltaspike.jpa.api.transaction; + +import org.apache.deltaspike.core.api.config.DeltaSpikeConfig; + +/** + * Optional config for transactions + */ +public interface TransactionConfig extends DeltaSpikeConfig +{ +/** + * @return timeout in seconds or null + */ +Integer getUserTransactionTimeoutInSeconds(); +} http://git-wip-us.apache.org/repos/asf/deltaspike/blob/e49b9d38/deltaspike/modules/jpa/impl/src/main/java/org/apache/deltaspike/jpa/impl/transaction/BeanManagedUserTransactionStrategy.java -- diff --git a/deltaspike/modules/jpa/impl/src/main/java/org/apache/deltaspike/jpa/impl/transaction/BeanManagedUserTransactionStrategy.java b/deltaspike/modules/jpa/impl/src/main/java/org/apache/deltaspike/jpa/impl/transaction/BeanManagedUserTransactionStrategy.java index b814c7f..f08087a 100644 --- a/deltaspike/modules/jpa/impl/src/main/java/org/apache/deltaspike/jpa/impl/transaction/BeanManagedUserTransactionStrategy.java +++ b/deltaspike/modules/jpa/impl/src/main/java/org/apache/deltaspike/jpa/impl/transaction/BeanManagedUserTransactionStrategy.java @@ -18,8 +18,10 @@ */ package org.apache.deltaspike.jpa.impl.transaction; +import org.apache.deltaspike.core.api.provider.BeanProvider; import org.apache.deltaspike.core.impl.util.JndiUtils; import org.apache.deltaspike.core.util.ExceptionUtils; +import org.apache.deltaspike.jpa.api.transaction.TransactionConfig; import org.apache.deltaspike.jpa.impl.transaction.context.EntityManagerEntry; import javax.enterprise.context.Dependent; @@ -51,6 +53,8 @@ public class BeanManagedUserTransactionStrategy extends ResourceLocalTransaction private static final Logger LOGGER = Logger.getLogger(BeanManagedUserTransactionStrategy.class.getName()); +private transient TransactionConfig transactionConfig; + @Override protected EntityManagerEntry createEntityManagerEntry( EntityManager entityManager, Class qualifier) @@ -82,8 +86,41 @@ public class BeanManagedUserTransactionStrategy extends ResourceLocalTransaction protected Integer getDefaultTransactionTimeoutInSeconds() { -//override it and provide a custom value - if needed - TODO discuss a type-safe module-config for DELTASPIKE-256 -return null; +if (this.transactionConfig == null) +{ +lazyInit(); +} + +return transactionConfig.getUserTransactionTimeoutInSeconds(); +} + +protected syn
svn commit: r1536188 - /deltaspike/site/trunk/content/jpa.mdtext
Author: gpetracek Date: Sun Oct 27 19:37:33 2013 New Revision: 1536188 URL: http://svn.apache.org/r1536188 Log: updated content Modified: deltaspike/site/trunk/content/jpa.mdtext Modified: deltaspike/site/trunk/content/jpa.mdtext URL: http://svn.apache.org/viewvc/deltaspike/site/trunk/content/jpa.mdtext?rev=1536188&r1=1536187&r2=1536188&view=diff == --- deltaspike/site/trunk/content/jpa.mdtext (original) +++ deltaspike/site/trunk/content/jpa.mdtext Sun Oct 27 19:37:33 2013 @@ -38,7 +38,7 @@ The following example shows a simple pro Producing it as request scoped bean means that the dispose method will be called on finishing the request. As an alternative it's possible to use a special scope called `@TransactionScoped` provided by the same DeltaSpike module. -Producer for the default EntityManager: +Producer for the default EntityManager (no EE-Server): :::java //... @@ -64,6 +64,32 @@ Producer for the default EntityManager: } } +Producer for the default EntityManager (EE-Server): + +:::java +@ApplicationScoped +public class EntityManagerProducer +{ +@PersistenceUnit +private EntityManagerFactory entityManagerFactory; + +@Produces +@Default +@RequestScoped +public EntityManager create() +{ +return this.entityManagerFactory.createEntityManager(); +} + +public void dispose(@Disposes @Default EntityManager entityManager) +{ +if (entityManager.isOpen()) +{ +entityManager.close(); +} +} +} + The following examples show how to use the `EntityManager` produced by the example above. Beans with transactional method:
svn commit: r884377 - /websites/production/deltaspike/content/
Author: gpetracek Date: Sun Oct 27 19:38:31 2013 New Revision: 884377 Log: Publishing svnmucc operation to deltaspike site by gpetracek Added: websites/production/deltaspike/content/ - copied from r884376, websites/staging/deltaspike/trunk/content/
git commit: DELTASPIKE-431 @JsfPhaseListener#ordinal
Updated Branches: refs/heads/master e49b9d387 -> 951a3b6c0 DELTASPIKE-431 @JsfPhaseListener#ordinal Project: http://git-wip-us.apache.org/repos/asf/deltaspike/repo Commit: http://git-wip-us.apache.org/repos/asf/deltaspike/commit/951a3b6c Tree: http://git-wip-us.apache.org/repos/asf/deltaspike/tree/951a3b6c Diff: http://git-wip-us.apache.org/repos/asf/deltaspike/diff/951a3b6c Branch: refs/heads/master Commit: 951a3b6c0320b65d1c16ae5c204bd225cdab6861 Parents: e49b9d3 Author: gpetracek Authored: Sun Oct 27 21:21:02 2013 +0100 Committer: gpetracek Committed: Sun Oct 27 21:23:13 2013 +0100 -- .../jsf/api/listener/phase/JsfPhaseListener.java | 6 -- .../phase/JsfRequestLifecycleBroadcaster.java | 18 ++ 2 files changed, 22 insertions(+), 2 deletions(-) -- http://git-wip-us.apache.org/repos/asf/deltaspike/blob/951a3b6c/deltaspike/modules/jsf/api/src/main/java/org/apache/deltaspike/jsf/api/listener/phase/JsfPhaseListener.java -- diff --git a/deltaspike/modules/jsf/api/src/main/java/org/apache/deltaspike/jsf/api/listener/phase/JsfPhaseListener.java b/deltaspike/modules/jsf/api/src/main/java/org/apache/deltaspike/jsf/api/listener/phase/JsfPhaseListener.java index b0e533d..446a41c 100644 --- a/deltaspike/modules/jsf/api/src/main/java/org/apache/deltaspike/jsf/api/listener/phase/JsfPhaseListener.java +++ b/deltaspike/modules/jsf/api/src/main/java/org/apache/deltaspike/jsf/api/listener/phase/JsfPhaseListener.java @@ -31,8 +31,6 @@ import static java.lang.annotation.RetentionPolicy.RUNTIME; * Annotation for implementations of {@link javax.faces.event.PhaseListener}. */ -//TODO CODI supports @InvocationOrder - re-visit the discussion - @Target(TYPE) @Retention(RUNTIME) @Inherited @@ -41,4 +39,8 @@ import static java.lang.annotation.RetentionPolicy.RUNTIME; @Stereotype public @interface JsfPhaseListener { +/** + * @return ordinal for invocation-order - higher ordinals first + */ +int ordinal() default 1000; //aligned with value in BaseConfigSource } http://git-wip-us.apache.org/repos/asf/deltaspike/blob/951a3b6c/deltaspike/modules/jsf/impl/src/main/java/org/apache/deltaspike/jsf/impl/listener/phase/JsfRequestLifecycleBroadcaster.java -- diff --git a/deltaspike/modules/jsf/impl/src/main/java/org/apache/deltaspike/jsf/impl/listener/phase/JsfRequestLifecycleBroadcaster.java b/deltaspike/modules/jsf/impl/src/main/java/org/apache/deltaspike/jsf/impl/listener/phase/JsfRequestLifecycleBroadcaster.java index a6866d2..dfef069 100644 --- a/deltaspike/modules/jsf/impl/src/main/java/org/apache/deltaspike/jsf/impl/listener/phase/JsfRequestLifecycleBroadcaster.java +++ b/deltaspike/modules/jsf/impl/src/main/java/org/apache/deltaspike/jsf/impl/listener/phase/JsfRequestLifecycleBroadcaster.java @@ -32,6 +32,8 @@ import javax.faces.event.PhaseListener; import javax.inject.Inject; import java.lang.annotation.Annotation; import java.util.ArrayList; +import java.util.Collections; +import java.util.Comparator; import java.util.List; import java.util.ListIterator; @@ -68,6 +70,22 @@ public class JsfRequestLifecycleBroadcaster this.phaseListeners.add(currentPhaseListener); } } + +//higher ordinals first +sortDescending(this.phaseListeners); +} + +private static void sortDescending(List phaseListeners) +{ +Collections.sort(phaseListeners, new Comparator() +{ +@Override +public int compare(PhaseListener phaseListener1, PhaseListener phaseListener2) +{ +return (phaseListener1.getClass().getAnnotation(JsfPhaseListener.class).ordinal() > + phaseListener2.getClass().getAnnotation(JsfPhaseListener.class).ordinal()) ? -1 : 1; +} +}); } protected void broadcastBeforeEvent(PhaseEvent phaseEvent)
svn commit: r1536212 - /deltaspike/site/trunk/content/examples.mdtext
Author: gpetracek Date: Sun Oct 27 21:45:22 2013 New Revision: 1536212 URL: http://svn.apache.org/r1536212 Log: updated content Modified: deltaspike/site/trunk/content/examples.mdtext Modified: deltaspike/site/trunk/content/examples.mdtext URL: http://svn.apache.org/viewvc/deltaspike/site/trunk/content/examples.mdtext?rev=1536212&r1=1536211&r2=1536212&view=diff == --- deltaspike/site/trunk/content/examples.mdtext (original) +++ deltaspike/site/trunk/content/examples.mdtext Sun Oct 27 21:45:22 2013 @@ -16,7 +16,6 @@ Notice:Licensed to the Apache Softwa specific language governing permissions and limitations under the License. - [TOC] *** @@ -29,6 +28,7 @@ artifact-id: deltaspike-jse-owb-example # External - - [confess2012_deltaspike](https://github.com/confess/confess2012_deltaspike) + - [Fullstack CODI to DeltaSpike @ os890](http://s.apache.org/Ymz) - [jboss-as-quickstart (search for *deltaspike*)](https://github.com/jboss-jdf/jboss-as-quickstart) + - [confess2012_deltaspike](https://github.com/confess/confess2012_deltaspike)
svn commit: r884386 - /websites/production/deltaspike/content/
Author: gpetracek Date: Sun Oct 27 21:46:10 2013 New Revision: 884386 Log: Publishing svnmucc operation to deltaspike site by gpetracek Added: websites/production/deltaspike/content/ - copied from r884385, websites/staging/deltaspike/trunk/content/
svn commit: r1536213 - /deltaspike/site/trunk/content/documentation.mdtext
Author: gpetracek Date: Sun Oct 27 21:49:29 2013 New Revision: 1536213 URL: http://svn.apache.org/r1536213 Log: cleanup Modified: deltaspike/site/trunk/content/documentation.mdtext Modified: deltaspike/site/trunk/content/documentation.mdtext URL: http://svn.apache.org/viewvc/deltaspike/site/trunk/content/documentation.mdtext?rev=1536213&r1=1536212&r2=1536213&view=diff == --- deltaspike/site/trunk/content/documentation.mdtext (original) +++ deltaspike/site/trunk/content/documentation.mdtext Sun Oct 27 21:49:29 2013 @@ -309,53 +309,30 @@ The core features of DeltaSpike project Definition : Contain the API and util classes of DeltaSpike project -Features : - -* BeanProvider & Manager -* ProjectStage -* Config & Property -* Messages & I18n -* Exception Handling & Control - View details » ## Security (optional) Definition : Intercept and check security -Features : - -* - View details » ## JPA (optional) Definition : -Features : - -* - View details » ## JSF (optional) Definition : -Features : - -* - View details » ## Container Control (optional) Definition : -Features : - -* View details » ## Bean Validation (optional)
svn commit: r884389 - /websites/production/deltaspike/content/
Author: gpetracek Date: Sun Oct 27 22:19:17 2013 New Revision: 884389 Log: Publishing svnmucc operation to deltaspike site by gpetracek Added: websites/production/deltaspike/content/ - copied from r884388, websites/staging/deltaspike/trunk/content/
git commit: DELTASPIKE-432 client-window adapter for jsf 2.2 (first draft)
Updated Branches: refs/heads/master 951a3b6c0 -> 4a3da4053 DELTASPIKE-432 client-window adapter for jsf 2.2 (first draft) Project: http://git-wip-us.apache.org/repos/asf/deltaspike/repo Commit: http://git-wip-us.apache.org/repos/asf/deltaspike/commit/4a3da405 Tree: http://git-wip-us.apache.org/repos/asf/deltaspike/tree/4a3da405 Diff: http://git-wip-us.apache.org/repos/asf/deltaspike/diff/4a3da405 Branch: refs/heads/master Commit: 4a3da405381406e2b3236e86a77efa92aac1d983 Parents: 951a3b6 Author: gpetracek Authored: Fri Nov 1 19:42:53 2013 +0100 Committer: gpetracek Committed: Fri Nov 1 20:15:23 2013 +0100 -- .../jsf/api/config/JsfModuleConfig.java | 18 ++ .../spi/scope/window/ClientWindowConfig.java| 5 + .../scope/window/DefaultClientWindowConfig.java | 23 +++ .../DeltaSpikeLifecycleFactoryWrapper.java | 22 +++ .../request/DeltaSpikeLifecycleWrapper.java | 11 ++ .../JsfClientWindowAwareLifecycleWrapper.java | 165 +++ .../impl/scope/window/ClientWindowAdapter.java | 69 .../impl/scope/window/DefaultClientWindow.java | 19 ++- deltaspike/modules/jsf/pom.xml | 3 + deltaspike/parent/pom.xml | 1 + 10 files changed, 330 insertions(+), 6 deletions(-) -- http://git-wip-us.apache.org/repos/asf/deltaspike/blob/4a3da405/deltaspike/modules/jsf/api/src/main/java/org/apache/deltaspike/jsf/api/config/JsfModuleConfig.java -- diff --git a/deltaspike/modules/jsf/api/src/main/java/org/apache/deltaspike/jsf/api/config/JsfModuleConfig.java b/deltaspike/modules/jsf/api/src/main/java/org/apache/deltaspike/jsf/api/config/JsfModuleConfig.java index b5b84b8..ee2c0a6 100644 --- a/deltaspike/modules/jsf/api/src/main/java/org/apache/deltaspike/jsf/api/config/JsfModuleConfig.java +++ b/deltaspike/modules/jsf/api/src/main/java/org/apache/deltaspike/jsf/api/config/JsfModuleConfig.java @@ -19,8 +19,10 @@ package org.apache.deltaspike.jsf.api.config; import org.apache.deltaspike.core.api.config.DeltaSpikeConfig; +import org.apache.deltaspike.core.util.ClassUtils; import javax.enterprise.context.ApplicationScoped; +import javax.faces.context.FacesContext; /** * Config for all JSF specific configurations. @@ -28,6 +30,9 @@ import javax.enterprise.context.ApplicationScoped; @ApplicationScoped public class JsfModuleConfig implements DeltaSpikeConfig { +public static final String CLIENT_WINDOW_CONFIG_KEY = "javax.faces.CLIENT_WINDOW_MODE"; +public static final String CLIENT_WINDOW_CLASS_NAME = "javax.faces.lifecycle.ClientWindow"; + private static final long serialVersionUID = -487295181899986237L; protected JsfModuleConfig() @@ -81,4 +86,17 @@ public class JsfModuleConfig implements DeltaSpikeConfig { return true; } + +public boolean isDelegatedWindowHandlingEnabled() +{ +if (ClassUtils.tryToLoadClassForName(CLIENT_WINDOW_CLASS_NAME) == null) +{ +return false; +} + +String configuredWindowHandling = FacesContext.getCurrentInstance().getExternalContext() +.getInitParameter(CLIENT_WINDOW_CONFIG_KEY); + +return !(configuredWindowHandling == null || "none".equalsIgnoreCase(configuredWindowHandling.trim())); +} } http://git-wip-us.apache.org/repos/asf/deltaspike/blob/4a3da405/deltaspike/modules/jsf/api/src/main/java/org/apache/deltaspike/jsf/spi/scope/window/ClientWindowConfig.java -- diff --git a/deltaspike/modules/jsf/api/src/main/java/org/apache/deltaspike/jsf/spi/scope/window/ClientWindowConfig.java b/deltaspike/modules/jsf/api/src/main/java/org/apache/deltaspike/jsf/spi/scope/window/ClientWindowConfig.java index dd3c5db..2828bd4 100644 --- a/deltaspike/modules/jsf/api/src/main/java/org/apache/deltaspike/jsf/spi/scope/window/ClientWindowConfig.java +++ b/deltaspike/modules/jsf/api/src/main/java/org/apache/deltaspike/jsf/spi/scope/window/ClientWindowConfig.java @@ -49,6 +49,11 @@ public interface ClientWindowConfig LAZY, /** + * Delegates to the default window-handling of JSF 2.2+ (if configured) + */ +DELEGATED, + +/** * If you set this mode, you also need to provide an own {@link ClientWindow} implementation. */ CUSTOM http://git-wip-us.apache.org/repos/asf/deltaspike/blob/4a3da405/deltaspike/modules/jsf/api/src/main/java/org/apache/deltaspike/jsf/spi/scope/window/DefaultClientWindowConfig.java -- diff --git a/deltaspike/modules/jsf/api/src/main/java/org/apache/deltaspike/jsf/spi/scope/window/DefaultClientWindowC
git commit: DELTASPIKE-434 fixed RepositoryComponent
Updated Branches: refs/heads/master 4a3da4053 -> f724794a4 DELTASPIKE-434 fixed RepositoryComponent Project: http://git-wip-us.apache.org/repos/asf/deltaspike/repo Commit: http://git-wip-us.apache.org/repos/asf/deltaspike/commit/f724794a Tree: http://git-wip-us.apache.org/repos/asf/deltaspike/tree/f724794a Diff: http://git-wip-us.apache.org/repos/asf/deltaspike/diff/f724794a Branch: refs/heads/master Commit: f724794a4d7e918c009f2d3282c4dd3282467c03 Parents: 4a3da40 Author: gpetracek Authored: Fri Nov 1 22:15:00 2013 +0100 Committer: gpetracek Committed: Fri Nov 1 22:15:37 2013 +0100 -- .../data/impl/RepositoryExtension.java | 4 ++-- .../data/impl/meta/RepositoryComponent.java | 25 ++-- .../data/impl/meta/RepositoryComponents.java| 5 ++-- .../data/impl/builder/part/QueryRootTest.java | 4 ++-- 4 files changed, 29 insertions(+), 9 deletions(-) -- http://git-wip-us.apache.org/repos/asf/deltaspike/blob/f724794a/deltaspike/modules/data/impl/src/main/java/org/apache/deltaspike/data/impl/RepositoryExtension.java -- diff --git a/deltaspike/modules/data/impl/src/main/java/org/apache/deltaspike/data/impl/RepositoryExtension.java b/deltaspike/modules/data/impl/src/main/java/org/apache/deltaspike/data/impl/RepositoryExtension.java index 8ba0dca..ef098fd 100755 --- a/deltaspike/modules/data/impl/src/main/java/org/apache/deltaspike/data/impl/RepositoryExtension.java +++ b/deltaspike/modules/data/impl/src/main/java/org/apache/deltaspike/data/impl/RepositoryExtension.java @@ -63,7 +63,7 @@ public class RepositoryExtension implements Extension PersistenceUnits.instance().init(); } - void processAnnotatedType(@Observes ProcessAnnotatedType event, BeanManager beanManager) + void processAnnotatedType(@Observes ProcessAnnotatedType event) { if (isRepository(event.getAnnotatedType())) { @@ -72,7 +72,7 @@ public class RepositoryExtension implements Extension { log.log(Level.FINER, "getHandlerClass: Repository annotation detected on {0}", event.getAnnotatedType()); -RepositoryComponentsFactory.instance().add(repoClass, beanManager); +RepositoryComponentsFactory.instance().add(repoClass); } catch (RepositoryDefinitionException e) { http://git-wip-us.apache.org/repos/asf/deltaspike/blob/f724794a/deltaspike/modules/data/impl/src/main/java/org/apache/deltaspike/data/impl/meta/RepositoryComponent.java -- diff --git a/deltaspike/modules/data/impl/src/main/java/org/apache/deltaspike/data/impl/meta/RepositoryComponent.java b/deltaspike/modules/data/impl/src/main/java/org/apache/deltaspike/data/impl/meta/RepositoryComponent.java index 5acee4e..2943555 100644 --- a/deltaspike/modules/data/impl/src/main/java/org/apache/deltaspike/data/impl/meta/RepositoryComponent.java +++ b/deltaspike/modules/data/impl/src/main/java/org/apache/deltaspike/data/impl/meta/RepositoryComponent.java @@ -34,6 +34,7 @@ import javax.enterprise.inject.spi.Bean; import javax.enterprise.inject.spi.BeanManager; import javax.persistence.FlushModeType; +import org.apache.deltaspike.core.api.provider.BeanManagerProvider; import org.apache.deltaspike.data.api.EntityManagerConfig; import org.apache.deltaspike.data.api.EntityManagerResolver; import org.apache.deltaspike.data.api.Repository; @@ -53,15 +54,16 @@ public class RepositoryComponent private static final Logger log = Logger.getLogger(RepositoryComponent.class.getName()); +private volatile Boolean entityManagerResolverIsNormalScope; + private final Class repoClass; private final RepositoryEntity entityClass; private final Class entityManagerResolver; -private final boolean entityManagerResolverIsNormalScope; private final FlushModeType entityManagerFlushMode; private final Map methods = new HashMap(); -public RepositoryComponent(Class repoClass, RepositoryEntity entityClass, BeanManager beanManager) +public RepositoryComponent(Class repoClass, RepositoryEntity entityClass) { if (entityClass == null) { @@ -71,6 +73,23 @@ public class RepositoryComponent this.entityClass = entityClass; this.entityManagerResolver = extractEntityManagerResolver(repoClass); this.entityManagerFlushMode = extractEntityManagerFlushMode(repoClass); +} + +//don't trigger this lookup during ProcessAnnotatedType +private void lazyInit() +{ +if (entityManagerResolverIsNormalScope == null) +{ +init(BeanManagerProvider.getInstance().getBeanManager()); +} +
git commit: DELTASPIKE-435 upgraded dependency
Updated Branches: refs/heads/master f724794a4 -> 5a2fb3012 DELTASPIKE-435 upgraded dependency Project: http://git-wip-us.apache.org/repos/asf/deltaspike/repo Commit: http://git-wip-us.apache.org/repos/asf/deltaspike/commit/5a2fb301 Tree: http://git-wip-us.apache.org/repos/asf/deltaspike/tree/5a2fb301 Diff: http://git-wip-us.apache.org/repos/asf/deltaspike/diff/5a2fb301 Branch: refs/heads/master Commit: 5a2fb30127efd988168fdb41ab807dd80379bdaf Parents: f724794 Author: gpetracek Authored: Fri Nov 1 23:47:18 2013 +0100 Committer: gpetracek Committed: Fri Nov 1 23:47:18 2013 +0100 -- deltaspike/parent/code/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/deltaspike/blob/5a2fb301/deltaspike/parent/code/pom.xml -- diff --git a/deltaspike/parent/code/pom.xml b/deltaspike/parent/code/pom.xml index bd33c72..75d1a78 100644 --- a/deltaspike/parent/code/pom.xml +++ b/deltaspike/parent/code/pom.xml @@ -778,7 +778,7 @@ org.jboss.arquillian.container arquillian-glassfish-remote-3.1 -1.0.0.CR2 +1.0.0.CR4 test
svn commit: r1538080 - /deltaspike/site/trunk/content/build.mdtext
Author: gpetracek Date: Fri Nov 1 23:09:05 2013 New Revision: 1538080 URL: http://svn.apache.org/r1538080 Log: updated content Modified: deltaspike/site/trunk/content/build.mdtext Modified: deltaspike/site/trunk/content/build.mdtext URL: http://svn.apache.org/viewvc/deltaspike/site/trunk/content/build.mdtext?rev=1538080&r1=1538079&r2=1538080&view=diff == --- deltaspike/site/trunk/content/build.mdtext (original) +++ deltaspike/site/trunk/content/build.mdtext Fri Nov 1 23:09:05 2013 @@ -66,7 +66,7 @@ Set JBoss_HOME ### GlassFish 3.1 -Install GlassFish (default setup without admin-password) and start GlassFish with asadmin start-domain +Install GlassFish (default setup without admin-password) and start GlassFish with asadmin start-domain *and* asadmin start-database **Executing the Arquillian tests with Oracle Glassfish 3.1+**
svn commit: r1538082 - /deltaspike/site/trunk/content/build.mdtext
Author: gpetracek Date: Fri Nov 1 23:13:01 2013 New Revision: 1538082 URL: http://svn.apache.org/r1538082 Log: updated content Modified: deltaspike/site/trunk/content/build.mdtext Modified: deltaspike/site/trunk/content/build.mdtext URL: http://svn.apache.org/viewvc/deltaspike/site/trunk/content/build.mdtext?rev=1538082&r1=1538081&r2=1538082&view=diff == --- deltaspike/site/trunk/content/build.mdtext (original) +++ deltaspike/site/trunk/content/build.mdtext Fri Nov 1 23:13:01 2013 @@ -66,7 +66,7 @@ Set JBoss_HOME ### GlassFish 3.1 -Install GlassFish (default setup without admin-password) and start GlassFish with asadmin start-domain *and* asadmin start-database +Install GlassFish (default setup without admin-password) and start GlassFish with asadmin start-domain **and** asadmin start-database **Executing the Arquillian tests with Oracle Glassfish 3.1+**
svn commit: r885125 - /websites/production/deltaspike/content/
Author: gpetracek Date: Fri Nov 1 23:15:32 2013 New Revision: 885125 Log: Publishing svnmucc operation to deltaspike site by gpetracek Added: websites/production/deltaspike/content/ - copied from r885124, websites/staging/deltaspike/trunk/content/
git commit: DELTASPIKE-416 unified path handling
Updated Branches: refs/heads/master 5a2fb3012 -> 2f6d6ea62 DELTASPIKE-416 unified path handling Project: http://git-wip-us.apache.org/repos/asf/deltaspike/repo Commit: http://git-wip-us.apache.org/repos/asf/deltaspike/commit/2f6d6ea6 Tree: http://git-wip-us.apache.org/repos/asf/deltaspike/tree/2f6d6ea6 Diff: http://git-wip-us.apache.org/repos/asf/deltaspike/diff/2f6d6ea6 Branch: refs/heads/master Commit: 2f6d6ea62dbc4fee9e765547dbd65fb267e282f7 Parents: 5a2fb30 Author: gpetracek Authored: Sat Nov 2 11:47:30 2013 +0100 Committer: gpetracek Committed: Sat Nov 2 11:49:58 2013 +0100 -- .../deltaspike/jsf/api/config/view/Folder.java | 41 ++- .../deltaspike/jsf/api/config/view/View.java| 38 +- .../navigation/destination/uc005/Pages.java | 35 + .../destination/uc005/ViewConfigPathTest.java | 53 .../navigation/syntax/uc004/ViewConfigTest.java | 2 +- .../navigation/syntax/uc005/ViewConfigTest.java | 4 +- .../navigation/syntax/uc006/ViewConfigTest.java | 4 +- 7 files changed, 160 insertions(+), 17 deletions(-) -- http://git-wip-us.apache.org/repos/asf/deltaspike/blob/2f6d6ea6/deltaspike/modules/jsf/api/src/main/java/org/apache/deltaspike/jsf/api/config/view/Folder.java -- diff --git a/deltaspike/modules/jsf/api/src/main/java/org/apache/deltaspike/jsf/api/config/view/Folder.java b/deltaspike/modules/jsf/api/src/main/java/org/apache/deltaspike/jsf/api/config/view/Folder.java index 618eb5f..4edfeae 100644 --- a/deltaspike/modules/jsf/api/src/main/java/org/apache/deltaspike/jsf/api/config/view/Folder.java +++ b/deltaspike/modules/jsf/api/src/main/java/org/apache/deltaspike/jsf/api/config/view/Folder.java @@ -26,9 +26,12 @@ import org.apache.deltaspike.core.util.ClassUtils; import org.apache.deltaspike.jsf.api.literal.FolderLiteral; import org.apache.deltaspike.jsf.util.NamingConventionUtils; +import java.lang.annotation.Annotation; import java.lang.annotation.Documented; import java.lang.annotation.Retention; import java.lang.annotation.Target; +import java.util.Iterator; +import java.util.Set; import static java.lang.annotation.ElementType.TYPE; import static java.lang.annotation.RetentionPolicy.RUNTIME; @@ -79,11 +82,30 @@ public @interface Folder if (defaultValueReplaced) { -return new FolderLiteral(name, folder.folderNameBuilder()); +Folder result = new FolderLiteral(name, folder.folderNameBuilder()); +updateNodeMetaData(viewConfigNode, result); +return result; } return folder; } +private void updateNodeMetaData(ViewConfigNode viewConfigNode, Folder folder) +{ +Set metaData = viewConfigNode.getMetaData(); + +Iterator metaDataIterator = metaData.iterator(); + +while (metaDataIterator.hasNext()) +{ +if (Folder.class.equals(metaDataIterator.next().annotationType())) +{ +metaDataIterator.remove(); +break; +} +} +metaData.add(folder); +} + private NameBuilder getFolderNameBuilder(Folder folder) { NameBuilder folderNameBuilder; @@ -131,8 +153,9 @@ public @interface Folder if (name == null /*null used as marker value for dyn. added instances*/ || ".".equals(name) /*default*/) { -this.defaultValueReplaced = true; name = NamingConventionUtils.toPath(viewConfigNode); + +this.defaultValueReplaced = true; } if (name != null && name.startsWith(".")) @@ -142,6 +165,20 @@ public @interface Folder this.defaultValueReplaced = true; } +if (name != null && !name.startsWith(".") && !name.startsWith("/")) +{ +name = NamingConventionUtils.toPath(viewConfigNode.getParent()) + name; + +this.defaultValueReplaced = true; +} + +if (name != null && !name.endsWith("/")) +{ +name = name + "/"; + +this.defaultValueReplaced = true; +} + if (name != null && name.contains("//")) { name = name.replace("//", "/"); http://git-wip-us.apache.org/repos/asf/deltaspike/blob/2f6d6ea6/deltaspike/modules/jsf/api/src/main/java/org/apache/deltaspike/jsf/api/config/view/View.java -- diff --git a/deltaspi
git commit: DELTASPIKE-439 detection of invalid view-configs
Updated Branches: refs/heads/master 2f6d6ea62 -> 80720cf4c DELTASPIKE-439 detection of invalid view-configs Project: http://git-wip-us.apache.org/repos/asf/deltaspike/repo Commit: http://git-wip-us.apache.org/repos/asf/deltaspike/commit/80720cf4 Tree: http://git-wip-us.apache.org/repos/asf/deltaspike/tree/80720cf4 Diff: http://git-wip-us.apache.org/repos/asf/deltaspike/diff/80720cf4 Branch: refs/heads/master Commit: 80720cf4c4b2148b2626a330aca96a4662d0f7eb Parents: 2f6d6ea Author: gpetracek Authored: Sat Nov 2 23:10:45 2013 +0100 Committer: gpetracek Committed: Sat Nov 2 23:10:45 2013 +0100 -- .../jsf/impl/config/view/ViewConfigExtension.java| 11 +++ 1 file changed, 11 insertions(+) -- http://git-wip-us.apache.org/repos/asf/deltaspike/blob/80720cf4/deltaspike/modules/jsf/impl/src/main/java/org/apache/deltaspike/jsf/impl/config/view/ViewConfigExtension.java -- diff --git a/deltaspike/modules/jsf/impl/src/main/java/org/apache/deltaspike/jsf/impl/config/view/ViewConfigExtension.java b/deltaspike/modules/jsf/impl/src/main/java/org/apache/deltaspike/jsf/impl/config/view/ViewConfigExtension.java index 4620262..000f570 100644 --- a/deltaspike/modules/jsf/impl/src/main/java/org/apache/deltaspike/jsf/impl/config/view/ViewConfigExtension.java +++ b/deltaspike/modules/jsf/impl/src/main/java/org/apache/deltaspike/jsf/impl/config/view/ViewConfigExtension.java @@ -171,6 +171,17 @@ public class ViewConfigExtension implements Extension, Deactivatable protected void addConfigClass(Class viewConfigClass, Set viewConfigAnnotations) { +String className = viewConfigClass.getName(); +if (!className.contains(".")) +{ +if (className.contains("$")) +{ +className = className.substring(0, className.indexOf("$")); +} + +throw new IllegalStateException("Please move the class '" + className + "' to a package!"); +} + for (Annotation annotation : viewConfigAnnotations) { if (annotation.annotationType().equals(ViewConfigRoot.class))
git commit: DELTASPIKE-441 AbstractAccessDecisionVoter added
Updated Branches: refs/heads/master be37dc6b9 -> db666c570 DELTASPIKE-441 AbstractAccessDecisionVoter added Project: http://git-wip-us.apache.org/repos/asf/deltaspike/repo Commit: http://git-wip-us.apache.org/repos/asf/deltaspike/commit/db666c57 Tree: http://git-wip-us.apache.org/repos/asf/deltaspike/tree/db666c57 Diff: http://git-wip-us.apache.org/repos/asf/deltaspike/diff/db666c57 Branch: refs/heads/master Commit: db666c5709e41343c64a366bf0c853da225d5eb1 Parents: be37dc6 Author: gpetracek Authored: Sun Nov 10 19:47:51 2013 +0100 Committer: gpetracek Committed: Sun Nov 10 20:16:23 2013 +0100 -- .../AbstractAccessDecisionVoter.java| 52 .../authorization/AbstractDecisionVoter.java| 40 +++ .../authorization/DefaultSecurityViolation.java | 39 --- .../authorization/SimpleSecurityViolation.java | 40 +++ 4 files changed, 132 insertions(+), 39 deletions(-) -- http://git-wip-us.apache.org/repos/asf/deltaspike/blob/db666c57/deltaspike/modules/security/api/src/main/java/org/apache/deltaspike/security/api/authorization/AbstractAccessDecisionVoter.java -- diff --git a/deltaspike/modules/security/api/src/main/java/org/apache/deltaspike/security/api/authorization/AbstractAccessDecisionVoter.java b/deltaspike/modules/security/api/src/main/java/org/apache/deltaspike/security/api/authorization/AbstractAccessDecisionVoter.java new file mode 100644 index 000..a67baa9 --- /dev/null +++ b/deltaspike/modules/security/api/src/main/java/org/apache/deltaspike/security/api/authorization/AbstractAccessDecisionVoter.java @@ -0,0 +1,52 @@ +/* + * 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.deltaspike.security.api.authorization; + +import java.util.HashSet; +import java.util.Set; + +/** + * Base implementation which provides helper methods. + */ +public abstract class AbstractAccessDecisionVoter extends AbstractDecisionVoter implements AccessDecisionVoter +{ +private static final long serialVersionUID = -9145021044568668681L; + +/** + * It should be final - but proxy-libs won't support it. + */ +@Override +public Set checkPermission(AccessDecisionVoterContext accessDecisionVoterContext) +{ +Set result = new HashSet(); + +checkPermission(accessDecisionVoterContext, result); + +return result; +} + +/** + * Allows an easier implementation in combination with {@link #newSecurityViolation(String)}. + * + * @param accessDecisionVoterContext current accessDecisionVoterContext + * @param violations set for adding violations + */ +protected abstract void checkPermission(AccessDecisionVoterContext accessDecisionVoterContext, +Set violations); +} \ No newline at end of file http://git-wip-us.apache.org/repos/asf/deltaspike/blob/db666c57/deltaspike/modules/security/api/src/main/java/org/apache/deltaspike/security/api/authorization/AbstractDecisionVoter.java -- diff --git a/deltaspike/modules/security/api/src/main/java/org/apache/deltaspike/security/api/authorization/AbstractDecisionVoter.java b/deltaspike/modules/security/api/src/main/java/org/apache/deltaspike/security/api/authorization/AbstractDecisionVoter.java new file mode 100644 index 000..72e9c41 --- /dev/null +++ b/deltaspike/modules/security/api/src/main/java/org/apache/deltaspike/security/api/authorization/AbstractDecisionVoter.java @@ -0,0 +1,40 @@ +/* + * 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
git commit: DELTASPIKE-445 fixed checkstyle violations
Updated Branches: refs/heads/master 562412bb4 -> feba6a764 DELTASPIKE-445 fixed checkstyle violations Project: http://git-wip-us.apache.org/repos/asf/deltaspike/repo Commit: http://git-wip-us.apache.org/repos/asf/deltaspike/commit/feba6a76 Tree: http://git-wip-us.apache.org/repos/asf/deltaspike/tree/feba6a76 Diff: http://git-wip-us.apache.org/repos/asf/deltaspike/diff/feba6a76 Branch: refs/heads/master Commit: feba6a764eec10f5faccd43ac10912f589ee92d1 Parents: 562412b Author: gpetracek Authored: Sun Nov 24 13:41:50 2013 +0100 Committer: gpetracek Committed: Sun Nov 24 13:42:49 2013 +0100 -- .../deltaspike/core/util/ProjectStageProducer.java | 11 ++- 1 file changed, 6 insertions(+), 5 deletions(-) -- http://git-wip-us.apache.org/repos/asf/deltaspike/blob/feba6a76/deltaspike/core/api/src/main/java/org/apache/deltaspike/core/util/ProjectStageProducer.java -- diff --git a/deltaspike/core/api/src/main/java/org/apache/deltaspike/core/util/ProjectStageProducer.java b/deltaspike/core/api/src/main/java/org/apache/deltaspike/core/util/ProjectStageProducer.java index 7a93ab5..b79be81 100644 --- a/deltaspike/core/api/src/main/java/org/apache/deltaspike/core/util/ProjectStageProducer.java +++ b/deltaspike/core/api/src/main/java/org/apache/deltaspike/core/util/ProjectStageProducer.java @@ -57,11 +57,12 @@ public class ProjectStageProducer implements Serializable * We iterate through them until we find the first non-empty value. */ public static final String[] CONFIG_SETTING_KEYS = -{ -"org.apache.deltaspike.ProjectStage", -"javax.faces.PROJECT_STAGE", -"faces.PROJECT_STAGE" -}; +{ +//TODO discuss it +"org.apache.deltaspike.ProjectStage", +"javax.faces.PROJECT_STAGE", +"faces.PROJECT_STAGE" +}; protected static final Logger LOG = Logger.getLogger(ProjectStageProducer.class.getName());
git commit: DELTASPIKE-455 ViewControllerRefLiteral moved
Updated Branches: refs/heads/master c3f89b2fc -> bcf5eda66 DELTASPIKE-455 ViewControllerRefLiteral moved Project: http://git-wip-us.apache.org/repos/asf/deltaspike/repo Commit: http://git-wip-us.apache.org/repos/asf/deltaspike/commit/bcf5eda6 Tree: http://git-wip-us.apache.org/repos/asf/deltaspike/tree/bcf5eda6 Diff: http://git-wip-us.apache.org/repos/asf/deltaspike/diff/bcf5eda6 Branch: refs/heads/master Commit: bcf5eda667ba9e90007183d695d03429b0b15703 Parents: c3f89b2 Author: gpetracek Authored: Mon Dec 2 12:00:38 2013 +0100 Committer: gpetracek Committed: Mon Dec 2 12:01:00 2013 +0100 -- .../core/api/config/view/ViewRef.java | 2 +- .../literal/ViewControllerRefLiteral.java | 53 .../api/literal/ViewControllerRefLiteral.java | 53 3 files changed, 54 insertions(+), 54 deletions(-) -- http://git-wip-us.apache.org/repos/asf/deltaspike/blob/bcf5eda6/deltaspike/core/api/src/main/java/org/apache/deltaspike/core/api/config/view/ViewRef.java -- diff --git a/deltaspike/core/api/src/main/java/org/apache/deltaspike/core/api/config/view/ViewRef.java b/deltaspike/core/api/src/main/java/org/apache/deltaspike/core/api/config/view/ViewRef.java index 6f4ac96..0ced532 100644 --- a/deltaspike/core/api/src/main/java/org/apache/deltaspike/core/api/config/view/ViewRef.java +++ b/deltaspike/core/api/src/main/java/org/apache/deltaspike/core/api/config/view/ViewRef.java @@ -18,7 +18,7 @@ */ package org.apache.deltaspike.core.api.config.view; -import org.apache.deltaspike.core.api.config.view.controller.literal.ViewControllerRefLiteral; +import org.apache.deltaspike.core.api.literal.ViewControllerRefLiteral; import org.apache.deltaspike.core.api.config.view.metadata.InlineViewMetaData; import org.apache.deltaspike.core.spi.config.view.InlineMetaDataTransformer; import org.apache.deltaspike.core.spi.config.view.TargetViewConfigProvider; http://git-wip-us.apache.org/repos/asf/deltaspike/blob/bcf5eda6/deltaspike/core/api/src/main/java/org/apache/deltaspike/core/api/config/view/controller/literal/ViewControllerRefLiteral.java -- diff --git a/deltaspike/core/api/src/main/java/org/apache/deltaspike/core/api/config/view/controller/literal/ViewControllerRefLiteral.java b/deltaspike/core/api/src/main/java/org/apache/deltaspike/core/api/config/view/controller/literal/ViewControllerRefLiteral.java deleted file mode 100644 index 3ff0f2b..000 --- a/deltaspike/core/api/src/main/java/org/apache/deltaspike/core/api/config/view/controller/literal/ViewControllerRefLiteral.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.deltaspike.core.api.config.view.controller.literal; - -import org.apache.deltaspike.core.api.config.view.controller.ViewControllerRef; - -import javax.enterprise.util.AnnotationLiteral; - -/** - * Literal for {@link org.apache.deltaspike.core.api.config.view.controller.ViewControllerRef} - */ -public class ViewControllerRefLiteral extends AnnotationLiteral implements ViewControllerRef -{ -private static final long serialVersionUID = 8582580975876369665L; - -private final Class value; -private final String name; - -public ViewControllerRefLiteral(Class value, String name) -{ -this.value = value; -this.name = name; -} - -@Override -public Class value() -{ -return this.value; -} - -@Override -public String name() -{ -return this.name; -} -} http://git-wip-us.apache.org/repos/asf/deltaspike/blob/bcf5eda6/deltaspike/core/api/src/main/java/org/apache/deltaspike/core/api/literal/ViewControllerRefLiteral.java -- diff --git a/deltaspike/core/api/src/main/java/org/apache/deltaspike/core/api/literal/ViewControllerRefLiteral.java b/deltaspike/core/api/src/main/java/org/apache/delt
svn commit: r1548080 - /deltaspike/site/trunk/content/documentation.mdtext
Author: gpetracek Date: Thu Dec 5 10:29:48 2013 New Revision: 1548080 URL: http://svn.apache.org/r1548080 Log: updated content Modified: deltaspike/site/trunk/content/documentation.mdtext Modified: deltaspike/site/trunk/content/documentation.mdtext URL: http://svn.apache.org/viewvc/deltaspike/site/trunk/content/documentation.mdtext?rev=1548080&r1=1548079&r2=1548080&view=diff == --- deltaspike/site/trunk/content/documentation.mdtext (original) +++ deltaspike/site/trunk/content/documentation.mdtext Thu Dec 5 10:29:48 2013 @@ -172,6 +172,23 @@ Or if you want to very bleeding edge, po runtime + Test-Control Module + + +org.apache.deltaspike.modules +deltaspike-test-control-module-api +${deltaspike.version} +compile + + + +org.apache.deltaspike.modules +deltaspike-test-control-module-impl +${deltaspike.version} +runtime + + + ### With Java SE To use DeltaSpike with Java SE, we must provide additional jars file corresponding to the DeltaSpike CDI Controller API
svn commit: r1548083 - /deltaspike/site/trunk/content/documentation.mdtext
Author: gpetracek Date: Thu Dec 5 10:32:16 2013 New Revision: 1548083 URL: http://svn.apache.org/r1548083 Log: updated content Modified: deltaspike/site/trunk/content/documentation.mdtext Modified: deltaspike/site/trunk/content/documentation.mdtext URL: http://svn.apache.org/viewvc/deltaspike/site/trunk/content/documentation.mdtext?rev=1548083&r1=1548082&r2=1548083&view=diff == --- deltaspike/site/trunk/content/documentation.mdtext (original) +++ deltaspike/site/trunk/content/documentation.mdtext Thu Dec 5 10:32:16 2013 @@ -179,7 +179,7 @@ Or if you want to very bleeding edge, po deltaspike-test-control-module-api ${deltaspike.version} compile - + org.apache.deltaspike.modules
svn commit: r889213 - /websites/production/deltaspike/content/
Author: gpetracek Date: Thu Dec 5 10:33:07 2013 New Revision: 889213 Log: Publishing svnmucc operation to deltaspike site by gpetracek Added: websites/production/deltaspike/content/ - copied from r889212, websites/staging/deltaspike/trunk/content/
svn commit: r1548085 - /deltaspike/site/trunk/content/documentation.mdtext
Author: gpetracek Date: Thu Dec 5 10:36:09 2013 New Revision: 1548085 URL: http://svn.apache.org/r1548085 Log: updated content Modified: deltaspike/site/trunk/content/documentation.mdtext Modified: deltaspike/site/trunk/content/documentation.mdtext URL: http://svn.apache.org/viewvc/deltaspike/site/trunk/content/documentation.mdtext?rev=1548085&r1=1548084&r2=1548085&view=diff == --- deltaspike/site/trunk/content/documentation.mdtext (original) +++ deltaspike/site/trunk/content/documentation.mdtext Thu Dec 5 10:36:09 2013 @@ -402,6 +402,13 @@ Features : View details » +## Test-Control (optional) + +Definition : This module allows to write CDI based tests easily. + +View details » + + # External ## Blogs
svn commit: r889216 - /websites/production/deltaspike/content/
Author: gpetracek Date: Thu Dec 5 10:57:47 2013 New Revision: 889216 Log: Publishing svnmucc operation to deltaspike site by gpetracek Added: websites/production/deltaspike/content/ - copied from r889215, websites/staging/deltaspike/trunk/content/
svn commit: r1548086 - /deltaspike/site/trunk/content/test-control.mdtext
Author: gpetracek Date: Thu Dec 5 10:57:39 2013 New Revision: 1548086 URL: http://svn.apache.org/r1548086 Log: test-control module documentation added Added: deltaspike/site/trunk/content/test-control.mdtext Added: deltaspike/site/trunk/content/test-control.mdtext URL: http://svn.apache.org/viewvc/deltaspike/site/trunk/content/test-control.mdtext?rev=1548086&view=auto == --- deltaspike/site/trunk/content/test-control.mdtext (added) +++ deltaspike/site/trunk/content/test-control.mdtext Thu Dec 5 10:57:39 2013 @@ -0,0 +1,100 @@ +Title: Test-Control Module +Notice: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. + +[TOC] + +*** + +# Intro + +This module is available since version 0.6 and allows to write CDI based tests easily. + +# CdiTestRunner + +JUnit Test-Runner to start/stop the CDI-Container autom. (per test-class) and one request and session per test-method: + +:::java +@RunWith(CdiTestRunner.class) +public class ContainerAndInjectionControl +{ +@Inject +private ApplicationScopedBean applicationScopedBean; + +@Inject +private SessionScopedBean sessionScopedBean; + +@Inject +private RequestScopedBean requestScopedBean; + +//test the injected beans +} + +# @TestControl + +@TestControl allows to change the default-behavior. In the following case only one session for all test-methods (of the test-class) will be created: + +:::java +@RunWith(CdiTestRunner.class) +@TestControl(startScopes = SessionScoped.class) +public class CustomizedScopeHandling +{ +//inject beans and test them +} + +# CdiTestSuiteRunner + +JUnit Test-Suite-Runner to start/stop the CDI-Container autom. (per test-suite): + +:::java +@RunWith(CdiTestSuiteRunner.class) +@Suite.SuiteClasses({ +TestX.class, +TestY.class +}) +public class SuiteLevelContainerControl +{ +} + +# Project-Stage Control + +It's possible to overrule the default-project-stage for unit-tests (ProjectStage.UnitTest.class): + +:::java +@RunWith(CdiTestRunner.class) +@TestControl(projectStage = CustomTestStage.class) +public class TestStageControl +{ +//tests here will see project-stage CustomTestStage.class + +@Test +@TestControl(projectStage = ProjectStage.Development.class) +public void checkDevEnv() +{ +} + +//tests here will see project-stage CustomTestStage.class +} + +# Hints + +Don't forget to add a beans.xml in the test-module (e.g. src/test/resources/META-INF/beans.xml). + +# SPI + +[TODO] +
svn commit: r889218 - /websites/production/deltaspike/content/
Author: gpetracek Date: Thu Dec 5 10:59:31 2013 New Revision: 889218 Log: Publishing svnmucc operation to deltaspike site by gpetracek Added: websites/production/deltaspike/content/ - copied from r889217, websites/staging/deltaspike/trunk/content/
git commit: DELTASPIKE-459 optional global container bootstrapping added
Updated Branches: refs/heads/master b1cdf8765 -> e1aeb3acb DELTASPIKE-459 optional global container bootstrapping added Project: http://git-wip-us.apache.org/repos/asf/deltaspike/repo Commit: http://git-wip-us.apache.org/repos/asf/deltaspike/commit/e1aeb3ac Tree: http://git-wip-us.apache.org/repos/asf/deltaspike/tree/e1aeb3ac Diff: http://git-wip-us.apache.org/repos/asf/deltaspike/diff/e1aeb3ac Branch: refs/heads/master Commit: e1aeb3acb640d25a639bc4e3d6de7c111cf0af38 Parents: b1cdf87 Author: gpetracek Authored: Thu Dec 5 13:10:49 2013 +0100 Committer: gpetracek Committed: Thu Dec 5 13:16:03 2013 +0100 -- .../testcontrol/api/junit/CdiTestRunner.java| 14 +++-- .../api/junit/CdiTestSuiteRunner.java | 32 +--- 2 files changed, 39 insertions(+), 7 deletions(-) -- http://git-wip-us.apache.org/repos/asf/deltaspike/blob/e1aeb3ac/deltaspike/modules/test-control/api/src/main/java/org/apache/deltaspike/testcontrol/api/junit/CdiTestRunner.java -- diff --git a/deltaspike/modules/test-control/api/src/main/java/org/apache/deltaspike/testcontrol/api/junit/CdiTestRunner.java b/deltaspike/modules/test-control/api/src/main/java/org/apache/deltaspike/testcontrol/api/junit/CdiTestRunner.java index 19698d9..fcd85c8 100644 --- a/deltaspike/modules/test-control/api/src/main/java/org/apache/deltaspike/testcontrol/api/junit/CdiTestRunner.java +++ b/deltaspike/modules/test-control/api/src/main/java/org/apache/deltaspike/testcontrol/api/junit/CdiTestRunner.java @@ -400,8 +400,11 @@ public class CdiTestRunner extends BlockJUnit4ClassRunner if (!isContainerStarted()) { -container.boot(); -setContainerStarted(); +if (!CdiTestSuiteRunner.isContainerStarted()) +{ +container.boot(); +setContainerStarted(); +} } List> restrictedScopes = new ArrayList>(); @@ -428,7 +431,11 @@ public class CdiTestRunner extends BlockJUnit4ClassRunner if (this.containerStarted) { -container.shutdown(); //stop the container on the same level which started it +if (CdiTestSuiteRunner.isStopContainerAllowed()) +{ +container.shutdown(); //stop the container on the same level which started it +CdiTestSuiteRunner.setContainerStarted(false); +} } } @@ -456,6 +463,7 @@ public class CdiTestRunner extends BlockJUnit4ClassRunner void setContainerStarted() { this.containerStarted = true; +CdiTestSuiteRunner.setContainerStarted(true); } private void startContexts(CdiContainer container, Class... restrictedScopes) http://git-wip-us.apache.org/repos/asf/deltaspike/blob/e1aeb3ac/deltaspike/modules/test-control/api/src/main/java/org/apache/deltaspike/testcontrol/api/junit/CdiTestSuiteRunner.java -- diff --git a/deltaspike/modules/test-control/api/src/main/java/org/apache/deltaspike/testcontrol/api/junit/CdiTestSuiteRunner.java b/deltaspike/modules/test-control/api/src/main/java/org/apache/deltaspike/testcontrol/api/junit/CdiTestSuiteRunner.java index 1d795c5..7b25a72 100644 --- a/deltaspike/modules/test-control/api/src/main/java/org/apache/deltaspike/testcontrol/api/junit/CdiTestSuiteRunner.java +++ b/deltaspike/modules/test-control/api/src/main/java/org/apache/deltaspike/testcontrol/api/junit/CdiTestSuiteRunner.java @@ -20,6 +20,7 @@ package org.apache.deltaspike.testcontrol.api.junit; import org.apache.deltaspike.cdise.api.CdiContainer; import org.apache.deltaspike.cdise.api.CdiContainerLoader; +import org.apache.deltaspike.core.api.config.ConfigResolver; import org.junit.runner.Description; import org.junit.runner.Runner; import org.junit.runner.notification.Failure; @@ -36,10 +37,17 @@ import java.util.logging.Logger; @SuppressWarnings("UnusedDeclaration") public class CdiTestSuiteRunner extends Suite { +private static final boolean STOP_CONTAINER; private static boolean containerStarted; //TODO private final Class testSuiteClass; +static +{ +String stopContainerConfigValue = ConfigResolver.getPropertyValue("testcontrol.stop_container", "true"); +STOP_CONTAINER = Boolean.parseBoolean(stopContainerConfigValue.trim()); +} + public CdiTestSuiteRunner(Class klass, RunnerBuilder builder) throws InitializationError { super(klass, builder); @@ -75,8 +83,11 @@ public class CdiTestSuiteRunner extends Suite CdiContainer contain
svn commit: r1548107 - /deltaspike/site/trunk/content/test-control.mdtext
Author: gpetracek Date: Thu Dec 5 12:16:51 2013 New Revision: 1548107 URL: http://svn.apache.org/r1548107 Log: updated content Modified: deltaspike/site/trunk/content/test-control.mdtext Modified: deltaspike/site/trunk/content/test-control.mdtext URL: http://svn.apache.org/viewvc/deltaspike/site/trunk/content/test-control.mdtext?rev=1548107&r1=1548106&r2=1548107&view=diff == --- deltaspike/site/trunk/content/test-control.mdtext (original) +++ deltaspike/site/trunk/content/test-control.mdtext Thu Dec 5 12:16:51 2013 @@ -90,6 +90,10 @@ It's possible to overrule the default-pr //tests here will see project-stage CustomTestStage.class } +# Optional Config + +It's possible to set "testcontrol.stop_container" to "false" (via the std. DeltaSpike config). With that the CDI-Container will be started just once for all tests. + # Hints Don't forget to add a beans.xml in the test-module (e.g. src/test/resources/META-INF/beans.xml).
svn commit: r889225 - /websites/production/deltaspike/content/
Author: gpetracek Date: Thu Dec 5 12:19:33 2013 New Revision: 889225 Log: Publishing svnmucc operation to deltaspike site by gpetracek Added: websites/production/deltaspike/content/ - copied from r889224, websites/staging/deltaspike/trunk/content/
git commit: DELTASPIKE-460 @SkipMetaDataMerge
Updated Branches: refs/heads/master e1aeb3acb -> 662f458cd DELTASPIKE-460 @SkipMetaDataMerge Project: http://git-wip-us.apache.org/repos/asf/deltaspike/repo Commit: http://git-wip-us.apache.org/repos/asf/deltaspike/commit/662f458c Tree: http://git-wip-us.apache.org/repos/asf/deltaspike/tree/662f458c Diff: http://git-wip-us.apache.org/repos/asf/deltaspike/diff/662f458c Branch: refs/heads/master Commit: 662f458cd725c771362d60a0b913630cf5252cc7 Parents: e1aeb3a Author: gpetracek Authored: Thu Dec 5 17:12:14 2013 +0100 Committer: gpetracek Committed: Thu Dec 5 17:12:14 2013 +0100 -- .../config/view/metadata/SkipMetaDataMerge.java | 37 +++ .../deltaspike/jsf/api/config/view/Folder.java | 2 + .../deltaspike/jsf/api/config/view/View.java| 3 + .../config/view/DefaultConfigNodeConverter.java | 5 +- .../view/navigation/syntax/uc009/Pages.java | 51 .../navigation/syntax/uc009/ViewConfigTest.java | 276 +++ 6 files changed, 372 insertions(+), 2 deletions(-) -- http://git-wip-us.apache.org/repos/asf/deltaspike/blob/662f458c/deltaspike/core/api/src/main/java/org/apache/deltaspike/core/api/config/view/metadata/SkipMetaDataMerge.java -- diff --git a/deltaspike/core/api/src/main/java/org/apache/deltaspike/core/api/config/view/metadata/SkipMetaDataMerge.java b/deltaspike/core/api/src/main/java/org/apache/deltaspike/core/api/config/view/metadata/SkipMetaDataMerge.java new file mode 100644 index 000..acbf094 --- /dev/null +++ b/deltaspike/core/api/src/main/java/org/apache/deltaspike/core/api/config/view/metadata/SkipMetaDataMerge.java @@ -0,0 +1,37 @@ +/* + * 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.deltaspike.core.api.config.view.metadata; + +import java.lang.annotation.Documented; +import java.lang.annotation.Retention; +import java.lang.annotation.Target; + +import static java.lang.annotation.ElementType.METHOD; +import static java.lang.annotation.RetentionPolicy.RUNTIME; + +@Target( METHOD ) +@Retention(RUNTIME) +@Documented + +/** + * In some cases (e.g. @Folder#name) it doesn't make sense to merge that part with inherited information. + */ +public @interface SkipMetaDataMerge +{ +} http://git-wip-us.apache.org/repos/asf/deltaspike/blob/662f458c/deltaspike/modules/jsf/api/src/main/java/org/apache/deltaspike/jsf/api/config/view/Folder.java -- diff --git a/deltaspike/modules/jsf/api/src/main/java/org/apache/deltaspike/jsf/api/config/view/Folder.java b/deltaspike/modules/jsf/api/src/main/java/org/apache/deltaspike/jsf/api/config/view/Folder.java index 4edfeae..8cac6c5 100644 --- a/deltaspike/modules/jsf/api/src/main/java/org/apache/deltaspike/jsf/api/config/view/Folder.java +++ b/deltaspike/modules/jsf/api/src/main/java/org/apache/deltaspike/jsf/api/config/view/Folder.java @@ -19,6 +19,7 @@ package org.apache.deltaspike.jsf.api.config.view; import org.apache.deltaspike.core.api.config.ConfigResolver; +import org.apache.deltaspike.core.api.config.view.metadata.SkipMetaDataMerge; import org.apache.deltaspike.core.api.config.view.metadata.ViewMetaData; import org.apache.deltaspike.core.spi.config.view.ConfigPreProcessor; import org.apache.deltaspike.core.spi.config.view.ViewConfigNode; @@ -53,6 +54,7 @@ public @interface Folder * * @return name of the folder */ +@SkipMetaDataMerge String name() default "."; /** http://git-wip-us.apache.org/repos/asf/deltaspike/blob/662f458c/deltaspike/modules/jsf/api/src/main/java/org/apache/deltaspike/jsf/api/config/view/View.java -- diff --git a/deltaspike/modules/jsf/api/src/main/java/org/apache/deltaspike/jsf/api/config/view/View.java b/deltaspike/modules/jsf/api/src/main/java/org/apache/deltaspike/jsf/api/config/view/View.java index 24e3bbe..802ed56 100644 --- a/deltaspike/modules/jsf/api/src/main/java/org/apache/deltaspik
git commit: DELTASPIKE-461 view-config meta-data added to AccessDecisionVoterContext
Updated Branches: refs/heads/master 662f458cd -> 5d60fd432 DELTASPIKE-461 view-config meta-data added to AccessDecisionVoterContext Project: http://git-wip-us.apache.org/repos/asf/deltaspike/repo Commit: http://git-wip-us.apache.org/repos/asf/deltaspike/commit/5d60fd43 Tree: http://git-wip-us.apache.org/repos/asf/deltaspike/tree/5d60fd43 Diff: http://git-wip-us.apache.org/repos/asf/deltaspike/diff/5d60fd43 Branch: refs/heads/master Commit: 5d60fd432d27208e425a76154a02c94c139a95db Parents: 662f458 Author: gpetracek Authored: Thu Dec 5 17:43:09 2013 +0100 Committer: gpetracek Committed: Thu Dec 5 17:44:13 2013 +0100 -- .../apache/deltaspike/jsf/impl/util/SecurityUtils.java| 10 ++ 1 file changed, 10 insertions(+) -- http://git-wip-us.apache.org/repos/asf/deltaspike/blob/5d60fd43/deltaspike/modules/jsf/impl/src/main/java/org/apache/deltaspike/jsf/impl/util/SecurityUtils.java -- diff --git a/deltaspike/modules/jsf/impl/src/main/java/org/apache/deltaspike/jsf/impl/util/SecurityUtils.java b/deltaspike/modules/jsf/impl/src/main/java/org/apache/deltaspike/jsf/impl/util/SecurityUtils.java index bed7629..76df3e3 100644 --- a/deltaspike/modules/jsf/impl/src/main/java/org/apache/deltaspike/jsf/impl/util/SecurityUtils.java +++ b/deltaspike/modules/jsf/impl/src/main/java/org/apache/deltaspike/jsf/impl/util/SecurityUtils.java @@ -36,6 +36,7 @@ import org.apache.deltaspike.security.spi.authorization.SecurityViolationHandler import javax.enterprise.inject.Typed; import javax.faces.application.FacesMessage; import javax.faces.context.FacesContext; +import java.lang.annotation.Annotation; import java.util.Collections; import java.util.HashSet; import java.util.List; @@ -59,6 +60,15 @@ public abstract class SecurityUtils return; } +accessDecisionVoterContext.addMetaData(ViewConfig.class.getName(), viewConfigDescriptor.getConfigClass()); +for (Annotation viewMetaData : viewConfigDescriptor.getMetaData()) +{ +if (!viewMetaData.annotationType().equals(Secured.class)) +{ + accessDecisionVoterContext.addMetaData(viewMetaData.annotationType().getName(), viewMetaData); +} +} + Secured.Descriptor securedDescriptor = viewConfigDescriptor .getExecutableCallbackDescriptor(Secured.class, Secured.Descriptor.class);
git commit: DELTASPIKE-342 tests restricted to se-category
Updated Branches: refs/heads/master 5d60fd432 -> 804d3bce8 DELTASPIKE-342 tests restricted to se-category Project: http://git-wip-us.apache.org/repos/asf/deltaspike/repo Commit: http://git-wip-us.apache.org/repos/asf/deltaspike/commit/804d3bce Tree: http://git-wip-us.apache.org/repos/asf/deltaspike/tree/804d3bce Diff: http://git-wip-us.apache.org/repos/asf/deltaspike/diff/804d3bce Branch: refs/heads/master Commit: 804d3bce815ea02cf3315de651b4fbe74dce7106 Parents: 5d60fd4 Author: gpetracek Authored: Fri Dec 6 13:08:12 2013 +0100 Committer: gpetracek Committed: Fri Dec 6 13:08:12 2013 +0100 -- .../uc001/RequestAndSessionScopePerTestMethodTest.java| 7 +++ .../test/testcontrol/uc002/SessionScopePerTestClassTest.java | 7 +++ .../uc003/RequestAndSessionScopePerTestMethodTest.java| 7 +++ .../test/testcontrol/uc003/SessionScopePerTestClassTest.java | 7 +++ .../apache/deltaspike/test/testcontrol/uc003/TestSuite.java | 7 +++ .../test/testcontrol/uc004/ProjectStageTestControlTest.java | 7 +++ 6 files changed, 42 insertions(+) -- http://git-wip-us.apache.org/repos/asf/deltaspike/blob/804d3bce/deltaspike/modules/test-control/impl/src/test/java/org/apache/deltaspike/test/testcontrol/uc001/RequestAndSessionScopePerTestMethodTest.java -- diff --git a/deltaspike/modules/test-control/impl/src/test/java/org/apache/deltaspike/test/testcontrol/uc001/RequestAndSessionScopePerTestMethodTest.java b/deltaspike/modules/test-control/impl/src/test/java/org/apache/deltaspike/test/testcontrol/uc001/RequestAndSessionScopePerTestMethodTest.java index 05b65d8..710ab21 100644 --- a/deltaspike/modules/test-control/impl/src/test/java/org/apache/deltaspike/test/testcontrol/uc001/RequestAndSessionScopePerTestMethodTest.java +++ b/deltaspike/modules/test-control/impl/src/test/java/org/apache/deltaspike/test/testcontrol/uc001/RequestAndSessionScopePerTestMethodTest.java @@ -19,11 +19,13 @@ package org.apache.deltaspike.test.testcontrol.uc001; import org.apache.deltaspike.core.api.provider.BeanProvider; +import org.apache.deltaspike.test.category.SeCategory; import org.apache.deltaspike.testcontrol.api.junit.CdiTestRunner; import org.junit.AfterClass; import org.junit.Assert; import org.junit.BeforeClass; import org.junit.Test; +import org.junit.experimental.categories.Category; import org.junit.runner.RunWith; import org.apache.deltaspike.test.testcontrol.shared.ApplicationScopedBean; import org.apache.deltaspike.test.testcontrol.shared.RequestScopedBean; @@ -32,6 +34,11 @@ import org.apache.deltaspike.test.testcontrol.shared.TestUtils; import javax.inject.Inject; +//Usually NOT needed! Currently only needed due to our arquillian-setup +@Category(SeCategory.class) + + + @RunWith(CdiTestRunner.class) //starts container once and one session + request per test-method //implicitly annotated with @TestControl without the default-scope settings public class RequestAndSessionScopePerTestMethodTest http://git-wip-us.apache.org/repos/asf/deltaspike/blob/804d3bce/deltaspike/modules/test-control/impl/src/test/java/org/apache/deltaspike/test/testcontrol/uc002/SessionScopePerTestClassTest.java -- diff --git a/deltaspike/modules/test-control/impl/src/test/java/org/apache/deltaspike/test/testcontrol/uc002/SessionScopePerTestClassTest.java b/deltaspike/modules/test-control/impl/src/test/java/org/apache/deltaspike/test/testcontrol/uc002/SessionScopePerTestClassTest.java index f365a54..c156987 100644 --- a/deltaspike/modules/test-control/impl/src/test/java/org/apache/deltaspike/test/testcontrol/uc002/SessionScopePerTestClassTest.java +++ b/deltaspike/modules/test-control/impl/src/test/java/org/apache/deltaspike/test/testcontrol/uc002/SessionScopePerTestClassTest.java @@ -19,12 +19,14 @@ package org.apache.deltaspike.test.testcontrol.uc002; import org.apache.deltaspike.core.api.provider.BeanProvider; +import org.apache.deltaspike.test.category.SeCategory; import org.apache.deltaspike.testcontrol.api.TestControl; import org.apache.deltaspike.testcontrol.api.junit.CdiTestRunner; import org.junit.AfterClass; import org.junit.Assert; import org.junit.BeforeClass; import org.junit.Test; +import org.junit.experimental.categories.Category; import org.junit.runner.RunWith; import org.apache.deltaspike.test.testcontrol.shared.ApplicationScopedBean; import org.apache.deltaspike.test.testcontrol.shared.RequestScopedBean; @@ -34,6 +36,11 @@ import org.apache.deltaspike.test.testcontrol.shared.TestUtils; import javax.enterprise.context.SessionScoped; import javax.inject.Inject; +//Usually NOT needed! Currently only needed due to our arquillian-setup +@Category(SeCategory.class) + + + @RunW
git commit: DELTASPIKE-458 upgraded version of arquillian-weld
Updated Branches: refs/heads/master e62058be6 -> 2ed563da2 DELTASPIKE-458 upgraded version of arquillian-weld Project: http://git-wip-us.apache.org/repos/asf/deltaspike/repo Commit: http://git-wip-us.apache.org/repos/asf/deltaspike/commit/2ed563da Tree: http://git-wip-us.apache.org/repos/asf/deltaspike/tree/2ed563da Diff: http://git-wip-us.apache.org/repos/asf/deltaspike/diff/2ed563da Branch: refs/heads/master Commit: 2ed563da2fa4535225591570e48520b5c9d828b6 Parents: e62058b Author: gpetracek Authored: Fri Dec 6 13:16:24 2013 +0100 Committer: gpetracek Committed: Fri Dec 6 13:17:04 2013 +0100 -- deltaspike/parent/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/deltaspike/blob/2ed563da/deltaspike/parent/pom.xml -- diff --git a/deltaspike/parent/pom.xml b/deltaspike/parent/pom.xml index 043651d..e05c130 100644 --- a/deltaspike/parent/pom.xml +++ b/deltaspike/parent/pom.xml @@ -89,7 +89,7 @@ 0.5.7.201204190339 -1.0.0.CR5 +1.0.0.CR7 version="[$(version;==;${deltaspike.osgi.version.clean}),$(version;=+;${deltaspike.osgi.version.clean}))"
git commit: DELTASPIKE-463 fixed node-copy
Updated Branches: refs/heads/master 2ed563da2 -> 249ab699f DELTASPIKE-463 fixed node-copy Project: http://git-wip-us.apache.org/repos/asf/deltaspike/repo Commit: http://git-wip-us.apache.org/repos/asf/deltaspike/commit/249ab699 Tree: http://git-wip-us.apache.org/repos/asf/deltaspike/tree/249ab699 Diff: http://git-wip-us.apache.org/repos/asf/deltaspike/diff/249ab699 Branch: refs/heads/master Commit: 249ab699ff05f74258586e7dc908b29c83613130 Parents: 2ed563d Author: gpetracek Authored: Mon Dec 9 08:53:02 2013 +0100 Committer: gpetracek Committed: Mon Dec 9 09:05:58 2013 +0100 -- .../jsf/impl/config/view/FolderConfigNode.java | 13 .../impl/config/view/custom/uc007/Pages.java| 35 + .../view/custom/uc007/ViewConfigTest.java | 80 3 files changed, 128 insertions(+) -- http://git-wip-us.apache.org/repos/asf/deltaspike/blob/249ab699/deltaspike/modules/jsf/impl/src/main/java/org/apache/deltaspike/jsf/impl/config/view/FolderConfigNode.java -- diff --git a/deltaspike/modules/jsf/impl/src/main/java/org/apache/deltaspike/jsf/impl/config/view/FolderConfigNode.java b/deltaspike/modules/jsf/impl/src/main/java/org/apache/deltaspike/jsf/impl/config/view/FolderConfigNode.java index cf7f451..3a357c7 100644 --- a/deltaspike/modules/jsf/impl/src/main/java/org/apache/deltaspike/jsf/impl/config/view/FolderConfigNode.java +++ b/deltaspike/modules/jsf/impl/src/main/java/org/apache/deltaspike/jsf/impl/config/view/FolderConfigNode.java @@ -18,9 +18,12 @@ */ package org.apache.deltaspike.jsf.impl.config.view; +import org.apache.deltaspike.core.api.config.view.metadata.CallbackDescriptor; import org.apache.deltaspike.core.spi.config.view.ViewConfigNode; import java.lang.annotation.Annotation; +import java.util.List; +import java.util.Map; import java.util.Set; public class FolderConfigNode extends AbstractConfigNode @@ -38,6 +41,16 @@ public class FolderConfigNode extends AbstractConfigNode { super(nodeToCopy.getParent(), nodeToCopy.getMetaData()); getInheritedMetaData().addAll(nodeToCopy.getInheritedMetaData()); +getChildren().addAll(nodeToCopy.getChildren()); + +for (Map.Entry, List> callbackDescriptorEntry : +nodeToCopy.getCallbackDescriptors().entrySet()) +{ +for (CallbackDescriptor callbackDescriptor : callbackDescriptorEntry.getValue()) +{ +registerCallbackDescriptors(callbackDescriptorEntry.getKey(), callbackDescriptor); +} +} this.nodeId = viewConfigClass; } http://git-wip-us.apache.org/repos/asf/deltaspike/blob/249ab699/deltaspike/modules/jsf/impl/src/test/java/org/apache/deltaspike/test/jsf/impl/config/view/custom/uc007/Pages.java -- diff --git a/deltaspike/modules/jsf/impl/src/test/java/org/apache/deltaspike/test/jsf/impl/config/view/custom/uc007/Pages.java b/deltaspike/modules/jsf/impl/src/test/java/org/apache/deltaspike/test/jsf/impl/config/view/custom/uc007/Pages.java new file mode 100644 index 000..3c59e99 --- /dev/null +++ b/deltaspike/modules/jsf/impl/src/test/java/org/apache/deltaspike/test/jsf/impl/config/view/custom/uc007/Pages.java @@ -0,0 +1,35 @@ +/* + * 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.deltaspike.test.jsf.impl.config.view.custom.uc007; + +import org.apache.deltaspike.core.api.config.view.ViewConfig; +import org.apache.deltaspike.core.spi.config.view.ViewConfigRoot; +import org.apache.deltaspike.jsf.api.config.view.View; +import org.apache.deltaspike.jsf.impl.config.view.DefaultViewConfigInheritanceStrategy; + +import static org.apache.deltaspike.jsf.api.config.view.View.ViewParameterMode.INCLUDE; + +//just for testing root-node replacement in combination with a view-config +@ViewConfigRoot(viewConfigInheritanceStrategy = DefaultViewConfigInheritanceStrategy.class) +interface Pages extends ViewConfig +{ +
git commit: DELTASPIKE-452 JsfToCdiSystemEventBroadcaster
Updated Branches: refs/heads/master 249ab699f -> a6b53a71d DELTASPIKE-452 JsfToCdiSystemEventBroadcaster thx to Thomas Andraschko Project: http://git-wip-us.apache.org/repos/asf/deltaspike/repo Commit: http://git-wip-us.apache.org/repos/asf/deltaspike/commit/a6b53a71 Tree: http://git-wip-us.apache.org/repos/asf/deltaspike/tree/a6b53a71 Diff: http://git-wip-us.apache.org/repos/asf/deltaspike/diff/a6b53a71 Branch: refs/heads/master Commit: a6b53a71d55d1671d10715591e7c4b7b82a4b5a4 Parents: 249ab69 Author: gpetracek Authored: Mon Dec 9 09:56:52 2013 +0100 Committer: gpetracek Committed: Mon Dec 9 09:56:52 2013 +0100 -- .../system/JsfToCdiSystemEventBroadcaster.java | 58 .../main/resources/META-INF/faces-config.xml| 13 + 2 files changed, 71 insertions(+) -- http://git-wip-us.apache.org/repos/asf/deltaspike/blob/a6b53a71/deltaspike/modules/jsf/impl/src/main/java/org/apache/deltaspike/jsf/impl/listener/system/JsfToCdiSystemEventBroadcaster.java -- diff --git a/deltaspike/modules/jsf/impl/src/main/java/org/apache/deltaspike/jsf/impl/listener/system/JsfToCdiSystemEventBroadcaster.java b/deltaspike/modules/jsf/impl/src/main/java/org/apache/deltaspike/jsf/impl/listener/system/JsfToCdiSystemEventBroadcaster.java new file mode 100644 index 000..d8c56d0 --- /dev/null +++ b/deltaspike/modules/jsf/impl/src/main/java/org/apache/deltaspike/jsf/impl/listener/system/JsfToCdiSystemEventBroadcaster.java @@ -0,0 +1,58 @@ +/* + * 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.deltaspike.jsf.impl.listener.system; + +import javax.enterprise.inject.spi.BeanManager; +import javax.faces.event.AbortProcessingException; +import javax.faces.event.SystemEvent; +import javax.faces.event.SystemEventListener; +import org.apache.deltaspike.core.api.provider.BeanManagerProvider; +import org.apache.deltaspike.core.spi.activation.Deactivatable; +import org.apache.deltaspike.core.util.ClassDeactivationUtils; + +/** + * Broadcasts JSF events to CDI observers. + */ +public class JsfToCdiSystemEventBroadcaster implements SystemEventListener, Deactivatable +{ +private boolean isActivated = true; + +public JsfToCdiSystemEventBroadcaster() +{ +this.isActivated = ClassDeactivationUtils.isActivated(getClass()); +} + +@Override +public boolean isListenerForSource(Object source) +{ +return true; +} + +@Override +public void processEvent(SystemEvent e) throws AbortProcessingException +{ +if (!this.isActivated) +{ +return; +} + +BeanManager beanManager = BeanManagerProvider.getInstance().getBeanManager(); +beanManager.fireEvent(e); +} +} http://git-wip-us.apache.org/repos/asf/deltaspike/blob/a6b53a71/deltaspike/modules/jsf/impl/src/main/resources/META-INF/faces-config.xml -- diff --git a/deltaspike/modules/jsf/impl/src/main/resources/META-INF/faces-config.xml b/deltaspike/modules/jsf/impl/src/main/resources/META-INF/faces-config.xml index de8ef13..3c8d349 100644 --- a/deltaspike/modules/jsf/impl/src/main/resources/META-INF/faces-config.xml +++ b/deltaspike/modules/jsf/impl/src/main/resources/META-INF/faces-config.xml @@ -32,6 +32,19 @@ org.apache.deltaspike.jsf.impl.view.DeltaSpikeViewHandler org.apache.deltaspike.jsf.impl.navigation.DeltaSpikeNavigationHandler org.apache.deltaspike.jsf.impl.listener.action.DeltaSpikeActionListener + + + org.apache.deltaspike.jsf.impl.listener.system.JsfToCdiSystemEventBroadcaster + javax.faces.event.ExceptionQueuedEvent + + + org.apache.deltaspike.jsf.impl.listener.system.JsfToCdiSystemEventBroadcaster + javax.faces.event.PostConstructApplicationEvent + + + org.apache.deltaspike.jsf.impl.listener.system.JsfToCd
git commit: DELTASPIKE-452 JsfSystemEventBroadcaster
Updated Branches: refs/heads/master a6b53a71d -> 09d70cbd3 DELTASPIKE-452 JsfSystemEventBroadcaster Project: http://git-wip-us.apache.org/repos/asf/deltaspike/repo Commit: http://git-wip-us.apache.org/repos/asf/deltaspike/commit/09d70cbd Tree: http://git-wip-us.apache.org/repos/asf/deltaspike/tree/09d70cbd Diff: http://git-wip-us.apache.org/repos/asf/deltaspike/diff/09d70cbd Branch: refs/heads/master Commit: 09d70cbd31195cb83d2cda58136f0c9e1af2c826 Parents: a6b53a7 Author: gpetracek Authored: Mon Dec 9 11:29:22 2013 +0100 Committer: gpetracek Committed: Mon Dec 9 11:29:22 2013 +0100 -- .../system/JsfSystemEventBroadcaster.java | 58 .../system/JsfToCdiSystemEventBroadcaster.java | 58 .../main/resources/META-INF/faces-config.xml| 6 +- 3 files changed, 61 insertions(+), 61 deletions(-) -- http://git-wip-us.apache.org/repos/asf/deltaspike/blob/09d70cbd/deltaspike/modules/jsf/impl/src/main/java/org/apache/deltaspike/jsf/impl/listener/system/JsfSystemEventBroadcaster.java -- diff --git a/deltaspike/modules/jsf/impl/src/main/java/org/apache/deltaspike/jsf/impl/listener/system/JsfSystemEventBroadcaster.java b/deltaspike/modules/jsf/impl/src/main/java/org/apache/deltaspike/jsf/impl/listener/system/JsfSystemEventBroadcaster.java new file mode 100644 index 000..9051742 --- /dev/null +++ b/deltaspike/modules/jsf/impl/src/main/java/org/apache/deltaspike/jsf/impl/listener/system/JsfSystemEventBroadcaster.java @@ -0,0 +1,58 @@ +/* + * 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.deltaspike.jsf.impl.listener.system; + +import javax.enterprise.inject.spi.BeanManager; +import javax.faces.event.AbortProcessingException; +import javax.faces.event.SystemEvent; +import javax.faces.event.SystemEventListener; +import org.apache.deltaspike.core.api.provider.BeanManagerProvider; +import org.apache.deltaspike.core.spi.activation.Deactivatable; +import org.apache.deltaspike.core.util.ClassDeactivationUtils; + +/** + * Broadcasts JSF events to CDI observers. + */ +public class JsfSystemEventBroadcaster implements SystemEventListener, Deactivatable +{ +private boolean isActivated = true; + +public JsfSystemEventBroadcaster() +{ +this.isActivated = ClassDeactivationUtils.isActivated(getClass()); +} + +@Override +public boolean isListenerForSource(Object source) +{ +return true; +} + +@Override +public void processEvent(SystemEvent e) throws AbortProcessingException +{ +if (!this.isActivated) +{ +return; +} + +BeanManager beanManager = BeanManagerProvider.getInstance().getBeanManager(); +beanManager.fireEvent(e); +} +} http://git-wip-us.apache.org/repos/asf/deltaspike/blob/09d70cbd/deltaspike/modules/jsf/impl/src/main/java/org/apache/deltaspike/jsf/impl/listener/system/JsfToCdiSystemEventBroadcaster.java -- diff --git a/deltaspike/modules/jsf/impl/src/main/java/org/apache/deltaspike/jsf/impl/listener/system/JsfToCdiSystemEventBroadcaster.java b/deltaspike/modules/jsf/impl/src/main/java/org/apache/deltaspike/jsf/impl/listener/system/JsfToCdiSystemEventBroadcaster.java deleted file mode 100644 index d8c56d0..000 --- a/deltaspike/modules/jsf/impl/src/main/java/org/apache/deltaspike/jsf/impl/listener/system/JsfToCdiSystemEventBroadcaster.java +++ /dev/null @@ -1,58 +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
git commit: DELTASPIKE-465 minor refactoring
Updated Branches: refs/heads/master 09d70cbd3 -> 896bf88ae DELTASPIKE-465 minor refactoring Project: http://git-wip-us.apache.org/repos/asf/deltaspike/repo Commit: http://git-wip-us.apache.org/repos/asf/deltaspike/commit/896bf88a Tree: http://git-wip-us.apache.org/repos/asf/deltaspike/tree/896bf88a Diff: http://git-wip-us.apache.org/repos/asf/deltaspike/diff/896bf88a Branch: refs/heads/master Commit: 896bf88aec664320cac026a87761ee28a4f12c2a Parents: 09d70cb Author: gpetracek Authored: Tue Dec 10 09:50:31 2013 +0100 Committer: gpetracek Committed: Tue Dec 10 09:53:44 2013 +0100 -- .../DefaultViewConfigInheritanceStrategy.java | 33 1 file changed, 20 insertions(+), 13 deletions(-) -- http://git-wip-us.apache.org/repos/asf/deltaspike/blob/896bf88a/deltaspike/modules/jsf/impl/src/main/java/org/apache/deltaspike/jsf/impl/config/view/DefaultViewConfigInheritanceStrategy.java -- diff --git a/deltaspike/modules/jsf/impl/src/main/java/org/apache/deltaspike/jsf/impl/config/view/DefaultViewConfigInheritanceStrategy.java b/deltaspike/modules/jsf/impl/src/main/java/org/apache/deltaspike/jsf/impl/config/view/DefaultViewConfigInheritanceStrategy.java index 00e7f7a..486c294 100644 --- a/deltaspike/modules/jsf/impl/src/main/java/org/apache/deltaspike/jsf/impl/config/view/DefaultViewConfigInheritanceStrategy.java +++ b/deltaspike/modules/jsf/impl/src/main/java/org/apache/deltaspike/jsf/impl/config/view/DefaultViewConfigInheritanceStrategy.java @@ -80,7 +80,7 @@ public class DefaultViewConfigInheritanceStrategy implements ViewConfigInheritan return inheritedAnnotations; } -private List addViewMetaData(Class currentClass) +protected List addViewMetaData(Class currentClass) { List result = new ArrayList(); @@ -93,25 +93,32 @@ public class DefaultViewConfigInheritanceStrategy implements ViewConfigInheritan continue; } -if (annotationClass.isAnnotationPresent(ViewMetaData.class)) -{ -result.add(annotation); -} -else if (annotationClass.isAnnotationPresent(Stereotype.class)) +addViewMetaData(annotation, result); +} +return result; +} + +protected void addViewMetaData(Annotation currentAnnotation, List metaDataList) +{ +Class annotationClass = currentAnnotation.annotationType(); + +if (annotationClass.isAnnotationPresent(ViewMetaData.class)) +{ +metaDataList.add(currentAnnotation); +} +else if (annotationClass.isAnnotationPresent(Stereotype.class)) +{ +for (Annotation inheritedViaStereotype : annotationClass.getAnnotations()) { -for (Annotation inheritedViaStereotype : annotationClass.getAnnotations()) +if (inheritedViaStereotype.annotationType().isAnnotationPresent(ViewMetaData.class)) { -if (inheritedViaStereotype.annotationType().isAnnotationPresent(ViewMetaData.class)) -{ -result.add(inheritedViaStereotype); -} +metaDataList.add(inheritedViaStereotype); } } } -return result; } -private void addInterfaces(Set processedTypes, Stack classesToAnalyze, Class nextClass) +protected void addInterfaces(Set processedTypes, Stack classesToAnalyze, Class nextClass) { for (Class interfaceToAdd : nextClass.getInterfaces()) {
git commit: DELTASPIKE-466 ExternalContainer spi added
Updated Branches: refs/heads/master 896bf88ae -> 307c757ae DELTASPIKE-466 ExternalContainer spi added Project: http://git-wip-us.apache.org/repos/asf/deltaspike/repo Commit: http://git-wip-us.apache.org/repos/asf/deltaspike/commit/307c757a Tree: http://git-wip-us.apache.org/repos/asf/deltaspike/tree/307c757a Diff: http://git-wip-us.apache.org/repos/asf/deltaspike/diff/307c757a Branch: refs/heads/master Commit: 307c757ae1a18595852f01d7c50ed73311eb9364 Parents: 896bf88 Author: gpetracek Authored: Wed Dec 11 09:46:45 2013 +0100 Committer: gpetracek Committed: Wed Dec 11 09:49:02 2013 +0100 -- .../deltaspike/testcontrol/api/TestControl.java | 5 ++ .../testcontrol/api/junit/CdiTestRunner.java| 62 .../api/literal/TestControlLiteral.java | 6 ++ .../testcontrol/spi/ExternalContainer.java | 34 +++ 4 files changed, 107 insertions(+) -- http://git-wip-us.apache.org/repos/asf/deltaspike/blob/307c757a/deltaspike/modules/test-control/api/src/main/java/org/apache/deltaspike/testcontrol/api/TestControl.java -- diff --git a/deltaspike/modules/test-control/api/src/main/java/org/apache/deltaspike/testcontrol/api/TestControl.java b/deltaspike/modules/test-control/api/src/main/java/org/apache/deltaspike/testcontrol/api/TestControl.java index d32b2fb..c492c97 100644 --- a/deltaspike/modules/test-control/api/src/main/java/org/apache/deltaspike/testcontrol/api/TestControl.java +++ b/deltaspike/modules/test-control/api/src/main/java/org/apache/deltaspike/testcontrol/api/TestControl.java @@ -52,4 +52,9 @@ public @interface TestControl * only supported on test-class-level */ Class logHandler() default ConsoleHandler.class; + +/** + * Requires additional service-loader config + */ +boolean startExternalContainers() default true; } http://git-wip-us.apache.org/repos/asf/deltaspike/blob/307c757a/deltaspike/modules/test-control/api/src/main/java/org/apache/deltaspike/testcontrol/api/junit/CdiTestRunner.java -- diff --git a/deltaspike/modules/test-control/api/src/main/java/org/apache/deltaspike/testcontrol/api/junit/CdiTestRunner.java b/deltaspike/modules/test-control/api/src/main/java/org/apache/deltaspike/testcontrol/api/junit/CdiTestRunner.java index fcd85c8..8093357 100644 --- a/deltaspike/modules/test-control/api/src/main/java/org/apache/deltaspike/testcontrol/api/junit/CdiTestRunner.java +++ b/deltaspike/modules/test-control/api/src/main/java/org/apache/deltaspike/testcontrol/api/junit/CdiTestRunner.java @@ -29,6 +29,7 @@ import org.apache.deltaspike.core.util.ProjectStageProducer; import org.apache.deltaspike.core.util.ServiceUtils; import org.apache.deltaspike.testcontrol.api.TestControl; import org.apache.deltaspike.testcontrol.api.literal.TestControlLiteral; +import org.apache.deltaspike.testcontrol.spi.ExternalContainer; import org.apache.deltaspike.testcontrol.spi.junit.TestStatementDecoratorFactory; import org.junit.Test; import org.junit.internal.runners.statements.FailOnTimeout; @@ -358,6 +359,8 @@ public class CdiTestRunner extends BlockJUnit4ClassRunner private Stack> startedScopes = new Stack>(); +private List externalContainers; + ContainerAwareTestContext(TestControl testControl, ContainerAwareTestContext parent) { this.parent = parent; @@ -404,6 +407,8 @@ public class CdiTestRunner extends BlockJUnit4ClassRunner { container.boot(); setContainerStarted(); + +bootExternalContainers(); } } @@ -423,6 +428,40 @@ public class CdiTestRunner extends BlockJUnit4ClassRunner startContexts(container, restrictedScopes.toArray(new Class[restrictedScopes.size()])); } +private void bootExternalContainers() +{ +if (!this.testControl.startExternalContainers()) +{ +return; +} + +if (this.externalContainers == null) +{ +this.externalContainers = ServiceUtils.loadServiceImplementations(ExternalContainer.class); +Collections.sort(this.externalContainers, new Comparator() +{ +@Override +public int compare(ExternalContainer ec1, ExternalContainer ec2) +{ +return ec1.getOrdinal() > ec2.getOrdinal() ? 1 : -1; +} +}); + +for (ExternalContainer externalContainer : this.externalContainers) +{ +try +{ +externalCo
git commit: DELTASPIKE-466 startScope and stopScope for ExternalContainer
Updated Branches: refs/heads/master 307c757ae -> a00c7e2f6 DELTASPIKE-466 startScope and stopScope for ExternalContainer Project: http://git-wip-us.apache.org/repos/asf/deltaspike/repo Commit: http://git-wip-us.apache.org/repos/asf/deltaspike/commit/a00c7e2f Tree: http://git-wip-us.apache.org/repos/asf/deltaspike/tree/a00c7e2f Diff: http://git-wip-us.apache.org/repos/asf/deltaspike/diff/a00c7e2f Branch: refs/heads/master Commit: a00c7e2f6869ef9a2ea010084ed20899fc009255 Parents: 307c757 Author: gpetracek Authored: Thu Dec 12 08:41:05 2013 +0100 Committer: gpetracek Committed: Thu Dec 12 08:42:38 2013 +0100 -- .../testcontrol/api/junit/CdiTestRunner.java| 35 +--- .../testcontrol/spi/ExternalContainer.java | 14 2 files changed, 45 insertions(+), 4 deletions(-) -- http://git-wip-us.apache.org/repos/asf/deltaspike/blob/a00c7e2f/deltaspike/modules/test-control/api/src/main/java/org/apache/deltaspike/testcontrol/api/junit/CdiTestRunner.java -- diff --git a/deltaspike/modules/test-control/api/src/main/java/org/apache/deltaspike/testcontrol/api/junit/CdiTestRunner.java b/deltaspike/modules/test-control/api/src/main/java/org/apache/deltaspike/testcontrol/api/junit/CdiTestRunner.java index 8093357..9b331a9 100644 --- a/deltaspike/modules/test-control/api/src/main/java/org/apache/deltaspike/testcontrol/api/junit/CdiTestRunner.java +++ b/deltaspike/modules/test-control/api/src/main/java/org/apache/deltaspike/testcontrol/api/junit/CdiTestRunner.java @@ -425,7 +425,7 @@ public class CdiTestRunner extends BlockJUnit4ClassRunner restrictedScopes.add(SessionScoped.class); } -startContexts(container, restrictedScopes.toArray(new Class[restrictedScopes.size()])); +startScopes(container, restrictedScopes.toArray(new Class[restrictedScopes.size()])); } private void bootExternalContainers() @@ -506,7 +506,7 @@ public class CdiTestRunner extends BlockJUnit4ClassRunner this.previousProjectStage = ProjectStageProducer.getInstance().getProjectStage(); ProjectStageProducer.setProjectStage(this.projectStage); -startContexts(CdiContainerLoader.getCdiContainer()); +startScopes(CdiContainerLoader.getCdiContainer()); } void applyAfterMethodConfig() @@ -528,7 +528,7 @@ public class CdiTestRunner extends BlockJUnit4ClassRunner CdiTestSuiteRunner.setContainerStarted(true); } -private void startContexts(CdiContainer container, Class... restrictedScopes) +private void startScopes(CdiContainer container, Class... restrictedScopes) { ContextControl contextControl = container.getContextControl(); @@ -555,9 +555,13 @@ public class CdiTestRunner extends BlockJUnit4ClassRunner try { -contextControl.stopContext(scopeAnnotation); //force a clean context +//force a clean context - TODO discuss onScopeStopped call +contextControl.stopContext(scopeAnnotation); + contextControl.startContext(scopeAnnotation); this.startedScopes.add(scopeAnnotation); + +onScopeStarted(scopeAnnotation); } catch (RuntimeException e) { @@ -615,6 +619,7 @@ public class CdiTestRunner extends BlockJUnit4ClassRunner try { contextControl.stopContext(scopeAnnotation); +onScopeStopped(scopeAnnotation); } catch (RuntimeException e) { @@ -624,5 +629,27 @@ public class CdiTestRunner extends BlockJUnit4ClassRunner } } } + +private void onScopeStarted(Class scopeClass) +{ +if (this.externalContainers != null) +{ +for (ExternalContainer externalContainer : this.externalContainers) +{ +externalContainer.startScope(scopeClass); +} +} +} + +private void onScopeStopped(Class scopeClass) +{ +if (this.externalContainers != null) +{ +for (ExternalContainer externalContainer : this.externalContainers) +{ +externalContainer.stopScope(scopeClass); +} +} +} } } http://git-wip-us.apache.org/repos/asf/deltaspike/blob/a00c7e2f/deltaspike/modules/test-control/api/src/main/java/org/apache/deltaspike/testcontrol/spi/ExternalContainer.java -- d
[2/2] git commit: DELTASPIKE-466 improved external-container handling
DELTASPIKE-466 improved external-container handling Project: http://git-wip-us.apache.org/repos/asf/deltaspike/repo Commit: http://git-wip-us.apache.org/repos/asf/deltaspike/commit/7ec889fe Tree: http://git-wip-us.apache.org/repos/asf/deltaspike/tree/7ec889fe Diff: http://git-wip-us.apache.org/repos/asf/deltaspike/diff/7ec889fe Branch: refs/heads/master Commit: 7ec889fe2e6085fc03b96ec491da3a89376dc6c4 Parents: 7f14a66 Author: gpetracek Authored: Sun Dec 15 20:25:15 2013 +0100 Committer: gpetracek Committed: Sun Dec 15 20:44:09 2013 +0100 -- .../deltaspike/testcontrol/api/TestControl.java | 1 + .../testcontrol/api/junit/CdiTestRunner.java| 34 ++-- 2 files changed, 25 insertions(+), 10 deletions(-) -- http://git-wip-us.apache.org/repos/asf/deltaspike/blob/7ec889fe/deltaspike/modules/test-control/api/src/main/java/org/apache/deltaspike/testcontrol/api/TestControl.java -- diff --git a/deltaspike/modules/test-control/api/src/main/java/org/apache/deltaspike/testcontrol/api/TestControl.java b/deltaspike/modules/test-control/api/src/main/java/org/apache/deltaspike/testcontrol/api/TestControl.java index c492c97..baba3cb 100644 --- a/deltaspike/modules/test-control/api/src/main/java/org/apache/deltaspike/testcontrol/api/TestControl.java +++ b/deltaspike/modules/test-control/api/src/main/java/org/apache/deltaspike/testcontrol/api/TestControl.java @@ -55,6 +55,7 @@ public @interface TestControl /** * Requires additional service-loader config + * Currently only supported on class-level */ boolean startExternalContainers() default true; } http://git-wip-us.apache.org/repos/asf/deltaspike/blob/7ec889fe/deltaspike/modules/test-control/api/src/main/java/org/apache/deltaspike/testcontrol/api/junit/CdiTestRunner.java -- diff --git a/deltaspike/modules/test-control/api/src/main/java/org/apache/deltaspike/testcontrol/api/junit/CdiTestRunner.java b/deltaspike/modules/test-control/api/src/main/java/org/apache/deltaspike/testcontrol/api/junit/CdiTestRunner.java index 9b331a9..af9d560 100644 --- a/deltaspike/modules/test-control/api/src/main/java/org/apache/deltaspike/testcontrol/api/junit/CdiTestRunner.java +++ b/deltaspike/modules/test-control/api/src/main/java/org/apache/deltaspike/testcontrol/api/junit/CdiTestRunner.java @@ -632,24 +632,38 @@ public class CdiTestRunner extends BlockJUnit4ClassRunner private void onScopeStarted(Class scopeClass) { -if (this.externalContainers != null) +List externalContainerList = collectExternalContainers(this); + +for (ExternalContainer externalContainer : externalContainerList) { -for (ExternalContainer externalContainer : this.externalContainers) -{ -externalContainer.startScope(scopeClass); -} +externalContainer.startScope(scopeClass); } } private void onScopeStopped(Class scopeClass) { -if (this.externalContainers != null) +List externalContainerList = collectExternalContainers(this); + +for (ExternalContainer externalContainer : externalContainerList) { -for (ExternalContainer externalContainer : this.externalContainers) -{ -externalContainer.stopScope(scopeClass); -} +externalContainer.stopScope(scopeClass); +} +} + +private static List collectExternalContainers(ContainerAwareTestContext testContext) +{ +List result = new ArrayList(); + +if (testContext.externalContainers != null) +{ +result.addAll(testContext.externalContainers); +} + +if (testContext.parent != null) +{ +result.addAll(collectExternalContainers(testContext.parent)); } +return result; } } }
[1/2] git commit: DELTASPIKE-468 optional integration with myfaces-test (first draft)
Updated Branches: refs/heads/master 7f14a66a3 -> fc03723bb DELTASPIKE-468 optional integration with myfaces-test (first draft) Project: http://git-wip-us.apache.org/repos/asf/deltaspike/repo Commit: http://git-wip-us.apache.org/repos/asf/deltaspike/commit/fc03723b Tree: http://git-wip-us.apache.org/repos/asf/deltaspike/tree/fc03723b Diff: http://git-wip-us.apache.org/repos/asf/deltaspike/diff/fc03723b Branch: refs/heads/master Commit: fc03723bb17eaf846a8090f93f5059df27524c19 Parents: 7ec889f Author: gpetracek Authored: Sun Dec 15 20:21:49 2013 +0100 Committer: gpetracek Committed: Sun Dec 15 20:44:09 2013 +0100 -- deltaspike/modules/jsf/pom.xml | 11 - deltaspike/modules/test-control/impl/pom.xml| 36 +++ .../impl/jsf/MockedJsf2TestContainer.java | 230 +++ .../testcontrol/uc005/JsfContainerTest.java | 114 + .../uc006/SkipExternalContainerTest.java| 45 ...deltaspike.testcontrol.spi.ExternalContainer | 18 ++ deltaspike/parent/pom.xml | 27 +++ 7 files changed, 470 insertions(+), 11 deletions(-) -- http://git-wip-us.apache.org/repos/asf/deltaspike/blob/fc03723b/deltaspike/modules/jsf/pom.xml -- diff --git a/deltaspike/modules/jsf/pom.xml b/deltaspike/modules/jsf/pom.xml index 06a79b3..8f8c53f 100644 --- a/deltaspike/modules/jsf/pom.xml +++ b/deltaspike/modules/jsf/pom.xml @@ -39,17 +39,6 @@ impl - - - -org.apache.myfaces.core -myfaces-api -${myfaces2.version} -provided - - - - http://git-wip-us.apache.org/repos/asf/deltaspike/blob/fc03723b/deltaspike/modules/test-control/impl/pom.xml -- diff --git a/deltaspike/modules/test-control/impl/pom.xml b/deltaspike/modules/test-control/impl/pom.xml index 2b6c0fe..4197e63 100644 --- a/deltaspike/modules/test-control/impl/pom.xml +++ b/deltaspike/modules/test-control/impl/pom.xml @@ -65,6 +65,42 @@ junit provided + + +org.apache.myfaces.test +myfaces-test20 +provided + + + +org.apache.myfaces.core +myfaces-api +provided + + + +org.apache.myfaces.core +myfaces-impl +provided + + + +org.apache.geronimo.specs +geronimo-el_2.2_spec +provided + + + +org.apache.geronimo.specs +geronimo-servlet_2.5_spec +provided + + + +commons-logging +commons-logging +test + http://git-wip-us.apache.org/repos/asf/deltaspike/blob/fc03723b/deltaspike/modules/test-control/impl/src/main/java/org/apache/deltaspike/testcontrol/impl/jsf/MockedJsf2TestContainer.java -- diff --git a/deltaspike/modules/test-control/impl/src/main/java/org/apache/deltaspike/testcontrol/impl/jsf/MockedJsf2TestContainer.java b/deltaspike/modules/test-control/impl/src/main/java/org/apache/deltaspike/testcontrol/impl/jsf/MockedJsf2TestContainer.java new file mode 100644 index 000..e6e2b2b --- /dev/null +++ b/deltaspike/modules/test-control/impl/src/main/java/org/apache/deltaspike/testcontrol/impl/jsf/MockedJsf2TestContainer.java @@ -0,0 +1,230 @@ +/* + * 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.deltaspike.testcontrol.impl.jsf; + +import org.apache.deltaspike.testcontrol.spi.ExternalContainer; +import org.apache.myfaces.test.mock.MockApplicationFactory; +import org.apache.myfaces.test.mock.MockExceptionHandlerFactory; +import org.apache.myfaces.test.mock.MockExternalContext; +import org.apache.myfaces.test.mock.Mo
svn commit: r1551045 - /deltaspike/site/trunk/content/test-control.mdtext
Author: gpetracek Date: Sun Dec 15 19:58:45 2013 New Revision: 1551045 URL: http://svn.apache.org/r1551045 Log: updated content Modified: deltaspike/site/trunk/content/test-control.mdtext Modified: deltaspike/site/trunk/content/test-control.mdtext URL: http://svn.apache.org/viewvc/deltaspike/site/trunk/content/test-control.mdtext?rev=1551045&r1=1551044&r2=1551045&view=diff == --- deltaspike/site/trunk/content/test-control.mdtext (original) +++ deltaspike/site/trunk/content/test-control.mdtext Sun Dec 15 19:58:45 2013 @@ -98,7 +98,27 @@ It's possible to set "testcontrol.stop_c Don't forget to add a beans.xml in the test-module (e.g. src/test/resources/META-INF/beans.xml). +# Optional Integrations + +## JSF (via MyFaces-Test) + +add: + +org.apache.deltaspike.testcontrol.impl.jsf.MockedJsf2TestContainer + +to + +/META-INF/services/org.apache.deltaspike.testcontrol.spi.ExternalContainer + +(in your config-folder for tests e.g.: test/resources) + # SPI -[TODO] +## ExternalContainer + +org.apache.deltaspike.testcontrol.spi.ExternalContainer allows to integrate containers which get started after the CDI container. +Currently DeltaSpike provides: + * MockedJsf2TestContainer (integration with MyFaces-Test) + +[TODO]
svn commit: r890451 - /websites/production/deltaspike/content/
Author: gpetracek Date: Sun Dec 15 20:03:29 2013 New Revision: 890451 Log: Publishing svnmucc operation to deltaspike site by gpetracek Added: websites/production/deltaspike/content/ - copied from r890450, websites/staging/deltaspike/trunk/content/
svn commit: r1551336 - /deltaspike/site/trunk/content/news.mdtext
Author: gpetracek Date: Mon Dec 16 20:23:51 2013 New Revision: 1551336 URL: http://svn.apache.org/r1551336 Log: updated content Modified: deltaspike/site/trunk/content/news.mdtext Modified: deltaspike/site/trunk/content/news.mdtext URL: http://svn.apache.org/viewvc/deltaspike/site/trunk/content/news.mdtext?rev=1551336&r1=1551335&r2=1551336&view=diff == --- deltaspike/site/trunk/content/news.mdtext (original) +++ deltaspike/site/trunk/content/news.mdtext Mon Dec 16 20:23:51 2013 @@ -22,6 +22,10 @@ Notice:Licensed to the Apache Softwa # Introduction +## New Committer (14.12.2013) + +Thomas Andraschko joined our development community. + ## 5th Release (0.5) (18.09.2013) The Apache DeltaSpike team is pleased to announce the 5th release (v0.5).
svn commit: r890618 - /websites/production/deltaspike/content/
Author: gpetracek Date: Mon Dec 16 20:24:51 2013 New Revision: 890618 Log: Publishing svnmucc operation to deltaspike site by gpetracek Added: websites/production/deltaspike/content/ - copied from r890617, websites/staging/deltaspike/trunk/content/
git commit: DELTASPIKE-471 support external handling of navigation-cases
Updated Branches: refs/heads/master 1fb0e961c -> accd49607 DELTASPIKE-471 support external handling of navigation-cases Project: http://git-wip-us.apache.org/repos/asf/deltaspike/repo Commit: http://git-wip-us.apache.org/repos/asf/deltaspike/commit/accd4960 Tree: http://git-wip-us.apache.org/repos/asf/deltaspike/tree/accd4960 Diff: http://git-wip-us.apache.org/repos/asf/deltaspike/diff/accd4960 Branch: refs/heads/master Commit: accd49607c8653679b2a047ccec62223a0b2f2bd Parents: 1fb0e96 Author: gpetracek Authored: Tue Dec 17 11:59:34 2013 +0100 Committer: gpetracek Committed: Tue Dec 17 12:07:22 2013 +0100 -- .../navigation/NavigationCaseMapWrapper.java| 90 +++- .../navigation/DeltaSpikeNavigationHandler.java | 2 +- 2 files changed, 89 insertions(+), 3 deletions(-) -- http://git-wip-us.apache.org/repos/asf/deltaspike/blob/accd4960/deltaspike/modules/jsf/impl/src/main/java/org/apache/deltaspike/jsf/impl/config/view/navigation/NavigationCaseMapWrapper.java -- diff --git a/deltaspike/modules/jsf/impl/src/main/java/org/apache/deltaspike/jsf/impl/config/view/navigation/NavigationCaseMapWrapper.java b/deltaspike/modules/jsf/impl/src/main/java/org/apache/deltaspike/jsf/impl/config/view/navigation/NavigationCaseMapWrapper.java index 0f94071..d393860 100644 --- a/deltaspike/modules/jsf/impl/src/main/java/org/apache/deltaspike/jsf/impl/config/view/navigation/NavigationCaseMapWrapper.java +++ b/deltaspike/modules/jsf/impl/src/main/java/org/apache/deltaspike/jsf/impl/config/view/navigation/NavigationCaseMapWrapper.java @@ -25,13 +25,16 @@ import org.apache.deltaspike.jsf.api.config.view.View; import org.apache.deltaspike.jsf.impl.util.JsfUtils; import org.apache.deltaspike.jsf.impl.util.RequestParameter; +import javax.faces.application.ConfigurableNavigationHandler; import javax.faces.application.NavigationCase; +import javax.faces.application.NavigationHandler; import java.util.List; import java.util.Set; import java.util.Map; import java.util.HashSet; import java.util.HashMap; import java.util.Collection; +import java.util.logging.Logger; /** * Destructive operations aren't supported (compared to the SubKeyMap used in MyFaces). @@ -40,23 +43,40 @@ import java.util.Collection; */ public class NavigationCaseMapWrapper implements Map> { +private static final Logger LOG = Logger.getLogger(NavigationCaseMapWrapper.class.getName()); + private Map> wrappedNavigationCaseMap; +private final NavigationHandler wrapped; private final Map> viewConfigBasedNavigationCaseCache; /** * Constructor for wrapping the given navigation-cases * * @param navigationCases current navigation-cases + * @param wrapped wrapped navigation-handler */ -public NavigationCaseMapWrapper(Map> navigationCases) +public NavigationCaseMapWrapper(Map> navigationCases, NavigationHandler wrapped) { this.wrappedNavigationCaseMap = navigationCases; +this.wrapped = wrapped; this.viewConfigBasedNavigationCaseCache = createViewConfigBasedNavigationCases(false); } private Map> createViewConfigBasedNavigationCases(boolean allowParameters) { -Map> result = new HashMap>(); +Map> result; + +if (this.wrapped instanceof ConfigurableNavigationHandler) +{ +result = new DelegatingMap((ConfigurableNavigationHandler)this.wrapped); +} +else +{ +LOG.warning("the wrapped navigation-handler doesn't extend " + +ConfigurableNavigationHandler.class.getName() + +". therefore std. navigation-rules might not work correctly with mojarra"); +result = new HashMap>(); +} Collection viewConfigDescriptors = BeanProvider.getContextualReference(ViewConfigResolver.class).getViewConfigDescriptors(); @@ -217,4 +237,70 @@ public class NavigationCaseMapWrapper implements Map result.addAll(createViewConfigBasedNavigationCases(true).entrySet()); return result; } + +//currently not a complete handling, but enough to fix the issues with mojarra +private class DelegatingMap extends HashMap> +{ +private static final long serialVersionUID = -955468874397821639L; +private final ConfigurableNavigationHandler wrapped; + +private DelegatingMap(ConfigurableNavigationHandler wrapped) +{ +this.wrapped = wrapped; +} + +@Override +public Set put(String key, Set value) +{ +//delegate to the wrapped instance -> the innermost handler needs to receive it +//(because mojarra uses
git commit: DELTASPIKE-471 support external handling of navigation-cases
Updated Branches: refs/heads/master accd49607 -> 3b52b8f8e DELTASPIKE-471 support external handling of navigation-cases Project: http://git-wip-us.apache.org/repos/asf/deltaspike/repo Commit: http://git-wip-us.apache.org/repos/asf/deltaspike/commit/3b52b8f8 Tree: http://git-wip-us.apache.org/repos/asf/deltaspike/tree/3b52b8f8 Diff: http://git-wip-us.apache.org/repos/asf/deltaspike/diff/3b52b8f8 Branch: refs/heads/master Commit: 3b52b8f8ea3dc247a8d786ffd131b014a1294f34 Parents: accd496 Author: gpetracek Authored: Tue Dec 17 14:13:10 2013 +0100 Committer: gpetracek Committed: Tue Dec 17 14:13:10 2013 +0100 -- .../view/navigation/NavigationCaseMapWrapper.java | 18 +- 1 file changed, 17 insertions(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/deltaspike/blob/3b52b8f8/deltaspike/modules/jsf/impl/src/main/java/org/apache/deltaspike/jsf/impl/config/view/navigation/NavigationCaseMapWrapper.java -- diff --git a/deltaspike/modules/jsf/impl/src/main/java/org/apache/deltaspike/jsf/impl/config/view/navigation/NavigationCaseMapWrapper.java b/deltaspike/modules/jsf/impl/src/main/java/org/apache/deltaspike/jsf/impl/config/view/navigation/NavigationCaseMapWrapper.java index d393860..ff21873 100644 --- a/deltaspike/modules/jsf/impl/src/main/java/org/apache/deltaspike/jsf/impl/config/view/navigation/NavigationCaseMapWrapper.java +++ b/deltaspike/modules/jsf/impl/src/main/java/org/apache/deltaspike/jsf/impl/config/view/navigation/NavigationCaseMapWrapper.java @@ -252,10 +252,26 @@ public class NavigationCaseMapWrapper implements Map @Override public Set put(String key, Set value) { +if (value == null) +{ +return null; +} + +Set result = new HashSet(); + +//filter entries created by createViewConfigBasedNavigationCases +for (NavigationCase navigationCase : value) +{ +if (!(navigationCase.getFromOutcome() == null && navigationCase.getFromAction() == null)) +{ +result.add(navigationCase); +} +} + //delegate to the wrapped instance -> the innermost handler needs to receive it //(because mojarra uses ConfigurableNavigationHandler#getNavigationCases // to add cases for std. nav.rules from the outside) -return this.wrapped.getNavigationCases().put(key, value); +return this.wrapped.getNavigationCases().put(key, result); } @Override
[2/2] git commit: DELTASPIKE-475 @Scheduled (first draft)
DELTASPIKE-475 @Scheduled (first draft) Project: http://git-wip-us.apache.org/repos/asf/deltaspike/repo Commit: http://git-wip-us.apache.org/repos/asf/deltaspike/commit/edbdaa8e Tree: http://git-wip-us.apache.org/repos/asf/deltaspike/tree/edbdaa8e Diff: http://git-wip-us.apache.org/repos/asf/deltaspike/diff/edbdaa8e Branch: refs/heads/master Commit: edbdaa8e6fac4686b407086c8f6d48c9ced892ab Parents: f216f03 Author: gpetracek Authored: Fri Dec 20 14:43:57 2013 +0100 Committer: gpetracek Committed: Fri Dec 20 15:47:41 2013 +0100 -- deltaspike/modules/pom.xml | 1 + deltaspike/modules/scheduler/api/pom.xml| 78 + .../deltaspike/scheduler/api/Scheduled.java | 45 +++ .../deltaspike/scheduler/spi/Scheduler.java | 40 +++ .../api/src/main/resources/META-INF/beans.xml | 23 ++ deltaspike/modules/scheduler/impl/pom.xml | 147 ++ .../scheduler/impl/QuartzScheduler.java | 287 +++ .../scheduler/impl/SchedulerExtension.java | 192 + .../scheduler/impl/SchedulerProducer.java | 39 +++ .../impl/src/main/resources/META-INF/beans.xml | 23 ++ .../javax.enterprise.inject.spi.Extension | 20 ++ ...rg.apache.deltaspike.scheduler.spi.Scheduler | 20 ++ deltaspike/modules/scheduler/pom.xml| 40 +++ deltaspike/parent/pom.xml | 14 + 14 files changed, 969 insertions(+) -- http://git-wip-us.apache.org/repos/asf/deltaspike/blob/edbdaa8e/deltaspike/modules/pom.xml -- diff --git a/deltaspike/modules/pom.xml b/deltaspike/modules/pom.xml index 3049707..9755231 100644 --- a/deltaspike/modules/pom.xml +++ b/deltaspike/modules/pom.xml @@ -42,6 +42,7 @@ partial-bean bean-validation data +scheduler test-control http://git-wip-us.apache.org/repos/asf/deltaspike/blob/edbdaa8e/deltaspike/modules/scheduler/api/pom.xml -- diff --git a/deltaspike/modules/scheduler/api/pom.xml b/deltaspike/modules/scheduler/api/pom.xml new file mode 100644 index 000..93af6e0 --- /dev/null +++ b/deltaspike/modules/scheduler/api/pom.xml @@ -0,0 +1,78 @@ + + +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.deltaspike.modules +scheduler-module-project +0.6-SNAPSHOT + + +org.apache.deltaspike.modules +deltaspike-scheduler-module-api +bundle + +Apache DeltaSpike Scheduler-Module API + + + +org.apache.deltaspike.scheduler.* + + +javax.enterprise.inject, +!org.apache.deltaspike.scheduler.*, +* + + + + + +org.apache.deltaspike.core +deltaspike-core-api + + + +org.apache.deltaspike.cdictrl +deltaspike-cdictrl-api +provided + + + + + + +true +org.apache.maven.plugins +maven-source-plugin + + + +attach-sources + +jar + + + + + + + + http://git-wip-us.apache.org/repos/asf/deltaspike/blob/edbdaa8e/deltaspike/modules/scheduler/api/src/main/java/org/apache/deltaspike/scheduler/api/Scheduled.java -- diff --git a/deltaspike/modules/scheduler/api/src/main/java/org/apache/deltaspike/scheduler/api/Scheduled.java b/deltaspike/modules/scheduler/api/src/main/java/org/apache/deltaspike/scheduler/api/Scheduled.java new file mode 100644 index 000..6732e5a --- /dev/null +++ b/deltaspike/modules/scheduler/api/src/main/java/org/apache/deltaspike/scheduler/api/Scheduled.java @@ -0,0 +1,45 @@ +/* + * 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
[1/2] git commit: DELTASPIKE-474 deactivatable services
Updated Branches: refs/heads/master 3b6277460 -> edbdaa8e6 DELTASPIKE-474 deactivatable services Project: http://git-wip-us.apache.org/repos/asf/deltaspike/repo Commit: http://git-wip-us.apache.org/repos/asf/deltaspike/commit/f216f036 Tree: http://git-wip-us.apache.org/repos/asf/deltaspike/tree/f216f036 Diff: http://git-wip-us.apache.org/repos/asf/deltaspike/diff/f216f036 Branch: refs/heads/master Commit: f216f03671a16520be543597a8b48862cfd37c57 Parents: 3b62774 Author: gpetracek Authored: Fri Dec 20 14:45:15 2013 +0100 Committer: gpetracek Committed: Fri Dec 20 15:01:47 2013 +0100 -- .../deltaspike/core/util/ServiceUtils.java | 36 +++- 1 file changed, 35 insertions(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/deltaspike/blob/f216f036/deltaspike/core/api/src/main/java/org/apache/deltaspike/core/util/ServiceUtils.java -- diff --git a/deltaspike/core/api/src/main/java/org/apache/deltaspike/core/util/ServiceUtils.java b/deltaspike/core/api/src/main/java/org/apache/deltaspike/core/util/ServiceUtils.java index 0c1b994..92fa6c4 100644 --- a/deltaspike/core/api/src/main/java/org/apache/deltaspike/core/util/ServiceUtils.java +++ b/deltaspike/core/api/src/main/java/org/apache/deltaspike/core/util/ServiceUtils.java @@ -18,11 +18,14 @@ */ package org.apache.deltaspike.core.util; +import org.apache.deltaspike.core.spi.activation.Deactivatable; + import javax.enterprise.inject.Typed; import java.util.ArrayList; import java.util.Iterator; import java.util.List; import java.util.ServiceLoader; +import java.util.logging.Logger; /** * Allows handling the lookup (with fallbacks) in a central place. @@ -31,6 +34,8 @@ import java.util.ServiceLoader; @Typed() public abstract class ServiceUtils { +private static final Logger LOG = Logger.getLogger(ServiceUtils.class.getName()); + private ServiceUtils() { // prevent instantiation @@ -38,6 +43,12 @@ public abstract class ServiceUtils public static List loadServiceImplementations(Class serviceType) { +return loadServiceImplementations(serviceType, false); +} + +public static List loadServiceImplementations(Class serviceType, + boolean ignoreServicesWithMissingDependencies) +{ List result = new ArrayList(); Iterator servicesIterator = ServiceLoader.load(serviceType).iterator(); @@ -50,7 +61,30 @@ public abstract class ServiceUtils while (servicesIterator.hasNext()) { -result.add(servicesIterator.next()); +try +{ +T service = servicesIterator.next(); + +if (service instanceof Deactivatable && +!ClassDeactivationUtils.isActivated((Class) service.getClass())) +{ +LOG.info("deactivated service: " + service.getClass().getName()); + +continue; +} +result.add(service); +} +catch (Throwable t) +{ +if (!ignoreServicesWithMissingDependencies) +{ +throw ExceptionUtils.throwAsRuntimeException(t); +} +else +{ +LOG.info("service filtered - caused by " + t.getMessage()); +} +} } return result; }
git commit: DELTASPIKE-475 minor improvement
Updated Branches: refs/heads/master edbdaa8e6 -> db6eaefb4 DELTASPIKE-475 minor improvement Project: http://git-wip-us.apache.org/repos/asf/deltaspike/repo Commit: http://git-wip-us.apache.org/repos/asf/deltaspike/commit/db6eaefb Tree: http://git-wip-us.apache.org/repos/asf/deltaspike/tree/db6eaefb Diff: http://git-wip-us.apache.org/repos/asf/deltaspike/diff/db6eaefb Branch: refs/heads/master Commit: db6eaefb4de91697a8c67cf98b98364bf328766d Parents: edbdaa8 Author: gpetracek Authored: Fri Dec 20 17:21:28 2013 +0100 Committer: gpetracek Committed: Fri Dec 20 17:21:28 2013 +0100 -- .../deltaspike/scheduler/impl/QuartzScheduler.java | 17 ++--- 1 file changed, 10 insertions(+), 7 deletions(-) -- http://git-wip-us.apache.org/repos/asf/deltaspike/blob/db6eaefb/deltaspike/modules/scheduler/impl/src/main/java/org/apache/deltaspike/scheduler/impl/QuartzScheduler.java -- diff --git a/deltaspike/modules/scheduler/impl/src/main/java/org/apache/deltaspike/scheduler/impl/QuartzScheduler.java b/deltaspike/modules/scheduler/impl/src/main/java/org/apache/deltaspike/scheduler/impl/QuartzScheduler.java index 8507d71..9eb1be8 100644 --- a/deltaspike/modules/scheduler/impl/src/main/java/org/apache/deltaspike/scheduler/impl/QuartzScheduler.java +++ b/deltaspike/modules/scheduler/impl/src/main/java/org/apache/deltaspike/scheduler/impl/QuartzScheduler.java @@ -248,20 +248,23 @@ public class QuartzScheduler implements Scheduler } @Override -public void jobToBeExecuted(JobExecutionContext context) +public void jobToBeExecuted(JobExecutionContext jobExecutionContext) { -Scheduled scheduled = context.getJobInstance().getClass().getAnnotation(Scheduled.class); +Scheduled scheduled = jobExecutionContext.getJobInstance().getClass().getAnnotation(Scheduled.class); Collections.addAll(this.scopes, scheduled.startScopes()); -this.contextControl = BeanProvider.getContextualReference(ContextControl.class); - -for (Class scopeAnnotation : this.scopes) +if (!this.scopes.isEmpty()) { -contextControl.startContext(scopeAnnotation); +this.contextControl = BeanProvider.getContextualReference(ContextControl.class); + +for (Class scopeAnnotation : this.scopes) +{ +contextControl.startContext(scopeAnnotation); +} } -BeanProvider.injectFields(context.getJobInstance()); +BeanProvider.injectFields(jobExecutionContext.getJobInstance()); } @Override
git commit: DELTASPIKE-477 dist-config for the scheduler-module
Updated Branches: refs/heads/master 91f01bde5 -> 871e5c714 DELTASPIKE-477 dist-config for the scheduler-module Project: http://git-wip-us.apache.org/repos/asf/deltaspike/repo Commit: http://git-wip-us.apache.org/repos/asf/deltaspike/commit/871e5c71 Tree: http://git-wip-us.apache.org/repos/asf/deltaspike/tree/871e5c71 Diff: http://git-wip-us.apache.org/repos/asf/deltaspike/diff/871e5c71 Branch: refs/heads/master Commit: 871e5c7149ef9cb954a6ad9560fba4c9cc797757 Parents: 91f01bd Author: gpetracek Authored: Sun Dec 22 13:13:01 2013 +0100 Committer: gpetracek Committed: Sun Dec 22 13:22:01 2013 +0100 -- deltaspike/dist/bom/pom.xml | 12 .../dist/full/src/main/distribution/modules-module.xml | 2 ++ 2 files changed, 14 insertions(+) -- http://git-wip-us.apache.org/repos/asf/deltaspike/blob/871e5c71/deltaspike/dist/bom/pom.xml -- diff --git a/deltaspike/dist/bom/pom.xml b/deltaspike/dist/bom/pom.xml index f0cc501..8f60598 100644 --- a/deltaspike/dist/bom/pom.xml +++ b/deltaspike/dist/bom/pom.xml @@ -159,6 +159,18 @@ deltaspike-bean-validation-module-impl runtime + + +org.apache.deltaspike.modules +deltaspike-scheduler-module-api +compile + + + +org.apache.deltaspike.modules +deltaspike-scheduler-module-impl +runtime + http://git-wip-us.apache.org/repos/asf/deltaspike/blob/871e5c71/deltaspike/dist/full/src/main/distribution/modules-module.xml -- diff --git a/deltaspike/dist/full/src/main/distribution/modules-module.xml b/deltaspike/dist/full/src/main/distribution/modules-module.xml index 6c23daf..0fb83cb 100644 --- a/deltaspike/dist/full/src/main/distribution/modules-module.xml +++ b/deltaspike/dist/full/src/main/distribution/modules-module.xml @@ -34,6 +34,8 @@ + +
git commit: DELTASPIKE-476 mocked scheduler tests
Updated Branches: refs/heads/master a60f751e1 -> 26504284a DELTASPIKE-476 mocked scheduler tests Project: http://git-wip-us.apache.org/repos/asf/deltaspike/repo Commit: http://git-wip-us.apache.org/repos/asf/deltaspike/commit/26504284 Tree: http://git-wip-us.apache.org/repos/asf/deltaspike/tree/26504284 Diff: http://git-wip-us.apache.org/repos/asf/deltaspike/diff/26504284 Branch: refs/heads/master Commit: 26504284afe6a35c99ab77bc33d7f360bda98c01 Parents: a60f751 Author: gpetracek Authored: Wed Dec 25 10:22:52 2013 +0100 Committer: gpetracek Committed: Wed Dec 25 10:22:52 2013 +0100 -- deltaspike/modules/scheduler/impl/pom.xml | 6 + .../scheduler/impl/SchedulerExtension.java | 3 +- .../scheduler/custom/AutoRegisteredJob.java | 26 + .../scheduler/custom/CustomConfigSource.java| 65 +++ .../test/scheduler/custom/CustomJob.java| 23 .../scheduler/custom/CustomSchedulerTest.java | 117 +++ .../test/scheduler/custom/ManualJob.java| 26 + .../test/scheduler/custom/MockedScheduler.java | 66 +++ .../scheduler/custom/QuartzDeactivator.java | 33 ++ .../test/scheduler/custom/TestJobManager.java | 104 + .../deltaspike/test/util/ArchiveUtils.java | 41 +++ .../impl/src/test/resources/META-INF/beans.xml | 24 ...ache.deltaspike.core.spi.config.ConfigSource | 20 ...rg.apache.deltaspike.scheduler.spi.Scheduler | 20 .../impl/src/test/resources/arquillian.xml | 83 + 15 files changed, 656 insertions(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/deltaspike/blob/26504284/deltaspike/modules/scheduler/impl/pom.xml -- diff --git a/deltaspike/modules/scheduler/impl/pom.xml b/deltaspike/modules/scheduler/impl/pom.xml index 83bb92e..8433b19 100644 --- a/deltaspike/modules/scheduler/impl/pom.xml +++ b/deltaspike/modules/scheduler/impl/pom.xml @@ -78,6 +78,12 @@ commons-logging test + + +org.apache.deltaspike.core +deltaspike-core-impl +test + http://git-wip-us.apache.org/repos/asf/deltaspike/blob/26504284/deltaspike/modules/scheduler/impl/src/main/java/org/apache/deltaspike/scheduler/impl/SchedulerExtension.java -- diff --git a/deltaspike/modules/scheduler/impl/src/main/java/org/apache/deltaspike/scheduler/impl/SchedulerExtension.java b/deltaspike/modules/scheduler/impl/src/main/java/org/apache/deltaspike/scheduler/impl/SchedulerExtension.java index bb1bcc9..2986810 100644 --- a/deltaspike/modules/scheduler/impl/src/main/java/org/apache/deltaspike/scheduler/impl/SchedulerExtension.java +++ b/deltaspike/modules/scheduler/impl/src/main/java/org/apache/deltaspike/scheduler/impl/SchedulerExtension.java @@ -41,6 +41,7 @@ import java.util.logging.Logger; public class SchedulerExtension implements Extension, Deactivatable { +public static final String JOB_CLASS_CONFIG_KEY = "deltaspike.scheduler.job-class"; private static final Logger LOG = Logger.getLogger(SchedulerExtension.class.getName()); private Boolean isActivated = true; @@ -57,7 +58,7 @@ public class SchedulerExtension implements Extension, Deactivatable if (this.isActivated) { -String jobClassName = ConfigResolver.getPropertyValue("deltaspike.scheduler.job-class", "org.quartz.Job"); +String jobClassName = ConfigResolver.getPropertyValue(JOB_CLASS_CONFIG_KEY, "org.quartz.Job"); this.jobClass = ClassUtils.tryToLoadClassForName(jobClassName); http://git-wip-us.apache.org/repos/asf/deltaspike/blob/26504284/deltaspike/modules/scheduler/impl/src/test/java/org/apache/deltaspike/test/scheduler/custom/AutoRegisteredJob.java -- diff --git a/deltaspike/modules/scheduler/impl/src/test/java/org/apache/deltaspike/test/scheduler/custom/AutoRegisteredJob.java b/deltaspike/modules/scheduler/impl/src/test/java/org/apache/deltaspike/test/scheduler/custom/AutoRegisteredJob.java new file mode 100644 index 000..5a4fbd8 --- /dev/null +++ b/deltaspike/modules/scheduler/impl/src/test/java/org/apache/deltaspike/test/scheduler/custom/AutoRegisteredJob.java @@ -0,0 +1,26 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except
git commit: DELTASPIKE-479 initial setup and added test
Updated Branches: refs/heads/master 26504284a -> 7b0650b95 DELTASPIKE-479 initial setup and added test Project: http://git-wip-us.apache.org/repos/asf/deltaspike/repo Commit: http://git-wip-us.apache.org/repos/asf/deltaspike/commit/7b0650b9 Tree: http://git-wip-us.apache.org/repos/asf/deltaspike/tree/7b0650b9 Diff: http://git-wip-us.apache.org/repos/asf/deltaspike/diff/7b0650b9 Branch: refs/heads/master Commit: 7b0650b95b8fff36272553e186f0802ad0cfc636 Parents: 2650428 Author: gpetracek Authored: Wed Dec 25 12:09:03 2013 +0100 Committer: gpetracek Committed: Wed Dec 25 12:13:04 2013 +0100 -- .../custom/CustomSchedulerEarFileTest.java | 42 +++ .../scheduler/custom/CustomSchedulerTest.java | 35 ++--- .../custom/CustomSchedulerWarFileTest.java | 55 .../deltaspike/test/util/ArchiveUtils.java | 4 +- deltaspike/parent/code/pom.xml | 10 ++-- .../EnterpriseArchiveProfileCategory.java | 27 ++ 6 files changed, 137 insertions(+), 36 deletions(-) -- http://git-wip-us.apache.org/repos/asf/deltaspike/blob/7b0650b9/deltaspike/modules/scheduler/impl/src/test/java/org/apache/deltaspike/test/scheduler/custom/CustomSchedulerEarFileTest.java -- diff --git a/deltaspike/modules/scheduler/impl/src/test/java/org/apache/deltaspike/test/scheduler/custom/CustomSchedulerEarFileTest.java b/deltaspike/modules/scheduler/impl/src/test/java/org/apache/deltaspike/test/scheduler/custom/CustomSchedulerEarFileTest.java new file mode 100644 index 000..f6f2a98 --- /dev/null +++ b/deltaspike/modules/scheduler/impl/src/test/java/org/apache/deltaspike/test/scheduler/custom/CustomSchedulerEarFileTest.java @@ -0,0 +1,42 @@ +/* + * 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.deltaspike.test.scheduler.custom; + +import org.apache.deltaspike.test.category.EnterpriseArchiveProfileCategory; +import org.jboss.arquillian.container.test.api.Deployment; +import org.jboss.arquillian.junit.Arquillian; +import org.jboss.shrinkwrap.api.ShrinkWrap; +import org.jboss.shrinkwrap.api.spec.EnterpriseArchive; +import org.junit.experimental.categories.Category; +import org.junit.runner.RunWith; + +@RunWith(Arquillian.class) +@Category(EnterpriseArchiveProfileCategory.class) +public class CustomSchedulerEarFileTest extends CustomSchedulerTest +{ +@Deployment +public static EnterpriseArchive deployEar() +{ +String simpleName = CustomSchedulerEarFileTest.class.getSimpleName(); +String archiveName = simpleName.substring(0, 1).toLowerCase() + simpleName.substring(1); + +return ShrinkWrap.create(EnterpriseArchive.class, archiveName + ".ear") +.addAsModule(CustomSchedulerWarFileTest.deploy()); +} +} http://git-wip-us.apache.org/repos/asf/deltaspike/blob/7b0650b9/deltaspike/modules/scheduler/impl/src/test/java/org/apache/deltaspike/test/scheduler/custom/CustomSchedulerTest.java -- diff --git a/deltaspike/modules/scheduler/impl/src/test/java/org/apache/deltaspike/test/scheduler/custom/CustomSchedulerTest.java b/deltaspike/modules/scheduler/impl/src/test/java/org/apache/deltaspike/test/scheduler/custom/CustomSchedulerTest.java index 541388d..489c2cf 100644 --- a/deltaspike/modules/scheduler/impl/src/test/java/org/apache/deltaspike/test/scheduler/custom/CustomSchedulerTest.java +++ b/deltaspike/modules/scheduler/impl/src/test/java/org/apache/deltaspike/test/scheduler/custom/CustomSchedulerTest.java @@ -19,44 +19,15 @@ package org.apache.deltaspike.test.scheduler.custom; import junit.framework.Assert; -import org.apache.deltaspike.core.spi.config.ConfigSource; import org.apache.deltaspike.scheduler.spi.Scheduler; -import org.apache.deltaspike.test.util.ArchiveUtils; -import org.jboss.arquillian.container.test.api.Deployment; -import org.jboss.arquillian.junit.Arquillian; -import org.jboss.s
git commit: DELTASPIKE-479 workaround for old versions of weld
Updated Branches: refs/heads/master 7b0650b95 -> 4a9effa8f DELTASPIKE-479 workaround for old versions of weld Project: http://git-wip-us.apache.org/repos/asf/deltaspike/repo Commit: http://git-wip-us.apache.org/repos/asf/deltaspike/commit/4a9effa8 Tree: http://git-wip-us.apache.org/repos/asf/deltaspike/tree/4a9effa8 Diff: http://git-wip-us.apache.org/repos/asf/deltaspike/diff/4a9effa8 Branch: refs/heads/master Commit: 4a9effa8f6c7f7a300ac4a7e0c5b92c3fe34e052 Parents: 7b0650b Author: gpetracek Authored: Wed Dec 25 15:20:06 2013 +0100 Committer: gpetracek Committed: Wed Dec 25 15:20:06 2013 +0100 -- .../test/scheduler/custom/CustomSchedulerTest.java | 12 +--- 1 file changed, 9 insertions(+), 3 deletions(-) -- http://git-wip-us.apache.org/repos/asf/deltaspike/blob/4a9effa8/deltaspike/modules/scheduler/impl/src/test/java/org/apache/deltaspike/test/scheduler/custom/CustomSchedulerTest.java -- diff --git a/deltaspike/modules/scheduler/impl/src/test/java/org/apache/deltaspike/test/scheduler/custom/CustomSchedulerTest.java b/deltaspike/modules/scheduler/impl/src/test/java/org/apache/deltaspike/test/scheduler/custom/CustomSchedulerTest.java index 489c2cf..b8a0692 100644 --- a/deltaspike/modules/scheduler/impl/src/test/java/org/apache/deltaspike/test/scheduler/custom/CustomSchedulerTest.java +++ b/deltaspike/modules/scheduler/impl/src/test/java/org/apache/deltaspike/test/scheduler/custom/CustomSchedulerTest.java @@ -19,21 +19,27 @@ package org.apache.deltaspike.test.scheduler.custom; import junit.framework.Assert; +import org.apache.deltaspike.core.api.provider.BeanProvider; import org.apache.deltaspike.scheduler.spi.Scheduler; +import org.junit.Before; import org.junit.Test; -import javax.enterprise.inject.Typed; import javax.inject.Inject; -@Typed() public abstract class CustomSchedulerTest { -@Inject +//don't use @Inject here - due to an issue with old versions of weld private Scheduler scheduler; @Inject private TestJobManager testJobManager; +@Before +public void init() +{ +this.scheduler = BeanProvider.getContextualReference(Scheduler.class); +} + @Test public void checkAutoRegisteredSchedulerJob() {
[2/2] git commit: DELTASPIKE-479 workaround for weld
DELTASPIKE-479 workaround for weld Project: http://git-wip-us.apache.org/repos/asf/deltaspike/repo Commit: http://git-wip-us.apache.org/repos/asf/deltaspike/commit/9c946f4a Tree: http://git-wip-us.apache.org/repos/asf/deltaspike/tree/9c946f4a Diff: http://git-wip-us.apache.org/repos/asf/deltaspike/diff/9c946f4a Branch: refs/heads/master Commit: 9c946f4a13363de9003693a635746bd30ba40d42 Parents: 92cc355 Author: gpetracek Authored: Wed Dec 25 15:54:28 2013 +0100 Committer: gpetracek Committed: Wed Dec 25 15:54:28 2013 +0100 -- .../deltaspike/test/scheduler/custom/CustomSchedulerTest.java| 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) -- http://git-wip-us.apache.org/repos/asf/deltaspike/blob/9c946f4a/deltaspike/modules/scheduler/impl/src/test/java/org/apache/deltaspike/test/scheduler/custom/CustomSchedulerTest.java -- diff --git a/deltaspike/modules/scheduler/impl/src/test/java/org/apache/deltaspike/test/scheduler/custom/CustomSchedulerTest.java b/deltaspike/modules/scheduler/impl/src/test/java/org/apache/deltaspike/test/scheduler/custom/CustomSchedulerTest.java index 489c2cf..02989da 100644 --- a/deltaspike/modules/scheduler/impl/src/test/java/org/apache/deltaspike/test/scheduler/custom/CustomSchedulerTest.java +++ b/deltaspike/modules/scheduler/impl/src/test/java/org/apache/deltaspike/test/scheduler/custom/CustomSchedulerTest.java @@ -22,14 +22,12 @@ import junit.framework.Assert; import org.apache.deltaspike.scheduler.spi.Scheduler; import org.junit.Test; -import javax.enterprise.inject.Typed; import javax.inject.Inject; -@Typed() public abstract class CustomSchedulerTest { @Inject -private Scheduler scheduler; +private Scheduler scheduler; @Inject private TestJobManager testJobManager;
[1/2] git commit: Revert "DELTASPIKE-479 workaround for old versions of weld"
Updated Branches: refs/heads/master 4a9effa8f -> 9c946f4a1 Revert "DELTASPIKE-479 workaround for old versions of weld" This reverts commit 4a9effa8f6c7f7a300ac4a7e0c5b92c3fe34e052. Project: http://git-wip-us.apache.org/repos/asf/deltaspike/repo Commit: http://git-wip-us.apache.org/repos/asf/deltaspike/commit/92cc355e Tree: http://git-wip-us.apache.org/repos/asf/deltaspike/tree/92cc355e Diff: http://git-wip-us.apache.org/repos/asf/deltaspike/diff/92cc355e Branch: refs/heads/master Commit: 92cc355e88d227470e1ebc70589477b366132d50 Parents: 4a9effa Author: gpetracek Authored: Wed Dec 25 15:53:25 2013 +0100 Committer: gpetracek Committed: Wed Dec 25 15:53:25 2013 +0100 -- .../test/scheduler/custom/CustomSchedulerTest.java | 12 +++- 1 file changed, 3 insertions(+), 9 deletions(-) -- http://git-wip-us.apache.org/repos/asf/deltaspike/blob/92cc355e/deltaspike/modules/scheduler/impl/src/test/java/org/apache/deltaspike/test/scheduler/custom/CustomSchedulerTest.java -- diff --git a/deltaspike/modules/scheduler/impl/src/test/java/org/apache/deltaspike/test/scheduler/custom/CustomSchedulerTest.java b/deltaspike/modules/scheduler/impl/src/test/java/org/apache/deltaspike/test/scheduler/custom/CustomSchedulerTest.java index b8a0692..489c2cf 100644 --- a/deltaspike/modules/scheduler/impl/src/test/java/org/apache/deltaspike/test/scheduler/custom/CustomSchedulerTest.java +++ b/deltaspike/modules/scheduler/impl/src/test/java/org/apache/deltaspike/test/scheduler/custom/CustomSchedulerTest.java @@ -19,27 +19,21 @@ package org.apache.deltaspike.test.scheduler.custom; import junit.framework.Assert; -import org.apache.deltaspike.core.api.provider.BeanProvider; import org.apache.deltaspike.scheduler.spi.Scheduler; -import org.junit.Before; import org.junit.Test; +import javax.enterprise.inject.Typed; import javax.inject.Inject; +@Typed() public abstract class CustomSchedulerTest { -//don't use @Inject here - due to an issue with old versions of weld +@Inject private Scheduler scheduler; @Inject private TestJobManager testJobManager; -@Before -public void init() -{ -this.scheduler = BeanProvider.getContextualReference(Scheduler.class); -} - @Test public void checkAutoRegisteredSchedulerJob() {
git commit: DELTASPIKE-479 added hint
Updated Branches: refs/heads/master 9c946f4a1 -> 84c21570d DELTASPIKE-479 added hint Project: http://git-wip-us.apache.org/repos/asf/deltaspike/repo Commit: http://git-wip-us.apache.org/repos/asf/deltaspike/commit/84c21570 Tree: http://git-wip-us.apache.org/repos/asf/deltaspike/tree/84c21570 Diff: http://git-wip-us.apache.org/repos/asf/deltaspike/diff/84c21570 Branch: refs/heads/master Commit: 84c21570d5f8b71c332f0d1104de6488b77e2993 Parents: 9c946f4 Author: gpetracek Authored: Wed Dec 25 16:10:11 2013 +0100 Committer: gpetracek Committed: Wed Dec 25 16:12:25 2013 +0100 -- .../test/scheduler/custom/CustomSchedulerTest.java| 10 ++ 1 file changed, 10 insertions(+) -- http://git-wip-us.apache.org/repos/asf/deltaspike/blob/84c21570/deltaspike/modules/scheduler/impl/src/test/java/org/apache/deltaspike/test/scheduler/custom/CustomSchedulerTest.java -- diff --git a/deltaspike/modules/scheduler/impl/src/test/java/org/apache/deltaspike/test/scheduler/custom/CustomSchedulerTest.java b/deltaspike/modules/scheduler/impl/src/test/java/org/apache/deltaspike/test/scheduler/custom/CustomSchedulerTest.java index 02989da..d97159d 100644 --- a/deltaspike/modules/scheduler/impl/src/test/java/org/apache/deltaspike/test/scheduler/custom/CustomSchedulerTest.java +++ b/deltaspike/modules/scheduler/impl/src/test/java/org/apache/deltaspike/test/scheduler/custom/CustomSchedulerTest.java @@ -28,6 +28,16 @@ public abstract class CustomSchedulerTest { @Inject private Scheduler scheduler; +//workaround for weld-se - as an alternative it's possible to use: +/* +private Scheduler scheduler; + +@Before +public void init() +{ +this.scheduler = BeanProvider.getContextualReference(Scheduler.class); +} +*/ @Inject private TestJobManager testJobManager;
svn commit: r1553389 - /deltaspike/site/trunk/content/documentation.mdtext
Author: gpetracek Date: Wed Dec 25 15:22:21 2013 New Revision: 1553389 URL: http://svn.apache.org/r1553389 Log: updated content Modified: deltaspike/site/trunk/content/documentation.mdtext Modified: deltaspike/site/trunk/content/documentation.mdtext URL: http://svn.apache.org/viewvc/deltaspike/site/trunk/content/documentation.mdtext?rev=1553389&r1=1553388&r2=1553389&view=diff == --- deltaspike/site/trunk/content/documentation.mdtext (original) +++ deltaspike/site/trunk/content/documentation.mdtext Wed Dec 25 15:22:21 2013 @@ -188,6 +188,22 @@ Or if you want to very bleeding edge, po runtime + Scheduler Module + + +org.apache.deltaspike.modules +deltaspike-scheduler-module-api +${deltaspike.version} +compile + + + +org.apache.deltaspike.modules +deltaspike-scheduler-module-impl +${deltaspike.version} +compile + + ### With Java SE @@ -408,7 +424,11 @@ Definition : This module allows to write View details » +## Scheduler (optional) + +Definition : This module provides a simple integration with quartz (per default) or any other scheduler which supports cron-expressions for job-classes. +View details » # External ## Blogs
svn commit: r1553390 - /deltaspike/site/trunk/content/scheduler.mdtext
Author: gpetracek Date: Wed Dec 25 15:25:42 2013 New Revision: 1553390 URL: http://svn.apache.org/r1553390 Log: scheduler module documentation added Added: deltaspike/site/trunk/content/scheduler.mdtext Added: deltaspike/site/trunk/content/scheduler.mdtext URL: http://svn.apache.org/viewvc/deltaspike/site/trunk/content/scheduler.mdtext?rev=1553390&view=auto == --- deltaspike/site/trunk/content/scheduler.mdtext (added) +++ deltaspike/site/trunk/content/scheduler.mdtext Wed Dec 25 15:25:42 2013 @@ -0,0 +1,24 @@ +Title: Scheduler Module +Notice: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. + +[TOC] + +*** + +# Intro +
svn commit: r1553391 - /deltaspike/site/trunk/content/documentation.mdtext
Author: gpetracek Date: Wed Dec 25 15:27:24 2013 New Revision: 1553391 URL: http://svn.apache.org/r1553391 Log: updated content Modified: deltaspike/site/trunk/content/documentation.mdtext Modified: deltaspike/site/trunk/content/documentation.mdtext URL: http://svn.apache.org/viewvc/deltaspike/site/trunk/content/documentation.mdtext?rev=1553391&r1=1553390&r2=1553391&view=diff == --- deltaspike/site/trunk/content/documentation.mdtext (original) +++ deltaspike/site/trunk/content/documentation.mdtext Wed Dec 25 15:27:24 2013 @@ -201,7 +201,7 @@ Or if you want to very bleeding edge, po org.apache.deltaspike.modules deltaspike-scheduler-module-impl ${deltaspike.version} -compile +runtime
svn commit: r891753 - /websites/production/deltaspike/content/
Author: gpetracek Date: Wed Dec 25 15:28:26 2013 New Revision: 891753 Log: Publishing svnmucc operation to deltaspike site by gpetracek Added: websites/production/deltaspike/content/ - copied from r891752, websites/staging/deltaspike/trunk/content/
svn commit: r891755 - /websites/production/deltaspike/content/
Author: gpetracek Date: Wed Dec 25 15:52:59 2013 New Revision: 891755 Log: Publishing svnmucc operation to deltaspike site by gpetracek Added: websites/production/deltaspike/content/ - copied from r891754, websites/staging/deltaspike/trunk/content/
svn commit: r1553392 - /deltaspike/site/trunk/content/scheduler.mdtext
Author: gpetracek Date: Wed Dec 25 15:52:10 2013 New Revision: 1553392 URL: http://svn.apache.org/r1553392 Log: updated content Modified: deltaspike/site/trunk/content/scheduler.mdtext Modified: deltaspike/site/trunk/content/scheduler.mdtext URL: http://svn.apache.org/viewvc/deltaspike/site/trunk/content/scheduler.mdtext?rev=1553392&r1=1553391&r2=1553392&view=diff == --- deltaspike/site/trunk/content/scheduler.mdtext (original) +++ deltaspike/site/trunk/content/scheduler.mdtext Wed Dec 25 15:52:10 2013 @@ -22,3 +22,77 @@ Notice:Licensed to the Apache Softwa # Intro +This module provides a simple integration with Quartz v2 (per default) or any other scheduler which supports cron-expressions for job-classes. + +# @Scheduled + +Just annotate your Quartz-Jobs with `@Scheduled` and they will get picked up and passed to the scheduler automatically (during the bootstrapping process). + +:::java +@Scheduled(cronExpression = "0 0/10 * * * ?") +public class CdiAwareQuartzJob implements org.quartz.Job +{ +@Inject +private MyService service; + +@Override +public void execute(JobExecutionContext context) throws JobExecutionException +{ +//... +} +} + +In such Quartz-jobs CDI based dependency-injection is enabled. Furthermore, the request- and session-scope get started (and stopped) per job-execution. Therefore, the container-control module (of DeltaSpike) is required. +That can be controlled via `@Scheduled#startScopes` (possible values: all scopes supported by the container-control module as well as `{}` for 'no scopes'). + +With 'false' for `@Scheduled#onStartup` it's even possible to schedule/install jobs dynamically - e.g.: + +:::java +@ApplicationScoped +public class ProjectStageAwareSchedulerController +{ +@Inject +private Scheduler jobScheduler; + +@Inject +private ProjectStage projectStage; + +public void registerJobs() +{ +if (ProjectStage.Production.equals(this.projectStage)) +{ +//see 'false' for @Scheduled#onStartup +this.jobScheduler.scheduleJob(ManualCdiAwareQuartzJob.class); +} +} + +@Scheduled(cronExpression = "0 0/10 * * * ?", onStartup = false) +public class ManualCdiAwareQuartzJob implements org.quartz.Job +{ +@Inject +private MyService service; + +@Override +public void execute(JobExecutionContext context) throws JobExecutionException +{ +//... +} +} +} + + +# Scheduler + +This SPI allows to control the scheduler (or integrate any other compatible scheduler as an alternative to Quartz2) + +Via std. injection like + +:::java +@Inject +private Scheduler jobScheduler; + +it's possible to manually start/stop the scheduler, pause/resume/interrupt/check scheduled jobs, register jobs manually or start a job once (without registering it permanently). + +# Custom Scheduler + +It's possible to replace the default integration with Quartz. Any other scheduler which supports cron-expressions for job-classes can be used. Please have a look at `org.apache.deltaspike.test.scheduler.custom` for further details.