After working some weeks with JDAPI strange features are emerging.
JDAPI seems to be unable to save PLL modules! Trying this results in This module type does not currently support saving to filesystem exception. Compiling PLL modules seems also sort of “not supported” by the jdapi. An exception This module type does not currently support compilation is thrown. Actually, decompiling the f90jdapi.jar and checking the PlsqlModule class confirms this. The only thing the save() and compile() methods are doing is throwing an exception. But why is this difference in behaviour between libraries and forms and menus?
So I got curious how the Migration Assistant does the trick. After decompiling the f90upgrade.jar to find out how Oracle fixes this problem in their Migration Assistant, I found out that they have also difficulties compiling and saving PLL modules. The work around is to execute the forms compiler (ifcmp90.exe or f90genm) from within Java. This is also backed up by a post on OTN replied by Frank Nimphius, one of the builders of the Migration Assistant.
Finding attached libraries can only be done in context of a parent FormModule or MenuModule (static method AttachedLibraries.find), but not in context of PlsqlModules. I might be wrong, but I think this is strange, because in real life a library (PlsqlModule) is very able to have other PlsqlModules attached. For example open ofgtel.pll and see the ofgmes.pll attached. So why isn’t jdapi letting me find them in the same way an attached library can be found on a form or menu?