test_class.declarator: VALUE_FIRST = "first"
test_class.modifier: private static final
test_class.original_string: private static final String VALUE_FIRST = "first";
test_class.type: String
test_class.var_name: VALUE_FIRST
test_class.declarator: VALUE_OTHER = "other"
test_class.modifier: private static final
test_class.original_string: private static final String VALUE_OTHER = "other";
test_class.type: String
test_class.var_name: VALUE_OTHER
test_class.declarator: BEAN_NAME = "spring.ThreadedService"
test_class.modifier: private static final
test_class.original_string: private static final String BEAN_NAME = "spring.ThreadedService";
test_class.type: String
test_class.var_name: BEAN_NAME
test_class.declarator: applicationContext
test_class.modifier: @Autowired
  	private
test_class.original_string: @Autowired
  	private ApplicationContext applicationContext;
test_class.type: ApplicationContext
test_class.var_name: applicationContext
test_class.declarator: threadedService
test_class.modifier: @Autowired
  	private
test_class.original_string: @Autowired
  	private ThreadedService threadedService;
test_class.type: ThreadedService
test_class.var_name: threadedService
test_class.file: impl/src/test/java/org/geomajas/spring/ThreadScopeTest.java
test_class.identifier: ThreadScopeTest
test_case.body: @Test
  	public void testThreadScope() throws Exception {
  		// verify that set/get works in normal case
  		threadedService.setValue(VALUE_FIRST);
  		Assert.assertEquals(VALUE_FIRST, threadedService.getValue());
  
  		// assure bean is not treated as prototype
  		ThreadedService ts = applicationContext.getBean(BEAN_NAME, ThreadedService.class);
  		Assert.assertEquals(VALUE_FIRST, ts.getValue());
  
  		Thread thread = new Thread(new Runnable() {
  
  			public void run() {
  				// we are in the thread, now create the autowired class and test:
  				testInOtherThread();
  			}
  		});
  		thread.start();
  		thread.join();
  
  		// now verify that we can clear the thread data
  		Assert.assertEquals(VALUE_FIRST, threadedService.getValue());
  		((ScopedObject)threadedService).removeFromScope();
  		Assert.assertNull(threadedService.getValue());
  	}
test_case.class_method_signature: ThreadScopeTest.testThreadScope()
test_case.full_signature: @Test public void testThreadScope()
test_case.identifier: testThreadScope
test_case.invocations: setValue assertEquals getValue getBean assertEquals getValue testInOtherThread start join assertEquals getValue removeFromScope assertNull getValue
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void testThreadScope()
focal_class.file: impl/src/main/java/org/geomajas/spring/ThreadScope.java
focal_class.identifier: ThreadScope
focal_class.interfaces: implements Scope, DisposableBean
focal_class.class_method_signature: ThreadScope.ThreadScope()
focal_class.full_signature: public  ThreadScope()
focal_class.identifier: ThreadScope
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.signature:  ThreadScope()
focal_class.class_method_signature: ThreadScope.get(String name, ObjectFactory<?> factory)
focal_class.full_signature: public Object get(String name, ObjectFactory<?> factory)
focal_class.identifier: get
focal_class.modifiers: public
focal_class.parameters: (String name, ObjectFactory<?> factory)
focal_class.return: Object
focal_class.signature: Object get(String name, ObjectFactory<?> factory)
focal_class.class_method_signature: ThreadScope.remove(String name)
focal_class.full_signature: public Object remove(String name)
focal_class.identifier: remove
focal_class.modifiers: public
focal_class.parameters: (String name)
focal_class.return: Object
focal_class.signature: Object remove(String name)
focal_class.class_method_signature: ThreadScope.registerDestructionCallback(String name, Runnable callback)
focal_class.full_signature: public void registerDestructionCallback(String name, Runnable callback)
focal_class.identifier: registerDestructionCallback
focal_class.modifiers: public
focal_class.parameters: (String name, Runnable callback)
focal_class.return: void
focal_class.signature: void registerDestructionCallback(String name, Runnable callback)
focal_class.class_method_signature: ThreadScope.resolveContextualObject(String key)
focal_class.full_signature: public Object resolveContextualObject(String key)
focal_class.identifier: resolveContextualObject
focal_class.modifiers: public
focal_class.parameters: (String key)
focal_class.return: Object
focal_class.signature: Object resolveContextualObject(String key)
focal_class.class_method_signature: ThreadScope.getConversationId()
focal_class.full_signature: public String getConversationId()
focal_class.identifier: getConversationId
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: String
focal_class.signature: String getConversationId()
focal_class.class_method_signature: ThreadScope.destroy()
focal_class.full_signature: public void destroy()
focal_class.identifier: destroy
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: void
focal_class.signature: void destroy()
focal_method.body: public ThreadScope() {
  		ThreadScopeContextHolder.clear();
  	}
focal_method.class_method_signature: ThreadScope.ThreadScope()
focal_method.full_signature: public  ThreadScope()
focal_method.identifier: ThreadScope
focal_method.modifiers: public
focal_method.parameters: ()
focal_method.signature:  ThreadScope()