private CorbaOrocosConnection(OrocosDataPort port, ConnectionType connectionType,
			boolean init, LockPolicy lockPolicy, boolean pull, int bufferSize,
			int transport, int dataSize, String connectionName) throws CNoCorbaTransport, CNoSuchPortException {


		logger = Logger.getLogger(CorbaOrocosConnection.class);

		this.port = port;
		this.connectionType = connectionType;

		CConnectionModel type;
		if(connectionType == ConnectionType.DATA){
			type = RTT.corba.CConnectionModel.CData;
		}else{
			type = RTT.corba.CConnectionModel.CBuffer;
		}

		RTT.corba.CLockPolicy policy;
		if(lockPolicy == LockPolicy.USYNC){
			policy = RTT.corba.CLockPolicy.CUnsync;
		}else if(lockPolicy == LockPolicy.LOCK_FREE){
			policy = RTT.corba.CLockPolicy.CLockFree;
		}else{
			policy = RTT.corba.CLockPolicy.CLocked;
		}

		connectionPolicy = new CConnPolicy(type, init, policy, pull, bufferSize, transport, dataSize, connectionName);
		CConnPolicyHolder policyHolder = new CConnPolicyHolder(connectionPolicy);

			if(port.getPortType() == PortType.INPUT_PORT){
				channelElement =  port.getComponent().getCDataFlowInterface().buildChannelOutput(port.getName(), policyHolder);
				if(port.getComponent().getCDataFlowInterface().channelReady(port.getName(), channelElement)){
					logger.info("Createad a connection to the port " + port.getName());
				}else{
					logger.warn("Connection to the port " + port.getName() + " failed");
				}
			}else{
				channelElement =  port.getComponent().getCDataFlowInterface().buildChannelInput(port.getName(), policyHolder);
				logger.info("Createad a connection to the port " + port.getName());
			}

		

	}