Archive for the ‘Java’ Category

Java Concurrent Programs made easy

Thursday, August 27th, 2009 by Barry Goodsell

It is a little known fact that Concurrent Manager Executables can be written in Java, as well as all the traditional languages such as PL/SQL. I believe that this functionality was introduced in 11.5.9, but very little fuss has been made of it. I first came across it while reading Tim Dexter’s excellent BI Publisher Blog in his article How To – Java Concurrent Programs.

Tim’s article is very good and I don’t intend to just repeat everything that he has written. However, I will cover the basics. Oracle have provided the Java Interface oracle.apps.fnd.cp.request.JavaConcurrentProgram; to create your Java Concurrent Program you will need to create a class that implements this interface, ensuring that the abstract method runProgram() is implemented. For example:

package abc.apps.oracle.xyz;

import oracle.apps.fnd.cp.request.JavaConcurrentProgram;
import oracle.apps.fnd.cp.request.CpContext;

public class CpTest implements JavaConcurrentProgram
{
  public void runProgram(CpContext cpContext)
  {
    // your code here
  }
}

Read the rest of this entry »

The wrong and right way to avoid invokeMethod in OAF Controllers

Friday, August 14th, 2009 by Barry Goodsell

If you look at the tutorials supplied by Oracle with OA Framework, you’ll see in their Controllers that they use invokeMethod to indirectly call methods in the Model (ie: the BC4J Application Module). I understand why Oracle recommends that you do it this way – it ensures that there are no dependencies between the various parts of the Model, View and Controller.

Here is a simple example:

package abc.oracle.apps.xyz.po.webui;

import oracle.apps.fnd.framework.server.OAApplicationModuleImpl;
import oracle.apps.fnd.framework.webui.OAControllerImpl;

class updatePo extends OAControllerImpl
{
  public void processRequest(pageContext, webBean)
  {
     OAApplicationModule am = pageContext.getApplicationModule(webBean);
     am.invokeMethod(”initQuery”);
  }
}

Read the rest of this entry »