Preheat the oven to 350 degrees F (175 degrees C). Grease two 7-inch cake pans and line with parchment paper.
Sift self-rising flour into a bowl; add sugar, margarine, and 1/2 teaspoon vanilla extract. Crack in eggs; beat with a wooden spoon or an electric mixer until pale and fluffy, about 3 minutes. Divide batter between the cake pans; smooth the tops with the back of a spoon.
Bake in the preheated oven until top is golden brown and a toothpick inserted into the center comes out clean, 30 to 40 minutes. Cool in the pans for 5 minutes. Invert onto a wire rack to cool completely, about 20 minutes.
Sift confectioners' sugar into a bowl; add butter and 1/2 teaspoon vanilla extract. Beat with an electric mixer until frosting is light and fluffy.
Spread jam over 1 cake layer; cover jam with frosting. Place second cake layer on top.