Using Application Module outside ADF Application context

I am trying to run application module using a standalone java class. Trying to use Application Module outside ADF Application context.
I have created a jar file on my standalone java class, and added my ADF application jar files to the classpath while running my standalone java file as a Jar file.
I could connect to the application module and I am able to get the response from my application module.
Below is the code I used to invoke my application module method from my standalone java class.
     public static void main(String[] args) {
          System.out.println("Testing .....");
         String jdbcURL = "jdbc:oracle:thin:@localhost:1521:XE";
         Hashtable env = new Hashtable();
         env.put(Context.INITIAL_CONTEXT_FACTORY, JboContext.JBO_CONTEXT_FACTORY);
         env.put(JboContext.DEPLOY_PLATFORM, JboContext.PLATFORM_LOCAL);
         try {
             Context ic = new InitialContext(env);
             String defName = "com.org.model.BatchJobAppModule";
             ApplicationModuleHome home = (ApplicationModuleHome)ic.lookup(defName);
             ApplicationModule mbApplicationModule= (ApplicationModule)home.create();
             mbApplicationModule.getTransaction().connect(jdbcURL, "HR", "HR");
                ((BatchJobAppModuleImpl)mbApplicationModule).connectToDatabase();
         } catch (NamingException ne) {
             // TODO: Add catch code
             ne.printStackTrace();
{code}
I am getting following messages.
{code: warning}
oracle.adf.share.ADFContext getCurrent
WARNING: Automatically initializing a DefaultContext for getCurrent.
Caller should ensure that a DefaultContext is proper for this use.
Memory leaks and/or unexpected behaviour may occur if the automatic initialization is performed improperly.
This message may be avoided by performing initADFContext before using getCurrent().
To see the stack trace for thread that is initializing this, set the logging level of oracle.adf.share.ADFContext to FINEST
Dec 14, 2012 10:16:37 PM oracle.security.jps.internal.config.xml.XmlConfigurationFactory initDefaultConfiguration
SEVERE: java.io.FileNotFoundException: D:\satya\testPackage\.\config\jps-config.xml (The system cannot find the path specified)
{code}
I have another question regarding connecting to database.
How to get connection from a datasource, to avoid supplying database credentials which will vary from one environment to another.
Please let me know if any one has pointers.
Thanks in advance.
Regards,
Satya
Edited by: 921138 on Dec 14, 2012 9:20 AM                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       

Thanks Shay for your response.
When I run the standalone java class from jDeveloper 11.1.1.5.0, I am able to get application module and also able to get the out put from application module method. While running the java class jdev is exectung the class with javaw command. I tried to execute the same from commnd prompt, it didn't print anything on the command prompt. So I tried to execute java command with "java followed by class path" as below.
set JAVA_HOME=C:\Oracle\Middleware\jdk160_24\jre
set PATH=%JAVA_HOME%\bin;%PATH%
java -classpath E:\poc\TestBatchJobClient\Project1\deploy\First.jar;E:\poc\BatchJobApp\Model\deploy\adf-share-base.jar;E:\poc\BatchJobApp\Model\deploy\adfm.jar;E:\poc\BatchJobApp\Model\deploy\BatchJobApp_Model.jar;C:\Oracle\Middleware\oracle_common\modules\oracle.adf.share_11.1.1\adf-share-support.jar;C:\Oracle\Middleware\oracle_common\modules\oracle.adf.share.ca_11.1.1\adf-share-ca.jar;C:\Oracle\Middleware\oracle_common\modules\oracle.adf.share.ca_11.1.1\adf-share-base.jar;C:\Oracle\Middleware\oracle_common\modules\oracle.adf.share_11.1.1\adflogginghandler.jar;C:\Oracle\Middleware\oracle_common\modules\oracle.adf.share_11.1.1\adfsharembean.jar;C:\Oracle\Middleware\oracle_common\modules\oracle.jmx_11.1.1\jmxframework.jar;C:\Oracle\Middleware\oracle_common\modules\oracle.jmx_11.1.1\jmxspi.jar;C:\Oracle\Middleware\oracle_common\modules\oracle.idm_11.1.1\identitystore.jar;C:\Oracle\Middleware\oracle_common\modules\oracle.adf.model_11.1.1\adfm.jar;C:\Oracle\Middleware\oracle_common\modules\oracle.adf.model_11.1.1\bc4j-mbeans.jar;C:\Oracle\Middleware\oracle_common\modules\oracle.adf.model_11.1.1\bc4jwizard.jar;C:\Oracle\Middleware\oracle_common\modules\groovy-all-1.6.3.jar;C:\Oracle\Middleware\oracle_common\modules\oracle.xdk_11.1.0\xmlparserv2.jar;C:\Oracle\Middleware\oracle_common\modules\oracle.adf.model_11.1.1\db-ca.jar;C:\Oracle\Middleware\oracle_common\modules\oracle.adf.model_11.1.1\jdev-cm.jar;C:\Oracle\Middleware\oracle_common\modules\oracle.ldap_11.1.1\ojmisc.jar;C:\Oracle\Middleware\oracle_common\modules\oracle.adf.share_11.1.1\commons-el.jar;C:\Oracle\Middleware\oracle_common\modules\oracle.adf.share_11.1.1\jsp-el-api.jar;C:\Oracle\Middleware\oracle_common\modules\oracle.adf.share_11.1.1\oracle-el.jar;C:\Oracle\Middleware\oracle_common\modules\oracle.javatools_11.1.1\resourcebundle.jar;C:\Oracle\Middleware\modules\javax.activation_1.1.0.0_1-1.jar;C:\Oracle\Middleware\modules\javax.mail_1.1.0.0_1-4-1.jar;C:\Oracle\Middleware\oracle_common\modules\oracle.mds_11.1.1\oramds.jar;C:\Oracle\Middleware\modules\javax.servlet_1.0.0.0_2-5.jar;C:\Oracle\Middleware\modules\javax.jsp_1.2.0.0_2-1.jar;C:\Oracle\Middleware\jdeveloper\ide\macros\..\..\..\wlserver_10.3\server\lib\ojdbc6.jar;C:\Oracle\Middleware\oracle_common\jlib\commons-cli-1.0.jar;C:\Oracle\Middleware\oracle_common\modules\oracle.bali.share_11.1.1\share.jar;C:\Oracle\Middleware\oracle_common\modules\oracle.xmlef_11.1.1\xmlef.jar;C:\Oracle\Middleware\oracle_common\modules\oracle.dms_11.1.1\dms.jar;C:\Oracle\Middleware\oracle_common\modules\oracle.xdk_11.1.0\xml.jar;C:\Oracle\Middleware\oracle_common\modules\oracle.javacache_11.1.1\cache.jar;C:\Oracle\Middleware\oracle_common\modules\oracle.ucp_11.1.0.jar;C:\Oracle\Middleware\oracle_common\modules\oracle.odl_11.1.1\ojdl.jar;C:\Oracle\Middleware\oracle_common\modules\oracle.javatools_11.1.1\javatools-nodeps.jar;C:\Oracle\Middleware\modules\javax.management_1.2.1.jar;C:\Oracle\Middleware\modules\javax.management.j2ee_1.0.jar;C:\Oracle\Middleware\oracle_common\modules\oracle.mds_11.1.1\mdsrt.jar;C:\Oracle\Middleware\oracle_common\modules\oracle.ldap_11.1.1\ldapjclnt11.jar;C:\Oracle\Middleware\oracle_common\modules\oracle.jps_11.1.1\jps-api.jar;C:\Oracle\Middleware\oracle_common\modules\oracle.jps_11.1.1\jps-common.jar;C:\Oracle\Middleware\oracle_common\modules\oracle.jps_11.1.1\jps-ee.jar;C:\Oracle\Middleware\oracle_common\modules\oracle.jps_11.1.1\jps-internal.jar;C:\Oracle\Middleware\oracle_common\modules\oracle.jps_11.1.1\jps-unsupported-api.jar;C:\Oracle\Middleware\oracle_common\modules\oracle.jps_11.1.1\jps-manifest.jar;C:\Oracle\Middleware\oracle_common\modules\oracle.jps_11.1.1\jacc-spi.jar;C:\Oracle\Middleware\oracle_common\modules\oracle.pki_11.1.1\oraclepki.jar;C:\Oracle\Middleware\oracle_common\modules\oracle.osdt_11.1.1\osdt_core.jar;C:\Oracle\Middleware\oracle_common\modules\oracle.osdt_11.1.1\osdt_cert.jar;C:\Oracle\Middleware\oracle_common\modules\oracle.osdt_11.1.1\osdt_xmlsec.jar;C:\Oracle\Middleware\oracle_common\modules\oracle.osdt_11.1.1\osdt_ws_sx.jar;C:\Oracle\Middleware\oracle_common\modules\oracle.iau_11.1.1\fmw_audit.jar;C:\Oracle\Middleware\modules\javax.security.jacc_1.0.0.0_1-1.jar;C:\Oracle\Middleware\oracle_common\modules\oracle.adf.security_11.1.1\adf-share-security.jar -Djavax.net.ssl.trustStore=C:\Oracle\Middleware\wlserver_10.3\server\lib\DemoTrust.jks com.org.TestMyClass
{code}
I got the same old error.
Regards,
Satya                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               

Similar Messages

  • How to use prepared statement by Application Module on ADF?

    Hello
    i am using a prepared statement on the view side of my project,
    this is my code, i'm not sure about using this code.
    AppModuleGFTImpl am = (AppModuleGFTImpl) Configuration.createRootApplicationModule(amDef,config);
    try {
    ps =am.getDBTransaction().createPreparedStatement("Select * from XXXXXX where kullanici_id=? and sifre=?",0);
    ps.setString(1, kullanici);
    ps.setString(2, sifre);
    rs = ps.executeQuery();
    if (rs.next()) {
    girebilir = true;
    } else {
    girebilir = false;
    ps.close();
    rs.close();
    //am.getDBTransaction().closeTransaction(); ? I'm not Sure
    //Configuration.releaseRootApplicationModule(am, true); ? I'm not Sure
    Is it True? How we use this code on the project view side? Must we close Transaction, or release application Module.
    thanks for interest.
    sorry my english.

    Hello, for the SP you can use something like this in your application module
      private static final String BULKSTAMMENN =
        "begin IVA_OWNER.IVA_UI_ALGEMEEN_PCK.USM_SNELLE_INVOER_GUI( P_RLE_ID => :1, P_AANTAL => :2, P_OJR_JAAR => :3, P_RAS_ID => :4, P_TOELICHTING => :5, P_SUCCES => :6 ); end;";
    public void bulkStamen ( int rasId, int telerId, int jaar, int aantal, String toelichting ) {
        CallableStatement bulkStamenSP = null;
        try {
          bulkStamenSP = getDBTransaction().createCallableStatement( BULKSTAMMENN, 0 );
          bulkStamenSP.setInt( 1, telerId );
          bulkStamenSP.setInt( 2, aantal );
          bulkStamenSP.setInt( 3, jaar );
          bulkStamenSP.setInt( 4, rasId );
          bulkStamenSP.setString( 5, toelichting );
          bulkStamenSP.registerOutParameter( 6, Types.VARCHAR );
          bulkStamenSP.executeUpdate();
        } catch ( Exception e ) {
          log.warning( "Aanroep naar " + BULKSTAMMENN + " gefaald, " + e.getMessage() );
        } finally {
          if ( bulkStamenSP != null ) {
            try {
              bulkStamenSP.close();
            } catch ( Exception e ) {
              log.warning( e.getMessage() );
        log.info( "Stammen bulk uitgevoerd voor " + rasId + " " + telerId + " " + jaar + " " + aantal + " " +
                  toelichting );
      }You can then drag this method onto your page or right into your task flow if your using JDev 11.
    Also you can access it from a backing bean although the methods above are preferred
    -Anton

  • Using data source in adf application.

    Hi ,
    JDev version : 11.1.1.6.0
    I am planning to use data source in the application  , but there is an issue facing while running with data source.
    Exception in thread "main" javax.naming.NoInitialContextException: Cannot instantiate class: weblogic.jndi.WLInitialContextFactory [Root exception is java.lang.ClassNotFoundException: weblogic.jndi.WLInitialContextFactory]
        at javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:657)
        at javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:288)
        at javax.naming.InitialContext.init(InitialContext.java:223)
        at javax.naming.InitialContext.<init>(InitialContext.java:197)
        at com.cisco.complianceutil.WizardDataSourceUtil.main(WizardDataSourceUtil.java:42)
    Caused by: java.lang.ClassNotFoundException: weblogic.jndi.WLInitialContextFactory
        at java.net.URLClassLoader$1.run(URLClassLoader.java:202)
        at java.security.AccessController.doPrivileged(Native Method)
        at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
    So I used "Weblogic.jar" once and "wlfullclient.jar" . By using one of these jars issue fixed but because of it while loading the application it is throwing the below error .
    <Sep 10, 2013 2:42:05 PM IST> <Warning> <Deployer> <BEA-149078> <Stack trace for message 149004
    weblogic.application.ModuleException: [HTTP:101216]Servlet: "weblogic.wsee.jaxws.client.async.AsyncTransportProvider" failed to preload on startup in Web application: "ComplianceWizard".
    javax.xml.ws.WebServiceException: javax.xml.ws.WebServiceException: java.lang.InstantiationException: weblogic.wsee.jaxws.client.async.AsyncTransportProvider
        at weblogic.wsee.jaxws.WLSInstanceResolver.getSingleton(WLSInstanceResolver.java:36)
        at weblogic.wsee.jaxws.WLSInstanceResolver.start(WLSInstanceResolver.java:55)
        at weblogic.wsee.jaxws.WLSInstanceResolver$WLSInvoker.start(WLSInstanceResolver.java:82)
        at com.sun.xml.ws.server.InvokerTube.setEndpoint(InvokerTube.java:85)
        at weblogic.wsee.jaxws.EndpointAwareLateInitTube.postCreateEndpoint(EndpointAwareLateInitTube.java:48)
        at weblogic.wsee.jaxws.JAXWSServlet.registerEndpoint(JAXWSServlet.java:150)
        at weblogic.wsee.jaxws.JAXWSServlet.init(JAXWSServlet.java:64)
    For this I observed that solution is removing the wlfullcient.jar or weblogic.jar from the libraries. But If I do not use any one of them then data source does not work. Please guide me with your suggestions.

    This is configured in your database access layer - if it is using ADF BC then in the Application Module go to the configuration tab and edit the local configuration to see the information about which DB you are accessing.

  • Advice using workspace in custom ADF application

    Submitted on behalf of Mike Rooney (who cannot access this forum):
    We are analyzing Oracle BPM 11g beta and would like to understand existing resources for building worklist views, task status, bpm reports, etc, into our custom ADF 11g application. We want to create components on our ADF application pages that mimic these features provided by Oracle Workspace. Are there APIs, libraries or rich components that exist? We have reviewed Chapter 29 of the Oracle SOA 11g Developer Guide which discusses a programmatic solution for building a custom worklist client. We are wondering if there are any alternative rich components or declarative solutions for this functionality.
    Any help or advice is appreciated!
    -- Becky Kellinger

    Sorry for the delay on this one.
    Our 11g api is completely backward compatible with 10g. So the source we provide for the JSP based worklist app in 10g still works with 11g.
    Starting with BPM PS1, we are also providing reusable taskflows for customers to create their own ADF app and reuse our worklist regions in that app.
    Heidi.

  • Redirect from one ADF SSO application to another ADF application

    Dear All
    I've 3 ADF application developed which have 3 different context roots
    1. /XXXXView (http://<server>:<port>/XXXXView/)
    2. /YYYYView (http://<server>:<port>/YYYYView/)
    3. /ZZZZView (http://<server>:<port>/ZZZZView/)
    Without ADF security being implemented I could redirect from one application to other using below code:
    FacesContext fc = FacesContext.getCurrentInstance();
    ExternalContext ectx = ctx.getExternalContext();
    ectx.redirect("/YYYYView");
    Then I implemented ADF security in /XXXXView application and also protected the application in OAM (the port changed to <ssoport> and the new URL is http://<server>:<ssoport>/XXXXView/). After implmenting ADF security the rediection from /XXXXView to other applications stopped working and gave the below error.
    IllegalStateException: Response already committed
    Thinking one ADF secure application might not redirect to another non ADF secure application, I also implmented ADF security in /YYYYView. But no luck. Still redirection didn't work.
    Even I tried using the below code after following the blog (http://adfdeveloper.blogspot.in/2011/07/adf-auto-redirect-while-still-passing.html)
    FacesContext fctx = FacesContext.getCurrentInstance();
    ViewHandler vh = fctx.getApplication().getViewHandler();
    UIViewRoot viewToRender = vh.createView(fctx, url);
    fctx.setViewRoot(viewToRender);
    fctx.renderResponse();
    Still redirection didn't work. It will be of great help if anyone can help me resolving this issue.
    Regards
    Sibs

    You will want to look into Component Usage in Web Dynpro.
    http://help.sap.com/saphelp_nw04s/helpdata/en/0e/496ad66c601349a730502d3ea26e05/frameset.htm
    Regards,
    Rich Heilman

  • Want to integrate multiple adf applications in one adf application

    Hi,
    I am using jdeveloper 10.1.3.3
    I had developed 3 independent adf applications.now i want to create one application above all 3 applications,such that once a person log in can access all three application according to its role.
    please help.Thanks in advance

    If you switch to JDev 11g, you can use taskflows to fairly easily integrate applications together.
    We are doing it and seems to be working so far.
    Mark

  • Cannot Use JaxB classes in ADF application.

    Hi
    I am using JDeveloper 11.1.1.6
    I am trying to call the Oracle Business Rules (OBR) Ruleset from the frontend.
    When I call a simple rule only using Java facts (facts are object references of classes which are used in OBR)  as input, the Rules are verified and executed correctly.
    After that I tried to give XML Facts as input the application is facing ClassNotFoundException.
    To access the XML facts I had to add the XML Fact class known as JAXB_CLASSES into the Libraries and Classpath of Project Properties.
    First I tried to call the OBR rules containing the XML Facts / Jaxb_classes from the page and it throwed ClassNotFoundException while deploying the application.
    Next I tried to invoke the Jaxb_classes from main method and it worked fine.
    My Question is : How can I access JAXB Classes in an ADF View Controller Project/ Application?
    Thanks,
    Nigel.

    I am adding the JAXB_classes into the application in the Backend and the code for intialising is also written in the Backens.
    Still, the application is throwing a exception like
    <RuleSession> <logIt> The symbol 'generated.ParametersType' is undefined.
    at line 7 column 14 in main
    <RuleSession> <logIt> UndefinedException: The symbol 'generated.ParametersType' is undefined.
      at line 7 column 14 in main
    <RuleSession> <logIt> The symbol 'generated.ParametersType' is undefined.
    at line 7 column 14 in main
    <RuleSession> <logIt> UndefinedException: The symbol 'generated.ParametersType' is undefined.
      at line 7 column 14 in main
    oracle.rules.sdk2.exception.SDKException: RUL-05186: error setting up rule session pool for decision point

  • How to use an OBR outside the application

    Hi All,
    I am using SOA and Jdev 11.1.1.1.0.
    I have created business Rule and deployed it(using Decision table).
    Now I want to use that rule out side my application.
    In JDev i am able to import .rules file only with in that application. But we need that out side that application.
    Please guide me.
    Regards
    PavanKumar.M
    Edited by: pavan4s on Mar 9, 2010 3:39 AM

    Hi Eric,
    Thanks for the reply.
    Yes, I have stored my rules file in MDS(File based... both in resource palltte and application resources).
    But how to use this in other application.
    While creating Business rule in other application it is allowing us to import files from the same application.
    Regards
    PavanKumar.M

  • Insert new row into oracle databse through application module usng ADF Form

    I am using Jdeveloper 11.1.2. I am a beginner. I had tried in-built createInsert and commit method to add new row into oracle DB. For that, I had created ViewObject, VOImpl and AMImpl. Then, I created to jsf page. On first page, I dragged and dropped createInsert fn and VO(as ADF-readonly table) from DC Palette. and on second page, I dragged and dropped my VO(as ADF-Form) and commit (as Button) from DC palette. I created task-flow for it. when i click on createInsert button, i redirected to second page. where i filled all the required information on form. After filling, when i clicked commit button, i redirected to first page.(coz i created task flow to return first page after commit). New row is inserted into ADF-table, but when i checked my oracle DB, there was nothing added.
    Thus, I want to use custom method to insert row into OracleDB. So how can i get this? what are the steps required to do this? what programming codes required in Bean.java and AMImpl.java. Or is there any other steps to do this?
    please provide me detail steps and programming code for bean, amimpl or for VOImpl or EOImpl.
    please help me.

    User,
    To insert a row into the db you have to use a VO which is based on an EO (entity object). There is no java class (or impl) needed. You can all do this decoratively.
    All you have to think of is the PK of the new row. You can use Groovy for that (http://tompeez.wordpress.com/2011/09/02/using-groovy-expression-to-set-a-primary-key-with-a-sequence-number/)
    The rest is like you described it yourself. Drag the Vo onto the page, drop it as read only table, drag the createInsert onto the page as button and set up the navigation. On the second page drag the same VO onto the page and drop it as ADF Form. drag the commit operation onto the page as button and setup the navigation back to the first page.
    Timo

  • How-To Access ADF application module with ADF faces

    Sorry for the repost but I don't get answer in the other Thread.
    If you look in this little demo you see that you get the DCBindingContainer bc = getBindingContainer(); initialization, but my method getBindingContainer(); gives back null.
    What could be the problem with this? Should I make some changes in preferences or something like that?
    I work with JDeveloper 1013
    Greetings Thijs

    Steve Muench made an example of that on his blog, here is the url for the source download: http://otn.oracle.com/products/jdev/tips/muench/accessbindingsinbackingbean/AccessAppModuleInBackingBean.zip
    There's one canveat to this technique however. #{binding} seems to be stored in requestScope and therefore can only be injected in request or none scoped managed beans.
    Regards,
    Simon Lessard

  • ADF BC: Optimal Application Module Runtime Configuration

    Have implemented an intranet application for 1000 users using the following technologies implemented on Oracle JDeveloper 10.1.3.0.4:
    ADF BC for my Services layer
    JSF for my Controller layer
    JSF and ADF for my View layer
    ADF Model for my Data layer
    The application is entirely designed by .jspx and .jsp pages (for reports), handling 106 application modules, with several entity and view objects and without any step-by-step stateful scenario. At each page, there appears a commit button to commit the end-user transaction, and a rollback button to return to the previous page.
    The application is database-backed from an Oracle Database 10g, deployed on three application servers Oracle 10.1.3.1 on three different hosts on Suse Linux OS, used data-source connection and AM pooling, and load-balanced by one webcacher in front of the 3 servers.
    Under stress test scenario, on a heavy system load in production environment, several ADF State Management errors were recognized that pushed the webacher and application server with the maximum load to automatic restarts due to either demand for JVM increased heap size or errors from the database that the TNS listener complained it could not handle any more connections.
    Thus, we started a safety/reliability tess for all our application module components (disabling "Enable application module pooling"), and a stress test using a third-party stress tool at work, but we're still faced with several questions.
    (a) What is the best strategy for AM configuration, to quit State Management at all since our application doesn't need it, and if so can it be done globally or declaratively and not individually and programmatically?
    (b) Testing on application module runtime configuration, we observed that not to "hang-on" on a connection -default functionality- but to release it at the end of each HTTP request, as each deployment is concentrated on a single data-source connection pool/single user, brought less open JDBC connections on A.S.? Is this the optimal run-time configuration than the default for our case?
    (c) If State Management errors are resolved, and using a software balancer before 3 application servers, regulate the traffice by 1/3 to each, is it possible that a system crash will be avoided next time?
    So, our problems related to ADF tunning and State Management Errors, but we need a good advice on this topic as the overall documentation is case-specific.

    Chapter 29 "Understanding Application Module Pooling" in the ADF Developer's Guide for Forms/4GL Developers on the ADF Learning Center at http://www.oracle.com/technology/products/adf/learnadf.html is the best place to start. There is no "magic" optimal configuration that I (or anyone here, really) can suggest to you. You need to understand the various "knobs and dials" that control the pool sizing and pool cleanup behavior, and then apply application-specific information to this information to derive what the optimal configuration for your particular application will be. The chapter explains how the application module pool and database connection pool interact, and in which situations it is best to change the default setting of the jbo.doconnectionpooling property to true.
    Chapter 28 "Application Module State Management" describes the functionality of that facility of the framework, as well as how to release the application module in stateless, unmanaged mode if you need to.
    By following the tips in the section "28.3.2.4 Setting Release Level in an Custom ADF PageLifecycle" (which builds on information introduced in section "10.5.4.1 Globally Customizing the ADF Page Lifecycle"), you can generically impose a different release level in your application without "touching" every page.
    As a general rule, if you have:
    (*) Lots of distinct application modules
    (*) Each of which is used as a separate data control (rather than being nested inside a containing application module as described in section "8.9.3 Root Application Modules Versus Nested Application Module Usages" of the dev guide)
    (*) Each of which uses the same database connection
    Then as described in section "29.8 How Database and Application Module Pools Cooperate" in the guide, your application can decrease the total overall number of connections used by using the non-default setting of jbo.doconnectionpooling=true.
    Applications using many distinct data controls in the span of a single user's session need to be aware of Bug# 4566186 ("PERF: ADFBINDINGFILTER CHECKS OUT ALL ADF BC DATA CONTROLS USED AT LEAST ONCE"). This issue has been fixed in JDev/ADF 11g, but apparently the fix was too complex to accommodate a 10.1.X backport. I'm trying to document a workaround and publish it on my blog, but I'm not finished with it yet.

  • Find application module instance using groovy script

    Hi,
    Can any one help me to find the instance of a specific application module using a groovy script.
    I know the below is going to give me the current application module instance
    adf.object.applicationModule.findViewObject("ViewObject").first().getAttribute("name")But I should be able to find a specific application module and then proceed with finding the viewObject in it.....
    Edited by: vijai on Mar 6, 2012 7:21 AM

    Hi john,
    This is the summary of my issue.....
    I have few Appmodules among which one is used for administration purpose. I have a particular ViewObject say V1 that is used in all the AppModules as instances from which values are used as bind variable values in viewObject query (So when these instances gets executed first time the bind variable are set). In one operation the user changes the value in the administration app module ViewObject V1 and commits it. So we face two issues here.....
    1. I need to refresh all the ViewObjects in the other appmodules
    2. and I need to refresh the Bind Variables values in the ViewObject query (or) Give the refreshed values in the page bindings Execute With Params.
    In order to do this stuffs I thought I would make a groovy script and use the viewObject in the Administration ViewObject for values in Bind variables,ExecuteWithParams value etc......
    Pls give me a better approach or a better groovy script to do this...........

  • ADF Libary Issue - Application Module disappear from data control

    Hi All,
    I am facing an issue while adding an Application module to an ADF project as an ADF libray.
    I have two applications - ADF Application1 with Model1 project having an Application module AM1, ADF Application2 with Model2 project having an Application Module AM2
    I have created an ADF library jar file of Model1 project.
    When I add it to Model2 project, the Application Module AM2 of Model2 disappears and Application Module AM1 from the library appears in data control.
    Please suggest what could be wrong.
    Regards,
    Rekha

    Hi,
    verify that both application modules don't share the same ID in their databindings.cpx file. Which release version of JDeveloper 11g are you on ?
    Frank

  • Table QBE-Filter BUG in combination with Application Module Pooling ?

    Hi,
    i use JDEVADF_11.1.1.1.0_GENERIC_090615.0017.5407, Java 1.6.0_14, ADF BC and ADF Faces.
    I have one View Object, one Page with a panelCollection and a table with option filtering (create via drag-and-drop from datacontrol).
    When I disable the application module pooling on the AM configuration and run the application, i can execute the query-by-example filter, but when I delete the filterCriteria and press enter (requerry for select all) the table shows the old data.
    Image for setting on application module:
    http://img265.imageshack.us/img265/1374/filterdoesnotwork1.png
    Image for execute querry and requerry for "all rows" (deleted filterCriteria)
    http://img140.imageshack.us/img140/1963/filterdoesnotwork2.png
    When I enable application module pooling all works fine. Is this a issue?
    kind regards

    Hi Frank,
    if I filter for employees which firstname starts with "D" and then for employees with "F" --> i see "No data to display.".
    So uncheck "Enable Application Module Pooling" on application module doesn't work with QBE-Filter ?
    I can send a testcase but it is so simple you can create it with jdeveloper in 2 minutes ;)
    Martin

  • Single session for all Application Modules

    Hello,
    I've got an application that has several Application Modules. All these modules need some data that are set from time to time. I've written some code that calls getSession().getUserData().put("myData",myData). After this method was called in another Application Module i want to retrieve myData with getSession().getUserData().get("myData"). But the result depends if I use 2-tier or 3-tier. In 2-tie I get myData while in 3-tier I get null. My question is:
    Is there a Session object or any other data instance that could be accessed from all Application Modules for on application instance.
    E.g. I've got two user (A,B) who start my application. Through using my app several instance of Application Modules are created. All Application Modules that are created for the instance of User A should be able to share his user name and some other dynamic data while the Application Modules created for B should have no access to that data.
    Doe anybody know if static data of an Application Module are a possible solution?
    regards
    Joerg

    Hi Joerg,
    I am not 100% sure what you are trying to achieve, and with which version of JDeveloper/ ADF, technologies (JSP, Swing), etc, but I can tell you that I have been experimenting with single session accounts myself within a rich-client Swing environment, as I have experienced Oracle DBA guys who want to control user authentication via Oracle accounts (I have achieved this via the JCLoginDialog mechanism, and a bit of a hack)... Frank Nemphius (sp?) posted something about a white paper coming out on a related subject but I don't know where he is with that.
    Anyway, I managed to do it in a prototype by nesting several application modules within a Root Application Module that was essentially simply a Container for the other application modules. Using this mechanism I was able to bind my root application module to any panel I wanted and it would inherit the roots Session.
    ie. I used many application modules and it only used one Oracle Session.
    However, my reservations -
    1) This solution was not tested robustly!
    2) I doubt this would be ideal for a distributed app with thousands of users - My solution is for a very complex app, with a limited number of users.
    Finally, I cannot confirm this is a great solution - I can only tell you it worked in my prototype, and I am currently awaiting the ADF source - when my company and Oracle can decide what level of support we currently have and need!?!? - what exactly does being an "Oracle partner" mean??? Its all very boring and un-interesting to a Java person like me... ;-)
    Once I have the source I will look at how it actually works and perhaps be able to answer questions like this more definitively. Hmm - I wonder if I could get the Oracle JDBC driver source too?? .... Is it written in C or C++?? I know them too... ;-)
    Cheers........Dean

Maybe you are looking for

  • Employer Unemployment Tax Not Being calculated in US Payroll

    Hi Experts, Employer Unemployment Tax (Tax Type 10) for Tax Authority Alabama is not being calculated in US Payroll in my SAP system. The taxable amt is showing up, but the tax is not being calculated in the payroll log. No error/warning mssg is prov

  • Does SharePoint 2013 have Power Query services similar to Power Pivot and Power View?

    Does SharePoint 2013 include services to host/support Power Query content similar to the way it hosts Power Pivot content in the Power Pivot Gallery? 

  • [Services and Systems]Custom script .bat for testing Avaibility for Service

    Hi, I am trying to create a Service in grid control. For the step - Create Generic Service: Service Test, I use custom script test type. I've already done this kind of service with a custom script stored on Unix system (script sh -> OK). However, thi

  • Image code in XML feed

    I am having a problem validating my feed -- it is giving me an error message with my image code. I definitely just copied and pasted from the itunes site, and it looks identical. Can someone help?? Here's the feed validator link. Thanks so much! -Jes

  • How display ApprovalStatus=Submit

    Hi Gurus, i have 2 pages.in first page have project_number lov,create button and tableRN. and i select the project_number and click on the create button it ll navigate to secound page. in secound page data enter and click on the submit button it ll n