Problem in App Module Impl client method

Hope someone has an answer for this. I have a data action calling a client interface service method in the app module impl class. I am passing http request data wrapped in a Map to this method from the action class.
In this method I am calling another method in a bean. Strangely, the code in app module method gets executed twice, acting like a recursive call! I debugged it and noticed that my action class calls the method only once, but the call in the method to bean method is executed twice. I want to capture a database error for inserting a new row in my bean method the first time by throwing a jbo exception in app module method, but throw new exception is ignored and message gets lost due to 2nd excecution of the code.
Any ideas or help is much appreciated.
TIA,
S

User, please always tell us your jdev version.
What do you mean by 'verbatim EO'?
If you want to use the framework you should use it and not look for some hacks to archive your work. The docs help you to create or update data using the framework. If you don't want to use the framework, you don't have to, but then your post is for an other forum.
Timo

Similar Messages

  • Accessing an app.module's client interface methods in other app module

    Hi all,
    We are developing an application with number of projects (one for each module). We have got a common project with an application module, entity and view objects which are common for the entire application. For reusability, this common project is shared in session scope since most of them are of static nature.
    In the shared application module's implementation class, a common method has been included that will be used for data filtering by constructing/appending where clauses in a particular application scoped view object. This method has been exposed as client interface method so that other projects can make use of it. The common project is compiled as an ADF Library jar for accessing it in other projects.
    For accessing the exposed client interface method, from the view controller layer, we can include its reference in the page definition file and can execute the method from a managed bean by finding the operation binding from the page definition. But, in case if we wish to access the method in another model project, we could not do so.
    Now, my questions are:
    1. Is it the correct location(Shared App Mod. Impl) for including the logic to filter the data?
    2. Is it possible to access the app. module impl method in another project's impl classes (Let it be entityImpl or viewObjectImpl or viewRowImpl or AppModImpl) ?
    3. If it is possible, how it has to be done?
    Thanks and regards,

    Strange, the same question here {thread:id=2187487}
    Timo
    Edited by: Timo Hahn on 08.03.2011 12:02
    @john You beat me agian

  • Hello, I have problems with app store Your payment method is not valid in this Store. Please enter a new payment method. Could you help me, please?

    I have tried 3 cards already but still the same problem with app store Your payment method is not valid in this Store. Please enter a new payment method.
    Is there any ways to solve the issue?
    Thank you in advance for your help!

    If you still have problem, contact iTune Support
    https://ssl.apple.com/emea/support/itunes/contact.html

  • JDev 323, Application module exportable client methods

    Hello all,
    Can anyone tell what is the exact set of rules for an application module method to be "exportable"?
    From what I have seen, the method must be public, and its parameters and return type must be either basic types or Serializable objects.
    It seems also that, if a parameter or the return value is an array of Serializable objects (such as String[]), then the method is still "exportable".
    Strangely though, if a parameter or the return value is an array of a basic type (say int[]), then the method no longer appears as exportable in the Application Module wizard...
    I know I could use various workarounds, such as replacing int[] with Number[], to achieve the same goal, but I'd really like to know if this is the expected behaviour or just a little flaw in the wizard.
    In the latter case, is there a possibility to fix this issue?
    Thanks for any help, Remi
    null

    This is a bug in 3.2.3 and will be fixed for the next release.
    null

  • Most direct way to do DML in App Module Impl

    Hi,
    I need to do simple INSERT and UPDATE statements in an Application Module. I have the table in question exposed as verbatim Entity and View objects.
    What is the most direct way of of executing an INSERT and UPDATE on PK without having to instantiate loads of objects?
    Many thanks.
    Edited by: user576183 on Sep 17, 2012 4:23 PM

    User, please always tell us your jdev version.
    What do you mean by 'verbatim EO'?
    If you want to use the framework you should use it and not look for some hacks to archive your work. The docs help you to create or update data using the framework. If you don't want to use the framework, you don't have to, but then your post is for an other forum.
    Timo

  • Transaction control of app module implementation , from a SLSB

    Hi, We are using a Session bean , to invoke app module implementation - service methods to manipulate VOs.
    The service method of app module is having control of transactions , like commit . We want to have this control from stateless session bean.
    Could some one help me ? Thanks .

    Hi,
    expose a custom client method on the ADF BC module and have this method (in AM impl) calling commit.
    Frank

  • How do I properly pass values into an input parameter form and app module?

    Using JDeveloper 11.1.1.4
    I created an application module that calls a PL/SQL procedure that uses input parameters. I exposed this to the data control and dropped the object on a jsff as a input parameter form. I need to set some of the input parameters on this form from values gathered and stored in a pageFlowScope bean. What is the proper way so that the values will: 1. show on the form, and 2. get to the java code in the application module that calls my procedure? An example field from my form is:
            <af:inputText value="#{bindings.pPayerId.inputValue}" label="Payer ID"
                          required="#{bindings.pPayerId.hints.mandatory}"
                          columns="#{bindings.pPayerId.hints.displayWidth}"
                          maximumLength="#{bindings.pPayerId.hints.precision}"
                          shortDesc="#{bindings.pPayerId.hints.tooltip}" id="it8">
              <f:validator binding="#{bindings.pPayerId.validator}"/>
              <af:convertNumber groupingUsed="false" pattern="#{bindings.pPayerId.format}"/>
            </af:inputText>Thanks,
    Troy

    Thanks Shay for pointing me in that direction.
    I didn't find the NDValue in the bindings, so I went to the pagedef xml and found it there. Changing the NDValue successfully delivered the value to the app module when the method was executed, but didn't show the value on the form. I had to add the same #{pageFlowScope.paramsBean.fileFormatParam} to the value of the input field and it now is working as needed.

  • Can't see imported app module client interface methods

    I needed to re-use the data model from another workspace in my current project, so I imported it.
    When I import a model into another application, the application module's client interface method(s) will show up in the data control palette (and thus become useable as the action of a data action) only if I click on the originating application in the application navigator (and it is certainly useable that way). But if I click anywhere in the application I've imported the model into, the data control palette doesn't display the method(s).
    Is this a bug? Is there a way to see the method(s) without having to click on the originating application?
    Thanks,
    David

    I needed to re-use the data model from another workspace in my current project, so I imported it.
    When I import a model into another application, the application module's client interface method(s) will show up in the data control palette (and thus become useable as the action of a data action) only if I click on the originating application in the application navigator (and it is certainly useable that way). But if I click anywhere in the application I've imported the model into, the data control palette doesn't display the method(s).
    Is this a bug? Is there a way to see the method(s) without having to click on the originating application?
    Thanks,
    David

  • Is it possible to call a custom method in App Module from a backing bean?

    I would like to know if a custom method in App Module can be called from inside a backing bean.
    I am not sure if it is logically right to call, from a backing bean, a custom method in App Module. But would like to know if that makes sense or if it is possible.

    Hi..
    Yes it is possible.You have to add that method for client interface of AppModule.Now you can see that method in Data Controls(Refresh the data control). To call this method using bean it should add as method action to bindings(Click Bindings>+>methodAction>and Create action binding).
    Now you can call this method in bean class.
    Check following example use this concept to execute view criteria
    http://adf-lk.blogspot.com/2011/05/oracle-adf-create-view-criteria-and_4727.html

  • Problem in Connection pooling after deploying BC4J App Module as EJB

    Hi,
    We have deployed the application modules on standalone OC4J as stateful EJB session beans.
    The problem is that with each user, the number of database connections seem to increase. This is making the application unscalable, which defeats the purpose of using EJB!
    Can someone please suggest how to limit the number of database conections in this scenario?
    Can this be solved by application module pooling? How can we use the PoolMgr to work with the session beans?
    We have tried to invoke disconnect on the application module after calling methods(using appmodule.disconnect(true)) and reconnect (appmodule.reconnect()) on entering the method. This keeps the number of connections low and works the first time the method is invoked. But subsequently, it gives nullpointerexception when the Row is accessed in the JSP.
    The exception we are getting is :
    java.lang.NullPointerException
         at oracle.jbo.client.remote.ViewUsageImpl.getStructDef(ViewUsageImpl.java:241)
         at oracle.jbo.client.remote.ViewUsageImpl.findAttributeDef(ViewUsageImpl.java:275)
         at oracle.jbo.client.remote.RowImpl.getAttributeIndexOf(RowImpl.java:368)
         at oracle.jbo.client.remote.RowImpl.getAttribute(RowImpl.java:144)
         at Supplier.client.ejb.beanmanaged.SupplierAM_IntPaymtVORowBeanManagedClient.getMdid(SupplierAM_IntPaymtVORowBeanManagedClient.java:63)
         at supplier.sccPayCheq._jspService(_sccPayCheq.java:102)
         [SRC:/Supplier/sccPayCheq.jsp:44]
    The Application module configuration (in bc4j.xcfg) is:
    <AppModuleConfig name="SupplierAM9iAS">
    <AppServerConnectionName>StandaloneOC4JConnection</AppServerConnectionName>
    <AppModuleJndiName>Supplier.SupplierAM</AppModuleJndiName>
    <java.naming.security.credentials>admin</java.naming.security.credentials>
    <DeployPlatform>EjbIas</DeployPlatform>
    <java.naming.security.principal>admin</java.naming.security.principal>
    <DtMiddleTierDeploymentProfile>ProjectMiddleTier.deploy</DtMiddleTierDeploymentProfile>
    <ApplicationName>Supplier.SupplierAM</ApplicationName>
    <DtDeploymentProfile>ProjectEJB.deploy</DtDeploymentProfile>
    <DtCommonDeploymentProfile>ProjectCommon.deploy</DtCommonDeploymentProfile>
    <JDBCDataSource>jdbc/ConnectionCoreDS</JDBCDataSource>
    <jbo.server.internal_connection>jdbc/ConnectionCoreDS</jbo.server.internal_connection>
    <jbo.ejb.txntype>local</jbo.ejb.txntype>
    <jbo.doconnectionpooling>true</jbo.doconnectionpooling>
    <ApplicationPath>ProjectEJB</ApplicationPath>
    </AppModuleConfig>
    The Datasource used (in $ORACLE_HOME/j2ee/home/config/data-sources.xml) is:
    <data-source
              class="oracle.jdbc.pool.OracleConnectionCacheImpl"           connection-driver="oracle.jdbc.driver.OracleDriver"
              ejb-location="jdbc/ConnectionDS"
              inactivity-timeout="30"
              location="jdbc/ConnectionCoreDS"
              name="ConnectionDS"
              password="*******"
              pooled-location="jdbc/ConnectionPooledDS"
              url="jdbc:oracle:thin:@<IPADDESS>:<SID>"
              username="USER"
              xa-location="jdbc/xa/ConnectionXADS"
              max-connections="5"
              min-connections="1"/>

    Can this be solved by application module pooling? How
    can we use the PoolMgr to work with the session
    beans?You can use a stateless checkout/checkin appmodule.
    Take a look at the following help topics which explain this in good detail.
    "About Application Module Pooling"
    "About JSP Pages and Application Module Pooling"
    The pool can help reuse the appmodule instance across requests thus reducing the number of concurrent db sessions.
    Dhiraj

  • Non-Serializable Parameter in client methods on an Application Module

    Hello,
    I want to create a client method which expects an java.io.InputStream as input parameter. Unfortunately all method parameters must be of a data type that implements the Serializable Interface. This might be good and reasonably for remote deployments as EJBs, but I want to use them local.
    Is there any solution for this problem?
    Thanks,
    Christian

    The use of our interface-based approach is for guaranteeing that your client layer is always separable from your middle-tier layer.
    If you are implementing a project where you are making the assumption that you won't be separating the two, then you can:
    (1) Make sure you're using Immediate sync mode, and
    (2) Have your client downcast to your *Impl class to call your method with non-serializable parameter.
    This isn't best practice in general, but given your constraints, it's the way to solve this problem.

  • URGENT: Getting app module service method result and calling web service??

    We have a .jar from another vendor that allows us to interact with an FOP rendering process. This .jar has methods that allow us to pass several parameters which results in the creation of the PDF which is stored in the database.
    We need to create the XML, which we've done, via view objects and a method in our application module. The developers at this point, have placed the code to call the service method into the model code that generates the XML. The actual .jar file for this is in the viewcontroller area.
    Is this a "reasonable" approach? ( that is, importing view object jar in model)
    The web service needs to have several parameters sent to it, most of which are configured in the web.xml. They are now being passed via a data action to the model's service method.
    Shouldn't the data action be written more like the following - note: some questions in here as well...
    public void onShowPdf( DataActionContext ctx )
    // note, you can get here from 5 different places in the application and we need to be able to retrieve the bindings from these separate places for proper generation... how??
    AppModule am = (AppModule) getAm();
    String strXML = am.getXML(...);
    // get web.xml values from session context...
    PDFArchiver stub = new PDFArchiver();
    stub.generate( send prms here );
    // the next page just needs to have 3 of the parameters exposed from this page to yield the results of the generated pdf (retrieve from db)
    // what would be the best way to get the parameters over there?
    } // onShowPDF
    after this data action, it simply forwards to the next page, which has a frame to display the pdf with an [ok] button at the bottom. The pdf is rendered via a Servlet.
    one last question...
    Right now, the service method was dropped on the data action, and it is automatically invoked ( we've bound the 8 parameters to it by over-riding initializeMethodParameters). If we were to switch it so the method RETURNED the XML, how would we get the results back while INSIDE A DATA ACTION? I could see if we called it by invoking a service method from the app module instance, but how do you do it in the lifecycle of the data action??
    Whew, that's all the questions for now.
    Any help, again, would be GREATLY appreciated.

    Most of the items in this previous post have been addressed. The one problem that remains is that we use a servlet to display the PDF. The servlet reads 3 parameters from the URL to send to a service method that reads and streams the PDF to the browser.
    HOWEVER, the user can view source and then paste parameters into the URL and view whatever he wants. So:
    1. How can we prevent the servlet parameters from being seen inside the source? OR, how can we simply prevent the user from invoking the view pdf servlet with other parameters?
    2. We've temporarily, written a data action (displayPDF) which has no service method. In the findForward data action, we grab the bindings that the servlet needs from other pages (4 different binding containers), then invoke the service method and write the data to the response object. This seems to work. So, our page has an iframe with the src="displayPDF.do".
    Again, should this be done another way? Seems strange to have a data action that "acts like a servlet"...
    Thanks for feedback.

  • How to detect JBO Exception from within Apps Module Custom Method ?

    Hi all,
    I have a custom method in apps module (AM) to set "Status" attribute to "A' in an antity, this is for approval.
    Also there is a rule that the transaction cannot be approved if it is already cancelled by another user (in multi user environment).
    The problem is :
    If the AM custom method fail (because it throws JBOException in the entity setter method), How can I know that it fails ?
    and report it back to the backing beans that call the custom method ?
    Thank you for your help,
    xtanto
    Below is the code :
    1. create a custom method in AM to do : setStatus ("A") ;
    public void approve(){
    ViewObject bphVo = findViewObject("BpHView1");
    BpHViewRowImpl vBphViewRow = (BpHViewRowImpl)bphVo.getCurrentRow();
    vBphViewRow.setStatus("A");
    2. Do a validation inside setStatus method of the entity :
    public void setStatus(String value) {
    if (! getCancel() == true )
    setAttributeInternal(STATUS, value);
    else
    throw new JboException("Error ! transaction already cancelled");
    3. On backing beans :
    public String approveButton_action() {
    BindingContainer bindings = getBindings();
    OperationBinding operationBinding =
    bindings.getOperationBinding("approve");
    Object result = operationBinding.execute();
    if (!operationBinding.getErrors().isEmpty()) {
    System.out.println("There is JBO Error !!");
    return null;
    else{
    commitButton_action();
    return "back";
    }

    Try this code:
    approveButtonAction()  {
    String navigationString = null;
    try {
    Object result = operationBinding.execute();
    naviagionString = success;
    catch (JboException e) {
       navigationString = null;
       (DCBindingContainer)bc.cacheException(e);
    } finally {
    if(navigationString != null)
      return commitButtonAction();
    else
      return navigationString;
    }

  • BC4J: client object reference in app module

    We know that the BC4J clients can call the server using the remote app module reference. Just wondering if the server can have references to the clients as well (so that the server could call all the clients if something on the server gets updated)? If so, is there any example for client callbacks from the app modules? Has anyone done something like this before?

    We know that the BC4J clients can call the server using the remote app module reference. Just wondering if the server can have references to the clients as well (so that the server could call all the clients if something on the server gets updated)? If so, is there any example for client callbacks from the app modules? Has anyone done something like this before?

  • Can't call app module methods!

    I have a web app that has two AppModules: AppModule and SFAppModule. SFAppModule is NOT nested within AppModule.
    In a method inside of AppModule, I need to set a where clause for a view that is part of the data model for the SFAppModule. I can't seem to gain access to the other application module.
    1. If I Make it a NESTED app module, then of course, I have a reference to it, as it adds it, BUT I'd end up having to fix the view references to this new AppModule.
    2. I could always move the VIEW objects out of SFAppModule into AppModule, but the idea was that any object in SF was really specific to that "subsystem". Of course one of the main launch pages needs to read 6 different views, two from each app module (we're planning on adding one more application module).
    Did we paint ourselves into a corner???
    How can we get a reference to SFAppModule from inside of AppModule if it is NOT a nested application module of AppModule?
    argh.

    Alternatives for Help Resetting Security Questions and Rescue Mail
         1. Apple ID- All about Apple ID security questions.
         2. Rescue email address and how to reset Apple ID security questions
         3. Apple ID- Contacting Apple for help with Apple ID account security.
         4. Fill out and submit this form. Select the topic, Account Security.
         5.  Call Apple Customer Service: Contacting Apple for support in your
              country and ask to speak to Account Security.
    How to Manage your Apple ID: Manage My Apple ID

Maybe you are looking for

  • Add to computer

    I have a new lap top and i'm trying to add my printer to it but don't know how it don't have a CD drive and it don't have window it is a acer chromebook how do i fine drive this

  • Sql script works in mssql but not in mysql

    The following SELECT count(*) FROM itemlist WHERE ID like '%a%' or itemDescription like '%a%' works in mssql but i get the error "Table 'xxx.itemlist' doesn't exist" in mysql. How can I make this work

  • Webcal via https error /auth not Found

    Hi, while trying to access webcal via https I get the error message I use https://servername.com/webcal and get in browser URL https://servername.com/auth?redirect=https://servername.com/webcal/ Not Found The requested URL /auth was not found on this

  • Assumption of Liability Process

    Just curious how this goes. Looking on ebay at plans and there are many claiming to do a AOL and keep unlimited data. I'm sure it can be done but verizon states it can make you change to the share plans when doing so. Anyone had problems keeping ther

  • I cant install os x mountaoin lion. why do i need to purchase to upgrade? :/

    i cant install os x mountaoin lion. why do i need to purchase to upgrade? :/