throws Exception
{
final String key = Role3.ROLE;
final String type = "PerThread";
final ServiceManager serviceManager = getServiceManager();
final BaseRole object1 = (BaseRole) serviceManager.lookup( key );
final BaseRole object2 = (BaseRole) serviceManager.lookup( key );
assertEquals( type + " object IDs (1 vs 2)", object1.getID(), object2.getID() );
final Thread thread = new Thread()
{
public void run()
{
try
{
final BaseRole object3 = (BaseRole) serviceManager.lookup( key );
final BaseRole object4 = (BaseRole) serviceManager.lookup( key );
assertTrue( type + " object IDs (1 vs 3)", object1.getID() != object3.getID() );
assertTrue( type + " object IDs (2 vs 4)", object2.getID() != object4.getID() );
assertEquals( type + " object IDs (3 vs 4)", object3.getID(), object4.getID() );
}