@Override
	public List<Part> takeParts(Class<?> partType, boolean blocking, int partCount) throws SharedWorkspaceException {
		logger.info("Starting takeParts()...");
		logger.info("CURRENT TRANSACTION=" + currentTransaction);
		List<Part> result = null;
		Selector partSelector = null;
		ContainerReference container = null;
		List<Selector> selectorList = new ArrayList<Selector>();
		
		if(partType.equals(Mainboard.class))
		{
			partSelector = FifoCoordinator.newSelector(partCount);
			container = mainboardContainer;
			selectorList.add(partSelector);
		}
		else
		{
			try {
				partSelector = LindaCoordinator.newSelector((Part)partType.newInstance(), partCount);
				selectorList.add(partSelector);
			} catch (InstantiationException e) {
				throw new SharedWorkspaceException("Part could not be taken: Part Type could not be instantiated (" + e.getMessage() + ")");
			} catch (IllegalAccessException e) {
				throw new SharedWorkspaceException("Part could not be taken: Part Type could not be instantiated (" + e.getMessage() + ")");
			}
			container = partContainer;
		}
		
		try {
			if(blocking)
				result = capi.take(container, selectorList, RequestTimeout.INFINITE, currentTransaction, IsolationLevel.READ_COMMITTED, null);
			else
			{
				try {
					result = capi.take(container, selectorList, RequestTimeout.TRY_ONCE, currentTransaction, IsolationLevel.READ_COMMITTED, null);
				} catch(CountNotMetException e) {
					// ok with that, return null
					logger.info("Finished.");
					return null;
				}
			}
			
			if(result.isEmpty())
			{
				logger.info("Finished.");
				return null;
			}
			
		} catch (MzsCoreException e) {
			e.printStackTrace();
			throw new SharedWorkspaceException("Part could not be taken: Error in MzsCore (" + e.getMessage() + ")");
		} catch (IndexOutOfBoundsException e) {
			throw new SharedWorkspaceException("Part could not be taken: Index out of bounds (" + e.getMessage() + ")");
		}
		logger.info("Finished.");
		return result;
	}