You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@isis.apache.org by ah...@apache.org on 2018/02/22 19:27:54 UTC
[isis] branch dev/2.0.0-M2 updated (50b3d27 -> 06c07d5)
This is an automated email from the ASF dual-hosted git repository.
ahuber pushed a change to branch dev/2.0.0-M2
in repository https://gitbox.apache.org/repos/asf/isis.git.
omit 50b3d27 ISIS-1756 backporting proper life-cycling from jax-rs-2 branch
omit 9b129d9 ISIS-1744 updating DN versions
omit 17b86dc ISIS-1841 remove unused import
omit 539a760 ISIS-1841 remove unnecessary null-check + simplify
omit 9a1839c ISIS-1841 clean up Internal API after rebase/merge
omit 939e6d5 ISIS-1841 use _Context to store Isis default class loader
omit a481770 ISIS-1811: updates versions to 2.0.0-M2-SNAPSHOT
omit 1eb7392 ISIS-1744: removes work-around code for prior to DN 5.1.5
omit 0c1d308 ISIS-1744: updates to DN 5.1.5
omit 02c0877 ISIS-1767: fixes dependency convergence issue with com.sun.mail
omit e180741 ISIS-1756 remove reflective access to DN's EnhancementHelper since we've got a dedicated method instead
omit 9acf9bc ISIS-1755 veto ExceptionRecognizer on CDI scan
omit 7a012d3 ISIS-1754 proper DN class-loading
omit 53a565a ISIS-1775 added license
omit 44077f9 ISIS-1775 Honor web-app's context path when configuring swagger.
omit 59f2c28 ISIS-1755 TomEE requires Service Providers to be public classes
omit 497976c rebase 2.0.0-M2 on top of 2.0.0-M1 (master)
omit f740597 ISIS-1756 utilize IsisWicketApplication's life-cycle instead of providing a life-cycle CDI Bean
omit e809ddd ISIS-1756 prevent SQLException on schema creation if config is missing
omit a78d891 ISIS-1756 - fix typo
omit d13d241 ISIS-1755 JEE 7+ allow coexistence of CDI and Isis' ServiceInjector
omit 1efa068 ISIS-1756 JEE 7+ Isis App life-cycling
omit 05c9ce9 ISIS-1767 JEE 7+ added dependency on javaee-api to core/runtime
omit 266a145 ISIS-1728: uses typesafe queries for helloworld
omit 627ee81 ISIS-1726: generalizes the logic that searches for @PersistenceCapable entities, to also take into account meta-annotations.
omit 5f8258a ISIS-1727: uses lambda in IsisSessionFactoryBuilder
omit 4828a2c ISIS-1725: requires that an AppManifest is supplied (used to obtain list of entities).
omit 23144b3 ISIS-1724: removes the deprecated IsisJdoSupport in the jdo applib
omit 2670a69 ISIS-1723: removes jdo applib's Auditable interface and @Auditable annotation
omit a352a0f ISIS-1276: fixes algorithm for lookup of datastore id's, at least
omit 8dcc249 ISIS-1276: fixes compile issues in metamodel and runtime
omit cbfbf54 ISIS-1276: updates applib, replaces references of TypesafeQuery to be instead JDOQLTypedQuery
omit 9509c9c ISIS-1276: updates core to compile under JDK 1.8 only
omit 270abd0 ISIS-1276: updates references for datanucleus.
add 75a936e ISIS-1866 fix tests after changed default behavior
add 2201436 ISIS-1841 cleanup switch statement
add e31e3c1 ISIS-1867: cache JAXBContext by class
add 1921a34 ISIS-1867: caches JAXBContext by class in JaxbService.Default implementation
add 4de6220 ISIS-1867: caches JAXBContext by class (in JaxbUtil utility class in applib)
add bf1daf6 ISIS-1867: refactors MemberExecutionDtoUtils #jaxbContextFor so handles exception, same as JaxbUtil
add 2ed6fac ISIS-1867: refactors MemberExecutionDtoUtils#jaxbContextFor to delegate to JaxbUtil
add 2da9f90 ISIS-1867: refactors JaxbService#jaxbContextFor so handles exception, similar to JaxbUtil
add a265623 ISIS-1867: refactors JaxbService to use JaxbUtil#jaxbContextFor
add 29278da ISIS-1867: refactors ChangesDtoUtil to use JaxbUtil#jaxbContextFor
add 1eb350d ISIS-1867: caches JAXBContext within JaxbMatchers (unit test support)
add 88a2f66 ISIS-1867: refactors GridLoaderServiceDefault to cache its JAXBContext during initialization
add 01af65d Merge branch 'ISIS-1867'
add b8c51e8 Merge branch 'master' of https://github.com/apache/isis
add 238655c ISIS-1866 further fixing tests
add dd9588d ISIS-1632 fix wrong filter logic
add 25ec0c2 ISIS-1866 further fixing tests
add 2d1c331 ISIS-1632 fixing wrong logic with publishing behavior
add 089170b ISIS-1866 further fixing tests
add 6dd9d40 ISIS-1866 further fixing tests
add 5595d4e ISIS-1866 further fixing tests
add d938728 Update _rgant-DomainObject_publishing.adoc
add 4fcac47 Merge branch 'master' of https://github.com/apache/isis
add a07f845 ISIS-1866 add code comment
add 96d812e ISIS-1742 remove deprecated NotContributedFacet.NotContributedAs
add 1187898 ISIS-1866 further fixing tests
add 84738e9 ISIS-1866 further fixing tests
add b9c25c5 ISIS-1866 further fixing tests
add 0350032 ISIS-1866 further fixing tests
add 7022adc ISIS-1868 updating plugins to the latest available versions
add 813597e ISIS-1869 fix surefire setup
add dbe8458 ISIS-1870 fix errors (mock setup)
add 8d3a7e1 ISIS-1870 fix MediaType parser errors on initialization
add 5a574cc ISIS-1870 fix MediaType parsing related tests
add b0858df ISIS-1870 proper test tearDown, tests still fail
new f4693d6 ISIS-1276: updates references for datanucleus.
new 1385584 ISIS-1276: updates core to compile under JDK 1.8 only
new 9e4caa8 ISIS-1276: updates applib, replaces references of TypesafeQuery to be instead JDOQLTypedQuery
new 9068474 ISIS-1276: fixes compile issues in metamodel and runtime
new b193a80 ISIS-1276: fixes algorithm for lookup of datastore id's, at least
new 4e66c19 ISIS-1723: removes jdo applib's Auditable interface and @Auditable annotation
new ff41e07 ISIS-1724: removes the deprecated IsisJdoSupport in the jdo applib
new 63e1e86 ISIS-1725: requires that an AppManifest is supplied (used to obtain list of entities).
new f5812a8 ISIS-1727: uses lambda in IsisSessionFactoryBuilder
new ecf9389 ISIS-1726: generalizes the logic that searches for @PersistenceCapable entities, to also take into account meta-annotations.
new e20eec9 ISIS-1728: uses typesafe queries for helloworld
new 9eb9c4b ISIS-1767 JEE 7+ added dependency on javaee-api to core/runtime
new f482514 ISIS-1756 JEE 7+ Isis App life-cycling
new ec87b99 ISIS-1755 JEE 7+ allow coexistence of CDI and Isis' ServiceInjector
new b17393b ISIS-1756 - fix typo
new dd3e538 ISIS-1756 prevent SQLException on schema creation if config is missing
new 73b69dc ISIS-1756 utilize IsisWicketApplication's life-cycle instead of providing a life-cycle CDI Bean
new 3e17e56 rebase 2.0.0-M2 on top of 2.0.0-M1 (master)
new e1cf831 ISIS-1755 TomEE requires Service Providers to be public classes
new c61eee9 ISIS-1775 Honor web-app's context path when configuring swagger.
new b7377f9 ISIS-1775 added license
new 1810edd ISIS-1754 proper DN class-loading
new 5a8586c ISIS-1755 veto ExceptionRecognizer on CDI scan
new 6769dde ISIS-1756 remove reflective access to DN's EnhancementHelper since we've got a dedicated method instead
new 13e2820 ISIS-1767: fixes dependency convergence issue with com.sun.mail
new 488f825 ISIS-1744: updates to DN 5.1.5
new fa11113 ISIS-1744: removes work-around code for prior to DN 5.1.5
new 42081eb ISIS-1811: updates versions to 2.0.0-M2-SNAPSHOT
new a3c108a ISIS-1841 use _Context to store Isis default class loader
new efdf118 ISIS-1841 clean up Internal API after rebase/merge
new ca1ea66 ISIS-1841 remove unnecessary null-check + simplify
new 723505c ISIS-1841 remove unused import
new c98701c ISIS-1744 updating DN versions
new 06c07d5 ISIS-1756 backporting proper life-cycling from jax-rs-2 branch
This update added new revisions after undoing existing revisions.
That is to say, some revisions that were in the old version of the
branch are not in the new version. This situation occurs
when a user --force pushes a change and generates a repository
containing something like this:
* -- * -- B -- O -- O -- O (50b3d27)
\
N -- N -- N refs/heads/dev/2.0.0-M2 (06c07d5)
You should already have received notification emails for all of the O
revisions, and so the following emails describe only the N revisions
from the common base, B.
Any revisions marked "omit" are not gone; other references still
refer to them. Any revisions marked "discard" are gone forever.
The 34 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:
.../rgant/_rgant-DomainObject_publishing.adoc | 2 +-
.../isis/applib/services/jaxb/JaxbService.java | 36 ++--
.../java/org/apache/isis/applib/util/JaxbUtil.java | 27 ++-
.../apache/isis/schema/utils/ChangesDtoUtils.java | 7 +-
.../apache/isis/schema/utils/CommandDtoUtils.java | 7 +-
.../isis/schema/utils/InteractionDtoUtils.java | 7 +-
.../isis/schema/utils/MemberExecutionDtoUtils.java | 7 +-
...tContributedFacetForActionLayoutAnnotation.java | 6 +-
.../notcontributed/NotContributedFacet.java | 26 ---
.../NotContributedFacetAbstract.java | 11 +-
...tributedFacetDerivedFromDomainServiceFacet.java | 2 +-
.../NotContributedFacetDerivedFromMixinFacet.java | 2 +-
.../DomainObjectAnnotationFacetFactory.java | 2 +-
.../publishing/PublishObjectsConfiguration.java | 1 +
...lishedObjectFacetForDomainObjectAnnotation.java | 8 +-
.../services/grid/GridLoaderServiceDefault.java | 36 ++--
.../action/ActionAnnotationFacetFactoryTest.java | 222 +++++----------------
...tionLayoutAnnotationFacetFactoryJunit4Test.java | 70 +++++--
...nLayoutXmlLayoutAnnotationFacetFactoryTest.java | 10 +-
.../DomainObjectAnnotationFacetFactoryTest.java | 119 +++++++----
.../DomainObjectLayoutFactoryTest.java | 45 +++--
.../ParameterAnnotationFacetFactoryTest.java | 10 +-
.../PropertyAnnotationFacetFactoryTest.java | 14 +-
...ObjectAssociationAbstractTest_alwaysHidden.java | 5 +-
core/pom.xml | 13 +-
core/schema/pom.xml | 6 +-
...AuthenticatorOrAuthorizorTest_authenticate.java | 41 ++--
...ticatorOrAuthorizorTest_isVisibleInAnyRole.java | 10 +-
.../core/unittestsupport/jaxb/JaxbMatchers.java | 25 ++-
.../restfulobjects/applib/RepresentationType.java | 22 +-
.../restfulobjects/applib/util/MediaTypes.java | 73 +++++++
.../applib/RepresentationTypeTest_lookup.java | 21 +-
.../restfulobjects/applib/util/ParserTest.java | 7 +-
33 files changed, 480 insertions(+), 420 deletions(-)
create mode 100644 core/viewer-restfulobjects-applib/src/main/java/org/apache/isis/viewer/restfulobjects/applib/util/MediaTypes.java
--
To stop receiving notification emails like this one, please contact
ahuber@apache.org.
[isis] 14/34: ISIS-1755 JEE 7+ allow coexistence of CDI and Isis'
ServiceInjector
Posted by ah...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
ahuber pushed a commit to branch dev/2.0.0-M2
in repository https://gitbox.apache.org/repos/asf/isis.git
commit ec87b99d95c9e10544affe199751164e83cb754a
Author: Andi Huber <ah...@apache.org>
AuthorDate: Sun Oct 29 09:33:17 2017 +0100
ISIS-1755 JEE 7+ allow coexistence of CDI and Isis' ServiceInjector
---
.../webapp/jee/IsisCDIBeanScanInterceptor.java | 97 ++++++++++++++++++++++
.../services/javax.enterprise.inject.spi.Extension | 1 +
2 files changed, 98 insertions(+)
diff --git a/core/runtime/src/main/java/org/apache/isis/core/webapp/jee/IsisCDIBeanScanInterceptor.java b/core/runtime/src/main/java/org/apache/isis/core/webapp/jee/IsisCDIBeanScanInterceptor.java
new file mode 100644
index 0000000..6632a59
--- /dev/null
+++ b/core/runtime/src/main/java/org/apache/isis/core/webapp/jee/IsisCDIBeanScanInterceptor.java
@@ -0,0 +1,97 @@
+/*
+ * 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.isis.core.webapp.jee;
+
+import java.util.HashSet;
+import java.util.Set;
+
+import javax.enterprise.event.Observes;
+import javax.enterprise.inject.spi.AfterBeanDiscovery;
+import javax.enterprise.inject.spi.BeforeBeanDiscovery;
+import javax.enterprise.inject.spi.Extension;
+import javax.enterprise.inject.spi.ProcessAnnotatedType;
+
+import org.apache.isis.applib.annotation.DomainService;
+import org.apache.isis.applib.services.metrics.MetricsService;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+/**
+ *
+ * A CDI inject extension @see <a href="https://docs.jboss.org/weld/reference/latest/en-US/html/extend.html">weld</a>,
+ * that lets CDI ignore certain Beans we declare tabu.
+ * <p>
+ * This extension is registered as a service provider by creating a file named
+ * {@code META-INF/services/javax.enterprise.inject.spi.Extension},
+ * which contains the name of this extension class.
+ * </p>
+ *
+ * <p>
+ * Beans declared tabu are managed (meaning instantiation and dependency injection)
+ * by Isis itself. All other Beans are allowed to be managed by CDI.
+ * </p>
+ *
+ * @author ahuber@apache.org
+ *
+ */
+final class IsisCDIBeanScanInterceptor implements Extension {
+
+ private static final Logger log = LoggerFactory.getLogger(IsisCDIBeanScanInterceptor.class);
+
+ /**
+ * Declaration of Beans that are managed by Isis and should be ignored by CDI.
+ * (in addition to those that have the @DomainService annotation)
+ */
+ private static final Set<String> tabu = new HashSet<>();
+ {
+ tabu.add(MetricsService.class.getName());
+ }
+
+ void beforeBeanDiscovery(@Observes BeforeBeanDiscovery event) {
+ log.info("beginning the scanning process");
+ }
+
+ <T> void processAnnotatedType(@Observes ProcessAnnotatedType<T> event) {
+
+ final String className = event.getAnnotatedType().getJavaClass().getName();
+
+ if(isTabu(className, event)) {
+ log.debug("veto type: " + className);
+ event.veto();
+ } else {
+ log.debug("allowing type: " + className);
+ }
+ }
+
+ void afterBeanDiscovery(@Observes AfterBeanDiscovery event) {
+ log.info("finished the scanning process");
+ }
+
+ // -- HELPER
+
+ private boolean isTabu(String className, ProcessAnnotatedType<?> event) {
+ if(tabu.contains(className))
+ return true;
+ if(event.getAnnotatedType().isAnnotationPresent(DomainService.class))
+ return true;
+
+ return false;
+ }
+
+}
diff --git a/core/runtime/src/main/resources/META-INF/services/javax.enterprise.inject.spi.Extension b/core/runtime/src/main/resources/META-INF/services/javax.enterprise.inject.spi.Extension
new file mode 100644
index 0000000..1be69b2
--- /dev/null
+++ b/core/runtime/src/main/resources/META-INF/services/javax.enterprise.inject.spi.Extension
@@ -0,0 +1 @@
+org.apache.isis.core.webapp.jee.IsisCDIBeanScanInterceptor
\ No newline at end of file
--
To stop receiving notification emails like this one, please contact
ahuber@apache.org.
[isis] 09/34: ISIS-1727: uses lambda in IsisSessionFactoryBuilder
Posted by ah...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
ahuber pushed a commit to branch dev/2.0.0-M2
in repository https://gitbox.apache.org/repos/asf/isis.git
commit f5812a86f402cfe05b486325b2ffe912b353c4ef
Author: Dan Haywood <da...@haywood-associates.co.uk>
AuthorDate: Tue Sep 19 22:56:54 2017 +0100
ISIS-1727: uses lambda in IsisSessionFactoryBuilder
---
.../system/session/IsisSessionFactoryBuilder.java | 25 ++++++++++------------
1 file changed, 11 insertions(+), 14 deletions(-)
diff --git a/core/runtime/src/main/java/org/apache/isis/core/runtime/system/session/IsisSessionFactoryBuilder.java b/core/runtime/src/main/java/org/apache/isis/core/runtime/system/session/IsisSessionFactoryBuilder.java
index 7a56c93..52df40e 100644
--- a/core/runtime/src/main/java/org/apache/isis/core/runtime/system/session/IsisSessionFactoryBuilder.java
+++ b/core/runtime/src/main/java/org/apache/isis/core/runtime/system/session/IsisSessionFactoryBuilder.java
@@ -207,21 +207,18 @@ public class IsisSessionFactoryBuilder {
isisSessionFactory.doInSession(
- new Runnable() {
- @Override
- public void run() {
- specificationLoader.postProcess();
- try {
- specificationLoader.validateAndAssert();
-
- } catch (final MetaModelInvalidException ex) {
- // no need to use a higher level, such as error(...); the calling code will expose any metamodel
- // validation errors in their own particular way.
- if(LOG.isDebugEnabled()) {
- LOG.debug("Meta model invalid", ex);
- }
- _Context.putSingleton(MetaModelInvalidException.class, ex);
+ () -> {
+ specificationLoader.postProcess();
+ try {
+ specificationLoader.validateAndAssert();
+
+ } catch (final MetaModelInvalidException ex) {
+ // no need to use a higher level, such as error(...); the calling code will expose any metamodel
+ // validation errors in their own particular way.
+ if(LOG.isDebugEnabled()) {
+ LOG.debug("Meta model invalid", ex);
}
+ _Context.putSingleton(MetaModelInvalidException.class, ex);
}
}
);
--
To stop receiving notification emails like this one, please contact
ahuber@apache.org.
[isis] 13/34: ISIS-1756 JEE 7+ Isis App life-cycling
Posted by ah...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
ahuber pushed a commit to branch dev/2.0.0-M2
in repository https://gitbox.apache.org/repos/asf/isis.git
commit f482514dd7e8573bf40b21108c926cbb657a4427
Author: Andi Huber <ah...@apache.org>
AuthorDate: Sun Oct 29 09:29:38 2017 +0100
ISIS-1756 JEE 7+ Isis App life-cycling
---
.../webapp/jee/IsisDomainAppLifecycleBean.java | 61 +++++++++++
.../webapp/jee/PersistenceUnitNoopProvider.java | 112 +++++++++++++++++++++
.../src/main/resources/META-INF/persistence.xml | 8 ++
3 files changed, 181 insertions(+)
diff --git a/core/runtime/src/main/java/org/apache/isis/core/webapp/jee/IsisDomainAppLifecycleBean.java b/core/runtime/src/main/java/org/apache/isis/core/webapp/jee/IsisDomainAppLifecycleBean.java
new file mode 100644
index 0000000..07881e3
--- /dev/null
+++ b/core/runtime/src/main/java/org/apache/isis/core/webapp/jee/IsisDomainAppLifecycleBean.java
@@ -0,0 +1,61 @@
+/*
+ * 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.isis.core.webapp.jee;
+
+import javax.annotation.PostConstruct;
+import javax.annotation.PreDestroy;
+import javax.ejb.Singleton;
+import javax.ejb.Startup;
+import javax.enterprise.context.ApplicationScoped;
+
+import org.apache.isis.core.runtime.system.context.IsisContext;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+
+/**
+ *
+ * JEE singleton that hooks into an Isis-Application's life-cycle.
+ *
+ * <p>
+ * This CDI managed Bean ensures proper destruction of Isis's context.
+ * </p>
+ *
+ * @author ahuber@apache.org
+ *
+ */
+@Singleton
+@Startup
+@ApplicationScoped
+public class IsisDomainAppLifecycleBean {
+
+ private static final Logger log = LoggerFactory.getLogger(IsisDomainAppLifecycleBean.class);
+
+ @PostConstruct
+ public void init() {
+ log.info("initializing ...");
+ }
+
+ @PreDestroy
+ public void destroy() {
+ IsisContext.destroy();
+ log.info("detroyed.");
+ }
+
+}
diff --git a/core/runtime/src/main/java/org/apache/isis/core/webapp/jee/PersistenceUnitNoopProvider.java b/core/runtime/src/main/java/org/apache/isis/core/webapp/jee/PersistenceUnitNoopProvider.java
new file mode 100644
index 0000000..3a9bac1
--- /dev/null
+++ b/core/runtime/src/main/java/org/apache/isis/core/webapp/jee/PersistenceUnitNoopProvider.java
@@ -0,0 +1,112 @@
+/*
+ * 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.isis.core.webapp.jee;
+
+import java.util.Map;
+
+import javax.persistence.Cache;
+import javax.persistence.EntityGraph;
+import javax.persistence.EntityManager;
+import javax.persistence.EntityManagerFactory;
+import javax.persistence.PersistenceUnitUtil;
+import javax.persistence.Query;
+import javax.persistence.SynchronizationType;
+import javax.persistence.criteria.CriteriaBuilder;
+import javax.persistence.metamodel.Metamodel;
+import javax.persistence.spi.PersistenceUnitInfo;
+import javax.persistence.spi.ProviderUtil;
+import javax.resource.NotSupportedException;
+
+/**
+ * Implements a PersistenceProvider that does nothing.
+ * <p>
+ * Note: the axon framework on JEE requires at least a dummy persistence unit.
+ * This requires that the {@code web.xml} includes a {@code persistence-context-ref} entry as follows:
+ *
+ * <pre>{@code
+ * <persistence-context-ref>
+ * <persistence-context-ref-name>org.axonframework.common.jpa.ContainerManagedEntityManagerProvider/entityManager</persistence-context-ref-name>
+ * <persistence-unit-name>noop</persistence-unit-name>
+ * </persistence-context-ref>
+ * }
+ * </pre>
+ * </p>
+ * <p>
+ * A {@code META_INF/persistence.xml} that declares the 'noop' persistence-unit
+ * is bundled with this module.
+ * </p>
+ *
+ * @author ahuber@apache.org
+ *
+ */
+@SuppressWarnings("rawtypes")
+public class PersistenceUnitNoopProvider implements javax.persistence.spi.PersistenceProvider{
+
+ @Override
+ public EntityManagerFactory createEntityManagerFactory(String emName, Map map) {
+ return noopEntityManagerFactory();
+ }
+
+ @Override
+ public EntityManagerFactory createContainerEntityManagerFactory(PersistenceUnitInfo info, Map map) {
+ return noopEntityManagerFactory();
+ }
+
+ @Override
+ public void generateSchema(PersistenceUnitInfo info, Map map) {
+ throw notSupported();
+ }
+
+ @Override
+ public boolean generateSchema(String persistenceUnitName, Map map) {
+ throw notSupported();
+ }
+
+ @Override
+ public ProviderUtil getProviderUtil() {
+ throw notSupported();
+ }
+
+ // -- HELPER
+
+ private static RuntimeException notSupported() {
+ return new RuntimeException(
+ new NotSupportedException("This PersistenceProvider is just a dummy."));
+ }
+
+ private EntityManagerFactory noopEntityManagerFactory() {
+ return new EntityManagerFactory() {
+ @Override public EntityManager createEntityManager() { return null; }
+ @Override public EntityManager createEntityManager(Map map) { return null; }
+ @Override public EntityManager createEntityManager(SynchronizationType synchronizationType) { return null; }
+ @Override public EntityManager createEntityManager(SynchronizationType synchronizationType, Map map) { return null; }
+ @Override public CriteriaBuilder getCriteriaBuilder() { return null; }
+ @Override public Metamodel getMetamodel() { return null; }
+ @Override public boolean isOpen() { return false; }
+ @Override public void close() { }
+ @Override public Map<String, Object> getProperties() { return null; }
+ @Override public Cache getCache() { return null; }
+ @Override public PersistenceUnitUtil getPersistenceUnitUtil() { return null; }
+ @Override public void addNamedQuery(String name, Query query) { }
+ @Override public <T> T unwrap(Class<T> cls) { return null; }
+ @Override public <T> void addNamedEntityGraph(String graphName, EntityGraph<T> entityGraph) { }
+ };
+ }
+
+}
diff --git a/core/runtime/src/main/resources/META-INF/persistence.xml b/core/runtime/src/main/resources/META-INF/persistence.xml
new file mode 100644
index 0000000..356a2aa
--- /dev/null
+++ b/core/runtime/src/main/resources/META-INF/persistence.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<persistence version="2.1" xmlns="http://xmlns.jcp.org/xml/ns/persistence" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/persistence http://xmlns.jcp.org/xml/ns/persistence/persistence_2_1.xsd">
+
+ <!-- declares a persistence unit that does nothing -->
+ <persistence-unit name="noop">
+ <provider>org.apache.isis.core.webapp.jee.PersistenceUnitNoopProvider</provider>
+ </persistence-unit>
+</persistence>
--
To stop receiving notification emails like this one, please contact
ahuber@apache.org.
[isis] 21/34: ISIS-1775 added license
Posted by ah...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
ahuber pushed a commit to branch dev/2.0.0-M2
in repository https://gitbox.apache.org/repos/asf/isis.git
commit b7377f9b09180b5ddef792cff4425f5b0b67f399
Author: Andi Huber <ah...@apache.org>
AuthorDate: Sun Nov 12 19:55:13 2017 +0100
ISIS-1775 added license
---
.../apache/isis/core/webapp/WebAppContextSupport.java | 19 +++++++++++++++++++
1 file changed, 19 insertions(+)
diff --git a/core/metamodel/src/main/java/org/apache/isis/core/webapp/WebAppContextSupport.java b/core/metamodel/src/main/java/org/apache/isis/core/webapp/WebAppContextSupport.java
index 044fe67..10aa314 100644
--- a/core/metamodel/src/main/java/org/apache/isis/core/webapp/WebAppContextSupport.java
+++ b/core/metamodel/src/main/java/org/apache/isis/core/webapp/WebAppContextSupport.java
@@ -1,3 +1,22 @@
+/*
+ * 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.isis.core.webapp;
import javax.servlet.ServletContext;
--
To stop receiving notification emails like this one, please contact
ahuber@apache.org.
[isis] 07/34: ISIS-1724: removes the deprecated IsisJdoSupport in
the jdo applib
Posted by ah...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
ahuber pushed a commit to branch dev/2.0.0-M2
in repository https://gitbox.apache.org/repos/asf/isis.git
commit ff41e073ec5d2e4149309b172bcb77a2831e887a
Author: Dan Haywood <da...@haywood-associates.co.uk>
AuthorDate: Tue Sep 19 22:50:00 2017 +0100
ISIS-1724: removes the deprecated IsisJdoSupport in the jdo applib
---
.../objectstore/jdo/datanucleus/service/support/IsisJdoSupportImpl.java | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/core/runtime/src/main/java/org/apache/isis/objectstore/jdo/datanucleus/service/support/IsisJdoSupportImpl.java b/core/runtime/src/main/java/org/apache/isis/objectstore/jdo/datanucleus/service/support/IsisJdoSupportImpl.java
index e5171c9..6e2ef41 100644
--- a/core/runtime/src/main/java/org/apache/isis/objectstore/jdo/datanucleus/service/support/IsisJdoSupportImpl.java
+++ b/core/runtime/src/main/java/org/apache/isis/objectstore/jdo/datanucleus/service/support/IsisJdoSupportImpl.java
@@ -62,7 +62,7 @@ import org.apache.isis.core.runtime.system.session.IsisSessionFactory;
nature = NatureOfService.DOMAIN,
menuOrder = "" + Integer.MAX_VALUE
)
-public class IsisJdoSupportImpl implements IsisJdoSupport {
+public class IsisJdoSupportImpl implements org.apache.isis.applib.services.jdosupport.IsisJdoSupport {
@Programmatic
@Override
--
To stop receiving notification emails like this one, please contact
ahuber@apache.org.
[isis] 05/34: ISIS-1276: fixes algorithm for lookup of datastore
id's, at least
Posted by ah...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
ahuber pushed a commit to branch dev/2.0.0-M2
in repository https://gitbox.apache.org/repos/asf/isis.git
commit b193a807d5924fde7a762b8de7b3b8191973674b
Author: Dan Haywood <da...@haywood-associates.co.uk>
AuthorDate: Mon Sep 18 22:55:49 2017 +0100
ISIS-1276: fixes algorithm for lookup of datastore id's, at least
---
.../persistence/spi/JdoObjectIdSerializer.java | 45 +++++++---------------
1 file changed, 13 insertions(+), 32 deletions(-)
diff --git a/core/runtime/src/main/java/org/apache/isis/objectstore/jdo/datanucleus/persistence/spi/JdoObjectIdSerializer.java b/core/runtime/src/main/java/org/apache/isis/objectstore/jdo/datanucleus/persistence/spi/JdoObjectIdSerializer.java
index fcfb0d8..e185908 100644
--- a/core/runtime/src/main/java/org/apache/isis/objectstore/jdo/datanucleus/persistence/spi/JdoObjectIdSerializer.java
+++ b/core/runtime/src/main/java/org/apache/isis/objectstore/jdo/datanucleus/persistence/spi/JdoObjectIdSerializer.java
@@ -93,37 +93,14 @@ public final class JdoObjectIdSerializer {
final DatastoreId dnOid = (DatastoreId) jdoOid;
final Object keyValue = dnOid.getKeyAsObject();
- if(false) {
-
- //
- // 1.8.0 original handling, appending a prefix "L_" or whatever
- //
- // if required by user community, we could add a property in isis.properties to enable if requested.
- //
- if(keyValue instanceof String) {
- return "S" + SEPARATOR + keyValue;
- }
- if(keyValue instanceof Long) {
- return "L" + SEPARATOR + keyValue;
- }
-
- if(keyValue instanceof BigInteger) {
- return "B" + SEPARATOR + keyValue;
- }
- if(keyValue instanceof Integer) {
- return "I" + SEPARATOR + keyValue;
- }
-
- } else {
- if( keyValue instanceof String ||
- keyValue instanceof Long ||
- keyValue instanceof BigDecimal || // 1.8.0 did not support BigDecimal
- keyValue instanceof BigInteger ||
- keyValue instanceof Integer) {
-
- // no separator
- return "" + keyValue;
- }
+ if( keyValue instanceof String ||
+ keyValue instanceof Long ||
+ keyValue instanceof BigDecimal || // 1.8.0 did not support BigDecimal
+ keyValue instanceof BigInteger ||
+ keyValue instanceof Integer) {
+
+ // no separator
+ return "" + keyValue;
}
}
@@ -204,7 +181,11 @@ public final class JdoObjectIdSerializer {
// @javax.jdo.annotations.PersistenceCapable(identityType = IdentityType.DATASTORE)
// for one of the common types (prettier handling)
- return idStr + "[OID]" + spec.getFullIdentifier();
+ // in DN 4.1, we did this...
+ // return idStr + "[OID]" + spec.getFullIdentifier();
+
+ // in DN 5.1, we simply do this...
+ return idStr;
}
}
--
To stop receiving notification emails like this one, please contact
ahuber@apache.org.
[isis] 17/34: ISIS-1756 utilize IsisWicketApplication's life-cycle
instead of providing a life-cycle CDI Bean
Posted by ah...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
ahuber pushed a commit to branch dev/2.0.0-M2
in repository https://gitbox.apache.org/repos/asf/isis.git
commit 73b69dc0110fb821ba47f80beb7783c6adb85aaa
Author: Andi Huber <ah...@apache.org>
AuthorDate: Mon Oct 30 17:21:46 2017 +0100
ISIS-1756 utilize IsisWicketApplication's life-cycle instead of
providing a life-cycle CDI Bean
---
.../webapp/jee/IsisDomainAppLifecycleBean.java | 61 ----------------------
.../wicket/viewer/IsisWicketApplication.java | 1 +
2 files changed, 1 insertion(+), 61 deletions(-)
diff --git a/core/runtime/src/main/java/org/apache/isis/core/webapp/jee/IsisDomainAppLifecycleBean.java b/core/runtime/src/main/java/org/apache/isis/core/webapp/jee/IsisDomainAppLifecycleBean.java
deleted file mode 100644
index 416b11f..0000000
--- a/core/runtime/src/main/java/org/apache/isis/core/webapp/jee/IsisDomainAppLifecycleBean.java
+++ /dev/null
@@ -1,61 +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.isis.core.webapp.jee;
-
-import javax.annotation.PostConstruct;
-import javax.annotation.PreDestroy;
-import javax.ejb.Singleton;
-import javax.ejb.Startup;
-import javax.enterprise.context.ApplicationScoped;
-
-import org.apache.isis.core.runtime.system.context.IsisContext;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-
-/**
- *
- * JEE singleton that hooks into an Isis-Application's life-cycle.
- *
- * <p>
- * This CDI managed Bean ensures proper destruction of Isis's context.
- * </p>
- *
- * @author ahuber@apache.org
- *
- */
-@Singleton
-@Startup
-@ApplicationScoped
-public class IsisDomainAppLifecycleBean {
-
- private static final Logger log = LoggerFactory.getLogger(IsisDomainAppLifecycleBean.class);
-
- @PostConstruct
- public void init() {
- log.info("initializing ...");
- }
-
- @PreDestroy
- public void destroy() {
- IsisContext.destroy();
- log.info("destroyed.");
- }
-
-}
diff --git a/core/viewer-wicket-impl/src/main/java/org/apache/isis/viewer/wicket/viewer/IsisWicketApplication.java b/core/viewer-wicket-impl/src/main/java/org/apache/isis/viewer/wicket/viewer/IsisWicketApplication.java
index 03426ac..3347ca4 100644
--- a/core/viewer-wicket-impl/src/main/java/org/apache/isis/viewer/wicket/viewer/IsisWicketApplication.java
+++ b/core/viewer-wicket-impl/src/main/java/org/apache/isis/viewer/wicket/viewer/IsisWicketApplication.java
@@ -859,6 +859,7 @@ public class IsisWicketApplication
}
getServletContext().setAttribute(WebAppConstants.ISIS_SESSION_FACTORY, null);
super.onDestroy();
+ IsisContext.destroy();
} catch(final RuntimeException ex) {
// symmetry with #init()
LOG.error("Failed to destroy", ex);
--
To stop receiving notification emails like this one, please contact
ahuber@apache.org.
[isis] 16/34: ISIS-1756 prevent SQLException on schema creation if
config is missing
Posted by ah...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
ahuber pushed a commit to branch dev/2.0.0-M2
in repository https://gitbox.apache.org/repos/asf/isis.git
commit dd3e5389a279e4b6b23b5bee27f411f9ae5e28c5
Author: Andi Huber <ah...@apache.org>
AuthorDate: Mon Oct 30 15:14:16 2017 +0100
ISIS-1756 prevent SQLException on schema creation if config is missing
---
.../jdo/datanucleus/CreateSchemaObjectFromClassMetadata.java | 9 +++++++--
1 file changed, 7 insertions(+), 2 deletions(-)
diff --git a/core/runtime/src/main/java/org/apache/isis/objectstore/jdo/datanucleus/CreateSchemaObjectFromClassMetadata.java b/core/runtime/src/main/java/org/apache/isis/objectstore/jdo/datanucleus/CreateSchemaObjectFromClassMetadata.java
index 87c6e91..9697f29 100644
--- a/core/runtime/src/main/java/org/apache/isis/objectstore/jdo/datanucleus/CreateSchemaObjectFromClassMetadata.java
+++ b/core/runtime/src/main/java/org/apache/isis/objectstore/jdo/datanucleus/CreateSchemaObjectFromClassMetadata.java
@@ -25,8 +25,6 @@ import java.sql.SQLException;
import java.sql.Statement;
import java.util.Map;
-import com.google.common.base.Strings;
-
import org.datanucleus.ClassLoaderResolver;
import org.datanucleus.enhancer.EnhancementNucleusContextImpl;
import org.datanucleus.metadata.AbstractClassMetaData;
@@ -35,6 +33,8 @@ import org.datanucleus.store.ConnectionEncryptionProvider;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
+import com.google.common.base.Strings;
+
/**
* Implementation note: the methods in this class are <tt>protected</tt> to allow for easy subclassing.
@@ -68,6 +68,11 @@ public class CreateSchemaObjectFromClassMetadata implements MetaDataListener, Da
final String url = properties.get("javax.jdo.option.ConnectionURL");
final String userName = properties.get("javax.jdo.option.ConnectionUserName");
final String password = getConnectionPassword();
+
+ if(Strings.isNullOrEmpty(driverName) || Strings.isNullOrEmpty(url)) {
+ LOG.warn("Unable to create schema due to missing configuration javax.jdo.option.Connection*");
+ return;
+ }
try {
--
To stop receiving notification emails like this one, please contact
ahuber@apache.org.
[isis] 19/34: ISIS-1755 TomEE requires Service Providers to be
public classes
Posted by ah...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
ahuber pushed a commit to branch dev/2.0.0-M2
in repository https://gitbox.apache.org/repos/asf/isis.git
commit e1cf831f247d5198fe154ed8f0f77c8969d4844f
Author: Andi Huber <ah...@apache.org>
AuthorDate: Tue Oct 31 09:01:45 2017 +0100
ISIS-1755 TomEE requires Service Providers to be public classes
---
.../org/apache/isis/core/webapp/jee/IsisCDIBeanScanInterceptor.java | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/core/runtime/src/main/java/org/apache/isis/core/webapp/jee/IsisCDIBeanScanInterceptor.java b/core/runtime/src/main/java/org/apache/isis/core/webapp/jee/IsisCDIBeanScanInterceptor.java
index 6632a59..c75605c 100644
--- a/core/runtime/src/main/java/org/apache/isis/core/webapp/jee/IsisCDIBeanScanInterceptor.java
+++ b/core/runtime/src/main/java/org/apache/isis/core/webapp/jee/IsisCDIBeanScanInterceptor.java
@@ -50,7 +50,7 @@ import org.slf4j.LoggerFactory;
* @author ahuber@apache.org
*
*/
-final class IsisCDIBeanScanInterceptor implements Extension {
+public final class IsisCDIBeanScanInterceptor implements Extension {
private static final Logger log = LoggerFactory.getLogger(IsisCDIBeanScanInterceptor.class);
--
To stop receiving notification emails like this one, please contact
ahuber@apache.org.
[isis] 27/34: ISIS-1744: removes work-around code for prior to DN
5.1.5
Posted by ah...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
ahuber pushed a commit to branch dev/2.0.0-M2
in repository https://gitbox.apache.org/repos/asf/isis.git
commit fa1111340f3ccda0b14c8bac88e61de5f1e51ace
Author: Dan Haywood <da...@haywood-associates.co.uk>
AuthorDate: Fri Jan 5 14:51:35 2018 +0000
ISIS-1744: removes work-around code for prior to DN 5.1.5
---
.../datanucleus/DataNucleusLifeCycleHelper.java | 26 ++++------------------
1 file changed, 4 insertions(+), 22 deletions(-)
diff --git a/core/runtime/src/main/java/org/apache/isis/objectstore/jdo/datanucleus/DataNucleusLifeCycleHelper.java b/core/runtime/src/main/java/org/apache/isis/objectstore/jdo/datanucleus/DataNucleusLifeCycleHelper.java
index fc5669e..398c30f 100644
--- a/core/runtime/src/main/java/org/apache/isis/objectstore/jdo/datanucleus/DataNucleusLifeCycleHelper.java
+++ b/core/runtime/src/main/java/org/apache/isis/objectstore/jdo/datanucleus/DataNucleusLifeCycleHelper.java
@@ -26,15 +26,12 @@ import java.util.function.Consumer;
import javax.jdo.PersistenceManagerFactory;
-import org.apache.isis.core.runtime.system.context.IsisContext;
-import org.datanucleus.ClassLoaderResolver;
-import org.datanucleus.PersistenceNucleusContext;
-import org.datanucleus.api.jdo.JDOPersistenceManagerFactory;
import org.datanucleus.enhancer.EnhancementHelper;
-import org.datanucleus.store.AbstractStoreManager;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
+import org.apache.isis.core.runtime.system.context.IsisContext;
+
/**
*
* Purges any state associated with DataNucleus.
@@ -78,11 +75,7 @@ public class DataNucleusLifeCycleHelper {
persistenceManagerFactory.close();
- // XXX uses reflection prior to DN v5.1.5
- // remove once DN v5.1.5 is released
- // dnUnregisterClassesManagedBy(cl);
-
- // XXX for info, why we do this see
+ // for info, on why we do this see
// https://github.com/datanucleus/datanucleus-core/issues/272
EnhancementHelper.getInstance().unregisterClasses(cl);
@@ -92,18 +85,7 @@ public class DataNucleusLifeCycleHelper {
}
- // -- HELPER
-
- // TODO remove once DN v5.1.5 is released
- private static void dnUnregisterClassesManagedBy(ClassLoader cl) {
- if(cl==null)
- return;
- visitDNRegisteredClasses(map->
- map.entrySet()
- .removeIf(entry->cl.equals(entry.getKey().getClassLoader()))
- );
- }
-
+
// -- LOW LEVEL REFLECTION
// TODO remove once DN v5.1.5 is released
--
To stop receiving notification emails like this one, please contact
ahuber@apache.org.
[isis] 22/34: ISIS-1754 proper DN class-loading
Posted by ah...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
ahuber pushed a commit to branch dev/2.0.0-M2
in repository https://gitbox.apache.org/repos/asf/isis.git
commit 1810edd6d71207f1d0e5d93b8939cd8d88012e21
Author: Andi Huber <ah...@apache.org>
AuthorDate: Wed Nov 22 12:08:32 2017 +0100
ISIS-1754 proper DN class-loading
---
.../core/runtime/system/context/IsisContext.java | 3 ++-
.../DataNucleusApplicationComponents.java | 27 +++++++++++-----------
.../wicket/viewer/IsisWicketApplication.java | 2 ++
3 files changed, 18 insertions(+), 14 deletions(-)
diff --git a/core/runtime/src/main/java/org/apache/isis/core/runtime/system/context/IsisContext.java b/core/runtime/src/main/java/org/apache/isis/core/runtime/system/context/IsisContext.java
index ee1cc1c..40929e2 100644
--- a/core/runtime/src/main/java/org/apache/isis/core/runtime/system/context/IsisContext.java
+++ b/core/runtime/src/main/java/org/apache/isis/core/runtime/system/context/IsisContext.java
@@ -48,7 +48,7 @@ public interface IsisContext {
()->new IllegalStateException(
"internal error: should have been populated by IsisSessionFactoryBuilder") );
}
-
+
/**
*
* @return Isis's default class loader
@@ -79,4 +79,5 @@ public interface IsisContext {
clear();
}
+
}
diff --git a/core/runtime/src/main/java/org/apache/isis/core/runtime/system/persistence/DataNucleusApplicationComponents.java b/core/runtime/src/main/java/org/apache/isis/core/runtime/system/persistence/DataNucleusApplicationComponents.java
index a68ce06..8fafca8 100644
--- a/core/runtime/src/main/java/org/apache/isis/core/runtime/system/persistence/DataNucleusApplicationComponents.java
+++ b/core/runtime/src/main/java/org/apache/isis/core/runtime/system/persistence/DataNucleusApplicationComponents.java
@@ -25,26 +25,26 @@ import java.util.Set;
import javax.jdo.JDOHelper;
import javax.jdo.PersistenceManagerFactory;
-import com.google.common.base.Joiner;
-import com.google.common.collect.Maps;
-
-import org.datanucleus.PersistenceNucleusContext;
-import org.datanucleus.PropertyNames;
-import org.datanucleus.api.jdo.JDOPersistenceManagerFactory;
-import org.datanucleus.metadata.MetaDataListener;
-import org.datanucleus.metadata.MetaDataManager;
-import org.datanucleus.store.StoreManager;
-import org.datanucleus.store.schema.SchemaAwareStoreManager;
-
import org.apache.isis.core.commons.components.ApplicationScopedComponent;
import org.apache.isis.core.commons.config.IsisConfiguration;
import org.apache.isis.core.commons.factory.InstanceUtil;
import org.apache.isis.core.metamodel.spec.ObjectSpecification;
import org.apache.isis.core.metamodel.specloader.SpecificationLoader;
+import org.apache.isis.core.runtime.system.context.IsisContext;
import org.apache.isis.objectstore.jdo.datanucleus.CreateSchemaObjectFromClassMetadata;
import org.apache.isis.objectstore.jdo.datanucleus.DataNucleusPropertiesAware;
import org.apache.isis.objectstore.jdo.metamodel.facets.object.query.JdoNamedQuery;
import org.apache.isis.objectstore.jdo.metamodel.facets.object.query.JdoQueryFacet;
+import org.datanucleus.PersistenceNucleusContext;
+import org.datanucleus.PropertyNames;
+import org.datanucleus.api.jdo.JDOPersistenceManagerFactory;
+import org.datanucleus.metadata.MetaDataListener;
+import org.datanucleus.metadata.MetaDataManager;
+import org.datanucleus.store.StoreManager;
+import org.datanucleus.store.schema.SchemaAwareStoreManager;
+
+import com.google.common.base.Joiner;
+import com.google.common.collect.Maps;
public class DataNucleusApplicationComponents implements ApplicationScopedComponent {
@@ -148,8 +148,9 @@ public class DataNucleusApplicationComponents implements ApplicationScopedCompon
datanucleusProps.put(PropertyNames.PROPERTY_SCHEMA_AUTOCREATE_TABLES, "true"); // but have DN do everything else...
datanucleusProps.put(PropertyNames.PROPERTY_SCHEMA_AUTOCREATE_COLUMNS, "true");
datanucleusProps.put(PropertyNames.PROPERTY_SCHEMA_AUTOCREATE_CONSTRAINTS, "true");
-
- persistenceManagerFactory = JDOHelper.getPersistenceManagerFactory(datanucleusProps);
+
+ persistenceManagerFactory = JDOHelper
+ .getPersistenceManagerFactory(datanucleusProps, IsisContext.getClassLoader() );
createSchema(persistenceManagerFactory, persistableClassNameSet, datanucleusProps);
} else {
diff --git a/core/viewer-wicket-impl/src/main/java/org/apache/isis/viewer/wicket/viewer/IsisWicketApplication.java b/core/viewer-wicket-impl/src/main/java/org/apache/isis/viewer/wicket/viewer/IsisWicketApplication.java
index ae3f78d..d249d68 100644
--- a/core/viewer-wicket-impl/src/main/java/org/apache/isis/viewer/wicket/viewer/IsisWicketApplication.java
+++ b/core/viewer-wicket-impl/src/main/java/org/apache/isis/viewer/wicket/viewer/IsisWicketApplication.java
@@ -333,6 +333,8 @@ public class IsisWicketApplication
List<Future<Object>> futures = null;
try {
super.init();
+
+ IsisContext.setClassLoader(this.getClass().getClassLoader());
futures = startBackgroundInitializationThreads();
--
To stop receiving notification emails like this one, please contact
ahuber@apache.org.
[isis] 32/34: ISIS-1841 remove unused import
Posted by ah...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
ahuber pushed a commit to branch dev/2.0.0-M2
in repository https://gitbox.apache.org/repos/asf/isis.git
commit 723505c37c40a6f0319409e3d829734348b62d41
Author: Andi Huber <ah...@apache.org>
AuthorDate: Mon Feb 19 15:09:28 2018 +0100
ISIS-1841 remove unused import
---
.../systemusinginstallers/IsisComponentProvider.java | 15 +++++++--------
1 file changed, 7 insertions(+), 8 deletions(-)
diff --git a/core/runtime/src/main/java/org/apache/isis/core/runtime/systemusinginstallers/IsisComponentProvider.java b/core/runtime/src/main/java/org/apache/isis/core/runtime/systemusinginstallers/IsisComponentProvider.java
index d6a6a14..9b2936a 100644
--- a/core/runtime/src/main/java/org/apache/isis/core/runtime/systemusinginstallers/IsisComponentProvider.java
+++ b/core/runtime/src/main/java/org/apache/isis/core/runtime/systemusinginstallers/IsisComponentProvider.java
@@ -23,17 +23,9 @@ import java.util.Collection;
import java.util.List;
import java.util.Map;
import java.util.Set;
-import java.util.stream.Collectors;
import javax.annotation.Nullable;
-import com.google.common.base.Function;
-import com.google.common.base.Joiner;
-import com.google.common.collect.FluentIterable;
-import com.google.common.collect.Iterables;
-import com.google.common.collect.Lists;
-import com.google.common.collect.Sets;
-
import org.apache.isis.applib.AppManifest;
import org.apache.isis.applib.annotation.DomainObject;
import org.apache.isis.applib.annotation.DomainService;
@@ -64,6 +56,13 @@ import org.apache.isis.objectstore.jdo.service.RegisterEntities;
import org.apache.isis.progmodels.dflt.JavaReflectorHelper;
import org.apache.isis.progmodels.dflt.ProgrammingModelFacetsJava5;
+import com.google.common.base.Function;
+import com.google.common.base.Joiner;
+import com.google.common.collect.FluentIterable;
+import com.google.common.collect.Iterables;
+import com.google.common.collect.Lists;
+import com.google.common.collect.Sets;
+
/**
*
*/
--
To stop receiving notification emails like this one, please contact
ahuber@apache.org.
[isis] 34/34: ISIS-1756 backporting proper life-cycling from
jax-rs-2 branch
Posted by ah...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
ahuber pushed a commit to branch dev/2.0.0-M2
in repository https://gitbox.apache.org/repos/asf/isis.git
commit 06c07d50ec3ed55ebb44c49da3ef6ac3574907cd
Author: Andi Huber <ah...@apache.org>
AuthorDate: Mon Feb 19 18:10:12 2018 +0100
ISIS-1756 backporting proper life-cycling from jax-rs-2 branch
---
.../core/runtime/system/context/IsisContext.java | 15 +++++
.../DataNucleusApplicationComponents.java | 15 +++++
.../persistence/PersistenceSessionFactory.java | 29 +++------
.../datanucleus/DataNucleusLifeCycleHelper.java | 69 ++--------------------
4 files changed, 41 insertions(+), 87 deletions(-)
diff --git a/core/runtime/src/main/java/org/apache/isis/core/runtime/system/context/IsisContext.java b/core/runtime/src/main/java/org/apache/isis/core/runtime/system/context/IsisContext.java
index 40929e2..9763ff5 100644
--- a/core/runtime/src/main/java/org/apache/isis/core/runtime/system/context/IsisContext.java
+++ b/core/runtime/src/main/java/org/apache/isis/core/runtime/system/context/IsisContext.java
@@ -65,6 +65,7 @@ public interface IsisContext {
*/
public static void clear() {
_Context.clear();
+ resetLogging();
}
// -- DEPRECATIONS
@@ -79,5 +80,19 @@ public interface IsisContext {
clear();
}
+ // -- HELPER
+
+ /**
+ * TODO [andi-huber] not sure if required, initial idea was to force log4j
+ * re-configuration on an undeploy/deploy cycle
+ */
+ static void resetLogging() {
+ try {
+ org.apache.log4j.BasicConfigurator.resetConfiguration();
+ org.apache.log4j.Logger.getRootLogger().removeAllAppenders();
+ } catch (Exception e) {
+ // at least we tried
+ }
+ }
}
diff --git a/core/runtime/src/main/java/org/apache/isis/core/runtime/system/persistence/DataNucleusApplicationComponents.java b/core/runtime/src/main/java/org/apache/isis/core/runtime/system/persistence/DataNucleusApplicationComponents.java
index 8fafca8..9cd3f7f 100644
--- a/core/runtime/src/main/java/org/apache/isis/core/runtime/system/persistence/DataNucleusApplicationComponents.java
+++ b/core/runtime/src/main/java/org/apache/isis/core/runtime/system/persistence/DataNucleusApplicationComponents.java
@@ -32,6 +32,7 @@ import org.apache.isis.core.metamodel.spec.ObjectSpecification;
import org.apache.isis.core.metamodel.specloader.SpecificationLoader;
import org.apache.isis.core.runtime.system.context.IsisContext;
import org.apache.isis.objectstore.jdo.datanucleus.CreateSchemaObjectFromClassMetadata;
+import org.apache.isis.objectstore.jdo.datanucleus.DataNucleusLifeCycleHelper;
import org.apache.isis.objectstore.jdo.datanucleus.DataNucleusPropertiesAware;
import org.apache.isis.objectstore.jdo.metamodel.facets.object.query.JdoNamedQuery;
import org.apache.isis.objectstore.jdo.metamodel.facets.object.query.JdoQueryFacet;
@@ -109,6 +110,20 @@ public class DataNucleusApplicationComponents implements ApplicationScopedCompon
namedQueryByName = catalogNamedQueries(persistableClassNameSet);
}
+
+ /**
+ * Marks the end of DataNucleus' life-cycle. Purges any state associated with DN.
+ * Subsequent calls have no effect.
+ *
+ * @since 2.0.0
+ */
+ public void shutdown() {
+ instance = null;
+ if(persistenceManagerFactory != null) {
+ DataNucleusLifeCycleHelper.cleanUp(persistenceManagerFactory);
+ persistenceManagerFactory = null;
+ }
+ }
private static boolean isSchemaAwareStoreManager(Map<String,String> datanucleusProps) {
diff --git a/core/runtime/src/main/java/org/apache/isis/core/runtime/system/persistence/PersistenceSessionFactory.java b/core/runtime/src/main/java/org/apache/isis/core/runtime/system/persistence/PersistenceSessionFactory.java
index 92f950d..146f16a 100644
--- a/core/runtime/src/main/java/org/apache/isis/core/runtime/system/persistence/PersistenceSessionFactory.java
+++ b/core/runtime/src/main/java/org/apache/isis/core/runtime/system/persistence/PersistenceSessionFactory.java
@@ -53,18 +53,12 @@ public class PersistenceSessionFactory implements ApplicationScopedComponent, Fi
private static final Logger LOG = LoggerFactory.getLogger(PersistenceSessionFactory.class);
- //region > constructor
-
private final IsisConfigurationDefault configuration;
public PersistenceSessionFactory(final IsisConfigurationDefault isisConfiguration) {
this.configuration = isisConfiguration;
}
- //endregion
-
- //region > init, createDataNucleusApplicationComponents
-
public static final String JDO_OBJECTSTORE_CONFIG_PREFIX = "isis.persistor.datanucleus"; // specific to the JDO objectstore
public static final String DATANUCLEUS_CONFIG_PREFIX = "isis.persistor.datanucleus.impl"; // reserved for datanucleus' own config props
@@ -159,19 +153,18 @@ public class PersistenceSessionFactory implements ApplicationScopedComponent, Fi
props.put(key, value);
}
}
- //endregion
- //region > shutdown
@Programmatic
public final void shutdown() {
- // no-op
+ if(!isInitialized()) {
+ return;
+ }
+ if(applicationComponents != null) {
+ applicationComponents.shutdown();
+ applicationComponents = null;
+ }
}
- //endregion
-
-
- //region > createPersistenceSession
-
/**
* Called by {@link org.apache.isis.core.runtime.system.session.IsisSessionFactory#openSession(AuthenticationSession)}.
*/
@@ -190,12 +183,6 @@ public class PersistenceSessionFactory implements ApplicationScopedComponent, Fi
fixturesInstalledFlag);
}
-
-
- //endregion
-
- //region > FixturesInstalledFlag impl
-
private Boolean fixturesInstalled;
@Programmatic
@@ -210,7 +197,5 @@ public class PersistenceSessionFactory implements ApplicationScopedComponent, Fi
this.fixturesInstalled = fixturesInstalled;
}
- //endregion
-
}
diff --git a/core/runtime/src/main/java/org/apache/isis/objectstore/jdo/datanucleus/DataNucleusLifeCycleHelper.java b/core/runtime/src/main/java/org/apache/isis/objectstore/jdo/datanucleus/DataNucleusLifeCycleHelper.java
index 398c30f..570e18f 100644
--- a/core/runtime/src/main/java/org/apache/isis/objectstore/jdo/datanucleus/DataNucleusLifeCycleHelper.java
+++ b/core/runtime/src/main/java/org/apache/isis/objectstore/jdo/datanucleus/DataNucleusLifeCycleHelper.java
@@ -18,60 +18,29 @@
*/
package org.apache.isis.objectstore.jdo.datanucleus;
-import java.lang.invoke.MethodHandle;
-import java.lang.invoke.MethodHandles;
-import java.lang.reflect.Field;
-import java.util.Map;
-import java.util.function.Consumer;
-
import javax.jdo.PersistenceManagerFactory;
-import org.datanucleus.enhancer.EnhancementHelper;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
import org.apache.isis.core.runtime.system.context.IsisContext;
+import org.datanucleus.enhancer.EnhancementHelper;
/**
*
* Purges any state associated with DataNucleus.
+ * <br/><br/>
+ * (requires datanucleus-core >= 5.1.5)
*
- * @author ahuber@apache.org
* @since 2.0.0
*
*/
public class DataNucleusLifeCycleHelper {
- private static final Logger LOG = LoggerFactory.getLogger(DataNucleusLifeCycleHelper.class);
+ //private static final Logger LOG = LoggerFactory.getLogger(DataNucleusLifeCycleHelper.class);
public static void cleanUp(PersistenceManagerFactory persistenceManagerFactory) {
try {
final ClassLoader cl = IsisContext.getClassLoader();
-
-// XXX not needed according to https://github.com/datanucleus/datanucleus-core/issues/272
-//
-// if(persistenceManagerFactory instanceof JDOPersistenceManagerFactory) {
-//
-// final JDOPersistenceManagerFactory jdoPMF =
-// (JDOPersistenceManagerFactory) persistenceManagerFactory;
-// final PersistenceNucleusContext nucleusContext = jdoPMF.getNucleusContext();
-// final AbstractStoreManager storeManager =
-// (AbstractStoreManager)nucleusContext.getStoreManager();
-//
-//
-// persistenceManagerFactory.getManagedClasses()
-// .forEach(clazz->{
-// final ClassLoaderResolver clr = nucleusContext.getClassLoaderResolver(cl);
-//
-// // Un-manage from the store
-// storeManager.unmanageClass(clr, clazz.getName(), false);
-//
-// // Unload the meta-data for this class
-// nucleusContext.getMetaDataManager().unloadMetaDataForClass(clazz.getName());
-// });
-// }
persistenceManagerFactory.close();
@@ -84,35 +53,5 @@ public class DataNucleusLifeCycleHelper {
}
}
-
-
- // -- LOW LEVEL REFLECTION
-
- // TODO remove once DN v5.1.5 is released
- private final static MethodHandle getRegisteredClassesMH;
- static {
- MethodHandle mh;
- try {
- Field registeredClasses = EnhancementHelper.class.getDeclaredField("registeredClasses");
- registeredClasses.setAccessible(true);
- mh = MethodHandles.lookup().unreflectGetter(registeredClasses);
- registeredClasses.setAccessible(false);
- } catch (Exception e) {
- mh = null;
- e.printStackTrace();
- }
- getRegisteredClassesMH = mh;
- }
-
- // TODO remove once DN v5.1.5 is released
- private static void visitDNRegisteredClasses(Consumer<Map<Class<?>, ?>> visitor){
- try {
- visitor.accept( (Map<Class<?>, ?>) getRegisteredClassesMH.invoke() );
- } catch (Throwable e) {
- LOG.warn("Failed to access DataNucleus' EnhancementHelper via reflection.", e);
- }
- }
-
-
}
--
To stop receiving notification emails like this one, please contact
ahuber@apache.org.
[isis] 29/34: ISIS-1841 use _Context to store Isis default class
loader
Posted by ah...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
ahuber pushed a commit to branch dev/2.0.0-M2
in repository https://gitbox.apache.org/repos/asf/isis.git
commit a3c108ad229126f860de65de4526b77e55055175
Author: Andi Huber <ah...@apache.org>
AuthorDate: Mon Feb 19 13:45:36 2018 +0100
ISIS-1841 use _Context to store Isis default class loader
---
.../org/apache/isis/viewer/wicket/viewer/IsisWicketApplication.java | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/core/viewer-wicket-impl/src/main/java/org/apache/isis/viewer/wicket/viewer/IsisWicketApplication.java b/core/viewer-wicket-impl/src/main/java/org/apache/isis/viewer/wicket/viewer/IsisWicketApplication.java
index d249d68..ecf8d4c 100644
--- a/core/viewer-wicket-impl/src/main/java/org/apache/isis/viewer/wicket/viewer/IsisWicketApplication.java
+++ b/core/viewer-wicket-impl/src/main/java/org/apache/isis/viewer/wicket/viewer/IsisWicketApplication.java
@@ -30,6 +30,7 @@ import java.util.UUID;
import java.util.concurrent.Callable;
import java.util.concurrent.Future;
+import org.apache.isis.applib.internal.context._Context;
import org.apache.isis.core.commons.authentication.AuthenticationSession;
import org.apache.isis.core.commons.config.IsisConfiguration;
import org.apache.isis.core.commons.config.IsisConfigurationDefault;
@@ -334,7 +335,7 @@ public class IsisWicketApplication
try {
super.init();
- IsisContext.setClassLoader(this.getClass().getClassLoader());
+ _Context.putSingleton(ClassLoader.class, this.getClass().getClassLoader());
futures = startBackgroundInitializationThreads();
--
To stop receiving notification emails like this one, please contact
ahuber@apache.org.
[isis] 18/34: rebase 2.0.0-M2 on top of 2.0.0-M1 (master)
Posted by ah...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
ahuber pushed a commit to branch dev/2.0.0-M2
in repository https://gitbox.apache.org/repos/asf/isis.git
commit 3e17e56a14d4002c2b2200feeddfbec589faf322
Author: Andi Huber <ah...@apache.org>
AuthorDate: Mon Feb 19 13:33:41 2018 +0100
rebase 2.0.0-M2 on top of 2.0.0-M1 (master)
---
.../apache/isis/core/runtime/services/ServiceInstantiator.java | 10 +++++-----
.../runtime/systemusinginstallers/IsisComponentProvider.java | 5 -----
.../isis/viewer/wicket/viewer/IsisWicketApplication.java | 2 +-
3 files changed, 6 insertions(+), 11 deletions(-)
diff --git a/core/runtime/src/main/java/org/apache/isis/core/runtime/services/ServiceInstantiator.java b/core/runtime/src/main/java/org/apache/isis/core/runtime/services/ServiceInstantiator.java
index 02e229e..199e3b3 100644
--- a/core/runtime/src/main/java/org/apache/isis/core/runtime/services/ServiceInstantiator.java
+++ b/core/runtime/src/main/java/org/apache/isis/core/runtime/services/ServiceInstantiator.java
@@ -28,11 +28,6 @@ import javax.annotation.PostConstruct;
import javax.annotation.PreDestroy;
import javax.enterprise.context.RequestScoped;
-import com.google.common.collect.Maps;
-import com.google.common.collect.Sets;
-
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
import org.apache.isis.applib.internal.context._Context;
import org.apache.isis.core.commons.config.IsisConfiguration;
import org.apache.isis.core.commons.exceptions.IsisException;
@@ -42,6 +37,11 @@ import org.apache.isis.core.commons.lang.ArrayExtensions;
import org.apache.isis.core.commons.lang.MethodExtensions;
import org.apache.isis.core.metamodel.services.ServicesInjector;
import org.apache.isis.core.metamodel.specloader.classsubstitutor.JavassistEnhanced;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import com.google.common.collect.Maps;
+import com.google.common.collect.Sets;
import javassist.util.proxy.MethodFilter;
import javassist.util.proxy.MethodHandler;
diff --git a/core/runtime/src/main/java/org/apache/isis/core/runtime/systemusinginstallers/IsisComponentProvider.java b/core/runtime/src/main/java/org/apache/isis/core/runtime/systemusinginstallers/IsisComponentProvider.java
index b637fe4..7d9322b 100644
--- a/core/runtime/src/main/java/org/apache/isis/core/runtime/systemusinginstallers/IsisComponentProvider.java
+++ b/core/runtime/src/main/java/org/apache/isis/core/runtime/systemusinginstallers/IsisComponentProvider.java
@@ -19,16 +19,13 @@
package org.apache.isis.core.runtime.systemusinginstallers;
-import java.lang.annotation.Annotation;
import java.util.Collection;
import java.util.List;
import java.util.Map;
import java.util.Set;
import java.util.stream.Collectors;
-import java.util.stream.Stream;
import javax.annotation.Nullable;
-import javax.jdo.annotations.PersistenceCapable;
import com.google.common.base.Function;
import com.google.common.base.Joiner;
@@ -37,8 +34,6 @@ import com.google.common.collect.Iterables;
import com.google.common.collect.Lists;
import com.google.common.collect.Sets;
-import org.reflections.Reflections;
-
import org.apache.isis.applib.AppManifest;
import org.apache.isis.applib.annotation.DomainObject;
import org.apache.isis.applib.annotation.DomainService;
diff --git a/core/viewer-wicket-impl/src/main/java/org/apache/isis/viewer/wicket/viewer/IsisWicketApplication.java b/core/viewer-wicket-impl/src/main/java/org/apache/isis/viewer/wicket/viewer/IsisWicketApplication.java
index 3347ca4..e3376e6 100644
--- a/core/viewer-wicket-impl/src/main/java/org/apache/isis/viewer/wicket/viewer/IsisWicketApplication.java
+++ b/core/viewer-wicket-impl/src/main/java/org/apache/isis/viewer/wicket/viewer/IsisWicketApplication.java
@@ -859,7 +859,7 @@ public class IsisWicketApplication
}
getServletContext().setAttribute(WebAppConstants.ISIS_SESSION_FACTORY, null);
super.onDestroy();
- IsisContext.destroy();
+ IsisContext.clear();
} catch(final RuntimeException ex) {
// symmetry with #init()
LOG.error("Failed to destroy", ex);
--
To stop receiving notification emails like this one, please contact
ahuber@apache.org.
[isis] 31/34: ISIS-1841 remove unnecessary null-check + simplify
Posted by ah...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
ahuber pushed a commit to branch dev/2.0.0-M2
in repository https://gitbox.apache.org/repos/asf/isis.git
commit ca1ea6673b99dd7a592a55879e09bb1b792a58f0
Author: Andi Huber <ah...@apache.org>
AuthorDate: Mon Feb 19 15:07:25 2018 +0100
ISIS-1841 remove unnecessary null-check + simplify
Note: _Reflect (Internal API) guarantees discovered classes to be non-null
---
.../systemusinginstallers/IsisComponentProvider.java | 16 ++++++----------
1 file changed, 6 insertions(+), 10 deletions(-)
diff --git a/core/runtime/src/main/java/org/apache/isis/core/runtime/systemusinginstallers/IsisComponentProvider.java b/core/runtime/src/main/java/org/apache/isis/core/runtime/systemusinginstallers/IsisComponentProvider.java
index 941c6e8..d6a6a14 100644
--- a/core/runtime/src/main/java/org/apache/isis/core/runtime/systemusinginstallers/IsisComponentProvider.java
+++ b/core/runtime/src/main/java/org/apache/isis/core/runtime/systemusinginstallers/IsisComponentProvider.java
@@ -144,16 +144,12 @@ public abstract class IsisComponentProvider {
mixinTypes.addAll(discovery.getTypesAnnotatedWith(Mixin.class));
final Set<Class<?>> domainObjectTypes = discovery.getTypesAnnotatedWith(DomainObject.class);
- mixinTypes.addAll(
- domainObjectTypes.stream().filter(input -> {
- if (input == null) {
- return false;
- }
- final DomainObject annotation = input.getAnnotation(DomainObject.class);
- return annotation.nature() == Nature.MIXIN;
- }).collect(Collectors.toList())
- );
-
+ domainObjectTypes.stream()
+ .filter(input -> {
+ final DomainObject annotation = input.getAnnotation(DomainObject.class);
+ return annotation.nature() == Nature.MIXIN;
+ })
+ .forEach(mixinTypes::add);
// add in any explicitly registered services...
domainServiceTypes.addAll(appManifest.getAdditionalServices());
--
To stop receiving notification emails like this one, please contact
ahuber@apache.org.
[isis] 02/34: ISIS-1276: updates core to compile under JDK 1.8 only
Posted by ah...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
ahuber pushed a commit to branch dev/2.0.0-M2
in repository https://gitbox.apache.org/repos/asf/isis.git
commit 138558413f0220da11bd7707d5fcd1deacd0e6eb
Author: Dan Haywood <da...@haywood-associates.co.uk>
AuthorDate: Mon Sep 18 22:16:56 2017 +0100
ISIS-1276: updates core to compile under JDK 1.8 only
---
core/pom.xml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/core/pom.xml b/core/pom.xml
index 72f9373..8ac118d 100644
--- a/core/pom.xml
+++ b/core/pom.xml
@@ -2151,7 +2151,7 @@ ${license.additional-notes}
<configuration>
<toolchains>
<jdk>
- <version>1.7</version>
+ <version>1.8</version>
<vendor>oracle</vendor>
</jdk>
</toolchains>
--
To stop receiving notification emails like this one, please contact
ahuber@apache.org.
[isis] 10/34: ISIS-1726: generalizes the logic that searches for
@PersistenceCapable entities, to also take into account meta-annotations.
Posted by ah...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
ahuber pushed a commit to branch dev/2.0.0-M2
in repository https://gitbox.apache.org/repos/asf/isis.git
commit ecf938944dbf1f55bd89a6b8d6be9416f09a4233
Author: Dan Haywood <da...@haywood-associates.co.uk>
AuthorDate: Tue Sep 19 22:59:43 2017 +0100
ISIS-1726: generalizes the logic that searches for @PersistenceCapable entities, to also take into account meta-annotations.
---
.../isis/applib/internal/reflection/_Reflect.java | 9 ++++--
.../internal/reflection/_Reflect_Discovery.java | 24 +++++++++++++++-
.../IsisComponentProvider.java | 33 ++++++++++++++--------
3 files changed, 51 insertions(+), 15 deletions(-)
diff --git a/core/applib/src/main/java/org/apache/isis/applib/internal/reflection/_Reflect.java b/core/applib/src/main/java/org/apache/isis/applib/internal/reflection/_Reflect.java
index 589cf31..e0b213d 100644
--- a/core/applib/src/main/java/org/apache/isis/applib/internal/reflection/_Reflect.java
+++ b/core/applib/src/main/java/org/apache/isis/applib/internal/reflection/_Reflect.java
@@ -23,10 +23,11 @@ import java.lang.annotation.Annotation;
import java.util.List;
import java.util.Set;
-import org.apache.isis.applib.internal.context._Context;
import org.reflections.scanners.SubTypesScanner;
import org.reflections.util.ClasspathHelper;
+import org.apache.isis.applib.internal.context._Context;
+
/**
* <h1>- internal use only -</h1>
* <p>
@@ -54,6 +55,9 @@ public final class _Reflect {
//TODO missing java-doc
public <T> Set<Class<? extends T>> getSubTypesOf(Class<T> type);
+
+ public Set<Class<?>> findPersistenceCapableTypes();
+
}
//TODO missing java-doc
@@ -79,5 +83,6 @@ public final class _Reflect {
new SubTypesScanner(false)
);
}
-
+
+
}
diff --git a/core/applib/src/main/java/org/apache/isis/applib/internal/reflection/_Reflect_Discovery.java b/core/applib/src/main/java/org/apache/isis/applib/internal/reflection/_Reflect_Discovery.java
index 9059e05..5db08e5 100644
--- a/core/applib/src/main/java/org/apache/isis/applib/internal/reflection/_Reflect_Discovery.java
+++ b/core/applib/src/main/java/org/apache/isis/applib/internal/reflection/_Reflect_Discovery.java
@@ -8,11 +8,15 @@ import java.util.Set;
import java.util.stream.Collectors;
import java.util.stream.Stream;
+import javax.jdo.annotations.PersistenceCapable;
import javax.validation.constraints.NotNull;
+import com.google.common.collect.Sets;
+
+import org.reflections.Reflections;
+
import org.apache.isis.applib.internal.base._NullSafe;
import org.apache.isis.applib.internal.reflection._Reflect.Discovery;
-import org.reflections.Reflections;
/**
*
@@ -80,6 +84,24 @@ class _Reflect_Discovery implements _Reflect.Discovery {
.filter(_NullSafe::isPresent);
}
+ public Set<Class<?>> findPersistenceCapableTypes() {
+
+ Set<Class<?>> pcSet = Sets.newLinkedHashSet();
+
+ Set<Class<?>> persistenceCapables = reflections.getTypesAnnotatedWith(PersistenceCapable.class);
+ persistenceCapables.stream()
+ .filter(x -> !x.isAnnotation())
+ .forEach(pcSet::add);
+
+ Stream<Class<? extends Annotation>> pcMetaAnnotStream =
+ (Stream)persistenceCapables.stream().filter(x -> x.isAnnotation());
+ pcMetaAnnotStream.map(metaAnnot -> reflections.getTypesAnnotatedWith(metaAnnot).stream())
+ .flatMap(x -> x)
+ .filter(x -> !x.isAnnotation())
+ .forEach(pcSet::add);
+
+ return pcSet;
+ }
}
diff --git a/core/runtime/src/main/java/org/apache/isis/core/runtime/systemusinginstallers/IsisComponentProvider.java b/core/runtime/src/main/java/org/apache/isis/core/runtime/systemusinginstallers/IsisComponentProvider.java
index 70c0acb..471b547 100644
--- a/core/runtime/src/main/java/org/apache/isis/core/runtime/systemusinginstallers/IsisComponentProvider.java
+++ b/core/runtime/src/main/java/org/apache/isis/core/runtime/systemusinginstallers/IsisComponentProvider.java
@@ -19,14 +19,26 @@
package org.apache.isis.core.runtime.systemusinginstallers;
+import java.lang.annotation.Annotation;
import java.util.Collection;
import java.util.List;
import java.util.Map;
import java.util.Set;
import java.util.stream.Collectors;
+import java.util.stream.Stream;
import javax.annotation.Nullable;
import javax.jdo.annotations.PersistenceCapable;
+import javax.ws.rs.HEAD;
+
+import com.google.common.base.Function;
+import com.google.common.base.Joiner;
+import com.google.common.collect.FluentIterable;
+import com.google.common.collect.Iterables;
+import com.google.common.collect.Lists;
+import com.google.common.collect.Sets;
+
+import org.reflections.Reflections;
import org.apache.isis.applib.AppManifest;
import org.apache.isis.applib.annotation.DomainObject;
@@ -58,13 +70,6 @@ import org.apache.isis.objectstore.jdo.service.RegisterEntities;
import org.apache.isis.progmodels.dflt.JavaReflectorHelper;
import org.apache.isis.progmodels.dflt.ProgrammingModelFacetsJava5;
-import com.google.common.base.Function;
-import com.google.common.base.Joiner;
-import com.google.common.collect.FluentIterable;
-import com.google.common.collect.Iterables;
-import com.google.common.collect.Lists;
-import com.google.common.collect.Sets;
-
/**
*
*/
@@ -138,7 +143,7 @@ public abstract class IsisComponentProvider {
final Discovery discovery = _Reflect.discover(moduleAndFrameworkPackages);
final Set<Class<?>> domainServiceTypes = discovery.getTypesAnnotatedWith(DomainService.class);
- final Set<Class<?>> persistenceCapableTypes = discovery.getTypesAnnotatedWith(PersistenceCapable.class);
+ final Set<Class<?>> persistenceCapableTypes = discovery.findPersistenceCapableTypes();
final Set<Class<? extends FixtureScript>> fixtureScriptTypes = discovery.getSubTypesOf(FixtureScript.class);
final Set<Class<?>> mixinTypes = Sets.newHashSet();
@@ -146,9 +151,13 @@ public abstract class IsisComponentProvider {
final Set<Class<?>> domainObjectTypes = discovery.getTypesAnnotatedWith(DomainObject.class);
mixinTypes.addAll(
- domainObjectTypes.stream()
- .filter(input -> input.getAnnotation(DomainObject.class).nature() == Nature.MIXIN)
- .collect(Collectors.toList())
+ domainObjectTypes.stream().filter(input -> {
+ if (input == null) {
+ return false;
+ }
+ final DomainObject annotation = input.getAnnotation(DomainObject.class);
+ return annotation.nature() == Nature.MIXIN;
+ }).collect(Collectors.toList())
);
@@ -190,7 +199,7 @@ public abstract class IsisComponentProvider {
}
static private boolean containedWithin(final List<String> packagesWithDotSuffix, final String className) {
for (String packageWithDotSuffix : packagesWithDotSuffix) {
- if(className.startsWith(packageWithDotSuffix)) {
+ if (className.startsWith(packageWithDotSuffix)) {
return true;
}
}
--
To stop receiving notification emails like this one, please contact
ahuber@apache.org.
[isis] 25/34: ISIS-1767: fixes dependency convergence issue with
com.sun.mail
Posted by ah...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
ahuber pushed a commit to branch dev/2.0.0-M2
in repository https://gitbox.apache.org/repos/asf/isis.git
commit 13e2820a3d31ef490112c409de4f89a05e17ca84
Author: Dan Haywood <da...@haywood-associates.co.uk>
AuthorDate: Fri Jan 5 14:43:57 2018 +0000
ISIS-1767: fixes dependency convergence issue with com.sun.mail
---
core/runtime/pom.xml | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/core/runtime/pom.xml b/core/runtime/pom.xml
index 2024a99..564b638 100644
--- a/core/runtime/pom.xml
+++ b/core/runtime/pom.xml
@@ -117,6 +117,12 @@
<dependency>
<groupId>javax</groupId>
<artifactId>javaee-api</artifactId>
+ <exclusions>
+ <exclusion>
+ <groupId>com.sun.mail</groupId>
+ <artifactId>javax.mail</artifactId>
+ </exclusion>
+ </exclusions>
</dependency>
<dependency>
--
To stop receiving notification emails like this one, please contact
ahuber@apache.org.
[isis] 26/34: ISIS-1744: updates to DN 5.1.5
Posted by ah...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
ahuber pushed a commit to branch dev/2.0.0-M2
in repository https://gitbox.apache.org/repos/asf/isis.git
commit 488f8257db1b966a0328837caf730f2121f2effc
Author: Dan Haywood <da...@haywood-associates.co.uk>
AuthorDate: Fri Jan 5 14:46:25 2018 +0000
ISIS-1744: updates to DN 5.1.5
---
core/pom.xml | 6 +++---
example/application/helloworld/pom.xml | 2 +-
example/application/simpleapp/pom.xml | 2 +-
3 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/core/pom.xml b/core/pom.xml
index 555cb91..b3e4731 100644
--- a/core/pom.xml
+++ b/core/pom.xml
@@ -89,10 +89,10 @@
<!-- Datanucleus Objectstore -->
<jdo-api.version>3.2.0-m7</jdo-api.version>
- <datanucleus-core.version>5.1.2</datanucleus-core.version>
- <datanucleus-api-jdo.version>5.1.2</datanucleus-api-jdo.version>
+ <datanucleus-core.version>5.1.5</datanucleus-core.version>
+ <datanucleus-api-jdo.version>5.1.4</datanucleus-api-jdo.version>
<datanucleus-jdo-query.version>5.0.2</datanucleus-jdo-query.version>
- <datanucleus-rdbms.version>5.1.2</datanucleus-rdbms.version>
+ <datanucleus-rdbms.version>5.1.5</datanucleus-rdbms.version>
<datanucleus-jodatime.version>5.1.0-release</datanucleus-jodatime.version>
<!--
ISIS-1288: seen integration tests to fail;
diff --git a/example/application/helloworld/pom.xml b/example/application/helloworld/pom.xml
index 002742f..89713a5 100644
--- a/example/application/helloworld/pom.xml
+++ b/example/application/helloworld/pom.xml
@@ -24,7 +24,7 @@
<parent>
<groupId>org.incode</groupId>
<artifactId>incode-build</artifactId>
- <version>3-SNAPSHOT</version>
+ <version>4</version>
</parent>
<groupId>org.apache.isis.example.application</groupId>
diff --git a/example/application/simpleapp/pom.xml b/example/application/simpleapp/pom.xml
index b2af7e6..2addcd7 100644
--- a/example/application/simpleapp/pom.xml
+++ b/example/application/simpleapp/pom.xml
@@ -24,7 +24,7 @@
<parent>
<groupId>org.incode</groupId>
<artifactId>incode-build</artifactId>
- <version>3-SNAPSHOT</version>
+ <version>4</version>
</parent>
<groupId>org.apache.isis.example.application</groupId>
--
To stop receiving notification emails like this one, please contact
ahuber@apache.org.
[isis] 24/34: ISIS-1756 remove reflective access to DN's
EnhancementHelper since we've got a dedicated method instead
Posted by ah...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
ahuber pushed a commit to branch dev/2.0.0-M2
in repository https://gitbox.apache.org/repos/asf/isis.git
commit 6769dde68417f475b9c0899463963ea6f7050f9f
Author: Andi Huber <ah...@apache.org>
AuthorDate: Sat Dec 9 09:55:21 2017 +0100
ISIS-1756 remove reflective access to DN's EnhancementHelper since we've
got a dedicated method instead
---
.../datanucleus/DataNucleusLifeCycleHelper.java | 136 +++++++++++++++++++++
1 file changed, 136 insertions(+)
diff --git a/core/runtime/src/main/java/org/apache/isis/objectstore/jdo/datanucleus/DataNucleusLifeCycleHelper.java b/core/runtime/src/main/java/org/apache/isis/objectstore/jdo/datanucleus/DataNucleusLifeCycleHelper.java
new file mode 100644
index 0000000..fc5669e
--- /dev/null
+++ b/core/runtime/src/main/java/org/apache/isis/objectstore/jdo/datanucleus/DataNucleusLifeCycleHelper.java
@@ -0,0 +1,136 @@
+/*
+ * 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.isis.objectstore.jdo.datanucleus;
+
+import java.lang.invoke.MethodHandle;
+import java.lang.invoke.MethodHandles;
+import java.lang.reflect.Field;
+import java.util.Map;
+import java.util.function.Consumer;
+
+import javax.jdo.PersistenceManagerFactory;
+
+import org.apache.isis.core.runtime.system.context.IsisContext;
+import org.datanucleus.ClassLoaderResolver;
+import org.datanucleus.PersistenceNucleusContext;
+import org.datanucleus.api.jdo.JDOPersistenceManagerFactory;
+import org.datanucleus.enhancer.EnhancementHelper;
+import org.datanucleus.store.AbstractStoreManager;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+/**
+ *
+ * Purges any state associated with DataNucleus.
+ *
+ * @author ahuber@apache.org
+ * @since 2.0.0
+ *
+ */
+public class DataNucleusLifeCycleHelper {
+
+ private static final Logger LOG = LoggerFactory.getLogger(DataNucleusLifeCycleHelper.class);
+
+ public static void cleanUp(PersistenceManagerFactory persistenceManagerFactory) {
+
+ try {
+
+ final ClassLoader cl = IsisContext.getClassLoader();
+
+// XXX not needed according to https://github.com/datanucleus/datanucleus-core/issues/272
+//
+// if(persistenceManagerFactory instanceof JDOPersistenceManagerFactory) {
+//
+// final JDOPersistenceManagerFactory jdoPMF =
+// (JDOPersistenceManagerFactory) persistenceManagerFactory;
+// final PersistenceNucleusContext nucleusContext = jdoPMF.getNucleusContext();
+// final AbstractStoreManager storeManager =
+// (AbstractStoreManager)nucleusContext.getStoreManager();
+//
+//
+// persistenceManagerFactory.getManagedClasses()
+// .forEach(clazz->{
+// final ClassLoaderResolver clr = nucleusContext.getClassLoaderResolver(cl);
+//
+// // Un-manage from the store
+// storeManager.unmanageClass(clr, clazz.getName(), false);
+//
+// // Unload the meta-data for this class
+// nucleusContext.getMetaDataManager().unloadMetaDataForClass(clazz.getName());
+// });
+// }
+
+ persistenceManagerFactory.close();
+
+ // XXX uses reflection prior to DN v5.1.5
+ // remove once DN v5.1.5 is released
+ // dnUnregisterClassesManagedBy(cl);
+
+ // XXX for info, why we do this see
+ // https://github.com/datanucleus/datanucleus-core/issues/272
+ EnhancementHelper.getInstance().unregisterClasses(cl);
+
+ } catch (Exception e) {
+ // ignore, since it only affects re-deploy-ability, which is nice to have but not critical
+ }
+
+ }
+
+ // -- HELPER
+
+ // TODO remove once DN v5.1.5 is released
+ private static void dnUnregisterClassesManagedBy(ClassLoader cl) {
+ if(cl==null)
+ return;
+ visitDNRegisteredClasses(map->
+ map.entrySet()
+ .removeIf(entry->cl.equals(entry.getKey().getClassLoader()))
+ );
+ }
+
+ // -- LOW LEVEL REFLECTION
+
+ // TODO remove once DN v5.1.5 is released
+ private final static MethodHandle getRegisteredClassesMH;
+ static {
+ MethodHandle mh;
+ try {
+ Field registeredClasses = EnhancementHelper.class.getDeclaredField("registeredClasses");
+ registeredClasses.setAccessible(true);
+ mh = MethodHandles.lookup().unreflectGetter(registeredClasses);
+ registeredClasses.setAccessible(false);
+ } catch (Exception e) {
+ mh = null;
+ e.printStackTrace();
+ }
+ getRegisteredClassesMH = mh;
+ }
+
+ // TODO remove once DN v5.1.5 is released
+ private static void visitDNRegisteredClasses(Consumer<Map<Class<?>, ?>> visitor){
+ try {
+ visitor.accept( (Map<Class<?>, ?>) getRegisteredClassesMH.invoke() );
+ } catch (Throwable e) {
+ LOG.warn("Failed to access DataNucleus' EnhancementHelper via reflection.", e);
+ }
+ }
+
+
+
+}
--
To stop receiving notification emails like this one, please contact
ahuber@apache.org.
[isis] 12/34: ISIS-1767 JEE 7+ added dependency on javaee-api to
core/runtime
Posted by ah...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
ahuber pushed a commit to branch dev/2.0.0-M2
in repository https://gitbox.apache.org/repos/asf/isis.git
commit 9eb9c4b3e38373c788f1ccae6f1dcf405d283c59
Author: Andi Huber <ah...@apache.org>
AuthorDate: Sun Oct 29 09:24:11 2017 +0100
ISIS-1767 JEE 7+ added dependency on javaee-api to core/runtime
---
core/pom.xml | 10 ++++++++++
core/runtime/pom.xml | 5 +++++
2 files changed, 15 insertions(+)
diff --git a/core/pom.xml b/core/pom.xml
index 8ac118d..555cb91 100644
--- a/core/pom.xml
+++ b/core/pom.xml
@@ -155,6 +155,8 @@
<guice.version>4.1.0</guice.version>
<picocontainer.version>2.15</picocontainer.version>
+
+ <javaee.version>7.0</javaee.version>
<dom4j.version>1.6.1</dom4j.version>
<jdom.version>2.0.2</jdom.version>
@@ -1462,6 +1464,14 @@ ${license.additional-notes}
<artifactId>picocontainer</artifactId>
<version>${picocontainer.version}</version>
</dependency>
+
+ <!-- JEE API -->
+ <dependency>
+ <groupId>javax</groupId>
+ <artifactId>javaee-api</artifactId>
+ <version>${javaee.version}</version>
+ <scope>provided</scope>
+ </dependency>
<!-- Bytecode libraries -->
<dependency>
diff --git a/core/runtime/pom.xml b/core/runtime/pom.xml
index 0aa0361..2024a99 100644
--- a/core/runtime/pom.xml
+++ b/core/runtime/pom.xml
@@ -114,6 +114,11 @@
<artifactId>slf4j-log4j12</artifactId>
</dependency>
+ <dependency>
+ <groupId>javax</groupId>
+ <artifactId>javaee-api</artifactId>
+ </dependency>
+
<dependency>
<!-- because DataNucleus uses log4j as its preferred logger -->
<groupId>log4j</groupId>
--
To stop receiving notification emails like this one, please contact
ahuber@apache.org.
[isis] 06/34: ISIS-1723: removes jdo applib's Auditable interface
and @Auditable annotation
Posted by ah...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
ahuber pushed a commit to branch dev/2.0.0-M2
in repository https://gitbox.apache.org/repos/asf/isis.git
commit 4e66c190465de2eda644cd388bb1ae3d64c205ab
Author: Dan Haywood <da...@haywood-associates.co.uk>
AuthorDate: Tue Sep 19 22:43:59 2017 +0100
ISIS-1723: removes jdo applib's Auditable interface and @Auditable annotation
---
.../system/persistence/PersistenceSessionFactoryMetamodelRefiner.java | 1 -
1 file changed, 1 deletion(-)
diff --git a/core/runtime/src/main/java/org/apache/isis/core/runtime/system/persistence/PersistenceSessionFactoryMetamodelRefiner.java b/core/runtime/src/main/java/org/apache/isis/core/runtime/system/persistence/PersistenceSessionFactoryMetamodelRefiner.java
index 8f5352d..7c6108e 100644
--- a/core/runtime/src/main/java/org/apache/isis/core/runtime/system/persistence/PersistenceSessionFactoryMetamodelRefiner.java
+++ b/core/runtime/src/main/java/org/apache/isis/core/runtime/system/persistence/PersistenceSessionFactoryMetamodelRefiner.java
@@ -57,7 +57,6 @@ public class PersistenceSessionFactoryMetamodelRefiner implements MetaModelRefin
// and also MandatoryFacetOnPropertyMandatoryAnnotationFactory
// and also PropertyAnnotationFactory
programmingModel.addFactory(new MandatoryFromJdoColumnAnnotationFacetFactory());
-
}
@Override
--
To stop receiving notification emails like this one, please contact
ahuber@apache.org.
[isis] 11/34: ISIS-1728: uses typesafe queries for helloworld
Posted by ah...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
ahuber pushed a commit to branch dev/2.0.0-M2
in repository https://gitbox.apache.org/repos/asf/isis.git
commit e20eec9db03ec13ad6868326283cde5c9752aa86
Author: Dan Haywood <da...@haywood-associates.co.uk>
AuthorDate: Tue Sep 19 23:02:07 2017 +0100
ISIS-1728: uses typesafe queries for helloworld
---
.../runtime/systemusinginstallers/IsisComponentProvider.java | 1 -
.../src/main/java/domainapp/dom/impl/HelloWorldObject.java | 4 +++-
.../src/main/java/domainapp/dom/impl/HelloWorldObjects.java | 9 +++++----
.../java/domainapp/modules/simple/dom/impl/SimpleObjects.java | 7 +++----
4 files changed, 11 insertions(+), 10 deletions(-)
diff --git a/core/runtime/src/main/java/org/apache/isis/core/runtime/systemusinginstallers/IsisComponentProvider.java b/core/runtime/src/main/java/org/apache/isis/core/runtime/systemusinginstallers/IsisComponentProvider.java
index 471b547..b637fe4 100644
--- a/core/runtime/src/main/java/org/apache/isis/core/runtime/systemusinginstallers/IsisComponentProvider.java
+++ b/core/runtime/src/main/java/org/apache/isis/core/runtime/systemusinginstallers/IsisComponentProvider.java
@@ -29,7 +29,6 @@ import java.util.stream.Stream;
import javax.annotation.Nullable;
import javax.jdo.annotations.PersistenceCapable;
-import javax.ws.rs.HEAD;
import com.google.common.base.Function;
import com.google.common.base.Joiner;
diff --git a/example/application/helloworld/src/main/java/domainapp/dom/impl/HelloWorldObject.java b/example/application/helloworld/src/main/java/domainapp/dom/impl/HelloWorldObject.java
index 54a1a35..502b756 100644
--- a/example/application/helloworld/src/main/java/domainapp/dom/impl/HelloWorldObject.java
+++ b/example/application/helloworld/src/main/java/domainapp/dom/impl/HelloWorldObject.java
@@ -43,7 +43,6 @@ import org.apache.isis.applib.services.title.TitleService;
@javax.jdo.annotations.PersistenceCapable(identityType = IdentityType.DATASTORE, schema = "helloworld" )
@javax.jdo.annotations.DatastoreIdentity(strategy = IdGeneratorStrategy.IDENTITY, column = "id")
@javax.jdo.annotations.Version(strategy= VersionStrategy.DATE_TIME, column ="version")
-@javax.jdo.annotations.Unique(name="HelloWorldObject_name_UNQ", members = {"name"})
@DomainObject(auditing = Auditing.ENABLED)
@DomainObjectLayout() // causes UI events to be triggered
public class HelloWorldObject implements Comparable<HelloWorldObject> {
@@ -52,6 +51,8 @@ public class HelloWorldObject implements Comparable<HelloWorldObject> {
this.name = name;
}
+
+ @javax.jdo.annotations.Unique
@javax.jdo.annotations.Column(allowsNull = "false", length = 40)
@Property(editing = Editing.DISABLED)
@Title(prepend = "Object: ")
@@ -59,6 +60,7 @@ public class HelloWorldObject implements Comparable<HelloWorldObject> {
public String getName() { return name; }
public void setName(final String name) { this.name = name; }
+
@javax.jdo.annotations.Column(allowsNull = "true", length = 4000)
@Property(editing = Editing.ENABLED)
private String notes;
diff --git a/example/application/helloworld/src/main/java/domainapp/dom/impl/HelloWorldObjects.java b/example/application/helloworld/src/main/java/domainapp/dom/impl/HelloWorldObjects.java
index 92bd565..2c776f5 100644
--- a/example/application/helloworld/src/main/java/domainapp/dom/impl/HelloWorldObjects.java
+++ b/example/application/helloworld/src/main/java/domainapp/dom/impl/HelloWorldObjects.java
@@ -20,7 +20,7 @@ package domainapp.dom.impl;
import java.util.List;
-import org.datanucleus.query.typesafe.TypesafeQuery;
+import javax.jdo.JDOQLTypedQuery;
import org.apache.isis.applib.annotation.Action;
import org.apache.isis.applib.annotation.DomainService;
@@ -31,9 +31,9 @@ import org.apache.isis.applib.annotation.ParameterLayout;
import org.apache.isis.applib.annotation.RestrictTo;
import org.apache.isis.applib.annotation.SemanticsOf;
import org.apache.isis.applib.services.jdosupport.IsisJdoSupport;
-import org.apache.isis.applib.services.registry.ServiceRegistry;
import org.apache.isis.applib.services.repository.RepositoryService;
+
@DomainService(
nature = NatureOfService.VIEW_MENU_ONLY,
objectType = "helloworld.HelloWorldObjects"
@@ -52,7 +52,7 @@ public class HelloWorldObjects {
@Action(semantics = SemanticsOf.SAFE)
@MemberOrder(sequence = "2")
public List<HelloWorldObject> findByName(final String name) {
- TypesafeQuery<HelloWorldObject> q = isisJdoSupport.newTypesafeQuery(HelloWorldObject.class);
+ JDOQLTypedQuery<HelloWorldObject> q = isisJdoSupport.newTypesafeQuery(HelloWorldObject.class);
final QHelloWorldObject cand = QHelloWorldObject.candidate();
q = q.filter(
cand.name.indexOf(q.stringParameter("name")).ne(-1)
@@ -64,7 +64,8 @@ public class HelloWorldObjects {
@Action(semantics = SemanticsOf.SAFE, restrictTo = RestrictTo.PROTOTYPING)
@MemberOrder(sequence = "3")
public List<HelloWorldObject> listAll() {
- return repositoryService.allInstances(HelloWorldObject.class);
+ return isisJdoSupport.newTypesafeQuery(HelloWorldObject.class)
+ .executeList();
}
@javax.inject.Inject
diff --git a/example/application/simpleapp/module-simple/src/main/java/domainapp/modules/simple/dom/impl/SimpleObjects.java b/example/application/simpleapp/module-simple/src/main/java/domainapp/modules/simple/dom/impl/SimpleObjects.java
index 335f9d0..d77fe47 100644
--- a/example/application/simpleapp/module-simple/src/main/java/domainapp/modules/simple/dom/impl/SimpleObjects.java
+++ b/example/application/simpleapp/module-simple/src/main/java/domainapp/modules/simple/dom/impl/SimpleObjects.java
@@ -20,7 +20,7 @@ package domainapp.modules.simple.dom.impl;
import java.util.List;
-import org.datanucleus.query.typesafe.TypesafeQuery;
+import javax.jdo.JDOQLTypedQuery;
import org.apache.isis.applib.annotation.Action;
import org.apache.isis.applib.annotation.ActionLayout;
@@ -35,7 +35,6 @@ import org.apache.isis.applib.annotation.SemanticsOf;
import org.apache.isis.applib.services.eventbus.ActionDomainEvent;
import org.apache.isis.applib.services.jdosupport.IsisJdoSupport;
import org.apache.isis.applib.services.repository.RepositoryService;
-import org.apache.isis.applib.services.xactn.TransactionService;
@DomainService(
nature = NatureOfService.VIEW_MENU_ONLY,
@@ -63,7 +62,7 @@ public class SimpleObjects {
@ParameterLayout(named="Name")
final String name
) {
- TypesafeQuery<SimpleObject> q = isisJdoSupport.newTypesafeQuery(SimpleObject.class);
+ JDOQLTypedQuery<SimpleObject> q = isisJdoSupport.newTypesafeQuery(SimpleObject.class);
final QSimpleObject cand = QSimpleObject.candidate();
q = q.filter(
cand.name.indexOf(q.stringParameter("name")).ne(-1)
@@ -74,7 +73,7 @@ public class SimpleObjects {
@Programmatic
public SimpleObject findByNameExact(final String name) {
- TypesafeQuery<SimpleObject> q = isisJdoSupport.newTypesafeQuery(SimpleObject.class);
+ JDOQLTypedQuery<SimpleObject> q = isisJdoSupport.newTypesafeQuery(SimpleObject.class);
final QSimpleObject cand = QSimpleObject.candidate();
q = q.filter(
cand.name.eq(q.stringParameter("name"))
--
To stop receiving notification emails like this one, please contact
ahuber@apache.org.
[isis] 15/34: ISIS-1756 - fix typo
Posted by ah...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
ahuber pushed a commit to branch dev/2.0.0-M2
in repository https://gitbox.apache.org/repos/asf/isis.git
commit b17393b11858e64ca72f3b6a5075067749a8f8e6
Author: Andi Huber <ah...@apache.org>
AuthorDate: Sun Oct 29 10:25:52 2017 +0100
ISIS-1756 - fix typo
---
.../org/apache/isis/core/webapp/jee/IsisDomainAppLifecycleBean.java | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/core/runtime/src/main/java/org/apache/isis/core/webapp/jee/IsisDomainAppLifecycleBean.java b/core/runtime/src/main/java/org/apache/isis/core/webapp/jee/IsisDomainAppLifecycleBean.java
index 07881e3..416b11f 100644
--- a/core/runtime/src/main/java/org/apache/isis/core/webapp/jee/IsisDomainAppLifecycleBean.java
+++ b/core/runtime/src/main/java/org/apache/isis/core/webapp/jee/IsisDomainAppLifecycleBean.java
@@ -55,7 +55,7 @@ public class IsisDomainAppLifecycleBean {
@PreDestroy
public void destroy() {
IsisContext.destroy();
- log.info("detroyed.");
+ log.info("destroyed.");
}
}
--
To stop receiving notification emails like this one, please contact
ahuber@apache.org.
[isis] 08/34: ISIS-1725: requires that an AppManifest is supplied
(used to obtain list of entities).
Posted by ah...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
ahuber pushed a commit to branch dev/2.0.0-M2
in repository https://gitbox.apache.org/repos/asf/isis.git
commit 63e1e8670553b56de3d44decf8bdb5e2e6637606
Author: Dan Haywood <da...@haywood-associates.co.uk>
AuthorDate: Tue Sep 19 22:55:48 2017 +0100
ISIS-1725: requires that an AppManifest is supplied (used to obtain list of entities).
---
.../persistence/PersistenceSessionFactory.java | 2 +-
.../objectstore/jdo/service/RegisterEntities.java | 83 ++++------------------
2 files changed, 15 insertions(+), 70 deletions(-)
diff --git a/core/runtime/src/main/java/org/apache/isis/core/runtime/system/persistence/PersistenceSessionFactory.java b/core/runtime/src/main/java/org/apache/isis/core/runtime/system/persistence/PersistenceSessionFactory.java
index 095fbee..92f950d 100644
--- a/core/runtime/src/main/java/org/apache/isis/core/runtime/system/persistence/PersistenceSessionFactory.java
+++ b/core/runtime/src/main/java/org/apache/isis/core/runtime/system/persistence/PersistenceSessionFactory.java
@@ -93,7 +93,7 @@ public class PersistenceSessionFactory implements ApplicationScopedComponent, Fi
final Map<String, String> datanucleusProps = dataNucleusConfig.asMap();
addDataNucleusPropertiesIfRequired(datanucleusProps);
- final RegisterEntities registerEntities = new RegisterEntities(configuration.asMap(), specificationLoader);
+ final RegisterEntities registerEntities = new RegisterEntities(specificationLoader);
final Set<String> classesToBePersisted = registerEntities.getEntityTypes();
applicationComponents = new DataNucleusApplicationComponents(jdoObjectstoreConfig, specificationLoader,
diff --git a/core/runtime/src/main/java/org/apache/isis/objectstore/jdo/service/RegisterEntities.java b/core/runtime/src/main/java/org/apache/isis/objectstore/jdo/service/RegisterEntities.java
index 7cbb48b..1908dfe 100644
--- a/core/runtime/src/main/java/org/apache/isis/objectstore/jdo/service/RegisterEntities.java
+++ b/core/runtime/src/main/java/org/apache/isis/objectstore/jdo/service/RegisterEntities.java
@@ -18,33 +18,30 @@
*/
package org.apache.isis.objectstore.jdo.service;
-import java.util.Collections;
import java.util.List;
-import java.util.Map;
import java.util.Set;
import javax.jdo.annotations.PersistenceCapable;
-import org.apache.isis.applib.AppManifest;
-import org.apache.isis.applib.internal.reflection._Reflect;
-import org.apache.isis.applib.internal.reflection._Reflect.Discovery;
-import org.apache.isis.core.metamodel.specloader.SpecificationLoader;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-import com.google.common.base.Function;
import com.google.common.base.Joiner;
-import com.google.common.base.Splitter;
-import com.google.common.base.Strings;
-import com.google.common.collect.Iterables;
import com.google.common.collect.Lists;
import com.google.common.collect.Sets;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import org.apache.isis.applib.AppManifest;
+import org.apache.isis.core.metamodel.specloader.SpecificationLoader;
+
public class RegisterEntities {
@SuppressWarnings("unused")
private final static Logger LOG = LoggerFactory.getLogger(RegisterEntities.class);
-
+
+ /**
+ * @deprecated - no longer used; instead an AppManifest must be specified.
+ */
+ @Deprecated
public final static String PACKAGE_PREFIX_KEY = "isis.persistor.datanucleus.RegisterEntities.packagePrefix";
// //////////////////////////////////////
@@ -59,13 +56,13 @@ public class RegisterEntities {
}
//endregion
- public RegisterEntities(final Map<String, String> configuration, final SpecificationLoader specificationLoader) {
+ public RegisterEntities(final SpecificationLoader specificationLoader) {
this.specificationLoader = specificationLoader;
Set<Class<?>> persistenceCapableTypes = AppManifest.Registry.instance().getPersistenceCapableTypes();
if(persistenceCapableTypes == null) {
- persistenceCapableTypes = searchForPersistenceCapables(configuration);
+ throw new IllegalStateException("AppManifest is required");
}
final List<String> classNamesNotEnhanced = Lists.newArrayList();
@@ -85,52 +82,11 @@ public class RegisterEntities {
}
}
- /**
- * only called if no appManifest
- */
- Set<Class<?>> searchForPersistenceCapables(final Map<String, String> configuration) {
-
- final String packagePrefixes = lookupPackagePrefixes(configuration);
-
- final Set<Class<?>> persistenceCapableTypes = Sets.newLinkedHashSet();
- final List<String> domPackages = parseDomPackages(packagePrefixes);
- for (final String packageName : domPackages) {
-
- final Discovery dicovery = _Reflect.discover(packageName);
-
- final Set<Class<?>> entityTypesInPackage =
- dicovery.getTypesAnnotatedWith(PersistenceCapable.class);
-
- if(entityTypesInPackage.isEmpty()) {
- throw new IllegalArgumentException(String.format(
- "Bad configuration.\n\nCould not locate any @PersistenceCapable entities in package '%s'\n" +
- "Check value of '%s' key in WEB-INF/*.properties\n",
- packageName,
- PACKAGE_PREFIX_KEY));
- }
- persistenceCapableTypes.addAll(entityTypesInPackage);
- }
- return persistenceCapableTypes;
- }
-
- private String lookupPackagePrefixes(final Map<String, String> configuration) {
- final String packagePrefixes = configuration.get(PACKAGE_PREFIX_KEY);
- if(Strings.isNullOrEmpty(packagePrefixes)) {
- throw new IllegalArgumentException(String.format(
- "Could not locate '%s' key in property files - aborting",
- PACKAGE_PREFIX_KEY));
- }
- return packagePrefixes;
- }
-
- private static List<String> parseDomPackages(String packagePrefixes) {
- return Collections.unmodifiableList(Lists.newArrayList(Iterables.transform(Splitter.on(",").split(packagePrefixes), trim())));
- }
private static boolean ignore(final Class<?> entityType) {
try {
if(entityType.isAnonymousClass() || entityType.isLocalClass() || entityType.isMemberClass() ||
- entityType.isInterface()) {
+ entityType.isInterface() || entityType.isAnnotation()) {
return true;
}
final PersistenceCapable persistenceCapable = entityType.getAnnotation(PersistenceCapable.class);
@@ -140,20 +96,9 @@ public class RegisterEntities {
}
}
- private static Function<String,String> trim() {
- return new Function<String,String>(){
- @Override
- public String apply(String input) {
- return input.trim();
- }
- };
- }
-
- // //////////////////////////////////////
SpecificationLoader getSpecificationLoader() {
return specificationLoader;
}
-
}
--
To stop receiving notification emails like this one, please contact
ahuber@apache.org.
[isis] 20/34: ISIS-1775 Honor web-app's context path when
configuring swagger.
Posted by ah...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
ahuber pushed a commit to branch dev/2.0.0-M2
in repository https://gitbox.apache.org/repos/asf/isis.git
commit c61eee967ad7a609d76c10bb2e415cc0051c2cb6
Author: Andi Huber <ah...@apache.org>
AuthorDate: Sun Nov 12 19:13:37 2017 +0100
ISIS-1775 Honor web-app's context path when configuring swagger.
---
.../services/swagger/SwaggerServiceDefault.java | 15 +++-
.../isis/core/webapp/WebAppContextSupport.java | 31 +++++++
.../wicket/viewer/IsisWicketApplication.java | 95 +++++++++++-----------
3 files changed, 91 insertions(+), 50 deletions(-)
diff --git a/core/metamodel/src/main/java/org/apache/isis/core/metamodel/services/swagger/SwaggerServiceDefault.java b/core/metamodel/src/main/java/org/apache/isis/core/metamodel/services/swagger/SwaggerServiceDefault.java
index 968a93c..192b5f6 100644
--- a/core/metamodel/src/main/java/org/apache/isis/core/metamodel/services/swagger/SwaggerServiceDefault.java
+++ b/core/metamodel/src/main/java/org/apache/isis/core/metamodel/services/swagger/SwaggerServiceDefault.java
@@ -22,15 +22,15 @@ import java.util.Map;
import javax.annotation.PostConstruct;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
import org.apache.isis.applib.annotation.DomainService;
import org.apache.isis.applib.annotation.NatureOfService;
import org.apache.isis.applib.annotation.Programmatic;
import org.apache.isis.applib.services.swagger.SwaggerService;
import org.apache.isis.core.metamodel.services.swagger.internal.SwaggerSpecGenerator;
import org.apache.isis.core.metamodel.specloader.SpecificationLoader;
+import org.apache.isis.core.webapp.WebAppContextSupport;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
@DomainService(
nature = NatureOfService.DOMAIN,
@@ -48,7 +48,14 @@ public class SwaggerServiceDefault implements SwaggerService {
@PostConstruct
public void init(final Map<String,String> properties) {
- this.basePath = getPropertyElse(properties, KEY_RESTFUL_BASE_PATH, KEY_RESTFUL_BASE_PATH_DEFAULT);
+
+ final String webappContextPath =
+ getPropertyElse(properties, WebAppContextSupport.WEB_APP_CONTEXT_PATH, "/");
+
+ final String basePath =
+ getPropertyElse(properties, KEY_RESTFUL_BASE_PATH, KEY_RESTFUL_BASE_PATH_DEFAULT);
+
+ this.basePath = WebAppContextSupport.prependContextPathIfPresent(webappContextPath, basePath);
}
static String getPropertyElse(final Map<String, String> properties, final String key, final String dflt) {
diff --git a/core/metamodel/src/main/java/org/apache/isis/core/webapp/WebAppContextSupport.java b/core/metamodel/src/main/java/org/apache/isis/core/webapp/WebAppContextSupport.java
new file mode 100644
index 0000000..044fe67
--- /dev/null
+++ b/core/metamodel/src/main/java/org/apache/isis/core/webapp/WebAppContextSupport.java
@@ -0,0 +1,31 @@
+package org.apache.isis.core.webapp;
+
+import javax.servlet.ServletContext;
+
+import com.google.common.base.Strings;
+
+public class WebAppContextSupport {
+
+ /**
+ * Property name given to the context path of the web application as returned by
+ * {@link ServletContext#getContextPath()}.
+ */
+ public static final String WEB_APP_CONTEXT_PATH = "application.webapp.context-path";
+
+
+ public static String prependContextPathIfPresent(String contextPath, String path) {
+ if(Strings.isNullOrEmpty(contextPath) || contextPath.equals("/"))
+ return path;
+
+ if(!contextPath.startsWith("/"))
+ throw new IllegalArgumentException(
+ "contextPath must start with a slash '/' character, got '"+contextPath+"'");
+
+ if(!path.startsWith("/"))
+ throw new IllegalArgumentException(
+ "path must start with a slash '/' character, got '"+path+"'");
+
+ return contextPath + path;
+ }
+
+}
diff --git a/core/viewer-wicket-impl/src/main/java/org/apache/isis/viewer/wicket/viewer/IsisWicketApplication.java b/core/viewer-wicket-impl/src/main/java/org/apache/isis/viewer/wicket/viewer/IsisWicketApplication.java
index e3376e6..ae3f78d 100644
--- a/core/viewer-wicket-impl/src/main/java/org/apache/isis/viewer/wicket/viewer/IsisWicketApplication.java
+++ b/core/viewer-wicket-impl/src/main/java/org/apache/isis/viewer/wicket/viewer/IsisWicketApplication.java
@@ -30,52 +30,6 @@ import java.util.UUID;
import java.util.concurrent.Callable;
import java.util.concurrent.Future;
-import com.google.common.base.Function;
-import com.google.common.base.Joiner;
-import com.google.common.collect.Lists;
-import com.google.common.collect.Sets;
-import com.google.common.io.Resources;
-import com.google.inject.Guice;
-import com.google.inject.Injector;
-import com.google.inject.Module;
-
-import org.apache.wicket.Application;
-import org.apache.wicket.Component;
-import org.apache.wicket.ConverterLocator;
-import org.apache.wicket.IConverterLocator;
-import org.apache.wicket.Page;
-import org.apache.wicket.RuntimeConfigurationType;
-import org.apache.wicket.SharedResources;
-import org.apache.wicket.ajax.AjaxRequestTarget;
-import org.apache.wicket.authentication.IAuthenticationStrategy;
-import org.apache.wicket.authentication.strategy.DefaultAuthenticationStrategy;
-import org.apache.wicket.authroles.authentication.AuthenticatedWebApplication;
-import org.apache.wicket.authroles.authentication.AuthenticatedWebSession;
-import org.apache.wicket.core.request.mapper.MountedMapper;
-import org.apache.wicket.devutils.debugbar.DebugBar;
-import org.apache.wicket.devutils.debugbar.InspectorDebugPanel;
-import org.apache.wicket.devutils.debugbar.PageSizeDebugPanel;
-import org.apache.wicket.devutils.debugbar.SessionSizeDebugPanel;
-import org.apache.wicket.devutils.debugbar.VersionDebugContributor;
-import org.apache.wicket.devutils.diskstore.DebugDiskDataStore;
-import org.apache.wicket.guice.GuiceComponentInjector;
-import org.apache.wicket.markup.head.IHeaderResponse;
-import org.apache.wicket.markup.head.filter.JavaScriptFilteredIntoFooterHeaderResponse;
-import org.apache.wicket.markup.html.IHeaderContributor;
-import org.apache.wicket.markup.html.IHeaderResponseDecorator;
-import org.apache.wicket.markup.html.WebPage;
-import org.apache.wicket.request.cycle.IRequestCycleListener;
-import org.apache.wicket.request.cycle.PageRequestHandlerTracker;
-import org.apache.wicket.request.cycle.RequestCycleListenerCollection;
-import org.apache.wicket.request.resource.CssResourceReference;
-import org.apache.wicket.settings.DebugSettings;
-import org.apache.wicket.settings.RequestCycleSettings;
-import org.apache.wicket.util.IContextProvider;
-import org.apache.wicket.util.time.Duration;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import org.wicketstuff.select2.ApplicationSettings;
-
import org.apache.isis.core.commons.authentication.AuthenticationSession;
import org.apache.isis.core.commons.config.IsisConfiguration;
import org.apache.isis.core.commons.config.IsisConfigurationDefault;
@@ -91,6 +45,7 @@ import org.apache.isis.core.runtime.system.session.IsisSessionFactory;
import org.apache.isis.core.runtime.threadpool.ThreadPoolSupport;
import org.apache.isis.core.webapp.IsisWebAppBootstrapper;
import org.apache.isis.core.webapp.WebAppConstants;
+import org.apache.isis.core.webapp.WebAppContextSupport;
import org.apache.isis.schema.utils.ChangesDtoUtils;
import org.apache.isis.schema.utils.CommandDtoUtils;
import org.apache.isis.schema.utils.InteractionDtoUtils;
@@ -119,6 +74,51 @@ import org.apache.isis.viewer.wicket.viewer.integration.wicket.ConverterForObjec
import org.apache.isis.viewer.wicket.viewer.integration.wicket.ConverterForObjectAdapterMemento;
import org.apache.isis.viewer.wicket.viewer.integration.wicket.WebRequestCycleForIsis;
import org.apache.isis.viewer.wicket.viewer.settings.IsisResourceSettings;
+import org.apache.wicket.Application;
+import org.apache.wicket.Component;
+import org.apache.wicket.ConverterLocator;
+import org.apache.wicket.IConverterLocator;
+import org.apache.wicket.Page;
+import org.apache.wicket.RuntimeConfigurationType;
+import org.apache.wicket.SharedResources;
+import org.apache.wicket.ajax.AjaxRequestTarget;
+import org.apache.wicket.authentication.IAuthenticationStrategy;
+import org.apache.wicket.authentication.strategy.DefaultAuthenticationStrategy;
+import org.apache.wicket.authroles.authentication.AuthenticatedWebApplication;
+import org.apache.wicket.authroles.authentication.AuthenticatedWebSession;
+import org.apache.wicket.core.request.mapper.MountedMapper;
+import org.apache.wicket.devutils.debugbar.DebugBar;
+import org.apache.wicket.devutils.debugbar.InspectorDebugPanel;
+import org.apache.wicket.devutils.debugbar.PageSizeDebugPanel;
+import org.apache.wicket.devutils.debugbar.SessionSizeDebugPanel;
+import org.apache.wicket.devutils.debugbar.VersionDebugContributor;
+import org.apache.wicket.devutils.diskstore.DebugDiskDataStore;
+import org.apache.wicket.guice.GuiceComponentInjector;
+import org.apache.wicket.markup.head.IHeaderResponse;
+import org.apache.wicket.markup.head.filter.JavaScriptFilteredIntoFooterHeaderResponse;
+import org.apache.wicket.markup.html.IHeaderContributor;
+import org.apache.wicket.markup.html.IHeaderResponseDecorator;
+import org.apache.wicket.markup.html.WebPage;
+import org.apache.wicket.request.cycle.IRequestCycleListener;
+import org.apache.wicket.request.cycle.PageRequestHandlerTracker;
+import org.apache.wicket.request.cycle.RequestCycleListenerCollection;
+import org.apache.wicket.request.resource.CssResourceReference;
+import org.apache.wicket.settings.DebugSettings;
+import org.apache.wicket.settings.RequestCycleSettings;
+import org.apache.wicket.util.IContextProvider;
+import org.apache.wicket.util.time.Duration;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.wicketstuff.select2.ApplicationSettings;
+
+import com.google.common.base.Function;
+import com.google.common.base.Joiner;
+import com.google.common.collect.Lists;
+import com.google.common.collect.Sets;
+import com.google.common.io.Resources;
+import com.google.inject.Guice;
+import com.google.inject.Injector;
+import com.google.inject.Module;
import de.agilecoders.wicket.core.Bootstrap;
import de.agilecoders.wicket.core.markup.html.bootstrap.behavior.BootstrapBaseBehavior;
@@ -346,6 +346,9 @@ public class IsisWicketApplication
final IsisConfigurationBuilder isisConfigurationBuilder = obtainConfigBuilder();
isisConfigurationBuilder.addDefaultConfigurationResourcesAndPrimers();
+
+ final String webappContextPath = getServletContext().getContextPath();
+ isisConfigurationBuilder.add(WebAppContextSupport.WEB_APP_CONTEXT_PATH, webappContextPath);
final IsisConfigurationDefault configuration = isisConfigurationBuilder.getConfiguration();
--
To stop receiving notification emails like this one, please contact
ahuber@apache.org.
[isis] 33/34: ISIS-1744 updating DN versions
Posted by ah...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
ahuber pushed a commit to branch dev/2.0.0-M2
in repository https://gitbox.apache.org/repos/asf/isis.git
commit c98701c48660e18f34783d11b188cbecc3b122f9
Author: Andi Huber <ah...@apache.org>
AuthorDate: Mon Feb 19 15:22:30 2018 +0100
ISIS-1744 updating DN versions
datanucleus-core.version 5.1.6 datanucleus-api-jdo.version 5.1.4
datanucleus-jdo-query.version 5.0.4
datanucleus-rdbms.version 5.1.6
---
core/pom.xml | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/core/pom.xml b/core/pom.xml
index 792ec5c..1c5158b 100644
--- a/core/pom.xml
+++ b/core/pom.xml
@@ -89,10 +89,10 @@
<!-- Datanucleus Objectstore -->
<jdo-api.version>3.2.0-m7</jdo-api.version>
- <datanucleus-core.version>5.1.5</datanucleus-core.version>
+ <datanucleus-core.version>5.1.6</datanucleus-core.version>
<datanucleus-api-jdo.version>5.1.4</datanucleus-api-jdo.version>
- <datanucleus-jdo-query.version>5.0.2</datanucleus-jdo-query.version>
- <datanucleus-rdbms.version>5.1.5</datanucleus-rdbms.version>
+ <datanucleus-jdo-query.version>5.0.4</datanucleus-jdo-query.version>
+ <datanucleus-rdbms.version>5.1.6</datanucleus-rdbms.version>
<datanucleus-jodatime.version>5.1.0-release</datanucleus-jodatime.version>
<!--
ISIS-1288: seen integration tests to fail;
--
To stop receiving notification emails like this one, please contact
ahuber@apache.org.
[isis] 23/34: ISIS-1755 veto ExceptionRecognizer on CDI scan
Posted by ah...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
ahuber pushed a commit to branch dev/2.0.0-M2
in repository https://gitbox.apache.org/repos/asf/isis.git
commit 5a8586c6feedda8be872c56174311be69bd570ea
Author: Andi Huber <ah...@apache.org>
AuthorDate: Wed Nov 22 14:12:22 2017 +0100
ISIS-1755 veto ExceptionRecognizer on CDI scan
---
.../webapp/jee/IsisCDIBeanScanInterceptor.java | 25 +++++++++++++---------
1 file changed, 15 insertions(+), 10 deletions(-)
diff --git a/core/runtime/src/main/java/org/apache/isis/core/webapp/jee/IsisCDIBeanScanInterceptor.java b/core/runtime/src/main/java/org/apache/isis/core/webapp/jee/IsisCDIBeanScanInterceptor.java
index c75605c..06fe4bf 100644
--- a/core/runtime/src/main/java/org/apache/isis/core/webapp/jee/IsisCDIBeanScanInterceptor.java
+++ b/core/runtime/src/main/java/org/apache/isis/core/webapp/jee/IsisCDIBeanScanInterceptor.java
@@ -18,8 +18,9 @@
*/
package org.apache.isis.core.webapp.jee;
-import java.util.HashSet;
-import java.util.Set;
+import java.util.ArrayList;
+import java.util.List;
+import java.util.function.Predicate;
import javax.enterprise.event.Observes;
import javax.enterprise.inject.spi.AfterBeanDiscovery;
@@ -28,6 +29,7 @@ import javax.enterprise.inject.spi.Extension;
import javax.enterprise.inject.spi.ProcessAnnotatedType;
import org.apache.isis.applib.annotation.DomainService;
+import org.apache.isis.applib.services.exceprecog.ExceptionRecognizer;
import org.apache.isis.applib.services.metrics.MetricsService;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@@ -58,9 +60,10 @@ public final class IsisCDIBeanScanInterceptor implements Extension {
* Declaration of Beans that are managed by Isis and should be ignored by CDI.
* (in addition to those that have the @DomainService annotation)
*/
- private static final Set<String> tabu = new HashSet<>();
+ private static final List<Predicate<Class<?>>> tabu = new ArrayList<>();
{
- tabu.add(MetricsService.class.getName());
+ tabu.add(MetricsService.class::equals);
+ tabu.add(ExceptionRecognizer.class::isAssignableFrom);
}
void beforeBeanDiscovery(@Observes BeforeBeanDiscovery event) {
@@ -69,9 +72,10 @@ public final class IsisCDIBeanScanInterceptor implements Extension {
<T> void processAnnotatedType(@Observes ProcessAnnotatedType<T> event) {
- final String className = event.getAnnotatedType().getJavaClass().getName();
+ final Class<?> clazz = event.getAnnotatedType().getJavaClass();
+ final String className = clazz.getName();
- if(isTabu(className, event)) {
+ if(isTabu(clazz, event)) {
log.debug("veto type: " + className);
event.veto();
} else {
@@ -85,12 +89,13 @@ public final class IsisCDIBeanScanInterceptor implements Extension {
// -- HELPER
- private boolean isTabu(String className, ProcessAnnotatedType<?> event) {
- if(tabu.contains(className))
- return true;
+ private boolean isTabu(Class<?> clazz, ProcessAnnotatedType<?> event) {
if(event.getAnnotatedType().isAnnotationPresent(DomainService.class))
return true;
-
+ for(Predicate<Class<?>> isTabu : tabu) {
+ if(isTabu.test(clazz))
+ return true;
+ }
return false;
}
--
To stop receiving notification emails like this one, please contact
ahuber@apache.org.
[isis] 04/34: ISIS-1276: fixes compile issues in metamodel and
runtime
Posted by ah...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
ahuber pushed a commit to branch dev/2.0.0-M2
in repository https://gitbox.apache.org/repos/asf/isis.git
commit 9068474656d4be63f5d479c3ca857cf54b075fdf
Author: Dan Haywood <da...@haywood-associates.co.uk>
AuthorDate: Mon Sep 18 22:29:13 2017 +0100
ISIS-1276: fixes compile issues in metamodel and runtime
---
.../value/vsp/ValueSemanticsProviderUtil.java | 2 --
...ionParameterAbstractTest_getId_and_getName.java | 8 ++++---
.../DataNucleusApplicationComponents.java | 2 +-
.../persistence/PersistenceSessionFactory.java | 2 +-
.../CreateSchemaObjectFromClassMetadata.java | 3 ++-
.../service/support/IsisJdoSupportImpl.java | 27 +++++++++-------------
6 files changed, 20 insertions(+), 24 deletions(-)
diff --git a/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/object/value/vsp/ValueSemanticsProviderUtil.java b/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/object/value/vsp/ValueSemanticsProviderUtil.java
index 03658a5..b34d5fe 100644
--- a/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/object/value/vsp/ValueSemanticsProviderUtil.java
+++ b/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/object/value/vsp/ValueSemanticsProviderUtil.java
@@ -24,7 +24,6 @@ import com.google.common.base.Strings;
import org.apache.isis.applib.adapters.ValueSemanticsProvider;
import org.apache.isis.core.commons.config.IsisConfiguration;
import org.apache.isis.core.commons.lang.ClassUtil;
-import org.apache.isis.core.commons.lang.StringExtensions;
import org.apache.isis.core.metamodel.facetapi.FacetHolder;
public final class ValueSemanticsProviderUtil {
@@ -46,7 +45,6 @@ public final class ValueSemanticsProviderUtil {
@SuppressWarnings("rawtypes")
final Class clazz = candidateClass != null ? ClassUtil.implementingClassOrNull(candidateClass.getName(), ValueSemanticsProvider.class, FacetHolder.class) : null;
return clazz != null ? clazz : (Class)ClassUtil.implementingClassOrNull(classCandidateName, ValueSemanticsProvider.class, FacetHolder.class);
-
}
}
diff --git a/core/metamodel/src/test/java/org/apache/isis/core/metamodel/specloader/specimpl/ObjectActionParameterAbstractTest_getId_and_getName.java b/core/metamodel/src/test/java/org/apache/isis/core/metamodel/specloader/specimpl/ObjectActionParameterAbstractTest_getId_and_getName.java
index 1f3fcc3..3e1eb76 100644
--- a/core/metamodel/src/test/java/org/apache/isis/core/metamodel/specloader/specimpl/ObjectActionParameterAbstractTest_getId_and_getName.java
+++ b/core/metamodel/src/test/java/org/apache/isis/core/metamodel/specloader/specimpl/ObjectActionParameterAbstractTest_getId_and_getName.java
@@ -19,6 +19,8 @@
package org.apache.isis.core.metamodel.specloader.specimpl;
+import javax.ws.rs.HEAD;
+
import com.google.common.base.Predicate;
import com.google.common.collect.Lists;
@@ -164,7 +166,7 @@ public class ObjectActionParameterAbstractTest_getId_and_getName {
one(actionParamPeer).getFacet(NamedFacet.class);
will(returnValue(null));
- one(parentAction).getParameters((Predicate<ObjectActionParameter>) with(Expectations.<Predicate>anything()));
+ one(parentAction).getParameters(with(Expectations.<Predicate<ObjectActionParameter>>anything()));
will(returnValue(Lists.newArrayList(objectActionParameter)));
}
});
@@ -183,7 +185,7 @@ public class ObjectActionParameterAbstractTest_getId_and_getName {
one(actionParamPeer).getFacet(NamedFacet.class);
will(returnValue(null));
- one(parentAction).getParameters(with(Expectations.<Predicate>anything()));
+ one(parentAction).getParameters(with(Expectations.<Predicate<ObjectActionParameter>>anything()));
will(returnValue(Lists.newArrayList(stubObjectActionParameterString, objectActionParameter, stubObjectActionParameterString2)));
}
});
@@ -202,7 +204,7 @@ public class ObjectActionParameterAbstractTest_getId_and_getName {
one(actionParamPeer).getFacet(NamedFacet.class);
will(returnValue(null));
- one(parentAction).getParameters(with(Expectations.<Predicate>anything()));
+ one(parentAction).getParameters(with(Expectations.<Predicate<ObjectActionParameter>>anything()));
will(returnValue(Lists.newArrayList(stubObjectActionParameterString, objectActionParameter, stubObjectActionParameterString2)));
}
});
diff --git a/core/runtime/src/main/java/org/apache/isis/core/runtime/system/persistence/DataNucleusApplicationComponents.java b/core/runtime/src/main/java/org/apache/isis/core/runtime/system/persistence/DataNucleusApplicationComponents.java
index 52ac35b..a68ce06 100644
--- a/core/runtime/src/main/java/org/apache/isis/core/runtime/system/persistence/DataNucleusApplicationComponents.java
+++ b/core/runtime/src/main/java/org/apache/isis/core/runtime/system/persistence/DataNucleusApplicationComponents.java
@@ -144,7 +144,7 @@ public class DataNucleusApplicationComponents implements ApplicationScopedCompon
// (if the configured StoreMgr supports it, and if requested in isis.properties)
//
datanucleusProps.put(PropertyNames.PROPERTY_SCHEMA_AUTOCREATE_ALL, "false"); // turn off, cos want to do the schema object ourselves...
- datanucleusProps.put(PropertyNames.PROPERTY_SCHEMA_AUTOCREATE_SCHEMA, "false");
+ datanucleusProps.put(PropertyNames.PROPERTY_SCHEMA_AUTOCREATE_DATABASE, "false");
datanucleusProps.put(PropertyNames.PROPERTY_SCHEMA_AUTOCREATE_TABLES, "true"); // but have DN do everything else...
datanucleusProps.put(PropertyNames.PROPERTY_SCHEMA_AUTOCREATE_COLUMNS, "true");
datanucleusProps.put(PropertyNames.PROPERTY_SCHEMA_AUTOCREATE_CONSTRAINTS, "true");
diff --git a/core/runtime/src/main/java/org/apache/isis/core/runtime/system/persistence/PersistenceSessionFactory.java b/core/runtime/src/main/java/org/apache/isis/core/runtime/system/persistence/PersistenceSessionFactory.java
index 8a32edb..095fbee 100644
--- a/core/runtime/src/main/java/org/apache/isis/core/runtime/system/persistence/PersistenceSessionFactory.java
+++ b/core/runtime/src/main/java/org/apache/isis/core/runtime/system/persistence/PersistenceSessionFactory.java
@@ -112,7 +112,7 @@ public class PersistenceSessionFactory implements ApplicationScopedComponent, Fi
putIfNotPresent(props, "javax.jdo.PersistenceManagerFactoryClass", JDOPersistenceManagerFactory.class.getName());
// previously we defaulted this property to "true", but that could cause the target database to be modified
- putIfNotPresent(props, PropertyNames.PROPERTY_SCHEMA_AUTOCREATE_SCHEMA, Boolean.FALSE.toString());
+ putIfNotPresent(props, PropertyNames.PROPERTY_SCHEMA_AUTOCREATE_DATABASE, Boolean.FALSE.toString());
putIfNotPresent(props, PropertyNames.PROPERTY_SCHEMA_VALIDATE_ALL, Boolean.TRUE.toString());
putIfNotPresent(props, PropertyNames.PROPERTY_CACHE_L2_TYPE, "none");
diff --git a/core/runtime/src/main/java/org/apache/isis/objectstore/jdo/datanucleus/CreateSchemaObjectFromClassMetadata.java b/core/runtime/src/main/java/org/apache/isis/objectstore/jdo/datanucleus/CreateSchemaObjectFromClassMetadata.java
index 6b2d536..87c6e91 100644
--- a/core/runtime/src/main/java/org/apache/isis/objectstore/jdo/datanucleus/CreateSchemaObjectFromClassMetadata.java
+++ b/core/runtime/src/main/java/org/apache/isis/objectstore/jdo/datanucleus/CreateSchemaObjectFromClassMetadata.java
@@ -31,10 +31,11 @@ import org.datanucleus.ClassLoaderResolver;
import org.datanucleus.enhancer.EnhancementNucleusContextImpl;
import org.datanucleus.metadata.AbstractClassMetaData;
import org.datanucleus.metadata.MetaDataListener;
-import org.datanucleus.store.encryption.ConnectionEncryptionProvider;
+import org.datanucleus.store.ConnectionEncryptionProvider;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
+
/**
* Implementation note: the methods in this class are <tt>protected</tt> to allow for easy subclassing.
*/
diff --git a/core/runtime/src/main/java/org/apache/isis/objectstore/jdo/datanucleus/service/support/IsisJdoSupportImpl.java b/core/runtime/src/main/java/org/apache/isis/objectstore/jdo/datanucleus/service/support/IsisJdoSupportImpl.java
index a9a2ac5..e5171c9 100644
--- a/core/runtime/src/main/java/org/apache/isis/objectstore/jdo/datanucleus/service/support/IsisJdoSupportImpl.java
+++ b/core/runtime/src/main/java/org/apache/isis/objectstore/jdo/datanucleus/service/support/IsisJdoSupportImpl.java
@@ -29,16 +29,14 @@ import java.util.Map;
import java.util.concurrent.Callable;
import javax.jdo.Extent;
+import javax.jdo.JDOQLTypedQuery;
import javax.jdo.PersistenceManager;
import javax.jdo.datastore.JDOConnection;
+import javax.jdo.query.BooleanExpression;
import com.google.common.collect.Lists;
import com.google.common.collect.Maps;
-import org.datanucleus.api.jdo.JDOPersistenceManager;
-import org.datanucleus.query.typesafe.BooleanExpression;
-import org.datanucleus.query.typesafe.TypesafeQuery;
-
import org.apache.isis.applib.FatalException;
import org.apache.isis.applib.annotation.DomainService;
import org.apache.isis.applib.annotation.NatureOfService;
@@ -158,12 +156,9 @@ public class IsisJdoSupportImpl implements IsisJdoSupport {
// temporarily disable concurrency checking while this method is performed
try {
- ConcurrencyChecking.executeWithConcurrencyCheckingDisabled(new Callable<Void>() {
- @Override
- public Void call() {
- getJdoPersistenceManager().deletePersistentAll(instances);
- return null;
- }
+ ConcurrencyChecking.executeWithConcurrencyCheckingDisabled((Callable<Void>) () -> {
+ getJdoPersistenceManager().deletePersistentAll(instances);
+ return null;
});
} catch (final Exception ex) {
throw new FatalException(ex);
@@ -176,31 +171,31 @@ public class IsisJdoSupportImpl implements IsisJdoSupport {
@Programmatic
@Override
public <T> List<T> executeQuery(final Class<T> cls, final BooleanExpression expression) {
- final TypesafeQuery<T> query = newTypesafeQuery(cls).filter(expression);
+ final JDOQLTypedQuery<T> query = newTypesafeQuery(cls).filter(expression);
return executeListAndClose(query);
}
@Programmatic
@Override
public <T> T executeQueryUnique(final Class<T> cls, final BooleanExpression expression) {
- final TypesafeQuery<T> query = newTypesafeQuery(cls).filter(expression);
+ final JDOQLTypedQuery<T> query = newTypesafeQuery(cls).filter(expression);
return executeUniqueAndClose(query);
}
@Programmatic
@Override
- public <T> TypesafeQuery<T> newTypesafeQuery(Class<T> cls) {
- return ((JDOPersistenceManager)getJdoPersistenceManager()).newTypesafeQuery(cls);
+ public <T> JDOQLTypedQuery<T> newTypesafeQuery(Class<T> cls) {
+ return getJdoPersistenceManager().newJDOQLTypedQuery(cls);
}
- private static <T> List<T> executeListAndClose(final TypesafeQuery<T> query) {
+ private static <T> List<T> executeListAndClose(final JDOQLTypedQuery<T> query) {
final List<T> elements = query.executeList();
final List<T> list = Lists.newArrayList(elements);
query.closeAll();
return list;
}
- private static <T> T executeUniqueAndClose(final TypesafeQuery<T> query) {
+ private static <T> T executeUniqueAndClose(final JDOQLTypedQuery<T> query) {
final T result = query.executeUnique();
query.closeAll();
return result;
--
To stop receiving notification emails like this one, please contact
ahuber@apache.org.
[isis] 30/34: ISIS-1841 clean up Internal API after rebase/merge
Posted by ah...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
ahuber pushed a commit to branch dev/2.0.0-M2
in repository https://gitbox.apache.org/repos/asf/isis.git
commit efdf1180691dc60856ad00d635ccf4190f7dacf5
Author: Andi Huber <ah...@apache.org>
AuthorDate: Mon Feb 19 14:58:04 2018 +0100
ISIS-1841 clean up Internal API after rebase/merge
refactor persistence capable type finding into its own package private
helper class
---
.../isis/applib/internal/reflection/_Reflect.java | 5 +-
.../internal/reflection/_Reflect_Discovery.java | 25 +--------
.../IsisComponentProvider.java | 2 +-
.../PersistenceCapableTypeFinder.java | 65 ++++++++++++++++++++++
4 files changed, 68 insertions(+), 29 deletions(-)
diff --git a/core/applib/src/main/java/org/apache/isis/applib/internal/reflection/_Reflect.java b/core/applib/src/main/java/org/apache/isis/applib/internal/reflection/_Reflect.java
index e0b213d..20d63e5 100644
--- a/core/applib/src/main/java/org/apache/isis/applib/internal/reflection/_Reflect.java
+++ b/core/applib/src/main/java/org/apache/isis/applib/internal/reflection/_Reflect.java
@@ -23,11 +23,10 @@ import java.lang.annotation.Annotation;
import java.util.List;
import java.util.Set;
+import org.apache.isis.applib.internal.context._Context;
import org.reflections.scanners.SubTypesScanner;
import org.reflections.util.ClasspathHelper;
-import org.apache.isis.applib.internal.context._Context;
-
/**
* <h1>- internal use only -</h1>
* <p>
@@ -56,8 +55,6 @@ public final class _Reflect {
//TODO missing java-doc
public <T> Set<Class<? extends T>> getSubTypesOf(Class<T> type);
- public Set<Class<?>> findPersistenceCapableTypes();
-
}
//TODO missing java-doc
diff --git a/core/applib/src/main/java/org/apache/isis/applib/internal/reflection/_Reflect_Discovery.java b/core/applib/src/main/java/org/apache/isis/applib/internal/reflection/_Reflect_Discovery.java
index 5db08e5..fe7db50 100644
--- a/core/applib/src/main/java/org/apache/isis/applib/internal/reflection/_Reflect_Discovery.java
+++ b/core/applib/src/main/java/org/apache/isis/applib/internal/reflection/_Reflect_Discovery.java
@@ -8,15 +8,11 @@ import java.util.Set;
import java.util.stream.Collectors;
import java.util.stream.Stream;
-import javax.jdo.annotations.PersistenceCapable;
import javax.validation.constraints.NotNull;
-import com.google.common.collect.Sets;
-
-import org.reflections.Reflections;
-
import org.apache.isis.applib.internal.base._NullSafe;
import org.apache.isis.applib.internal.reflection._Reflect.Discovery;
+import org.reflections.Reflections;
/**
*
@@ -84,24 +80,5 @@ class _Reflect_Discovery implements _Reflect.Discovery {
.filter(_NullSafe::isPresent);
}
- public Set<Class<?>> findPersistenceCapableTypes() {
-
- Set<Class<?>> pcSet = Sets.newLinkedHashSet();
-
- Set<Class<?>> persistenceCapables = reflections.getTypesAnnotatedWith(PersistenceCapable.class);
- persistenceCapables.stream()
- .filter(x -> !x.isAnnotation())
- .forEach(pcSet::add);
-
- Stream<Class<? extends Annotation>> pcMetaAnnotStream =
- (Stream)persistenceCapables.stream().filter(x -> x.isAnnotation());
- pcMetaAnnotStream.map(metaAnnot -> reflections.getTypesAnnotatedWith(metaAnnot).stream())
- .flatMap(x -> x)
- .filter(x -> !x.isAnnotation())
- .forEach(pcSet::add);
-
- return pcSet;
- }
-
}
diff --git a/core/runtime/src/main/java/org/apache/isis/core/runtime/systemusinginstallers/IsisComponentProvider.java b/core/runtime/src/main/java/org/apache/isis/core/runtime/systemusinginstallers/IsisComponentProvider.java
index 7d9322b..941c6e8 100644
--- a/core/runtime/src/main/java/org/apache/isis/core/runtime/systemusinginstallers/IsisComponentProvider.java
+++ b/core/runtime/src/main/java/org/apache/isis/core/runtime/systemusinginstallers/IsisComponentProvider.java
@@ -137,7 +137,7 @@ public abstract class IsisComponentProvider {
final Discovery discovery = _Reflect.discover(moduleAndFrameworkPackages);
final Set<Class<?>> domainServiceTypes = discovery.getTypesAnnotatedWith(DomainService.class);
- final Set<Class<?>> persistenceCapableTypes = discovery.findPersistenceCapableTypes();
+ final Set<Class<?>> persistenceCapableTypes = PersistenceCapableTypeFinder.find(discovery);
final Set<Class<? extends FixtureScript>> fixtureScriptTypes = discovery.getSubTypesOf(FixtureScript.class);
final Set<Class<?>> mixinTypes = Sets.newHashSet();
diff --git a/core/runtime/src/main/java/org/apache/isis/core/runtime/systemusinginstallers/PersistenceCapableTypeFinder.java b/core/runtime/src/main/java/org/apache/isis/core/runtime/systemusinginstallers/PersistenceCapableTypeFinder.java
new file mode 100644
index 0000000..1fbf533
--- /dev/null
+++ b/core/runtime/src/main/java/org/apache/isis/core/runtime/systemusinginstallers/PersistenceCapableTypeFinder.java
@@ -0,0 +1,65 @@
+/*
+ * 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.isis.core.runtime.systemusinginstallers;
+
+import java.lang.annotation.Annotation;
+import java.util.LinkedHashSet;
+import java.util.Set;
+
+import javax.jdo.annotations.PersistenceCapable;
+
+import org.apache.isis.applib.internal.reflection._Reflect.Discovery;
+
+/**
+ *
+ * Package private helper class. Finds PersistenceCapable types.
+ *
+ */
+class PersistenceCapableTypeFinder {
+
+ @SuppressWarnings("unchecked")
+ static Set<Class<?>> find(Discovery discovery) {
+
+ final Set<Class<?>> types = new LinkedHashSet<>();
+
+ discovery.getTypesAnnotatedWith(PersistenceCapable.class).stream()
+ .forEach(type->{
+
+ if(type.isAnnotation()) {
+
+ // We have an annotation, that is annotated with @PersistenceCapable,
+ // this requires special treatment:
+ // Search for any classes annotated with this (meta-)annotation.
+
+ discovery.getTypesAnnotatedWith((Class<? extends Annotation>) type).stream()
+ .filter(x->!x.isAnnotation())
+ .forEach(types::add);
+
+ } else {
+
+ types.add(type);
+
+ }
+ });
+
+ return types;
+ }
+
+}
--
To stop receiving notification emails like this one, please contact
ahuber@apache.org.
[isis] 28/34: ISIS-1811: updates versions to 2.0.0-M2-SNAPSHOT
Posted by ah...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
ahuber pushed a commit to branch dev/2.0.0-M2
in repository https://gitbox.apache.org/repos/asf/isis.git
commit 42081eb60be8ee7fdd0d0e84927b03971600c8b6
Author: Dan Haywood <da...@haywood-associates.co.uk>
AuthorDate: Tue Jan 9 07:15:06 2018 +0000
ISIS-1811: updates versions to 2.0.0-M2-SNAPSHOT
---
adocs/documentation/pom.xml | 2 +-
core/applib/pom.xml | 2 +-
core/integtestsupport/pom.xml | 2 +-
core/log4j/pom.xml | 2 +-
core/maven-plugin/pom.xml | 2 +-
core/mavendeps/intellij/pom.xml | 2 +-
core/mavendeps/testing/pom.xml | 2 +-
core/mavendeps/webapp/pom.xml | 2 +-
core/metamodel/pom.xml | 2 +-
core/pom.xml | 70 +++++++++++-----------
core/runtime/pom.xml | 2 +-
core/schema/pom.xml | 2 +-
core/security-shiro/pom.xml | 6 +-
core/security/pom.xml | 2 +-
core/specsupport/pom.xml | 2 +-
core/unittestsupport/pom.xml | 2 +-
core/viewer-restfulobjects-applib/pom.xml | 2 +-
core/viewer-restfulobjects-rendering/pom.xml | 2 +-
core/viewer-restfulobjects-server/pom.xml | 2 +-
core/viewer-wicket-applib/pom.xml | 2 +-
core/viewer-wicket-impl/pom.xml | 2 +-
core/viewer-wicket-model/pom.xml | 2 +-
core/viewer-wicket-ui/pom.xml | 2 +-
core/webserver/pom.xml | 2 +-
core/wrapper/pom.xml | 2 +-
example/application/helloworld/pom.xml | 2 +-
example/application/simpleapp/application/pom.xml | 2 +-
.../application/simpleapp/module-simple/pom.xml | 2 +-
example/application/simpleapp/pom.xml | 2 +-
example/application/simpleapp/webapp/pom.xml | 2 +-
example/archetype/helloworld/pom.xml | 2 +-
example/archetype/simpleapp/pom.xml | 4 +-
pom.xml | 2 +-
33 files changed, 70 insertions(+), 70 deletions(-)
diff --git a/adocs/documentation/pom.xml b/adocs/documentation/pom.xml
index 960a2e4..659e31b 100644
--- a/adocs/documentation/pom.xml
+++ b/adocs/documentation/pom.xml
@@ -29,7 +29,7 @@
<groupId>org.apache.isis.docs</groupId>
<artifactId>isis-documentation</artifactId>
- <version>2.0.0-M1-SNAPSHOT</version>
+ <version>2.0.0-M2-SNAPSHOT</version>
<packaging>pom</packaging>
<name>Apache Isis Docs</name>
diff --git a/core/applib/pom.xml b/core/applib/pom.xml
index 9cfea89..7fa9feb 100644
--- a/core/applib/pom.xml
+++ b/core/applib/pom.xml
@@ -23,7 +23,7 @@
<parent>
<groupId>org.apache.isis.core</groupId>
<artifactId>isis</artifactId>
- <version>2.0.0-M1-SNAPSHOT</version>
+ <version>2.0.0-M2-SNAPSHOT</version>
</parent>
<artifactId>isis-core-applib</artifactId>
diff --git a/core/integtestsupport/pom.xml b/core/integtestsupport/pom.xml
index 50e15c1..83e5dd5 100644
--- a/core/integtestsupport/pom.xml
+++ b/core/integtestsupport/pom.xml
@@ -23,7 +23,7 @@
<parent>
<groupId>org.apache.isis.core</groupId>
<artifactId>isis</artifactId>
- <version>2.0.0-M1-SNAPSHOT</version>
+ <version>2.0.0-M2-SNAPSHOT</version>
</parent>
<artifactId>isis-core-integtestsupport</artifactId>
diff --git a/core/log4j/pom.xml b/core/log4j/pom.xml
index 115312e..12b8253 100644
--- a/core/log4j/pom.xml
+++ b/core/log4j/pom.xml
@@ -15,7 +15,7 @@
<parent>
<groupId>org.apache.isis.core</groupId>
<artifactId>isis</artifactId>
- <version>2.0.0-M1-SNAPSHOT</version>
+ <version>2.0.0-M2-SNAPSHOT</version>
</parent>
<artifactId>isis-core-log4j</artifactId>
diff --git a/core/maven-plugin/pom.xml b/core/maven-plugin/pom.xml
index 3e3646b..0ff59a6 100644
--- a/core/maven-plugin/pom.xml
+++ b/core/maven-plugin/pom.xml
@@ -23,7 +23,7 @@
<parent>
<groupId>org.apache.isis.core</groupId>
<artifactId>isis</artifactId>
- <version>2.0.0-M1-SNAPSHOT</version>
+ <version>2.0.0-M2-SNAPSHOT</version>
</parent>
<groupId>org.apache.isis.tool</groupId>
diff --git a/core/mavendeps/intellij/pom.xml b/core/mavendeps/intellij/pom.xml
index 7a387b6..ce57609 100644
--- a/core/mavendeps/intellij/pom.xml
+++ b/core/mavendeps/intellij/pom.xml
@@ -24,7 +24,7 @@
<parent>
<groupId>org.apache.isis.core</groupId>
<artifactId>isis</artifactId>
- <version>2.0.0-M1-SNAPSHOT</version>
+ <version>2.0.0-M2-SNAPSHOT</version>
<relativePath>../../pom.xml</relativePath>
</parent>
diff --git a/core/mavendeps/testing/pom.xml b/core/mavendeps/testing/pom.xml
index 6504f20..cd2b9f2 100644
--- a/core/mavendeps/testing/pom.xml
+++ b/core/mavendeps/testing/pom.xml
@@ -24,7 +24,7 @@
<parent>
<groupId>org.apache.isis.core</groupId>
<artifactId>isis</artifactId>
- <version>2.0.0-M1-SNAPSHOT</version>
+ <version>2.0.0-M2-SNAPSHOT</version>
<relativePath>../../pom.xml</relativePath>
</parent>
diff --git a/core/mavendeps/webapp/pom.xml b/core/mavendeps/webapp/pom.xml
index ddeecf4..9b3d24e 100644
--- a/core/mavendeps/webapp/pom.xml
+++ b/core/mavendeps/webapp/pom.xml
@@ -24,7 +24,7 @@
<parent>
<groupId>org.apache.isis.core</groupId>
<artifactId>isis</artifactId>
- <version>2.0.0-M1-SNAPSHOT</version>
+ <version>2.0.0-M2-SNAPSHOT</version>
<relativePath>../../pom.xml</relativePath>
</parent>
diff --git a/core/metamodel/pom.xml b/core/metamodel/pom.xml
index 697eb3d..1361ac7 100644
--- a/core/metamodel/pom.xml
+++ b/core/metamodel/pom.xml
@@ -23,7 +23,7 @@
<parent>
<groupId>org.apache.isis.core</groupId>
<artifactId>isis</artifactId>
- <version>2.0.0-M1-SNAPSHOT</version>
+ <version>2.0.0-M2-SNAPSHOT</version>
</parent>
<artifactId>isis-core-metamodel</artifactId>
diff --git a/core/pom.xml b/core/pom.xml
index b3e4731..792ec5c 100644
--- a/core/pom.xml
+++ b/core/pom.xml
@@ -29,7 +29,7 @@
<groupId>org.apache.isis.core</groupId>
<artifactId>isis</artifactId>
- <version>2.0.0-M1-SNAPSHOT</version>
+ <version>2.0.0-M2-SNAPSHOT</version>
<packaging>pom</packaging>
@@ -1143,12 +1143,12 @@ ${license.additional-notes}
<dependency>
<groupId>org.apache.isis.core</groupId>
<artifactId>isis-core-unittestsupport</artifactId>
- <version>2.0.0-M1-SNAPSHOT</version>
+ <version>2.0.0-M2-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>org.apache.isis.core</groupId>
<artifactId>isis-core-unittestsupport</artifactId>
- <version>2.0.0-M1-SNAPSHOT</version>
+ <version>2.0.0-M2-SNAPSHOT</version>
<type>test-jar</type>
<scope>test</scope>
</dependency>
@@ -1157,14 +1157,14 @@ ${license.additional-notes}
<dependency>
<groupId>org.apache.isis.core</groupId>
<artifactId>isis-core-applib</artifactId>
- <version>2.0.0-M1-SNAPSHOT</version>
+ <version>2.0.0-M2-SNAPSHOT</version>
<type>jar</type>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>org.apache.isis.core</groupId>
<artifactId>isis-core-applib</artifactId>
- <version>2.0.0-M1-SNAPSHOT</version>
+ <version>2.0.0-M2-SNAPSHOT</version>
<type>test-jar</type>
<scope>test</scope>
</dependency>
@@ -1186,14 +1186,14 @@ ${license.additional-notes}
<dependency>
<groupId>org.apache.isis.core</groupId>
<artifactId>isis-core-schema</artifactId>
- <version>2.0.0-M1-SNAPSHOT</version>
+ <version>2.0.0-M2-SNAPSHOT</version>
<type>jar</type>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>org.apache.isis.core</groupId>
<artifactId>isis-core-schema</artifactId>
- <version>2.0.0-M1-SNAPSHOT</version>
+ <version>2.0.0-M2-SNAPSHOT</version>
<type>test-jar</type>
<scope>test</scope>
</dependency>
@@ -1202,7 +1202,7 @@ ${license.additional-notes}
<dependency>
<groupId>org.apache.isis.core</groupId>
<artifactId>isis-core-log4j</artifactId>
- <version>2.0.0-M1-SNAPSHOT</version>
+ <version>2.0.0-M2-SNAPSHOT</version>
<type>jar</type>
<scope>compile</scope>
</dependency>
@@ -1211,14 +1211,14 @@ ${license.additional-notes}
<dependency>
<groupId>org.apache.isis.core</groupId>
<artifactId>isis-core-metamodel</artifactId>
- <version>2.0.0-M1-SNAPSHOT</version>
+ <version>2.0.0-M2-SNAPSHOT</version>
<type>jar</type>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>org.apache.isis.core</groupId>
<artifactId>isis-core-metamodel</artifactId>
- <version>2.0.0-M1-SNAPSHOT</version>
+ <version>2.0.0-M2-SNAPSHOT</version>
<type>test-jar</type>
<scope>test</scope>
</dependency>
@@ -1227,76 +1227,76 @@ ${license.additional-notes}
<dependency>
<groupId>org.apache.isis.core</groupId>
<artifactId>isis-core-runtime</artifactId>
- <version>2.0.0-M1-SNAPSHOT</version>
+ <version>2.0.0-M2-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>org.apache.isis.core</groupId>
<artifactId>isis-core-runtime</artifactId>
- <version>2.0.0-M1-SNAPSHOT</version>
+ <version>2.0.0-M2-SNAPSHOT</version>
<type>test-jar</type>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.apache.isis.core</groupId>
<artifactId>isis-core-wrapper</artifactId>
- <version>2.0.0-M1-SNAPSHOT</version>
+ <version>2.0.0-M2-SNAPSHOT</version>
</dependency>
<!-- webserver -->
<dependency>
<groupId>org.apache.isis.core</groupId>
<artifactId>isis-core-webserver</artifactId>
- <version>2.0.0-M1-SNAPSHOT</version>
+ <version>2.0.0-M2-SNAPSHOT</version>
</dependency>
<!-- specsupport -->
<dependency>
<groupId>org.apache.isis.core</groupId>
<artifactId>isis-core-specsupport</artifactId>
- <version>2.0.0-M1-SNAPSHOT</version>
+ <version>2.0.0-M2-SNAPSHOT</version>
</dependency>
<!-- integtestsupport -->
<dependency>
<groupId>org.apache.isis.core</groupId>
<artifactId>isis-core-integtestsupport</artifactId>
- <version>2.0.0-M1-SNAPSHOT</version>
+ <version>2.0.0-M2-SNAPSHOT</version>
</dependency>
<!-- Restful Objects viewer -->
<dependency>
<groupId>org.apache.isis.core</groupId>
<artifactId>isis-core-viewer-restfulobjects-applib</artifactId>
- <version>2.0.0-M1-SNAPSHOT</version>
+ <version>2.0.0-M2-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>org.apache.isis.core</groupId>
<artifactId>isis-core-viewer-restfulobjects-applib</artifactId>
- <version>2.0.0-M1-SNAPSHOT</version>
+ <version>2.0.0-M2-SNAPSHOT</version>
<type>test-jar</type>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.apache.isis.core</groupId>
<artifactId>isis-core-viewer-restfulobjects-rendering</artifactId>
- <version>2.0.0-M1-SNAPSHOT</version>
+ <version>2.0.0-M2-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>org.apache.isis.core</groupId>
<artifactId>isis-core-viewer-restfulobjects-rendering</artifactId>
- <version>2.0.0-M1-SNAPSHOT</version>
+ <version>2.0.0-M2-SNAPSHOT</version>
<type>test-jar</type>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.apache.isis.core</groupId>
<artifactId>isis-core-viewer-restfulobjects-server</artifactId>
- <version>2.0.0-M1-SNAPSHOT</version>
+ <version>2.0.0-M2-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>org.apache.isis.core</groupId>
<artifactId>isis-core-viewer-restfulobjects-server</artifactId>
- <version>2.0.0-M1-SNAPSHOT</version>
+ <version>2.0.0-M2-SNAPSHOT</version>
<type>test-jar</type>
<scope>test</scope>
</dependency>
@@ -1305,12 +1305,12 @@ ${license.additional-notes}
<dependency>
<groupId>org.apache.isis.core</groupId>
<artifactId>isis-core-security</artifactId>
- <version>2.0.0-M1-SNAPSHOT</version>
+ <version>2.0.0-M2-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>org.apache.isis.core</groupId>
<artifactId>isis-core-security-shiro</artifactId>
- <version>2.0.0-M1-SNAPSHOT</version>
+ <version>2.0.0-M2-SNAPSHOT</version>
</dependency>
@@ -1318,41 +1318,41 @@ ${license.additional-notes}
<dependency>
<groupId>org.apache.isis.core</groupId>
<artifactId>isis-core-viewer-wicket-applib</artifactId>
- <version>2.0.0-M1-SNAPSHOT</version>
+ <version>2.0.0-M2-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>org.apache.isis.core</groupId>
<artifactId>isis-core-viewer-wicket-model</artifactId>
- <version>2.0.0-M1-SNAPSHOT</version>
+ <version>2.0.0-M2-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>org.apache.isis.core</groupId>
<artifactId>isis-core-viewer-wicket-model</artifactId>
- <version>2.0.0-M1-SNAPSHOT</version>
+ <version>2.0.0-M2-SNAPSHOT</version>
<scope>test</scope>
<type>test-jar</type>
</dependency>
<dependency>
<groupId>org.apache.isis.core</groupId>
<artifactId>isis-core-viewer-wicket-ui</artifactId>
- <version>2.0.0-M1-SNAPSHOT</version>
+ <version>2.0.0-M2-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>org.apache.isis.core</groupId>
<artifactId>isis-core-viewer-wicket-ui</artifactId>
- <version>2.0.0-M1-SNAPSHOT</version>
+ <version>2.0.0-M2-SNAPSHOT</version>
<scope>test</scope>
<type>test-jar</type>
</dependency>
<dependency>
<groupId>org.apache.isis.core</groupId>
<artifactId>isis-core-viewer-wicket-impl</artifactId>
- <version>2.0.0-M1-SNAPSHOT</version>
+ <version>2.0.0-M2-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>org.apache.isis.core</groupId>
<artifactId>isis-core-viewer-wicket-impl</artifactId>
- <version>2.0.0-M1-SNAPSHOT</version>
+ <version>2.0.0-M2-SNAPSHOT</version>
<scope>test</scope>
<type>test-jar</type>
</dependency>
@@ -1361,26 +1361,26 @@ ${license.additional-notes}
<dependency>
<groupId>org.apache.isis.tool</groupId>
<artifactId>isis-maven-plugin</artifactId>
- <version>2.0.0-M1-SNAPSHOT</version>
+ <version>2.0.0-M2-SNAPSHOT</version>
</dependency>
<!-- Maven dependencies -->
<dependency>
<groupId>org.apache.isis.mavendeps</groupId>
<artifactId>isis-mavendeps-intellij</artifactId>
- <version>2.0.0-M1-SNAPSHOT</version>
+ <version>2.0.0-M2-SNAPSHOT</version>
<type>pom</type>
</dependency>
<dependency>
<groupId>org.apache.isis.mavendeps</groupId>
<artifactId>isis-mavendeps-testing</artifactId>
- <version>2.0.0-M1-SNAPSHOT</version>
+ <version>2.0.0-M2-SNAPSHOT</version>
<type>pom</type>
</dependency>
<dependency>
<groupId>org.apache.isis.mavendeps</groupId>
<artifactId>isis-mavendeps-webapp</artifactId>
- <version>2.0.0-M1-SNAPSHOT</version>
+ <version>2.0.0-M2-SNAPSHOT</version>
<type>pom</type>
</dependency>
diff --git a/core/runtime/pom.xml b/core/runtime/pom.xml
index 564b638..85d14bb 100644
--- a/core/runtime/pom.xml
+++ b/core/runtime/pom.xml
@@ -23,7 +23,7 @@
<parent>
<groupId>org.apache.isis.core</groupId>
<artifactId>isis</artifactId>
- <version>2.0.0-M1-SNAPSHOT</version>
+ <version>2.0.0-M2-SNAPSHOT</version>
</parent>
<artifactId>isis-core-runtime</artifactId>
diff --git a/core/schema/pom.xml b/core/schema/pom.xml
index eb39ae7..52ac941 100644
--- a/core/schema/pom.xml
+++ b/core/schema/pom.xml
@@ -23,7 +23,7 @@
<parent>
<groupId>org.apache.isis.core</groupId>
<artifactId>isis</artifactId>
- <version>2.0.0-M1-SNAPSHOT</version>
+ <version>2.0.0-M2-SNAPSHOT</version>
</parent>
<artifactId>isis-core-schema</artifactId>
diff --git a/core/security-shiro/pom.xml b/core/security-shiro/pom.xml
index 13535bb..249459a 100644
--- a/core/security-shiro/pom.xml
+++ b/core/security-shiro/pom.xml
@@ -23,11 +23,11 @@
<parent>
<groupId>org.apache.isis.core</groupId>
<artifactId>isis</artifactId>
- <version>2.0.0-M1-SNAPSHOT</version>
+ <version>2.0.0-M2-SNAPSHOT</version>
</parent>
<artifactId>isis-core-security-shiro</artifactId>
- <version>2.0.0-M1-SNAPSHOT</version>
+ <version>2.0.0-M2-SNAPSHOT</version>
<name>Apache Isis Security Shiro</name>
@@ -70,7 +70,7 @@
<dependency>
<groupId>org.apache.isis.core</groupId>
<artifactId>isis-core-security-shiro</artifactId>
- <version>2.0.0-M1-SNAPSHOT</version>
+ <version>2.0.0-M2-SNAPSHOT</version>
</dependency>
</dependencies>
</dependencyManagement>
diff --git a/core/security/pom.xml b/core/security/pom.xml
index 03fc5e7..cf44483 100644
--- a/core/security/pom.xml
+++ b/core/security/pom.xml
@@ -23,7 +23,7 @@
<parent>
<groupId>org.apache.isis.core</groupId>
<artifactId>isis</artifactId>
- <version>2.0.0-M1-SNAPSHOT</version>
+ <version>2.0.0-M2-SNAPSHOT</version>
</parent>
<artifactId>isis-core-security</artifactId>
diff --git a/core/specsupport/pom.xml b/core/specsupport/pom.xml
index 6ae7e18..a31d9df 100644
--- a/core/specsupport/pom.xml
+++ b/core/specsupport/pom.xml
@@ -15,7 +15,7 @@
<parent>
<groupId>org.apache.isis.core</groupId>
<artifactId>isis</artifactId>
- <version>2.0.0-M1-SNAPSHOT</version>
+ <version>2.0.0-M2-SNAPSHOT</version>
</parent>
<artifactId>isis-core-specsupport</artifactId>
diff --git a/core/unittestsupport/pom.xml b/core/unittestsupport/pom.xml
index 49972f5..9c36059 100644
--- a/core/unittestsupport/pom.xml
+++ b/core/unittestsupport/pom.xml
@@ -23,7 +23,7 @@
<parent>
<groupId>org.apache.isis.core</groupId>
<artifactId>isis</artifactId>
- <version>2.0.0-M1-SNAPSHOT</version>
+ <version>2.0.0-M2-SNAPSHOT</version>
</parent>
<artifactId>isis-core-unittestsupport</artifactId>
diff --git a/core/viewer-restfulobjects-applib/pom.xml b/core/viewer-restfulobjects-applib/pom.xml
index e3206ae..ab27a7c 100644
--- a/core/viewer-restfulobjects-applib/pom.xml
+++ b/core/viewer-restfulobjects-applib/pom.xml
@@ -23,7 +23,7 @@
<parent>
<groupId>org.apache.isis.core</groupId>
<artifactId>isis</artifactId>
- <version>2.0.0-M1-SNAPSHOT</version>
+ <version>2.0.0-M2-SNAPSHOT</version>
</parent>
<artifactId>isis-core-viewer-restfulobjects-applib</artifactId>
diff --git a/core/viewer-restfulobjects-rendering/pom.xml b/core/viewer-restfulobjects-rendering/pom.xml
index 7a9feb3..c581b80 100644
--- a/core/viewer-restfulobjects-rendering/pom.xml
+++ b/core/viewer-restfulobjects-rendering/pom.xml
@@ -23,7 +23,7 @@
<parent>
<groupId>org.apache.isis.core</groupId>
<artifactId>isis</artifactId>
- <version>2.0.0-M1-SNAPSHOT</version>
+ <version>2.0.0-M2-SNAPSHOT</version>
</parent>
<artifactId>isis-core-viewer-restfulobjects-rendering</artifactId>
diff --git a/core/viewer-restfulobjects-server/pom.xml b/core/viewer-restfulobjects-server/pom.xml
index 1bae1d0..39519ef 100644
--- a/core/viewer-restfulobjects-server/pom.xml
+++ b/core/viewer-restfulobjects-server/pom.xml
@@ -23,7 +23,7 @@
<parent>
<groupId>org.apache.isis.core</groupId>
<artifactId>isis</artifactId>
- <version>2.0.0-M1-SNAPSHOT</version>
+ <version>2.0.0-M2-SNAPSHOT</version>
</parent>
<artifactId>isis-core-viewer-restfulobjects-server</artifactId>
diff --git a/core/viewer-wicket-applib/pom.xml b/core/viewer-wicket-applib/pom.xml
index a415304..11ebfb0 100644
--- a/core/viewer-wicket-applib/pom.xml
+++ b/core/viewer-wicket-applib/pom.xml
@@ -24,7 +24,7 @@
<parent>
<groupId>org.apache.isis.core</groupId>
<artifactId>isis</artifactId>
- <version>2.0.0-M1-SNAPSHOT</version>
+ <version>2.0.0-M2-SNAPSHOT</version>
</parent>
<artifactId>isis-core-viewer-wicket-applib</artifactId>
diff --git a/core/viewer-wicket-impl/pom.xml b/core/viewer-wicket-impl/pom.xml
index 9c11554..33a7f12 100644
--- a/core/viewer-wicket-impl/pom.xml
+++ b/core/viewer-wicket-impl/pom.xml
@@ -24,7 +24,7 @@
<parent>
<groupId>org.apache.isis.core</groupId>
<artifactId>isis</artifactId>
- <version>2.0.0-M1-SNAPSHOT</version>
+ <version>2.0.0-M2-SNAPSHOT</version>
</parent>
<name>Apache Isis Wicket Viewer Implementation</name>
diff --git a/core/viewer-wicket-model/pom.xml b/core/viewer-wicket-model/pom.xml
index aa7a091..7dd62f8 100644
--- a/core/viewer-wicket-model/pom.xml
+++ b/core/viewer-wicket-model/pom.xml
@@ -24,7 +24,7 @@
<parent>
<groupId>org.apache.isis.core</groupId>
<artifactId>isis</artifactId>
- <version>2.0.0-M1-SNAPSHOT</version>
+ <version>2.0.0-M2-SNAPSHOT</version>
</parent>
<artifactId>isis-core-viewer-wicket-model</artifactId>
diff --git a/core/viewer-wicket-ui/pom.xml b/core/viewer-wicket-ui/pom.xml
index edf4621..8b99385 100644
--- a/core/viewer-wicket-ui/pom.xml
+++ b/core/viewer-wicket-ui/pom.xml
@@ -24,7 +24,7 @@
<parent>
<groupId>org.apache.isis.core</groupId>
<artifactId>isis</artifactId>
- <version>2.0.0-M1-SNAPSHOT</version>
+ <version>2.0.0-M2-SNAPSHOT</version>
</parent>
<artifactId>isis-core-viewer-wicket-ui</artifactId>
diff --git a/core/webserver/pom.xml b/core/webserver/pom.xml
index 24ec1d8..0ef3631 100644
--- a/core/webserver/pom.xml
+++ b/core/webserver/pom.xml
@@ -23,7 +23,7 @@
<parent>
<groupId>org.apache.isis.core</groupId>
<artifactId>isis</artifactId>
- <version>2.0.0-M1-SNAPSHOT</version>
+ <version>2.0.0-M2-SNAPSHOT</version>
</parent>
<artifactId>isis-core-webserver</artifactId>
diff --git a/core/wrapper/pom.xml b/core/wrapper/pom.xml
index 3d2f9a8..8f839f3 100644
--- a/core/wrapper/pom.xml
+++ b/core/wrapper/pom.xml
@@ -23,7 +23,7 @@
<parent>
<groupId>org.apache.isis.core</groupId>
<artifactId>isis</artifactId>
- <version>2.0.0-M1-SNAPSHOT</version>
+ <version>2.0.0-M2-SNAPSHOT</version>
</parent>
<artifactId>isis-core-wrapper</artifactId>
diff --git a/example/application/helloworld/pom.xml b/example/application/helloworld/pom.xml
index 89713a5..778632a 100644
--- a/example/application/helloworld/pom.xml
+++ b/example/application/helloworld/pom.xml
@@ -29,7 +29,7 @@
<groupId>org.apache.isis.example.application</groupId>
<artifactId>helloworld</artifactId>
- <version>2.0.0-M1-SNAPSHOT</version>
+ <version>2.0.0-M2-SNAPSHOT</version>
<name>HelloWorld</name>
diff --git a/example/application/simpleapp/application/pom.xml b/example/application/simpleapp/application/pom.xml
index e46f103..05fb986 100644
--- a/example/application/simpleapp/application/pom.xml
+++ b/example/application/simpleapp/application/pom.xml
@@ -23,7 +23,7 @@
<parent>
<groupId>org.apache.isis.example.application</groupId>
<artifactId>simpleapp</artifactId>
- <version>2.0.0-M1-SNAPSHOT</version>
+ <version>2.0.0-M2-SNAPSHOT</version>
</parent>
<artifactId>simpleapp-application</artifactId>
diff --git a/example/application/simpleapp/module-simple/pom.xml b/example/application/simpleapp/module-simple/pom.xml
index 4910509..c605819 100644
--- a/example/application/simpleapp/module-simple/pom.xml
+++ b/example/application/simpleapp/module-simple/pom.xml
@@ -23,7 +23,7 @@
<parent>
<groupId>org.apache.isis.example.application</groupId>
<artifactId>simpleapp</artifactId>
- <version>2.0.0-M1-SNAPSHOT</version>
+ <version>2.0.0-M2-SNAPSHOT</version>
</parent>
<artifactId>simpleapp-module-simple</artifactId>
diff --git a/example/application/simpleapp/pom.xml b/example/application/simpleapp/pom.xml
index 2addcd7..b38ee1b 100644
--- a/example/application/simpleapp/pom.xml
+++ b/example/application/simpleapp/pom.xml
@@ -29,7 +29,7 @@
<groupId>org.apache.isis.example.application</groupId>
<artifactId>simpleapp</artifactId>
- <version>2.0.0-M1-SNAPSHOT</version>
+ <version>2.0.0-M2-SNAPSHOT</version>
<name>SimpleApp Parent</name>
diff --git a/example/application/simpleapp/webapp/pom.xml b/example/application/simpleapp/webapp/pom.xml
index da6eea8..b1ad666 100644
--- a/example/application/simpleapp/webapp/pom.xml
+++ b/example/application/simpleapp/webapp/pom.xml
@@ -23,7 +23,7 @@
<parent>
<groupId>org.apache.isis.example.application</groupId>
<artifactId>simpleapp</artifactId>
- <version>2.0.0-M1-SNAPSHOT</version>
+ <version>2.0.0-M2-SNAPSHOT</version>
</parent>
<artifactId>simpleapp-webapp</artifactId>
diff --git a/example/archetype/helloworld/pom.xml b/example/archetype/helloworld/pom.xml
index 350cfea..90842d8 100644
--- a/example/archetype/helloworld/pom.xml
+++ b/example/archetype/helloworld/pom.xml
@@ -21,7 +21,7 @@
<modelVersion>4.0.0</modelVersion>
<groupId>org.apache.isis.archetype</groupId>
<artifactId>helloworld-archetype</artifactId>
- <version>2.0.0-M1-SNAPSHOT</version>
+ <version>2.0.0-M2-SNAPSHOT</version>
<packaging>maven-archetype</packaging>
<name>helloworld-archetype</name>
<build>
diff --git a/example/archetype/simpleapp/pom.xml b/example/archetype/simpleapp/pom.xml
index a432bb2..646c9dc 100644
--- a/example/archetype/simpleapp/pom.xml
+++ b/example/archetype/simpleapp/pom.xml
@@ -21,7 +21,7 @@
<modelVersion>4.0.0</modelVersion>
<groupId>org.apache.isis.archetype</groupId>
<artifactId>simpleapp-archetype</artifactId>
- <version>2.0.0-M1-SNAPSHOT</version>
+ <version>2.0.0-M2-SNAPSHOT</version>
<packaging>maven-archetype</packaging>
<name>simpleapp-archetype</name>
<build>
@@ -70,7 +70,7 @@
<parent>
<groupId>org.apache.isis.core</groupId>
<artifactId>isis</artifactId>
- <version>2.0.0-M1-SNAPSHOT</version>
+ <version>2.0.0-M2-SNAPSHOT</version>
<relativePath>../../../core/pom.xml</relativePath>
</parent>
<properties>
diff --git a/pom.xml b/pom.xml
index b376ff4..7914330 100644
--- a/pom.xml
+++ b/pom.xml
@@ -21,7 +21,7 @@
<groupId>org.apache.isis</groupId>
<artifactId>isis-all</artifactId>
- <version>2.0.0-M1-SNAPSHOT</version>
+ <version>2.0.0-M2-SNAPSHOT</version>
<packaging>pom</packaging>
--
To stop receiving notification emails like this one, please contact
ahuber@apache.org.
[isis] 01/34: ISIS-1276: updates references for datanucleus.
Posted by ah...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
ahuber pushed a commit to branch dev/2.0.0-M2
in repository https://gitbox.apache.org/repos/asf/isis.git
commit f4693d6d11ee0661882ffda0f22c74b774a10f52
Author: Dan Haywood <da...@haywood-associates.co.uk>
AuthorDate: Mon Sep 18 22:13:20 2017 +0100
ISIS-1276: updates references for datanucleus.
Also updated org.incode:incode-build to 3-SNAPSHOT, and java-mavenmixin-datanucleus to 0.0.5-SNAPSHOT
---
core/applib/pom.xml | 39 ++--------------------------------
core/pom.xml | 19 ++++++++---------
core/unittestsupport/pom.xml | 5 ++---
example/application/helloworld/pom.xml | 2 +-
example/application/simpleapp/pom.xml | 2 +-
5 files changed, 15 insertions(+), 52 deletions(-)
diff --git a/core/applib/pom.xml b/core/applib/pom.xml
index 2d84f74..9cfea89 100644
--- a/core/applib/pom.xml
+++ b/core/applib/pom.xml
@@ -56,41 +56,6 @@
</excludes>
</resource>
</resources>
- <pluginManagement>
- <plugins>
- <!--This plugin's configuration is used to store Eclipse m2e settings only. It has no influence on the Maven build itself.-->
- <plugin>
- <groupId>org.eclipse.m2e</groupId>
- <artifactId>lifecycle-mapping</artifactId>
- <version>1.0.0</version>
- <configuration>
- <lifecycleMappingMetadata>
- <pluginExecutions>
- <pluginExecution>
- <pluginExecutionFilter>
- <groupId>
- org.datanucleus
- </groupId>
- <artifactId>
- datanucleus-maven-plugin
- </artifactId>
- <versionRange>
- [4.0.0-release,)
- </versionRange>
- <goals>
- <goal>enhance</goal>
- </goals>
- </pluginExecutionFilter>
- <action>
- <ignore />
- </action>
- </pluginExecution>
- </pluginExecutions>
- </lifecycleMappingMetadata>
- </configuration>
- </plugin>
- </plugins>
- </pluginManagement>
</build>
<dependencies>
@@ -132,8 +97,8 @@
<!-- DataNucleus' standard JDO support -->
<dependency>
- <groupId>javax.jdo</groupId>
- <artifactId>jdo-api</artifactId>
+ <groupId>org.datanucleus</groupId>
+ <artifactId>javax.jdo</artifactId>
</dependency>
<!-- DataNucleus' (proprietary) type-safe query support-->
diff --git a/core/pom.xml b/core/pom.xml
index c9475a8..72f9373 100644
--- a/core/pom.xml
+++ b/core/pom.xml
@@ -87,14 +87,13 @@
[6] https://github.com/moment/moment/blob/develop/LICENSE</license.additional-notes>
<!-- Datanucleus Objectstore -->
- <jdo-api.version>3.1</jdo-api.version>
+ <jdo-api.version>3.2.0-m7</jdo-api.version>
- <datanucleus-core.version>4.1.7</datanucleus-core.version>
- <datanucleus-api-jdo.version>4.1.1</datanucleus-api-jdo.version>
- <datanucleus-jdo-query.version>4.0.5</datanucleus-jdo-query.version>
- <datanucleus-rdbms.version>4.1.9</datanucleus-rdbms.version>
-
- <datanucleus-jodatime.version>4.1.0-release</datanucleus-jodatime.version>
+ <datanucleus-core.version>5.1.2</datanucleus-core.version>
+ <datanucleus-api-jdo.version>5.1.2</datanucleus-api-jdo.version>
+ <datanucleus-jdo-query.version>5.0.2</datanucleus-jdo-query.version>
+ <datanucleus-rdbms.version>5.1.2</datanucleus-rdbms.version>
+ <datanucleus-jodatime.version>5.1.0-release</datanucleus-jodatime.version>
<!--
ISIS-1288: seen integration tests to fail;
domain object date holding 1-Aug-2015 after xactn retrieved as 31-Jul-2015
@@ -103,7 +102,7 @@
<datanucleus-jodatime.version>4.1.1</datanucleus-jodatime.version>
-->
- <datanucleus-maven-plugin.version>4.0.2</datanucleus-maven-plugin.version>
+ <datanucleus-maven-plugin.version>5.0.2</datanucleus-maven-plugin.version>
<shiro.version>1.2.6</shiro.version>
@@ -2020,8 +2019,8 @@ ${license.additional-notes}
<!-- DataNucleus -->
<dependency>
- <groupId>javax.jdo</groupId>
- <artifactId>jdo-api</artifactId>
+ <groupId>org.datanucleus</groupId>
+ <artifactId>javax.jdo</artifactId>
<version>${jdo-api.version}</version>
</dependency>
<dependency>
diff --git a/core/unittestsupport/pom.xml b/core/unittestsupport/pom.xml
index 51a84e7..49972f5 100644
--- a/core/unittestsupport/pom.xml
+++ b/core/unittestsupport/pom.xml
@@ -61,9 +61,8 @@
</dependency>
<dependency>
- <groupId>javax.jdo</groupId>
- <artifactId>jdo-api</artifactId>
- <version>${jdo-api.version}</version>
+ <groupId>org.datanucleus</groupId>
+ <artifactId>javax.jdo</artifactId>
<optional>true</optional>
</dependency>
diff --git a/example/application/helloworld/pom.xml b/example/application/helloworld/pom.xml
index c4570e3..002742f 100644
--- a/example/application/helloworld/pom.xml
+++ b/example/application/helloworld/pom.xml
@@ -24,7 +24,7 @@
<parent>
<groupId>org.incode</groupId>
<artifactId>incode-build</artifactId>
- <version>2</version>
+ <version>3-SNAPSHOT</version>
</parent>
<groupId>org.apache.isis.example.application</groupId>
diff --git a/example/application/simpleapp/pom.xml b/example/application/simpleapp/pom.xml
index 84de916..b2af7e6 100644
--- a/example/application/simpleapp/pom.xml
+++ b/example/application/simpleapp/pom.xml
@@ -24,7 +24,7 @@
<parent>
<groupId>org.incode</groupId>
<artifactId>incode-build</artifactId>
- <version>2</version>
+ <version>3-SNAPSHOT</version>
</parent>
<groupId>org.apache.isis.example.application</groupId>
--
To stop receiving notification emails like this one, please contact
ahuber@apache.org.
[isis] 03/34: ISIS-1276: updates applib,
replaces references of TypesafeQuery to be instead JDOQLTypedQuery
Posted by ah...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
ahuber pushed a commit to branch dev/2.0.0-M2
in repository https://gitbox.apache.org/repos/asf/isis.git
commit 9e4caa88e17606b940766644f5be68ce59e71443
Author: Dan Haywood <da...@haywood-associates.co.uk>
AuthorDate: Mon Sep 18 22:17:54 2017 +0100
ISIS-1276: updates applib, replaces references of TypesafeQuery to be instead JDOQLTypedQuery
---
.../org/apache/isis/applib/services/jdosupport/IsisJdoSupport.java | 7 +++----
1 file changed, 3 insertions(+), 4 deletions(-)
diff --git a/core/applib/src/main/java/org/apache/isis/applib/services/jdosupport/IsisJdoSupport.java b/core/applib/src/main/java/org/apache/isis/applib/services/jdosupport/IsisJdoSupport.java
index 4ca5c10..75a4e0f 100644
--- a/core/applib/src/main/java/org/apache/isis/applib/services/jdosupport/IsisJdoSupport.java
+++ b/core/applib/src/main/java/org/apache/isis/applib/services/jdosupport/IsisJdoSupport.java
@@ -23,10 +23,9 @@ import java.util.Collection;
import java.util.List;
import java.util.Map;
+import javax.jdo.JDOQLTypedQuery;
import javax.jdo.PersistenceManager;
-
-import org.datanucleus.query.typesafe.BooleanExpression;
-import org.datanucleus.query.typesafe.TypesafeQuery;
+import javax.jdo.query.BooleanExpression;
import org.apache.isis.applib.annotation.Programmatic;
@@ -132,5 +131,5 @@ public interface IsisJdoSupport {
* </p>
*/
@Programmatic
- <T> TypesafeQuery<T> newTypesafeQuery(Class<T> cls);
+ <T> JDOQLTypedQuery<T> newTypesafeQuery(Class<T> cls);
}
--
To stop receiving notification emails like this one, please contact
ahuber@apache.org.