PL/SQL from Application Module instead of Using VO/EO - Violating Standard?

Hi,
I have seen product code which Use PL/SQL APIs for committing data (Creation of Records in Table) from Application Module. There is no BC4J (VO/EO) used in this data route.
Is there any coding standard (document) which says such cases are against Standards.I know there is one Standard saying PL/SQL Based VO is dicouraged in Oracle Apps.
Thanks
Joseph

Vikram,
Performance depends on the way you are going to make use of pl/sql code. Suppose if you are using pl/sql just for final insert/update with other validations bound to it through a single call, that's fine. But in case you have other multiple calls to pl/sql blocks also for fetching data for display purpose, that's where standard VO's will be more efficient reducing the number of trip for pl/sql calls. So use it only when it is the last way and you need to handle multiple validations with complex data structure.
As for locking, yes, you might have to take care of locking handling scenario if such a situation happens. But again it depends on what's your business logic and how is your data being processed.
--Shiv                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               

Similar Messages

  • Call VO method from application module

    Hi Experts.
    In my case I have created VO and inside implementation class custom method: filterResultsByGroup()
    code:
    public class VO_Business_AreaImpl extends ViewObjectImpl implements VO_Business_Area {
    public VO_Business_AreaImpl() {
    public void filterResultsByGroup() {
    System.out.println("hello");
    now... I would like to call filterResultsByGroup() method from Application Module Imp class:
    code:
    public class AppModuleImpl extends ApplicationModuleImpl implements AppModule {
    public AppModuleImpl() {
    public VO_Business_AreaImpl getVO_Business_Area1() {
    return (VO_Business_AreaImpl)findViewObject("VO_Business_Area1");
    public void RunGroupFilter(){
    ViewObjectImpl bussinesArea;
    bussinesArea = this.getVO_Business_Area1();
    ViewCriteria vc = bussinesArea.getViewCriteria("filterResultsByGroup();");
    bussinesArea.applyViewCriteria(vc);
    bussinesArea.executeQuery();
    but it doesn't work. Anyone knows how to call this method?
    Best Regards.

    you code should be like
    VO_Business_AreaImpl bussinesArea;
    bussinesArea = this.getVO_Business_Area1();
    bussinesArea.filterResultsByGroup();

  • HT204406 How can I subscribe to Itunes Match redeeming from itunes card instead of using credit card?

    How can I subscribe to itunes Match redeeming from itunes card instead of using credit card?

    Do you have another device (eg a computer) that also contains your music? If so, yes, you can turn off iTunes match and sync everything with a cable. Do you tend to buy new music from downloads or ripping CDs? If downloads, you can turn on "download purchases automatically" on the phone to make them available to you there, once you've cable-synced your current library. If CDs, you would have to manually sync with cable (or over local wifi) each time you add a new CD.
    Matt

  • How to execute SQL Instruction from Application Module

    Hi people
    I´d like to know how I can execute a SQL Instruction like "delete from user" from the Application Module ..prepareSession method...
    I´m Using Jdev 10 with ADF Faces
    thank you

    Hello,
    Code example:
    @Override
      protected void prepareSession ( Session session ) {
        super.prepareSession( session );
        setDebugOff();
      private static final String DEBUGOFF = "begin IVA_UI_ALGEMEEN_PCK.SET_DEBUG_OFF; end;";
      public boolean setDebugOff () {
        boolean success = false;
        PreparedStatement debugOffSP = null;
        try {
          debugOffSP = getDBTransaction().createPreparedStatement( DEBUGOFF, 0 );
          success = debugOffSP.execute();
        } catch ( Exception e ) {
          success = false;
        } finally {
          if ( debugOffSP != null ) {
            try {
              debugOffSP.close();
            } catch ( Exception e ) {
              log.warning( e.getMessage() );
        return success;
      }-Anton

  • Calling Oracle BugDB PL/SQL Package Procedures from Application Modules

    Hi Experts,
    I am using JDev 11g R2.My requirement is as follows:
    1.Create a public database link to remote bugDB using the Testing Environment.(Done)
    2.Access the data from local database to BugDB using that DB link (Done)
    3.Insert/Create a bug using the Create_Bug procedure in the API provided by BugDB(Failed).In the Application ModuleImpl class I have added the following code(Just an Example) to call the API containing a pl/sql procedure which creates a bug in the remote db table.
    public void Create_Bug(String Product, String Component, String Subcomponent, String Status) {
    CallableStatement st = null ;
    try {
    StringBuffer str = new StringBuffer();
    str.append(" BEGIN ");
    str.append(" Bug.Bug_API_V1.Create_Bug@bugtest( ");
    str.append(" Product => :1, ");
    str.append(" Component => :2, ");
    str.append(" BugNo => :3 ");
    str.append(" Status => :4 ");
    str.append(" ")
    str.append(" ); ");
    str.append(" END; ");
    st =getDBTransaction().createCallableStatement(str.toString(), 1);
    st.setString(1, Product);
    st.setString(2, Component);
    st.setString(3, Subcomponent);
    st.setString(4, Status);
    st.execute();
    } catch (SQLException sqle) {
    // TODO: Add catch code
    sqle.printStackTrace();
    } catch (NumberFormatException nfe) {
    // TODO: Add catch code
    nfe.printStackTrace();
    4.Added a managed bean to invoke this AppModuleDataControl which stores the value in the remote database.(Failed in this part).
    Its not showing any errors in the log but the bug is not created either in the remote database.Could anyone guide me where am I going wrong or what is the better way to handle this requirement.Any suggestion for materials,links or tutorials would be highly appreciated.Thanks in advance.
    Regards,
    Prasanna

    Prasanna,
    this is a public form_ and the Oracle bug database API is not public! Can you please post internal questions to Oracle internal forums and mailing lists?
    thank you
    Frank

  • POJOs or EJBs for worker classes spawned from Application Module?

    Hello,
    I'm running JDev 11.1.2.3.0.
    I need to create a couple of worker classes that will be instantiated from my Application Module. The first will invoke PL/SQL via createCallableStatement. The second sends a message to a jabber server.
    In the Java EE world, I'd do this with stateless EJBs and use the @PreConstruct and @PostDestroy annotations to control the lifecycle.
    What is the recommended approach with ADF when using Classes to make these calls from an Application Module? Should one use POJOs and rely on WebLogic to handle garbage collection, or should/can one use EJB 3.0 stateless session beans?
    Many thanks.
    Edited by: user576183 on May 11, 2013 9:24 AM

    Stateless session beans is the recommended approach with ADF BC too.
    http://docs.oracle.com/cd/E14571_01/web.1111/b31974/bcextservices.htm
    http://technology.amis.nl/2013/01/20/adf-interaction-with-business-service-an-ongoing-discussion/

  • BC4J: How get Connection from Application Module

    I've written a custom method for my Application Module for using by the client tier. In this method I call a JPUblisher created class, that accesses a PL/SQL procedure. For this JPublisher created class I need a connection context. The class calls DefaultContext.getDefaultContext() but that seems to be null.
    How can I get the current Connection of the Application Module, so that I can create a DefaultContext?
    Unfortunately Transaction has no getConnection method.
    Thanks,
    Robert

    We don't make the Connection directly available because in some sense it's a rope on which you can hang yourself if you are not careful. Since BC4J AppModules are most often used from a pool, and you might be using connection pooling in addition to application module pooling, in general it is not safe to get hold of the raw JDBC connection and "hang onto it".
    If you make careful use to always get the current JDBC connection before you use it, and not try to cache it, then you should be ok. Often, you can avoid the need to get the raw JDBC connection by calling getDBTransaction().createPreparedStatement(...) or the analogous createCallableStatement() or createStatement() that are also on the DBTransaction interface.
    Here is a little function you can add to your application module impl class to retrieve the Connection:
      private Connection getCurrentConnection() {
        Statement st = null;
        try {
          st = getDBTransaction().createStatement(0);
          return st.getConnection();
        catch (SQLException s) {
          s.printStackTrace();
          return null;
        finally {
          if (st != null) try { st.close(); } catch (SQLException s2) {}
      }It basically creates a (dummy) statement, gets the current connection from the statement, then closes the statement.
    I tried using this in a custom method in an AppModuleImpl class that invoked a JPublisher-create package-wrapper class like this:
      public void callStoredProc() {
        try {
          // Empservice is package wrapper class created by JPublisher
          Empservice e = new Empservice(getCurrentConnection());
          BigDecimal sal = e.lookupsalary(new BigDecimal(7369));
          System.out.println(sal);
        catch (SQLException s) {
          s.printStackTrace();
      }and it works for me.

  • Connection object from application module

    hi
    i was wondering if there is someway to retrieve the Connection object from the application module. something like:
    java.sql.Connection conn = appMod.getConn();
    i'm using JDeveloper 9.0.3.4
    Thanks in advanced
    Vitor

    Take a look at
    http://radio.weblogs.com/0118231/2004/01/30.html#a232
    Sascha

  • Obteain connection object from application module

    Hello
    I am working with ADF 10g using BC4j , I am in application module implementation class, how can I obtain the java.sql.connection object used by my application module?

    to execute prepared statements follow
    http://download-uk.oracle.com/docs/html/B25947_01/bcadvgen005.htm#sm0297
    to access the SQL connection itself (for whatever reason)
    Re: how to get connection from adf bc?
    Frank

  • How to get value in backing bean from application module

    Hi all.. I'm new in jdeveloper and adf..
    I need to use value from backing bean and use that value in application module.
    But I don't know how to get it.
    Do you a have any solution?

    suppose you have myMethod(String argumentName1,String argumentName2) in your Application Module
    then to access a method binding from a managed bean, use the following code,
      BindingContext bctx = BindingContext.getCurrent();
      BindingContainer bindings = bctx.getCurrentBindingsEntry();
      OperationBinding operationBinding =
           bindings.getOperationBinding("name_of_method_binding");
      //Here you can pass the parameters value to the AM method
      operationBinding.getParamsMap().put("argumentName1",value1);
      operationBinding.getParamsMap().put("argumentName2",value2);
      //invoke method
      operationBinding.execute();
      if (!operationBinding.getErrors().isEmpty()) {
         //check errors
         List errors = operationBinding.getErrors();
      //optional
      Object methodReturnValue = operationBinding.getResult();

  • Application Module getting and using.

    Hello all,
    I am currently using this code:
    DCDataControl dc = daContext.getBindingContext().findDataControl("AppModuleDataControl");
    if (dc instanceof DCJboDataControl) {
    ApplicationModule appModule = (ApplicationModule) dc.getDataProvider();
    ApplicationModuleImpl myAm = (ApplicationModuleImpl)appModule;
    It compiles well, but the problem is that the App Module that is returned is of type : WSApplicationModuleImpl.
    I need to use the getDBTransaction() method from ApplicationModuleImpl, since when I cast my appModule, i get an error, I was wondering if there was something I was doing wrong.
    I have searched high and low, and still haven't found what WSApplicationModuleImpl is for (i know that if I try to use some of the methods of ApplicationModuleImpl I get a moethod 'methodname' is not a working set Application Module method...)

    Steve,
    I followed the instructions in your article, which gave me a better understanding of the situation but did not resolve my particular issue. I was confused by all the statements and insinuations in both JDev and various articles that configuring application modules to use interfaces is really to support a client that is not colocated with the business services. I did not see the relevance of the interfaces to getting the appropriate data type back from the data control (MyAppModule rather than WSApplicationModuleImpl, for example). Anyway, I followed the steps from that article that related to the application module. I did not create interfaces for the other business components (views, entities, etc). I continued to get back the wrong data type when retreiving the application module from the data control in an action. So I kept looking for other clues and finally came across the article about when to use batch mode (http://www.oracle.com/technology/products/jdev/tips/muench/batchmode/index.html). Reading that one of the benefits of batch mode is better enforcement of programming business calls to interfaces I thought I'd try changing the sync to immediate rather (from the default, batch). This did exactly what I was originally trying to do. It caused the data control to return a MyAppModuleImpl rather than a generic WSApplicationModuleImpl. Finally I could call methods on the business service from actions.
    After learning about batch mode, I understand that my change is not advisable in the grand scheme of clean design. Unfortunately, even though I believe that I have all the components in place to support a clean design, the batch mode seems to be preventing me from getting data type back.
    So I write this for the next person to run into ClassCastExceptions when attempting to retrieve their application module, since I haven't seen it suggested before: look into batch vs. immediate mode - at the very least it will help you diagnose the problem.
    Jeff

  • Error While Calling a WebService from Application Module

    Hi all
    I have generated a Proxy from a web Service and i am trying to call the web service from an Application Module it is throwing me error
    JBO-29000: Unexpected exception caught: oracle.classloader.util.AnnotatedNoClassDefFoundError, msg= Missing class: webservices.types.com.siebel.xml.order_interface.Orders Dependent class: java.lang.reflect.Array Loader: jre.bootstrap Code-Source: unknown Configuration: jre bootstrap
    Missing class: webservices.types.com.siebel.xml.order_interface.Orders Dependent class: java.lang.reflect.Array Loader: jre.bootstrap Code-Source: unknown Configuration: jre bootstrap
    IMy web Service is correct, as i have executed the client and it is working fine, but when i try to class the web service from an external class or from an application module it is throwing me this error. So any light on this issue will be very helpful
    thanks

    Hi,
    did you registered the web service in the external service registration? The "DataAccessException:" is a hint to this issue.
    best regards,
    Rene

  • Error while calling webservice from application module

    Hi all
    I have generated a Proxy from a web Service and i am trying to call the web service from an Application Module it is throwing me error
    JBO-29000: Unexpected exception caught: oracle.classloader.util.AnnotatedNoClassDefFoundError, msg= Missing class: webservices.types.com.siebel.xml.order_interface.Orders Dependent class: java.lang.reflect.Array Loader: jre.bootstrap Code-Source: unknown Configuration: jre bootstrap
    Missing class: webservices.types.com.siebel.xml.order_interface.Orders Dependent class: java.lang.reflect.Array Loader: jre.bootstrap Code-Source: unknown Configuration: jre bootstrap
    My web Service is correct, as i have executed the client and it is working fine, but when i try to access the web service from an application module it is throwing me this error. So any light on this issue will be very helpful
    thanks

    This forum is for XML DB issues. XML DB is a feature of 9iR2 and later.You need t look in the XML Technology forum

  • Obtaining DataSource from Application Module

    How may i obtain DataSource from pool managed by Application Module? I want some of my db-related operation performed by Spring's JdbcOperations class ( http://www.springframework.org/docs/api/org/springframework/jdbc/core/JdbcOperations.html ) and i want have only one connection pool in my application.
    Thanks,
    Kind regards,
    Marcin Zduniak / http://J2ME.pl

    Refer
    http://www.oracle.com/technology/products/jdev/howtos/10g/usingdatasources/using_datasources.html

  • Binding Methods Exposed From Application Module

    Hi All,
    I am using JDeveloper 11.0.2. I have a method exposed on the Application Module that when invoked, it creates a row. I exposed AppModADImpl as a client interface. After doing this, I am now able to see the method under data control section. On my page, I when to bindings and tried to create a bind to this method, I am able to see the method but the OPERATIONS list is disabled, because of this, I am unable to create the bind to the page.
    The method I'm trying to bind is below
    public Row createSystemTypes() {
    ViewObjectImpl vo = getAdSystemTypes1();
    Row row = vo.createRow();
    vo.insertRow(row);
    return row;
    Because the Operations List if disabled, when I click OK, I get the Error "No Actiond defined for the selected Item"
    I would appreciate help to know why Im unable to bind the method to the page.

    As the method has been added to the client interface of the application module, you have to select the application module in the dialog, not a view object. After selecting the application module (or the data control or root node) you should see all methods which are part of the client interface.
    Still, I wold do like Joonas outlined: use drag and drop and if you don't like the button you get this way on the page, switch to source mode and remove it. This will keep hte generated binding in the page def. Removing the button in design view will remove both, button and binding.
    Timo

Maybe you are looking for