Skip to content

Instantly share code, notes, and snippets.

View nexdrew's full-sized avatar

Andrew Goode nexdrew

View GitHub Profile
@nexdrew
nexdrew / republish.sh
Last active November 29, 2016 15:56 — forked from soldair/republish.sh
publish modules from the public registry to another registry
#!/bin/bash
mkdir -p ./publish-tmp
cd publish-tmp
if [ "$?" != "0" ]; then
echo "failed to create publish tmp dir"
exit 1
fi
@nexdrew
nexdrew / TransactionAwareSessionContext.java
Last active December 25, 2015 14:39 — forked from seykron/TransactionAwareSessionContext.java
Modified fork of seykron's original workaround for SPR-9020. See comments for more details.
import java.util.Arrays;
import org.hibernate.FlushMode;
import org.hibernate.HibernateException;
import org.hibernate.Session;
import org.hibernate.context.TenantIdentifierMismatchException;
import org.hibernate.context.internal.ManagedSessionContext;
import org.hibernate.engine.spi.SessionFactoryImplementor;
import org.hibernate.service.jta.platform.spi.JtaPlatform;
import org.slf4j.Logger;