How to achieve BC4J stateful management in a web app?

I have a web application developed with JSP, Struts as the view / controller layer and BC4J as the model layer.
I am not using the complete ADF framework. Just plain struts, JSP and BC4J.
What I want to do is to have one struts action to set a
query condition on a view object and execute the query.
Then i release the application module. In another struts action I want to get the same application module with the
viewobject query set.
Pseudo for Action 1:
try{
Configuration.createRootApplicationModule("test.bc.AppModule", "AppModuleLocal");
.. get view object
.. build and perform the query on the view object.
finally
Configuration.releaseRootApplicationModule(am, true);
pseudo for action2:
try{
Configuration.createRootApplicationModule("test.bc.AppModule", "AppModuleLocal");
.. get view object with the query stored
.. use the results.
finally
Configuration.releaseRootApplicationModule(am, true);
I cannot make this work. If I put the am from action1 in the session object and retrieves it from the session in action2 it works. But I need to release the appmodule in action 1 since I have no guarantees that the user will run action2..
I have read the paper of Steve Muench "Understanding Application Module Pooling Concepts and: Configuration Parameters"
This document says:
"ADF application modules provides the ability to snapshot and reactivate their pending state to XML (stored on the file system or in the database), and the ADF application module pooling mechanism leverages this capability to deliver a "managed state" option to web application developers that simplifies building applications like the example just given.
As a performance optimization, when an instance of an AM is returned to the pool in "managed state" mode, the pool keeps track that the AM is referenced by that particular session. The AM instance is still in the pool and available for use, but it would prefer to be used by the same session that was using it last time because maintaining this so-called "session affinity" improves performance.
I have set my bc4j configurations to
releasmode = STATEFUL
jbo.passivationstore = databse
jbo.server.internal_connection= my jdbc connection
But the appmodule returned in action2 is not the same as the one returned in action1.
I am using jdev 9052 and deploying to oc4j 904 standalone.
I guess I have to use som other commands for retrieving/ releasing the AM or set some properties on it, but I have not found any documentation for this.
Any tips on how to achieve this bc4j session state to work in a plain struts , bc4j environment is appreciated.

The Configuration.createRootApplicationModule() and companion releaseRootApplicationModule() API's are not for use in web applications. They are designed for use by simple command-line console programs.
Using the BC4J application module pool programmatically in a web environment should be done like the JDeveloper 9.0.3/9.0.4 "Pooling" sample illustrates.
In the JDev 9.0.3 or 9.0.4 version, see the sample project under ./BC4J/samples/Pooling
Hope this helps.

Similar Messages

  • How to check Internal, Concurrent Manager status in Oracle Apps R12 from fr

    Step by step how to check Internal, Concurrent Manager status in Oracle Apps R12 from front end and how to start them.

    Richa wrote:
    Step by step how to check Internal, Concurrent Manager status in Oracle Apps R12 from front end Concurrent Processing - Concurrent Manager Generic Platform Questions and Answers [ID 105133.1]
    and how to start them1) Using adcmctl.sh (from the backend)
    2) Using Activate button (from the front-end) -- http://docs.oracle.com/cd/E18727_01/doc.121/e12893/T174296T174302.htm#4334248
    Thanks,
    Hussein

  • How to achieve New Window requirement from One Web Template?

    Hi Experts,
    I've a WebTemplate contains 2 Graphs. Each graph have one Zoom Button. My requirement is, When I click the Zoom button that corresponding Grpah should display in a New Window. I've finished all the above requirements.
    Since, I have One Mandatory field, I'm always getting the Variable Screen in a New Window while I clik the Zoom Button.
    I need to avoid this "Rerun" feature in New Window.
    Kindly suggest me how to achieve this..
    Full points will be given.
    Thanks
    Jay Jay

    Hi Thanks.
    Even I'm also trying for the same scenario only.
    Actually I have 2 Web Templates.
    In First Template I have 2 Charts and 2 Zoom buttons for each.
    While I running the 1 Template, i give an Value in the  Variable screen of First Web Template.
    If I click a Zoom button of 1st Chart, It should open a New window with the Second Web Template. And Second Web Template should automatically take a First Template's Variable screen Values.
    (Since, U have an Mandatory field in Second Template u were not faced this requirment.)
    Even I tried with "TRANSFER_STATE". It is not taking the First Variable Screen's input values.
    Kindly help me in this issue.
    Thanks in advance.

  • How to get error information back from Office Web Apps server?

    I'm developing a web application with an embedded Word iframe that interfaces with an Office Web Apps server; I am trying to implement the MS-FSSHTTPB protocol for my WOPI server.
    More details here. When I send a bad response back to the OWA server it stops making requests to the WOPI server and sends the following error message back to the browser client: "Sorry, there was a problem and we can't open this document. If this
    happens again, try opening the document in Microsoft Word."
    Is there a way I can get additional information about what went wrong so that I can correct it?

    Yes, this is closely related to SharePoint.
    I'm trying to embed a Word editor in our web app. The Word iframe is served from the OWA server. It typically communicates with a SharePoint server to receive information about the document its trying to display.
    I'm trying to implement the SharePoint portion. The servers communicate via the MS-FSSHTTPB protocol (among others) which I'm struggling to implement. When I send a response to the OWA server that it doesn't like then it stops replying. I'm wondering how
    I can retrieve the exact error the occurred.
    I believe I originally posted this question to Open Specifications  >  SharePoint Server Protocols.

  • How to achieve Tab level security in a WEBI report?

    hi,
    I have 2 tabs in a single Webi XI R3 report. This report should be viewed by 2 users with the following conditions.
    1st Tab should be seen by only User #1. (Tab 2 should be disabled)
    2nd Tab should be seen by only User #2. (Tab 1 should be disabled)
    How can we achieve this?
    Regards,
    Vamsee

    It is not possible to provide security on a report tab, only the document itself. Making it a requirement doesn't change the features of the product.
    If the two tabs are showing data in different formats, then using two different reports is the way to go. If the report tabs are showing the same format but different data (content) then you can apply filters or security rules in the universe itself to restrict data to what User 1 and User 2 are allowed to see.

  • How do I force CC Manager to redownload my apps?

    I've recently lost my secondary drive (where my Adobe apps are installed).  I've recovered everything from my BRU backups, but I would rather reinstall the latest CC apps from scratch.  How can I get the CC Manager to allow me to redownload all of my apps since it currently thinks that everything is up to date?

    CC desktop lists applications as "Up to Date" when they are not
    -http://helpx.adobe.com/creative-cloud/kb/aam-lists-removed-apps-date.html

  • How to move list of folders in Outlook Web App from Safari to Firefox

    I have a list of folders, one or two moved over but moist did nit

    Outlook Web App (Exchange Server 2010-2013) should have the same content on all modern browsers, since the mail and mail folders are stored on the server.
    Perhaps, though, a cookie or other local storage keeps track of peculiarities of your desired layout? If you explore around, can you find the missing folders?

  • How to get the physical path of my web app root context ?

    Hi,
    I used this code to initialize my LOG4J logger.
            System.out.println(Version + "Servlet context path : " + sctx .getContextPath());
            String path = sctx .getRealPath("/");
            fullyqualifiedlog4jpath = path + "log4j.xml";
            File locallogxml = new File(fullyqualifiedlog4jpath);
            if (locallogxml.exists()) {
                initialized = true;
                DOMConfigurator.configure(fullyqualifiedlog4jpath);
                log = Logger.getLogger(Log4j.class.getName());
                log.info(Version + "Logger initialized");
            else {
                System.out.println(Version + "Unable to locate the log4j.xml file");
            }It works perfectly when running the application with the embedded Jdev11 WLS.
    When deploying the application on a standalone WLS server the path is not returned ;-( I get a null value.
    Does someone has three lines of code which get the physical path of my web app root context?
    Yves

    Changed the methiod used to access log4j.xml.
            FacesContext ctx = FacesContext.getCurrentInstance();
            ServletContext sctx = (ServletContext) ctx.getExternalContext().getContext();
            String contextPath = sctx.getContextPath();
            HttpServletRequest  hsr = (HttpServletRequest)ctx.getExternalContext().getRequest();
            String host = hsr.getServerName();
            int port = hsr.getServerPort();
            try
              String urlstring = "http://" + host + ":" + port + contextPath + "/faces/log4j.xml";
              DOMConfigurator.configure(new URL(urlstring));
              log = Logger.getLogger(Log4j.class.getName());
    .....using the URL s OK.

  • How to use vertical scroll browser in Flex web app?

    Hi,
    I´m developing a web app with flex3. Web app has linkbar connected to a viewstack,
    that contain inside a canvas that change the height property depending on the option
    selected on the linkbar. My problem is that, when the viewstack resizes his canvas
    and has the height property bigger than the resolution of the web browser, shows a
    vertical and horizontal scroll inside de canvas. I need not to show the scrollbars
    inside the canvas, I need to show the vertical scroll bar in the general container, I
    think in application. I try to set the property verticalScrollPolicy to "off" in the containers
    and "auto" or "on" in application. The containers don´t show now the scrolls bar and
    application shows an empty vertical scroll bar. I would need to have an vertical scroll
    bar working properly in application. Somebody could help me, please.
    Thanks,

    I could make it work by dragging them to the src folder.
    That's exactly what you need to do. After all, they're source files
    When you define "src" as the source directory, that's where the compiler will look for classes/packages.
    So the package net.xyz.widgets.* resolves to src/net/xyz/widgets/

  • Liquid: How to filter on specific items in a web app collection

    I am trying to write some logic in Liquid that will show/hide certain html based on the value of a specific property of the webapp.
    I am trying to limit users to being able to create only one item of each type based on this filter.
    So in this case, the user has the option to create a 1 Bedroom Cabin, 2 Bedroom Cabin, 3 Bedroom Cabin or a 4+ Bedroom Cabin. I want them to be able to create only one of each type of cabin. I am pretty sure if/else statements are not a good way to check for this as I would be checking not only if the certain cabin type exists, but also for each situation of if say they have created a 1 Bedroom Cabin and a 4+ Bedroom Cabin. The way I am currently trying to accomplish it, I would have to write a ton of If/Else statements to check for all of these possibilities.
    Also, I notice that this code only checks if the type exists. So, if there are 4 web app items, all of these if/then statements below will evaluate to true. This is not the behavior I am looking for.
    Is there a different filter in Liquid to accomplish what I am trying to do? It seems as though my ability to iterate and do custom logic on collections is a bit limited right now in the current system. Any help would be greatly appreciated. Thanks.
    {module_webappscustomer id="28157" filter="all" render="collection" collection="listingsApp" template=""}
    <select name="CAT_Custom_1" id="CAT_Custom_1" class="cat_dropdown">
        <option value=" ">-- Please select --</option>
         {% for item in listingsApp.items %}
              {% assign accomodation = item.['Accommodation Type'] %}
              {% if accomodation == "1 Bedroom Cabin" %}
                   <option value="2 Bedroom Cabin">2 Bedroom Cabin</option>
                   <option value="3 Bedroom Cabin">3 Bedroom Cabin</option>
                   <option value="4&#43; Bedroom Cabin">4&#43; Bedroom Cabin</option>
              {% endif %}
              {% if accomodation == "2 Bedroom Cabin" %}
                   <option value="1 Bedroom Cabin">1 Bedroom Cabin</option>
                   <option value="3 Bedroom Cabin">3 Bedroom Cabin</option>
                   <option value="4&#43; Bedroom Cabin">4&#43; Bedroom Cabin</option>
              {% endif %}
              {% if accomodation == "3 Bedroom Cabin" %}
                   <option value="1 Bedroom Cabin">1 Bedroom Cabin</option>
                   <option value="2 Bedroom Cabin">2 Bedroom Cabin</option>
                   <option value="4&#43; Bedroom Cabin">4&#43; Bedroom Cabin</option>
              {% endif %}
              {% if accomodation == "4 Bedroom Cabin" %}
                   <option value="1 Bedroom Cabin">1 Bedroom Cabin</option>
                   <option value="2 Bedroom Cabin">2 Bedroom Cabin</option>
                   <option value="3 Bedroom Cabin">3 Bedroom Cabin</option>
              {% endif %}
         {% endfor %}
    </select>

    If I understand your intent, I’d loop once over listingsApp.items, setting a boolean to represent the ‘already used’ state of each accommodation type. Then I could use those to control the options:
    <select>
        {% unless hasAlreadyUsed1BRC -%}
            <option value="1 Bedroom Cabin">1 Bedroom Cabin</option>
        {% endunless -%}
        {% unless hasAlreadyUsed2BRC -%}
            <option value="2 Bedroom Cabin">2 Bedroom Cabin</option>
        {% endunless -%}
    </select>

  • Manage content of web-app

    Hi All,
    I am developing a web application using Spring/Hibernate frameworks. My application is going to be a public facing application. The pages on this application can be divided into categories. Pre-login & Post login.
    Pre-Login pages: These are mainly going to be marketing/user education pages. These are HTMLs/Jsps with el tags.
    Post-Login pages: These are main application pages which are pure JSPs with EL tags.
    Since app has been launched, marketing team puts pressure on us to change the content on the pre-login pages on almost daily basis. Currently, we are handling this by sending the static files to the remote static server.
    I want to streamline this process. The above one is tedious for changing the content as presentation is mixed with content. Often this results in errors & reworks.
    Can I make use of Foresst/Cocoon or some other XML based approach to address this issue? I want, at least for static pages, to keep the presentation code on static pages separate from content. This can enable the marketing team to write content in simple text files, which eventually can be uploaded to the server.
    Please suggest what I can do here. I wish for following: A simple text file upload and then on the basis of EL tags on the JSPs, content gets reflected on the pages of the running application.
    Rgds
    Sumit

    Few standard options:
    1) File system based content as you are planning
    2) Database driven content
    3) CMS product
    All these options should be used with care since it may slowdown the application performance. As in your case, marketing team is requesting change once a day; you can setup a cache (Any open source cache product) to improve the performance.
    Option 2& 3 are preferred approach for dynamic content because of ease of use from marketing guy perspective. Marketing team does not need to contact to deployment administrator for each change. They can simply change the content their own.

  • How to I config Authorization Database For  Adf Web App

    I Have Web Apllication that i want to Authorize resurce (task flow , page ,..) From Database
    Please help me

    Hi,
    unfortunately the question is not clear enough. When you say "authorize from database" then the question is what the policy is that you have saved in the database. Users , roles ? Note that there is a known limitation with the use of the SQL authentication as the role name saved in the database must match the role name used in an ADF application
    Frank

  • Floor Plan Manager Technique in Web Dynpro for ABAP

    Hi Experts,
    Road map technique and Floor Plan Manager Technique, both are same or different.
    I need to develop a web dynpro application based on Floor Plan Manager Technique. can I develop this application in WebDynpro for ABAP. If so please help me how to use Floor Plan Manager Technique in Web Dynpro for ABAP.
    I don't have knowledge in java, so i cann't develop this application in web dypro for java.
    Please help me.
    Thanks & Regards
    Sridhar

    >Road map technique and Floor Plan Manager Technique, both are same or different.
    They are different. The FloorPlan Manager is a tool for constructing WD applications with a similar layout and user interface.  There are two different floor plans currently - the OIF - Object Instance Floorplan and the GAF - Guided Activity Floorplan.  The OIF is for the editing of a single business object. It allows for things like the nesting of header and item details.  The GAF, on the other hand, uses a road map to walk you through an activity - much like a Guided Procedure.  The FloorPlan Manager is very powerful because it can be configured using component and application configuration - allowing you to plug in different UI Building Blocks (UIBB) as Web Dynpro Components or Views.  You can change the roadmap, for instance, adding a new step by just chaning this configuration and not having to touch the code.  Consistency between applications is also a major stregth of the FloorPlan Manager. 
    The Road Map is just a UI element in WD.  It can be used to create your own custom applications.
    >can I develop this application in WebDynpro for ABAP
    Sure.  The Floorplan manager has been available for WDA since SPS13.  Have a look at the packages APB_FPM_DEMO and ABP_FPM_TEST for examples of how to build components designed for the FloorPlan Manager.
    Admittedly there aren't a whole lot of documents available on the subject yet. Some eLearning is being worked on now.  There are going to be some workshops at TechEd on the subject:
    https://wiki.sdn.sap.com/wiki/display/Community/BringitallTogetherwithFPM%28FloorplanManager%29forWebDynpro+ABAP
    The best thing to do right now is to study the demo applications SAP provides.

  • How to achieve automated posted for invoice and stock transfers

    Hi,
    I have following queries for an RFP, can some one give hints on how to achieve them in SAP
    o Receive self-billing documents from the customer, stating the deliveries and amounts that are settled and paid
    o Automatic posting of invoice documents from the vendor, based on the data from the purchase order and goods receipts
    o Process material stock transfers between two plants that use different SAP systems
    Thanks & Regards
    Raghu

    Hi,
    Normally when we do GR we take the cenvat credit by capturing & posting the excise invoice.
    This can be done using the t.codes - MIGO or J1IEX.
    So when the Material doc is posted the Part 1 register gets updated with Qty received.
    If we post the excise inv using either MIGO or J1IEX the Part 2 register gets updated.
    Now if you have done both the above then inorder to cancel the excise inv.
    1. You have to cancel the Material Doc (so system wil use the Mov type 102)
    2. Now Post your excise inv using J1IEX so that your Part1 reg will be updated ( i.e you are reversing the Cenvat Credit that you have availed).
    3. Finally you have to cancel the Excise inv document using J1IEX so that your Part 2 register wil be updated.
    Make sure that you do the above steps as per the above sequence else system will show the error as you mentioned.
    Hope its clear.
    Regards,
    Kiran

  • How to achieve this tree table (displaying/modifying non leaf level details) ?? Image inside

    Region
    location
    Dept
    Budget Available
    Allot Budget
    Unused Budget
    Decision for unused budget
    US
    200$
    User Input
    NY
    100$
    User Input
    CA
    100$
    User Input
    HR
    50$
    User Input
    IT
    50$
    User Input
    ---------30$--------
    20$
    LOV
    Add to Location
    Use for Future Project
    Add to Region
    Spend as Bonus
    How to achieve this tree table ?
    My client wants that they should also be able to manage budge at Location or region level not only at the leaf(Dept) level.
    I did a lot of research and finally found out that the details can only printed at the leaf(Dept) level.......
    We can not hard code Region, locations and departments in table rows. When table tree is displayed we will only show all the regions... (US, UK, SA, IND, AUS, CAN,RUS, JPN.... etc..)
    For Example:
    Locations for US (NY, CA, OKH, WC...... etc.)
    Locaitons for UK (SC, ENG, WL..... etc)  and so on......
    Departments for CA (HR, IT, ADMIN, FIN, TRVL, OPRN........ etc. ..)
    Thanks in advance... It will be really great help if I get some breakthrough...
    -Rahul

    Hi,
    what if you add a transient attribute to those view objects? This way you don't need to change the table structure.
    Frank

Maybe you are looking for

  • When I open my computer and use it for a period of time it freezes up and it say Mozilla Firefox is not responding. What should I do with this?

    This happened several times already that my computer freezes up and it says Mozilla Firefox is not responding. When this happen it takes a long time before I can use my computer, I would say one hour or sometimes it takes 2 hours. When it takes like

  • Video KB -- How Do I?

    A project I have been working on in my spare time is to make videos about how to do simple tasks that my customers continually ask. Recently it was pointed out to me, it would be a good idea to share this project here in the IronPort Community forums

  • Display cost center in FBL3N

    I want to display cost center information in GL line item report (FBL3N).I choose new layout with additional column: order and cost center.My problem is only order will display the information while no details in cost center column.How do i display m

  • Delta update for 0FI_AR_4 DataSource

    Hi Experts, We have a couple of reports (Infoprovider ODS) which are based on the 0FI_AR_4 DataSource. We have enhanced the Datasource and added 7 to 8 fields from SD and FI region. For enabling delta current mapping is: UPDMOD (R/3) field mapped to

  • Signature image for outlook

    I am trying to create a signature image for outlook but the image is loosing sharpness when the mail is delivered. What is the ideal work flow to create a signature image?