public void run()
{
CouchDBPersonJTAEntity person = new CouchDBPersonJTAEntity();
person.setPersonId("1_p" + i);
person.setPersonName("crossdata-store");
CouchDBAddressJTAEntity address = new CouchDBAddressJTAEntity();
address.setAddressId("1_a" + i);
address.setStreet("my street");
person.setAddress(address);
try
{
em.persist(person);
}
catch (Exception ex)
{
CouchDBAddressJTAEntity found = em.find(CouchDBAddressJTAEntity.class, "1_a" + i);
Assert.assertNull(found);
}
// As data is not commited, hence it should return null with
// other session.