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

Similar Messages

  • Can't get and use an apple id for cloud or apps or store when i try to change it it will let me but then everytime it keeps asking me to chang e password everytime cant get my computer to just accept one password that will keep

    can't get and use an apple id for cloud or apps or store when i try to change it it will let me but then everytime it keeps asking me to chang e password everytime cant get my computer to just accept one password that will keep

    Just what are you doing and what is the exact wording of the message you are getting?

  • How do I get and use iCloud

    How do I get and use ICloud, will my current mobile me email automatically convert to iCloud?

    It will be available on Oct. 12th.

  • How will the new OSX Mavericks affect applications already installed and using Mountain Lion?

    How will the new OSX Mavericks affect applications already installed and using Mountain Lion?

    If you're asking about compatibility, that would be something you would need to ask of the app developers, though most apps compatible with Mountain Lion should be compatible with Mavericks. You can also consult the tables here:
    http://roaringapps.com/apps
    though that information comes from user reports and so should not be considered authoritative.
    If you're asking whether installing Mavericks will delete your apps, no, it won't, though a good backup is always highly recommended.
    Regards.

  • Use of application module pool and ADF Busines Components

    Hi to all;
    Lets suppose an web application with about 10 CRUD forms and 15 to 20 reports or forms just to query and show data;
    That's clear to me, all the advantages of using App modules pool.
    But for that reports ..... Just an Read only and Forward Only data ?
    I was wondering, if it will be more effective and lightweight if we just take an JNDI JDBC connection query data and show it.
    This imaginary application will make use of application module pool to provide that 10 CRUD web forms and in other hand, will have for reports,JNDI data sources;
    What are your opinion about having this two architectural approach working together in one application ?
    Very thanks;
    Marcos Ortega
    Brazil;

    Hi Deepak;
    BC4J in my opinion is great and i am proud to share this opinion with all of you;
    As a meter of fact, i post this thread to help me better understand BC4J architecture.
    I think that my doubt main point is ...
    Are application modules pool's life cycle an extra work , when the job is just to read and show data ?
    Perhaps, an document about statefull and/or stateless application service release, help me;
    IMHO;
    cached data most of the time must to be discarted for reports, always we want to query database directly, View's object ClearCache() method would be called to reports.
    I think that it's different, when we are talking about sequent requests when we need to span the session, views and entities states.
    Forwards Thanks;

  • Best practice for calling application module methods and plsql code

    In my application I am experiencing problems with connection pooling, I seem to be using a lot of connections in my application when only a few users are using the system. As part of our application we need to call database procedures for business logic.
    Our backing beans, call methods on the application module which in turn call a database procedure. For instance in the backing bean we have code like this to call the application module method.
    // Calling Module to generate new examination/test.
    CIGAppModuleImpl appMod = (CIGAppModuleImpl)Configuration.createRootApplicationModule("ky.gov.exam.model.CIGAppModule", "CIGAppModuleLocal");
    String testId = appMod.createTest( userId, examId, centerId).toString();
    AdfFacesContext.getCurrentInstance().getPageFlowScope().put("tid",testId);
    // Close the call
    System.out.println("Calling releaseRootApplicationModule remove");
    Configuration.releaseRootApplicationModule(appMod, true);
    System.out.println("Completed releaseRootApplicationModule remove");
    return returnResult;
    In the application module method we have the following code.
    System.out.println("CIGAppModuleImpl: Call the database and use the value from the iterator");
    CallableStatement cs = null;
    try{
    cs = getDBTransaction().createCallableStatement("begin ? := macilap.user_admin.new_test_init(?,?,?); end;", 0);
    cs.registerOutParameter(1, Types.NUMERIC);
    cs.setString(2, p_userId);
    cs.setString(3, p_examId);
    cs.setString(4, p_centerId);
    cs.executeUpdate();
    returnResult=cs.getInt(1);
    System.out.println("CIGAppModuleImpl.createTest: Return Result is " + returnResult);
    }catch (SQLException se){
    throw new JboException(se);
    finally {
    if (cs != null) {
    try {
    cs.close();
    catch (SQLException s) {
    throw new JboException(s);
    I have read in one of Steve Muench presentations (Oracle Fusion Applications Team' Best Practises) that calling the createRootApplicationModule method is a bad idea, and to call the method via the binding interface.
    I am assuming calling the createRootApplicationModule uses much more resources and database connections that calling the method through the binding interface such as
    BindingContainer bindings = getBindings();
    OperationBinding ob = bindings.getOperationBinding("customMethod");
    Object result = ob.execute()
    Is this the case? Also is using getDBTransaction().createCallableStatement the best way of calling database procedures. Would it be better to expose plsql packages as webservices and then call them from the applicationModule. Is this more efficient?
    Regards
    Orlando

    Thanks Shay, this is now working.
    I successfully got the binding to the application method in the pagedef.
    I used the following code in my backing bean.
    package view.backing;
    import oracle.binding.BindingContainer;
    import oracle.binding.OperationBinding;
    public class Testdatabase {
    private DCBindingContainer bindingContainer;
    public void setBindingContainer (DCBindingContainer bc) {this.bindingContainer = bc;}
    public DCBindingContainer getBindingContainer() {return bindingContainer;}
    public static String validateUser()
    // Calling Module to validate user and return user role details.
    System.out.println("Getting Binding Container from Home Backing Bean");
    BindingContainer bindings = BindingContext.getCurrent().getCurrentBindingsEntry();
    System.out.println("Obtain binding");
    OperationBinding operationBinding = bindings.getOperationBinding("calldatabase");
    System.out.println("Set username parameter");
    operationBinding.getParamsMap().put("p_userId",userId);
    System.out.println("Set password parameter");
    operationBinding.getParamsMap().put("p_testId",examId);
    Object result = operationBinding.execute();
    System.out.println("Obtain result");
    String userRole = result.toString();
    System.out.println("Result is "+userRole);
    }

  • 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                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               

  • How to put Module filename and use current filename in code ?

    Hi,
    I was create SequenceCall (in MainSequence), but need to put Module filename and existing file where to find module. I found some old function that are not part of API anymore (TS_SequenceCallModuleSetUseCurrentFile() and TS_SequenceCallModuleSetSequenceName(). Those exists in help file, but not in tsapicvi.c.
    Can you someone help with this (CVI code) ?
    Best regards,
    branar
    Solved!
    Go to Solution.

    Hi,
    I create seq file in CVI code (based on excell file). So, all sequences and subsequences are generated by CVI code and Ecxell file. Currently, want to add SequenceCall in MainSequence. It work with:
    tsErrChkMsgPopup( TS_EngineGetSeqFileEx (EngineHandle, &errorInfo, SeqTemplate_path, TS_GetSeqFile_DoNotRunLoadCallback, TS_ConflictHandler_Prompt, &SequenceFileHandle));
    error= TS_SeqFileGetSequenceByName (SequenceFileHandle, NULL, "MainSequence", &SequenceHandle);
    tsErrChkMsgPopup( TS_SequenceGetNumSteps(SequenceHandle, &errorInfo, TS_StepGroup_Main, &iNumofSteps));
    tsErrChkMsgPopup( TS_EngineNewStep (EngineHandle, &errorInfo, "", "SequenceCall", &sequenceCallStep));
    tsErrChkMsgPopup( TS_StepSetName ( sequenceCallStep, NULL, szName));
    tsErrChkMsgPopup( TS_SequenceInsertStep ( SequenceHandle, &errorInfo, sequenceCallStep, iNumofSteps, TS_StepGroup_Main ));
    error= TS_StepGetModule ( sequenceCallStep, &errorInfo, &sequenceCallStepModule);
    Now, need to add Module name and sequence name to call. I was tried with some function, but those are not supported (at least in tsapicvi.c)
    error= TS_SequenceCallModuleSetUseCurrentFile ( sequenceCallStepModule, &errorInfo, VTRUE);
    error= TS_SequenceCallModuleSetSequenceName ( sequenceCallStepModule, &errorInfo, SeqTarget_path);
     Also, I not found similar function to use instead. Can you help me with this ?
    Best regards,
    branar

  • Applications software dependencies and using packages

    I'm preparing a software application deployment (EMET v5) but the documentation requires a package to be created for several files/settings to be configured.  Is it possible to create a package dependency for an application deployment?  At present,
    I only see the option to add other available Applications as dependencies.
    Thanks

    Hi,
    No it's not possible.
    If you are going the package route you could use the advanced tab of the program to run another program first.
    Add both parts of the application as a package.
    Don't tick the box "always run this program first" unless you want it to run regardless of it already being installed.
    Or you ditch the package and use an application deployment for both.

  • Can you get and use internet explorer for mac?

    I am wondering If I can obtain and use internet explorer?

    No
    Safari or Firefox  are the optimal choices. At times Safari does not open links with smooth pagination of fonts and lettering / graphics are not clear. So I opt for Firefox. Be aware that you need to close Safari to use Firefox. It has been my experience.that if I forget to close Safari and open Firefox at same time Firefox error message says oops! We need to reset or can't open try again.

  • How to make GUI application run fast and use less memory?

    Hi, there,
    My GUI application have:
    Menu, toolbar, filechooser, JTable, and log panel.(There is not much file io operation)
    When I run it in my machine, it is so slow, and if I run several times, close it after each run, it will run out of my memory. I am using PII266MMX, 256RAM. (When I run another software, such as flashfxp, GUI of which is more complicated than mine, however it is far faster than mine, but I don't think it is written in JAVA), Is JAVA's GUI desktop application not fast?
    Regardless hardware factors, what should I pay attention to writing an efficient GUI application?
    Can anybody give some advice?
    Thanks a lot, thanks .....

    Thank you, Denis.
    I can run several times of this applicaiton in another machine: PIII866, 256M RAM (windows 2000). I didn't encounter the memory problem, I can open serveral windows of it with that machine.
    Why I met this problem in this old machine, I alway get memory not enough problem.(this old machine comes with Win98). Both of machines have same memory(256M).
    Could you please give me some hint?
    Thanks,
    Sitai

  • How to get and use connection from Web AS 7.0 pool?

    Hello!
    I've set up a datasource and connection pool in my Web AS according http://help.sap.com/saphelp_nw70/helpdata/en/c0/3ad4d5cdc66447a188b582aad537d3/frameset.htm
    And I have some questions about using connection pool:
    1) here is my code which get connection form pool:
    InitialContext ctx = new InitialContext();
    DataSource datasource = (DataSource) ctx.lookup("jdbc/IndexesDataSource");
    Connection con = datasource.getConnection();
    return con;
    Does it properly?
    2) Which method I should call when I need to pass connection back to the pool? Will it be enough to call con.close()?
    regards, Lev

    Hi Lev,
    Write code like this
    try{
    InitialContext ctx=new InitialContext();
    DataSource ds=(DataSource)ctx.lookup("jdbc/indexsDataSource");
    Connection con=ds.getConnection();
    Statement stmt=con.createStatement();
    con.close();
    catch(Exception e)
    wdComponentAPI.getMessageManager().reportException("Exception "+e,true);
    also have a look at below links[Link|http://help.sap.com/saphelp_nw04/helpdata/en/61/fdbc3d16f39e33e10000000a11405a/frameset.htm][Link1|http://help.sap.com/saphelp_nw04/helpdata/en/46/ddc4705e911f43a611840d8decb5f6/frameset.htm][Tutorial|http://help.sap.com/saphelp_nw04/helpdata/en/91/9c2226df76f64fa7783dcaa4534395/frameset.htm]
    Regards,
    Krishna kattu

  • AOL has deleted Safari as a means to use AOL. What server can I now get and use?

    AOL has stopped using Safari as a server to get onto AOL. What can I use instead of Safari to gain wntrance into AOL??

    Safari is a browser (not a server), so I'm not sure I understand what AOL is doing. I just tested it and was able to open the AOL home page without a problem.

  • How to get and use FlashPlayer on Android - Samsung S4?

    When I'm viewing videos on the internet, many times the video will not play because I don't have Flash Player on my Android phone. I've tried searching for the app in Play Store, to no avail, and other video apps do not seem to work. Any suggestions for those who may have encountered this problem?
    Thanks.
    Ken

    Here you go this is from their archive.
    http://download.macromedia.com/pub/flashplayer/installers/archive/android/11.1.115.81/install_flash_player_ics.apk
    It's their last version they ever made.  You will need to use a browser that isn't Chrome, or based on Chrome for it to work.

  • How to get and use mouse information?

    I want to write a simple program for getting mouse location, and if the location of the mouse is within an area, then a red dot show on the screen.
    Could anyone please teach me how to get mouse location?
    Thanks

    http://java.sun.com/docs/books/tutorial/uiswing/events/mouselistener.html
    http://java.sun.com/docs/books/tutorial/uiswing/events/mousemotionlistener.html
    http://java.sun.com/docs/books/tutorial/uiswing/events/mousewheellistener.html
    Doh! Too slow!
    Message was edited by:
    DrLaszloJamf

Maybe you are looking for

  • Report shows "No data found" when validation fails

    Hi folks, I'm new to the OTN and have a short question regarding validations/report pagination. We are using Apex 4.0.2.00.07. I have a page containing a report with three columns. First column is a checkbox (f30), the second one a date picker and th

  • My mac book air has been stolen, how can I report it to apple

    is theresomeplace I can check before buying another one fromebay?

  • BitLocker Drive Label

    We use BitLocker on our laptops which are not connected to AD. We would like to change the Computer Name of the laptops and would like the BitLocker Drive Label to match the new Computer Name. Is there a way to change the Drive Label without decrypti

  • Multiple partner for Vendor

    Dear experts, I am facing one urgent query from my client. they have a scenario that one vendor may have multiple "good supplier" partner.Is it possible in SAP to have multiple partners for "goods supplier" or "Invoicing Party" for a same vendor. Ful

  • Intercompany order related billing

    Hi, Can anyone please explain the steps to create Intercompany order related billing?  1000 company code has to bill 2000 company code.  It is order related. Thanks, Srinivasan.K