Hello everybody,
I need to compile generated Java source code inside of a enterprise application. I know that is possible to do these things in a ordinary JavaBean or backing bean of a JSF. But a much better solution would be to compile the Java code and return instances inside of a EJB3. I already migrated the JSR 199 compiler API of the Java 7 to libraries which can be used in Java 5 standalone applications. The JSR 199 Java Compiler API works pretty well and doesn't need access to the underlying file system. This is everything I need. But inside of a EJB3 deployed on JBoss 4.0.5 it doesn't work.
JavaCompiler compiler = ToolProvider.getSystemJavaCompiler();