Invoking ApplicationModule from a servlet using ADF Model
Sometimes you may need to invoke services exposed by an ApplicationModule from a non ADF web application. This blog post discusses an interesting approach for such use cases where the business logic is residing in a servlet and which in turn invokes the methods exposed through the ApplicationModule, during the course of execution. One obvious solution is to create ApplicationModule on the fly and release it at the end of the request, as shown below. This code will work if your entire transaction gets committed within a single request. In other words, this is ideal for those use cases which does not call for maintaining state across requests from the same client. try{ ApplicationModule applicationModule = Configuration.createRootApplicationModule(qualifiedAMDefName, configName); //Business logic goes here....... }catch(Excpetion ex){ //Handle Error }finally{ Configuration.releaseRootApplicationModule(applicationModule, false); } P...