Mongo based session persistence using SparkJava (jetty 9.4.x) - session

We are Implementing Mongo based session persistence using SparkJava (version 2.6.0 with Jetty 9.4.x). we required to store jetty session into mongoDB. How i can achieve it in SparkJava? I found many example of using MongoSessionIdManager and MongoSessionManager with jetty-nosql (9.3.x). but MongoSessionIdManager and MongoSessionManager no longer exist in jetty-nosql (9.4.x).
I think this topic was discussed at https://github.com/perwendel/spark/pull/836 but not able to find example of implementation..
Thanks a lot in advance !!

I Got it working after customizing SparkJava library and generated spark-core-2.6.1-SNAPSHOT.jar.
added working Example of MongoDB and JDBC based session clustering using SpakrJava at My GitHub repository

Related

Need and example using panache Reactive JPA

I found the quarkus-hibernate-reactive-panache extension but I couldn't find an example of it using Panache orm with reactive repositories (In my case I use postgresql).
PanacheRepositoryBase.java seems that works as I need (smallrye.mutiny.*), could anybody link me to an example?
Thanks in advace, and nice work on quarkus project.
Regards
UPDATE: A quickstart is now available on the Quarkus quickstarts development branch: https://github.com/quarkusio/quarkus-quickstarts/tree/development/hibernate-reactive-panache-quickstart
Old answer:
I've just created a new quickstart for Hibernate Reactive with Panache in Quarkus:
https://github.com/quarkusio/quarkus-quickstarts/pull/809
Hopefully, it will be included soon in the list of quickstarts, but you can have a look already if you want to play with it.

Spring Boot - Hazelcast Session implementation

I have Recently started working on Spring Boot. I came to know the feature called Hazelcast.
Can some one please explain me about how the Hazelcast can be used for accessing session and setting session attributes ?
Also it would be great if i can get the information about how the session will be managed.
BestRegards,
Hemal.
Does this help https://github.com/hazelcast/hazelcast-code-samples/tree/master/hazelcast-integration/springboot-http
Disclaimer: I wrote this example.

Easiest Way to Access Neo4J from Java

I want to access a Neo4j DB with Java and wanted to know what the preferred way to do this is. I just want to write a quite simple data structure to the DB.
http://neo4j.com/developer/java/ gives following options:
JDBC
Hibernate OGM
Spring Data
Rest API via Unmanaged Extensions
I looked into accessing Neo4J with JDBC and Hibernate OGM. It seems that its not worth it to use for me. JDBC gives me some trouble. So should i go with the REST way or try to fix my JDBC problems?
The JDBC driver is really a wrapper around the REST interface (as of neo4j 2.3). There is a example application how to use it. Should suffice for very simple use.
Then there is neo4j-ogm (different from Hibernate OGM) - this is an object graph mapping library, similar to hibernate in ORM world. This has minimal external dependencies and is very easy to use - ideal for cases where you want to map couple of objects into graph.
Then there is the Spring Data Neo4j project, which since version 4 uses neo4j-ogm for mapping, but adds other Spring data features, like repositories, derived finder queries, transactions ...

Neo4j unmanaged extension with Spring Data

I was advised to develop Neo4j extension because of poor performance due to the many calls to the Neo4j REST interface introduced by Spring Data Neo4j. For the good start I was able to run simply Neo4j extension from Neo4j documentation:
http://docs.neo4j.org/chunked/stable/server-unmanaged-extensions.html
Now I have to move some logic from my web service to Neo4j extension to make communication between them as small as possible. However, my web service is based on Spring Data Neo4j as well as Spring Data JPA, so to reuse my actual code I would like to use also Spring Data in my extension. I have found this documentation:
http://docs.spring.io/spring-data/data-neo4j/docs/current/reference/html/reference_neo4j-server.html
but it is not clear for me and there is no working example. Is there any sample code with such integration?
There is a great example on using SDN in an unmanage extension, see http://inserpio.wordpress.com/2014/04/30/extending-the-neo4j-server-with-spring-data-neo4j/.

Liferay multiple portlets running with same embedded neo4j db

Using spring data neo4j in liferay portlets, Neo4j is locking itself when a portlet is using it, encounter exception like below
Unable to lock store [db.name], this is usually a result of some other Neo4j kernel running using the same store
Is there any way to run multiple portlets with same embedded neo4j db. Can i use Neo4j HA? Looks like Neo4j HA to going to deal with multi-servers, but i only one server. Any ideas?
Thanks in advance!
Did you try including neo4j library files at portal level instead of using at portlet level ?
i.e. to place required .jar files in /lib/ext instead of inside WEB-INF of every portlet.
I'm not an expert in neo4j, but having good experience with liferay. Suggesting above solution from liferay point to ensure common place for all portlets.

Resources