Skip to content

Instantly share code, notes, and snippets.

View tbml's full-sized avatar

Tibor Mlynarik tbml

  • Prague, Czech Republic
View GitHub Profile
@tbml
tbml / CompositeMethodInvocationTest
Created May 2, 2018 06:46
Possible corrupted composite method invocation
public class CompositeMethodInvocationTest extends AbstractPolygeneTest {
@Service
MyService srv;
/**
* To correct, change instance pool type in CompositeMethodModel
* AtomicInstancePool -> SynchronizedCompositeMethodInstancePool
*/
@Test
@tbml
tbml / ClosedAssociationTest.java
Last active June 23, 2017 08:31
ClosedAssociation
package org.apache.polygene.runtime.unitofwork;
import org.apache.polygene.api.association.Association;
import org.apache.polygene.api.common.Optional;
import org.apache.polygene.api.entity.EntityBuilder;
import org.apache.polygene.api.identity.HasIdentity;
import org.apache.polygene.api.property.Property;
import org.apache.polygene.api.unitofwork.UnitOfWork;
import org.apache.polygene.bootstrap.AssemblyException;
import org.apache.polygene.bootstrap.ModuleAssembly;
@tbml
tbml / ForumClient.java
Created July 2, 2012 23:49
Qi4j forum sample rest client test
public class ForumClient
{
private ContextResourceClient crc;
private final Module module;
private String username = "rickard";
private String password = "secret";
public ForumClient() throws AssemblyException
@tbml
tbml / dci_sample_a_to_2_0
Created May 15, 2012 21:28
Patch to upgrade qi4j dci-cargo sample_a from 1.4.1 -> 2.0
Index: samples/dci-cargo/dcisample_a/src/main/java/com/marcgrue/dcisample_a/infrastructure/conversion/EntityToDTOService.java
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- samples/dci-cargo/dcisample_a/src/main/java/com/marcgrue/dcisample_a/infrastructure/conversion/EntityToDTOService.java (revision 63141ff27bf64d0acd5b2bbd7dca7f0e17baaf33)
+++ samples/dci-cargo/dcisample_a/src/main/java/com/marcgrue/dcisample_a/infrastructure/conversion/EntityToDTOService.java (revision )
@@ -1,33 +1,30 @@
package com.marcgrue.dcisample_a.infrastructure.conversion;