I wouldn't class either 'confectionery'.
Confection is defined as something that is highly rich in sugar. It's not normally used to define pastries and cakes. It's normally reserved for lollies and such.
Neither pastries or cakes are deemed 'confections', however it is also the act of mixing. But I have never heard it used in that manner.
confection[kənˈfɛkʃən]n1. the act or process of compounding or mixing
confection - definition of confection by the Free Online Dictionary, Thesaurus and Encyclopedia.