[jira] [Commented] (ISIS-2799) JPA: Framework caches and does not re-read changed state from the database.

2021-07-26 Thread ASF subversion and git services (Jira)


[ 
https://issues.apache.org/jira/browse/ISIS-2799?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17387282#comment-17387282
 ] 

ASF subversion and git services commented on ISIS-2799:
---

Commit 03aedde83511b8748904286c5f5ef754ce0fa9e6 in isis's branch 
refs/heads/master from danhaywood
[ https://gitbox.apache.org/repos/asf?p=isis.git;h=03aedde ]

ISIS-2799: adds docs on disabling JPA caching


> JPA: Framework caches and does not re-read changed state from the database.
> ---
>
> Key: ISIS-2799
> URL: https://issues.apache.org/jira/browse/ISIS-2799
> Project: Isis
>  Issue Type: Bug
>  Components: Isis Persistence JPA
>Affects Versions: 2.0.0-M5
>Reporter: Daniel Keir Haywood
>Assignee: Daniel Keir Haywood
>Priority: Blocker
> Fix For: 2.0.0-M6
>
>
> to reproduce:
>  * run up JPA simpleapp
>  * save an object
>  * using h2 console, update the name manually
>  * reload the object through the UI (eg click on the title)  - the change is 
> not picked up, ie the database is not read.
>  
> 
> It seems that we use 
> the symptom seems to be that we cache EntityManager's in JpaContext, which 
> might be ok if they are proxied thread-locals; however the underlying aren't 
> disposed of.
> We notice that EclipseLink creates a "NoServerPlatform", meaning that it 
> doesn't recognise us as being in a container.
> We also notice that JPA creates an LocalContainerEntityManagerFactoryBean, 
> whereas perhaps it should create a LocalEntityManagerFactoryBean.  
> [https://stackoverflow.com/a/6157339/56880] 
> some docs:
> [https://www.eclipse.org/eclipselink/documentation/2.6/solutions/testingjpa001.htm]
> [https://www.baeldung.com/jpa-hibernate-persistence-context] - we want to use 
> "transaction-scoped" persistence context rather than "extended" ... and we 
> are, I think.
>  
>  



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Commented] (ISIS-2799) JPA: Framework caches and does not re-read changed state from the database.

2021-07-20 Thread Daniel Keir Haywood (Jira)


[ 
https://issues.apache.org/jira/browse/ISIS-2799?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17383980#comment-17383980
 ] 

Daniel Keir Haywood commented on ISIS-2799:
---

more docs:

[https://wiki.eclipse.org/EclipseLink/FAQ/How_to_disable_the_shared_cache%3F]

[https://wiki.eclipse.org/EclipseLink/UserGuide/JPA/Basic_JPA_Development/Caching]

[https://wiki.eclipse.org/EclipseLink/Examples/JPA/Caching]

> JPA: Framework caches and does not re-read changed state from the database.
> ---
>
> Key: ISIS-2799
> URL: https://issues.apache.org/jira/browse/ISIS-2799
> Project: Isis
>  Issue Type: Bug
>  Components: Isis Persistence JPA
>Affects Versions: 2.0.0-M5
>Reporter: Daniel Keir Haywood
>Assignee: Daniel Keir Haywood
>Priority: Blocker
> Fix For: 2.0.0-M6
>
>
> to reproduce:
>  * run up JPA simpleapp
>  * save an object
>  * using h2 console, update the name manually
>  * reload the object through the UI (eg click on the title)  - the change is 
> not picked up, ie the database is not read.
>  
> 
> It seems that we use 
> the symptom seems to be that we cache EntityManager's in JpaContext, which 
> might be ok if they are proxied thread-locals; however the underlying aren't 
> disposed of.
> We notice that EclipseLink creates a "NoServerPlatform", meaning that it 
> doesn't recognise us as being in a container.
> We also notice that JPA creates an LocalContainerEntityManagerFactoryBean, 
> whereas perhaps it should create a LocalEntityManagerFactoryBean.  
> [https://stackoverflow.com/a/6157339/56880] 
> some docs:
> [https://www.eclipse.org/eclipselink/documentation/2.6/solutions/testingjpa001.htm]
> [https://www.baeldung.com/jpa-hibernate-persistence-context] - we want to use 
> "transaction-scoped" persistence context rather than "extended" ... and we 
> are, I think.
>  
>  



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Commented] (ISIS-2799) JPA: Framework caches and does not re-read changed state from the database.

2021-07-19 Thread Andi Huber (Jira)


[ 
https://issues.apache.org/jira/browse/ISIS-2799?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17383538#comment-17383538
 ] 

Andi Huber commented on ISIS-2799:
--

eclipselink.cache.shared.default=false 
seems to do the trick

in depth info on caching can be found here
https://www.eclipse.org/eclipselink/documentation/2.7/concepts/cache.htm#CDEFHHEH

> JPA: Framework caches and does not re-read changed state from the database.
> ---
>
> Key: ISIS-2799
> URL: https://issues.apache.org/jira/browse/ISIS-2799
> Project: Isis
>  Issue Type: Bug
>  Components: Isis Persistence JPA
>Affects Versions: 2.0.0-M5
>Reporter: Daniel Keir Haywood
>Assignee: Daniel Keir Haywood
>Priority: Blocker
> Fix For: 2.0.0-M6
>
>
> to reproduce:
>  * run up JPA simpleapp
>  * save an object
>  * using h2 console, update the name manually
>  * reload the object through the UI (eg click on the title)  - the change is 
> not picked up, ie the database is not read.
>  
> 
> It seems that we use 
> the symptom seems to be that we cache EntityManager's in JpaContext, which 
> might be ok if they are proxied thread-locals; however the underlying aren't 
> disposed of.
> We notice that EclipseLink creates a "NoServerPlatform", meaning that it 
> doesn't recognise us as being in a container.
> We also notice that JPA creates an LocalContainerEntityManagerFactoryBean, 
> whereas perhaps it should create a LocalEntityManagerFactoryBean.  
> [https://stackoverflow.com/a/6157339/56880] 
> some docs:
> [https://www.eclipse.org/eclipselink/documentation/2.6/solutions/testingjpa001.htm]
> [https://www.baeldung.com/jpa-hibernate-persistence-context] - we want to use 
> "transaction-scoped" persistence context rather than "extended" ... and we 
> are, I think.
>  
>  



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Commented] (ISIS-2799) JPA: Framework caches and does not re-read changed state from the database.

2021-07-15 Thread Daniel Keir Haywood (Jira)


[ 
https://issues.apache.org/jira/browse/ISIS-2799?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17381456#comment-17381456
 ] 

Daniel Keir Haywood commented on ISIS-2799:
---

also [https://github.com/gavlyukovskiy/spring-boot-data-source-decorator] to 
debug

> JPA: Framework caches and does not re-read changed state from the database.
> ---
>
> Key: ISIS-2799
> URL: https://issues.apache.org/jira/browse/ISIS-2799
> Project: Isis
>  Issue Type: Bug
>  Components: Isis Persistence JPA
>Affects Versions: 2.0.0-M5
>Reporter: Daniel Keir Haywood
>Assignee: Daniel Keir Haywood
>Priority: Blocker
> Fix For: 2.0.0-M6
>
>
> It seems that we use 
> the symptom seems to be that we cache EntityManager's in JpaContext, which 
> might be ok if they are proxied thread-locals; however the underlying aren't 
> disposed of.
> We notice that EclipseLink creates a "NoServerPlatform", meaning that it 
> doesn't recognise us as being in a container.
> We also notice that JPA creates an LocalContainerEntityManagerFactoryBean, 
> whereas perhaps it should create a LocalEntityManagerFactoryBean.  
> [https://stackoverflow.com/a/6157339/56880] 
> some docs:
> [https://www.eclipse.org/eclipselink/documentation/2.6/solutions/testingjpa001.htm]
> [https://www.baeldung.com/jpa-hibernate-persistence-context] - we want to use 
> "transaction-scoped" persistence context rather than "extended" ... and we 
> are, I think.
>  
>  



--
This message was sent by Atlassian Jira
(v8.3.4#803005)