Il s’agit d’un agrégateur de savoir à partir de livres.
N’hésitez pas à aller le visiter: https://prodeej.com
Il s’agit d’un agrégateur de savoir à partir de livres.
N’hésitez pas à aller le visiter: https://prodeej.com
Avec un ami, nous avons commencé il y a deux ans maintenant de créer une plate-forme de réservation de week-end.
Le site est en ligne depuis juillet dernier. Vous y trouverez des week-ends sur toute la France.
Vous trouverez des idées pour vos prochains week-ends sur
et vous pourrez les concrétiser sur
On our UNCODE powered website, some feature images were not displayed. It was the wp_get_image_editor script that run on error. To solve the issue, we have installed php-imagick (php-gd can work as well).
https://www.baeldung.com/spring-data-neo4j-intro explains how to configure Spring with Neo4J and use repositories to get data.
https://neo4j.com/docs/ogm-manual/current/tutorial/#tutorial-session shows how to create a CRUD service using the Session object.
As written in the Session Javadoc, Session object is not thread safe.

Most of our DAO objects are singletons used by many threads. So the Session class member should be replaced by a SessionFactory which will create a new Session each time we need it.

The Service calling the DAO is annotated with @Transactional to have transaction support on all his methods.

Running this code causes a org.neo4j.ogm.exception.core.TransactionManagerException: Transaction is not current for this thread
The code of Neo4jTransactionManager shows that a new Session is opened when starting a transaction.
And it is stored in the TransactionSynchronizationManager, a « thread local holder » that is cleared at the end of the transaction.

The created Session can easily be retrieved through the TransactionSynchronizationManager.

The following DAO work fine if we are in a Spring-managed transactional context

On a project I decided to use Soap-UI to test REST services. Since I wanted to add some DBUnit datasets before executing the test, I decided to use it with jUnit as described here.
At the beginning everything worked well but as more tests were added, a GC Overhead appears and increasing the Heap Space and the Permgen did not resolved anything.
I will now tell you how this GC Overhead was resolved.
When a GC Overhead or any memory problem occurs the execution must be monitored with jvisualvm a tool shipped with the JDK

It appears that the memory increase along the build without been released (memory leak).

To analyze the memory, a dump must be fetched. This can easily be done in jvisualvm by clicking on Heap Dump.

Memory Analyzer Tool is a tool that analyze the memory. It can find memory leaks.
When opening the dump, Memory Analyzer Tool find immediately the problem

By clicking on details, we can see what happens

The object InferredSchemaManager from Soap-UI has a Vector containing 2024 objects that occupies more than 1 GB of memory. It is a very good candidate for memory leak.
To see when this Vector is filled, we must have a look at the code of Soap-UI. It can be easily found on gitHub repository https://github.com/SmartBear/soapui
By opening InferredSchemaManager, we can see that there are static collections : perfect candidates for memory leaks because they stay alive as long as the application runs.

And we see that it is filled each time we load the schema of a rest service

By looking at what the utility of schemas map, we see that it is just a cache for loading schemas so empty it will just have performances issues.
Luckily, there is a release method that empty the table

By watching the call hierarchy we can see that this method is called by WsdlProject.release().


By watching what this method does we see that it releases project resources. So we can call it at the end of our tests.

And we see that we don’t have neither memory leaks nor GC Overhead anymore.

It’s weird because this method is never mentioned in the documentation.
