You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@isis.apache.org by da...@apache.org on 2021/04/05 09:55:08 UTC

[isis-app-helloworld] branch jpa-SNAPSHOT updated: adds notes on eclipselink.weaving

This is an automated email from the ASF dual-hosted git repository.

danhaywood pushed a commit to branch jpa-SNAPSHOT
in repository https://gitbox.apache.org/repos/asf/isis-app-helloworld.git


The following commit(s) were added to refs/heads/jpa-SNAPSHOT by this push:
     new 3d517c0  adds notes on eclipselink.weaving
3d517c0 is described below

commit 3d517c03566c196bc53e98c7f7862198f1b3768a
Author: danhaywood <da...@haywood-associates.co.uk>
AuthorDate: Mon Apr 5 10:54:46 2021 +0100

    adds notes on eclipselink.weaving
---
 lib/README.txt                                           |   3 +++
 lib/spring-instrument-5.3.5.jar                          | Bin 0 -> 7429 bytes
 .../modules/hello/dom/hwo/HelloWorldObjects.java         |   2 ++
 src/main/resources/application.yml                       |  13 ++++++++-----
 src/main/resources/config/application.properties         |   2 +-
 5 files changed, 14 insertions(+), 6 deletions(-)

diff --git a/lib/README.txt b/lib/README.txt
new file mode 100644
index 0000000..8cd1712
--- /dev/null
+++ b/lib/README.txt
@@ -0,0 +1,3 @@
+If eclipselink.weaving=true, then run using JVM argument:
+
+ -javaagent:lib/spring-instrument-5.3.5.jar
diff --git a/lib/spring-instrument-5.3.5.jar b/lib/spring-instrument-5.3.5.jar
new file mode 100644
index 0000000..164db3b
Binary files /dev/null and b/lib/spring-instrument-5.3.5.jar differ
diff --git a/src/main/java/domainapp/modules/hello/dom/hwo/HelloWorldObjects.java b/src/main/java/domainapp/modules/hello/dom/hwo/HelloWorldObjects.java
index c0dd034..0231d8f 100644
--- a/src/main/java/domainapp/modules/hello/dom/hwo/HelloWorldObjects.java
+++ b/src/main/java/domainapp/modules/hello/dom/hwo/HelloWorldObjects.java
@@ -2,6 +2,8 @@ package domainapp.modules.hello.dom.hwo;
 
 import java.util.List;
 
+import javax.inject.Inject;
+
 import org.apache.isis.applib.annotation.Action;
 import org.apache.isis.applib.annotation.ActionLayout;
 import org.apache.isis.applib.annotation.DomainService;
diff --git a/src/main/resources/application.yml b/src/main/resources/application.yml
index 21b0664..45e8658 100644
--- a/src/main/resources/application.yml
+++ b/src/main/resources/application.yml
@@ -48,11 +48,13 @@ isis:
       auto-create-schemas: hello
       create-schema-sql-template: "CREATE SCHEMA IF NOT EXISTS %S"
 
-# workaround for https://issues.apache.org/jira/browse/ISIS-2583: not used, but needed to prevent NPE
-datanucleus:
-  cache:
-    level2:
-      type: soft
+eclipselink:
+  # if enabled, then must be run with JVM arg:
+  # -javaagent:lib/spring-instrument-5.3.5.jar
+  weaving: false
+  # if weaving subproperties are required, then specify all eclipselink.weaving
+  # properties using application.properties instead (it's not possible to
+  # specify both eclipselink.weaving property and its subsproperties using yaml syntax)
 
 resteasy:
   jaxrs:
@@ -66,3 +68,4 @@ server:
 spring:
   banner:
     location: banner.txt
+
diff --git a/src/main/resources/config/application.properties b/src/main/resources/config/application.properties
index 2b01a88..1593d38 100644
--- a/src/main/resources/config/application.properties
+++ b/src/main/resources/config/application.properties
@@ -8,4 +8,4 @@
 #
 
 spring.datasource.platform=h2
-spring.datasource.url=jdbc:h2:mem:helloworld
\ No newline at end of file
+spring.datasource.url=jdbc:h2:mem:helloworld