End-to-end vs. Platform Generation

A hotly debated discussion circles around the question whether code generation that tries to generate executable code directly is easier than generating code which needs to run on a specific platform like EJB or .NET. Experienced code generators sometimes claim that end-to-end generation which avoids complex runtime platforms is easier. The reason behind this - surprising - statement could be that once you have created a powerful model and meta-model, adding behavior e.g. transaction support is not so hard anymore if it is done on top of a simple and primitive platform. It gets harder once you have to comply to highly complex runtime platforms like EJB or .NET with your generated code.