Skip to content

Instantly share code, notes, and snippets.

Streaming data changes, one at a time.

Gunnar Morling gunnarmorling

Streaming data changes, one at a time.
View GitHub Profile
gunnarmorling / UC-1
Last active Aug 29, 2015
OGM-465 Error handling SPI
View UC-1
// UC-1: As a user of OGM, upon an exception during flush(), I want to log all operations applied so far and abort the
// processing of the flush cycle
File[] files = Maven.resolver()
.resolve( "org.apache.avro:avro:jar:1.7.6" )
System.out.println( Arrays.toString( files ) );
View gist:ba193caecb7d5cdbd0a4
javax.persistence.PersistenceException: org.hibernate.engine.transaction.jta.platform.spi.JtaPlatformException: Could not obtain JBoss Transactions transaction manager instance
at org.hibernate.jpa.spi.AbstractEntityManagerImpl.convert(
at org.hibernate.jpa.spi.AbstractEntityManagerImpl.convert(
at org.hibernate.jpa.spi.AbstractEntityManagerImpl.throwPersistenceException(
at org.hibernate.jpa.internal.EntityManagerImpl.isOpen(
at org.hibernate.jpa.internal.EntityManagerImpl.checkOpen(
at org.hibernate.jpa.internal.EntityManagerImpl.checkOpen(
at org.hibernate.jpa.internal.EntityManagerImpl.getSession(
at org.hibernate.jpa.spi.AbstractEntityManagerImpl.setDefaultProperties(
at org.hibernate.jpa.spi.AbstractEntityManagerImpl.postInit(AbstractEntityManagerIm
View gist:8bd6d5b4569eaa923cbe
# Run complete. Total time: 00:00:20
Benchmark (url) Mode Samples Score Error Units
o.h.v.URLConstraintBenchmark.measureValidationUsingRegExp ss 300 580,450 ± 100,057 us
o.h.v.URLConstraintBenchmark.measureValidationUsingRegExp ss 300 575,237 ± 99,833 us
o.h.v.URLConstraintBenchmark.measureValidationUsingRegExp http://例子.测试 ss 300 454,633 ± 50,617 us
o.h.v.URLConstraintBenchmark.measureValidationUsingRegExp http//foo/ ss 300 181,290 ± 15,749 us
o.h.v.URLConstraintBenchmark.measureValidationUsingRegExp ///a ss 300 86,680 ± 17,834 us
o.h.v.URLConstraintBenchmark.measureValidationUsingRegExp :// should fail ss 300 80,807 ± 11,059 us
public class CallerProvider extends SecurityManager {
public Class<?> getCallerClass() {
return getClassContext()[2];
private static class OgmPersistEventListener extends DefaultPersistEventListener {
* Performs all the actual work needed to save an entity (well to get the save moved to
* the execution queue).
* @param entity The entity to be saved
* @param key The id to be used for saving the entity (or null, in the case of identity columns)
* @param persister The entity's persister instance.
* @param useIdentityColumn Should an identity column be used for id generation?
public class Court {
private CourtId id;
private String name;
@OneToMany(mappedBy = "playedOn")
private Set<Game> games = new HashSet<Game>();
gunnarmorling / gist:fa6eb9ab72fff2d5a8d1
Created Sep 5, 2014
IMPL types exposed by HSEARCH API/SPIs
View gist:fa6eb9ab72fff2d5a8d1
[ERROR] my-rules:PublicMethodsMayNotExposeInternalTypes: API/SPI methods must not expose internal types.
[ERROR] getFilterDefinition(java.lang.String)
[ERROR] getIndexManagerHolder()
[ERROR] makeBatchBackend(
[ERROR] getIdFieldCacheCollectionFactory()
[ERROR] getIdFieldCacheCollectionFactory()
gunnarmorling / Actual_Persisted_Format.json
Last active Aug 29, 2015
Persisted format of OneToOneTest#testBidirectionalManyToOne() in MongoDB
View Actual_Persisted_Format.json
"_id" : "6866afaf-c5ee-4fee-9821-79b2ae2a63b7",
"husband" : [
"name" : "Bea"
"_id" : "ae25fe38-d532-415c-b12a-4c1f0f4782a8",
"name" : "Alex",
gunnarmorling /
Last active Aug 29, 2015
Query improvements and better Neo4j support - Hibernate OGM 4.1.0.Beta6 is out

The Hibernate team is very happy to announce the release of another Beta of Hibernate OGM 4.1!

Progress has been made with respect to query execution and the Neo4j dialect. Also we do provide a so-called "Bill of Materials" POM now which the Maven users out there will appreciate (details below).

The GAV coordinates to be used with Maven, Gradle etc. are:

  • org.hibernate.ogm:hibernate-ogm-core:4.1.0.Beta6 for the OGM engine and
  • org.hibernate.ogm:hibernate-ogm-:4.1.0.Beta6, depending on the backend you want to use.

Alternatively you can fetch a release bundle containing Hibernate OGM and all its dependencies from SourceForge.

You can’t perform that action at this time.