How to separate application module instance per user session?

Hi.
How do you separate application module instances per session or per user? I am creating a web application and has created a simple filter that implements Filter.
Thanks in advance.

Hi Frank. Thank you for the reply.
I tried using two browsers. The behavior of each page is very much different when being opened individually. Its like the two pages is sharing the same iterator / data and / or entity object. These two pages were opened to see if one is dependent upon the other. But when I test the same scenario on a different computer, everything works out fine.
Is there a way for me to verify if the sessions are different? and if they are different, is there a way to verify if the application module created a new instance for the other session?

Similar Messages

  • One Application Module Instance Per User

    Hi, I am using JDeveloper 11.1.1.2 with ADF BC.
    I have an application with a single root application module. I have my JDBC data source set up to enable identity based connection pooling so that a database connection is created with the current user's credentials.
    Basically, I would like an application module pool such that a single application module instance exists for each user in the system. If a user logs into the system, a new app module should be instantiated for him (tied to his db credentials). If the user makes a new request and his app module has been removed from the pool for inactivity, a new app module should be instantiated even if others already exist in the pool for other users. If the user is already logged into the system and tries to login again in another browser window, I would like to check if an app module already exists in the pool for the user and re-use that one instead of instantiating a new one.
    I don't want to set jbo.doconnectionpooling=true because I want the app module instance to keep its cached data.
    Is this possible? If so, how could I configure the application module to make this work?

    Hi Frank. Thank you for the reply.
    I tried using two browsers. The behavior of each page is very much different when being opened individually. Its like the two pages is sharing the same iterator / data and / or entity object. These two pages were opened to see if one is dependent upon the other. But when I test the same scenario on a different computer, everything works out fine.
    Is there a way for me to verify if the sessions are different? and if they are different, is there a way to verify if the application module created a new instance for the other session?

  • How to get application module instance from java bundle?

    Hi!
    I would like to build an application that would get all translations from a database table.
    So I created application module for translations that contains a view object which is selecting translations for specific language from a database table. I exposed a method in application module as client interface which returns HashMap<String, String> for all translations for specific language. When I test my view and client interface method call they work fine.
    Then I created java bundle classes to get translations for specific language. Then I tried to override public Object[][] getContents() method.
    I tried to get my translations application module like this:
    SharedTranslationsAppModuleImpl am = new SharedTranslationsAppModuleImpl();
    Map<String, String> translationsMap = am.getTranslations(this.getLocaleCode); // Client interface method call
    In getTranslations(String LocaleCode) I try to get that view (which would select translations from database) but it returns NULL and I get NPE error message.
    So what is the right way to get application module from java bundle file? Now everytime application wants to get translations, application stops and displays NPE message.
    Regards, Marko
    I use JDeveloper 11.1.2.1.0

    Marko,
    you can't just instantiate an application module. An application module has to be set up, db connections and memory pools have to be initialized and ....
    Can you describe why and when you try to read the resource bundle from the db and where the resource bundle is used?
    This blog may be what you are looking for http://technology.amis.nl/2012/08/10/implement-resource-bundles-for-adf-applications-in-a-database-table/
    Timo

  • Restrict application instances per user?

    We have a new ERP application.  As with most enterprise software, it has a restrictive license on concurrent uses.  It even counts multiple instances from the same user as multiple uses of its license.
    The application runs from a Windows 2012 R2 server, as a RemoteApp.
    Is there a way to restrict it so that each user may only run a single instance of the application?

    Hi Itwally1,
    All RemoteApp programs on the same server for the same user will run in the same session.
    There seems to be no built-in method to limit a RemoteApp to a single instance per user session. Please refer to following threads and check if can help you.
    Restrict a published RemoteApp to a single instance per user
    Limite RemoteApp to one instance per user
    If anything I misunderstand or any update, please don't hesitate to let me know.
    Best regards,
    Justin Gu
    Please remember to mark the replies as answers if they help and unmark them if they provide no help. If you have feedback for TechNet Support, contact [email protected]

  • Limite RemoteApp to one instance per user

    Hello everyone,
    A customer asked us to make an (unfinished) application available to them. Since this application is unfinished we want to make sure that only one person at a time is using it and that under no circumstances the customer can copy the application.
    RemoteApp seems perfect for this, however standard it allows users to open the same application as much as they like with the same credentials.
    Is there a way to limit the RemoteApp applications to one per user session?

    Hi,
    Another idea is to create an additional user account and limit only this account can use this RemoteApp.
    Thanks.
    Jeremy Wu
    TechNet Community Support

  • Accessing application module instances directly from the AMPool

    Hi!
    I´m want to create an Application Module Pool Monitor, actually I need to know how many fetched rows an Application Module instance has.
    I made a jsp, that do the following:
    ApplicationPool pool = (ApplicationPool)poolMgr.getResourcePool(poolname);
    int instanceCount = pool.getInstanceCount();
    for (int i = 0; i < instanceCount; i++){       
    ApplicationModule am = pool.getInstance(i);
    and then works with the am instances, calculating the rows that each VO has fetched.
    Now, It is not yet clear to me if, when I use "pool.getInstance(i)",
    I'm locking the instance that is being use by another session (an user session), or trying to get a lock,
    and possibly creating a deadlock. Or the AMPool administrates the lock and I don´t need to worry about it.
    Thank in advance, and sorry for my bad english!
    (i forgot to mention, I´m using adf - bc 10.1.2 )
    Message was edited by:
    user506477

    Sure, we are having RAM problems, sometimes, and for reasons that are still unclear, a process begins to consume memory.
    What we need rigth now, is a tool that tell us how many rows in memory has each user, and which ViewObject is creating them. The idea is to make some kind of monitor that shows that, the AM that each user has, an the state of their VOs.
    I used the JSP in this page as a reference:
    http://radio.weblogs.com/0118231/stories/2004/05/10/gettingApplicationModulePoolStatisticsToAidWithSizeTuning.html
    I´m not trying to create a new AM management mechanism, simply a tool that shows the status of the application (and perhaps allows me, for instance, to clear the cache of a VO that has to many rows fetched).
    In my JSP I obtain an instance of the AMs using "pool.getInstance(i)", and access then the associated VOs. But I don´t know if accesing the AMs this way could create problems with users that have an AM assigned to them, for example, a deadlock.
    Thanks!

  • Failed to checkout an application module instance

    Hi,
    I am using JDev 3.2 to develop my JSPs and BC4J. When I tried to run my JSP from my web server I got the error "JBO-30003:The application pool, TsrsJSP20_TsrsBCPack_TsrsBCPackModule, failed to checkout an application module instance. JBO-26061:Error while opening JDBC connection." How can I fix this error? Please help!!!!
    Lisa
    null

    This is a deployment problem. You either do not have all the JARS/JSPs/properties files deployed onto the webserver or they are not found in the classpath (wrapper classpath for apache).
    Since this is very webserver specific it is difficult to be more specific.

  • 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...........

  • How to invoke Application Module method from entity object methods

    Hi,
    We have an existing Application Module which provides some validation logic. We are using OperatingBinding or getting the Application Module instance from the bindings and then invoking the app module methods in the view controller project.
    But in our current scenario, We need to invoke the application module method from the setAttribute method in the entity object when ever an entity attribute value is changed . I believe we can call createRootApplicationModule method to create application module instance. But this may lead to performance overhead.
    Can you please suggest, if there is any alternative to invoke the application module method inside the business components.
    What is the best way to create

    We have a pricing service, which was developed as a separate application. We need to invoke the pricing service with the change in certain attributes of the entity object and update some of the attributes of the current entity object. At present we are handling these calls to the pricing service in the ui layer in the valueChangeListener.
    But we would like to move this service call into setAttribute method as we are unable to prevent the call to the service if the model validations fail. I am looking for the best possible approach for invoking the service calls from the entity objects.
    Thanks and Regards,
    S R Prasad

  • Application pool unable to check out application module instance in TOMCAT!

    Hi,
    I am able to run my bc4j application (WITH jsp CLIENTS) in JDEVELOPER just fine. But when I deploy it to TOMCAT, it gives me an error :
    "oracle.jbo.common.ampool.ApplicationPoolException: JBO-3003: The application pool WoopsBC4J.WoopsBC4JModule, failed to check out an application module instance"
    Can anyone tell me why this is happening?
    I have successfully deployed the sample ONLINEORDERS application to TOMCAT without any problem but this application somehow refuses to work.
    Is there anyone who encountered similar problems?
    Regards
    Ifti

    Chris, Here's the complete error message that I am receiving when I attempt to call the JSP page. I infact re-installed tomcat just to make sure that I don't have any old files that my application is referring to. So right now , I have only one application.
    Any help would be appreciated!
    Internal Servlet Error:
    javax.servlet.ServletException: oracle.jbo.common.ampool.ApplicationPoolException: JBO-30003: The application pool, WoopsModule, failed to checkout an application module instance.
    oracle.jbo.ApplicationModule oracle.jbo.html.jsp.JSPApplicationRegistry.getAppModuleInstance(java.lang.String, javax.servlet.jsp.PageContext)
    int oracle.jbo.html.jsp.datatags.ApplicationModuleTag.doEndTag()
    void _0002fiss_0005fListPerson_0002ejspiss_0005fListPerson_jsp_0._jspService(javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse)
    void org.apache.jasper.runtime.HttpJspBase.service(javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse)
    void javax.servlet.http.HttpServlet.service(javax.servlet.ServletRequest, javax.servlet.ServletResponse)
    void org.apache.jasper.servlet.JspServlet$JspServletWrapper.service(javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse, boolean)
    void org.apache.jasper.servlet.JspServlet.serviceJspFile(javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse, java.lang.String, java.lang.Throwable, boolean)
    void org.apache.jasper.servlet.JspServlet.service(javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse)
    void javax.servlet.http.HttpServlet.service(javax.servlet.ServletRequest, javax.servlet.ServletResponse)
    void org.apache.tomcat.core.ServletWrapper.doService(org.apache.tomcat.core.Request, org.apache.tomcat.core.Response)
    void org.apache.tomcat.core.Handler.service(org.apache.tomcat.core.Request, org.apache.tomcat.core.Response)
    void org.apache.tomcat.core.ServletWrapper.service(org.apache.tomcat.core.Request, org.apache.tomcat.core.Response)
    void org.apache.tomcat.core.ContextManager.internalService(org.apache.tomcat.core.Request, org.apache.tomcat.core.Response)
    void org.apache.tomcat.core.ContextManager.service(org.apache.tomcat.core.Request, org.apache.tomcat.core.Response)
    void org.apache.tomcat.service.http.HttpConnectionHandler.processConnection(org.apache.tomcat.service.TcpConnection, java.lang.Object[])
    void org.apache.tomcat.service.TcpWorkerThread.runIt(java.lang.Object[])
    void org.apache.tomcat.util.ThreadPool$ControlRunnable.run()
    void java.lang.Thread.run()
    ## Detail 0 ##
    oracle.jbo.NoDefException: JBO-25002: Definition WoopsBC4J.WoopsBC4JModule of type ApplicationModule not found
    oracle.jbo.ApplicationModule oracle.jbo.html.jsp.JSPApplicationRegistry.getAppModuleInstance(java.lang.String, javax.servlet.jsp.PageContext)
    int oracle.jbo.html.jsp.datatags.ApplicationModuleTag.doEndTag()
    void _0002fiss_0005fListPerson_0002ejspiss_0005fListPerson_jsp_0._jspService(javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse)
    void org.apache.jasper.runtime.HttpJspBase.service(javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse)
    void javax.servlet.http.HttpServlet.service(javax.servlet.ServletRequest, javax.servlet.ServletResponse)
    void org.apache.jasper.servlet.JspServlet$JspServletWrapper.service(javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse, boolean)
    void org.apache.jasper.servlet.JspServlet.serviceJspFile(javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse, java.lang.String, java.lang.Throwable, boolean)
    void org.apache.jasper.servlet.JspServlet.service(javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse)
    void javax.servlet.http.HttpServlet.service(javax.servlet.ServletRequest, javax.servlet.ServletResponse)
    void org.apache.tomcat.core.ServletWrapper.doService(org.apache.tomcat.core.Request, org.apache.tomcat.core.Response)
    void org.apache.tomcat.core.Handler.service(org.apache.tomcat.core.Request, org.apache.tomcat.core.Response)
    void org.apache.tomcat.core.ServletWrapper.service(org.apache.tomcat.core.Request, org.apache.tomcat.core.Response)
    void org.apache.tomcat.core.ContextManager.internalService(org.apache.tomcat.core.Request, org.apache.tomcat.core.Response)
    void org.apache.tomcat.core.ContextManager.service(org.apache.tomcat.core.Request, org.apache.tomcat.core.Response)
    void org.apache.tomcat.service.http.HttpConnectionHandler.processConnection(org.apache.tomcat.service.TcpConnection, java.lang.Object[])
    void org.apache.tomcat.service.TcpWorkerThread.runIt(java.lang.Object[])
    void org.apache.tomcat.util.ThreadPool$ControlRunnable.run()
    void java.lang.Thread.run()
    void org.apache.jasper.servlet.JspServlet.service(javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse)
    void javax.servlet.http.HttpServlet.service(javax.servlet.ServletRequest, javax.servlet.ServletResponse)
    void org.apache.tomcat.core.ServletWrapper.doService(org.apache.tomcat.core.Request, org.apache.tomcat.core.Response)
    void org.apache.tomcat.core.Handler.service(org.apache.tomcat.core.Request, org.apache.tomcat.core.Response)
    void org.apache.tomcat.core.ServletWrapper.service(org.apache.tomcat.core.Request, org.apache.tomcat.core.Response)
    void org.apache.tomcat.core.ContextManager.internalService(org.apache.tomcat.core.Request, org.apache.tomcat.core.Response)
    void org.apache.tomcat.core.ContextManager.service(org.apache.tomcat.core.Request, org.apache.tomcat.core.Response)
    void org.apache.tomcat.service.http.HttpConnectionHandler.processConnection(org.apache.tomcat.service.TcpConnection, java.lang.Object[])
    void org.apache.tomcat.service.TcpWorkerThread.runIt(java.lang.Object[])
    void org.apache.tomcat.util.ThreadPool$ControlRunnable.run()
    void java.lang.Thread.run()
    Root cause:
    javax.servlet.jsp.JspException: oracle.jbo.common.ampool.ApplicationPoolException: JBO-30003: The application pool, WoopsModule, failed to checkout an application module instance.
    oracle.jbo.ApplicationModule oracle.jbo.html.jsp.JSPApplicationRegistry.getAppModuleInstance(java.lang.String, javax.servlet.jsp.PageContext)
    int oracle.jbo.html.jsp.datatags.ApplicationModuleTag.doEndTag()
    void _0002fiss_0005fListPerson_0002ejspiss_0005fListPerson_jsp_0._jspService(javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse)
    void org.apache.jasper.runtime.HttpJspBase.service(javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse)
    void javax.servlet.http.HttpServlet.service(javax.servlet.ServletRequest, javax.servlet.ServletResponse)
    void org.apache.jasper.servlet.JspServlet$JspServletWrapper.service(javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse, boolean)
    void org.apache.jasper.servlet.JspServlet.serviceJspFile(javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse, java.lang.String, java.lang.Throwable, boolean)
    void org.apache.jasper.servlet.JspServlet.service(javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse)
    void javax.servlet.http.HttpServlet.service(javax.servlet.ServletRequest, javax.servlet.ServletResponse)
    void org.apache.tomcat.core.ServletWrapper.doService(org.apache.tomcat.core.Request, org.apache.tomcat.core.Response)
    void org.apache.tomcat.core.Handler.service(org.apache.tomcat.core.Request, org.apache.tomcat.core.Response)
    void org.apache.tomcat.core.ServletWrapper.service(org.apache.tomcat.core.Request, org.apache.tomcat.core.Response)
    void org.apache.tomcat.core.ContextManager.internalService(org.apache.tomcat.core.Request, org.apache.tomcat.core.Response)
    void org.apache.tomcat.core.ContextManager.service(org.apache.tomcat.core.Request, org.apache.tomcat.core.Response)
    void org.apache.tomcat.service.http.HttpConnectionHandler.processConnection(org.apache.tomcat.service.TcpConnection, java.lang.Object[])
    void org.apache.tomcat.service.TcpWorkerThread.runIt(java.lang.Object[])
    void org.apache.tomcat.util.ThreadPool$ControlRunnable.run()
    void java.lang.Thread.run()
    ## Detail 0 ##
    oracle.jbo.NoDefException: JBO-25002: Definition WoopsBC4J.WoopsBC4JModule of type ApplicationModule not found
    oracle.jbo.ApplicationModule oracle.jbo.html.jsp.JSPApplicationRegistry.getAppModuleInstance(java.lang.String, javax.servlet.jsp.PageContext)
    int oracle.jbo.html.jsp.datatags.ApplicationModuleTag.doEndTag()
    void _0002fiss_0005fListPerson_0002ejspiss_0005fListPerson_jsp_0._jspService(javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse)
    void org.apache.jasper.runtime.HttpJspBase.service(javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse)
    void javax.servlet.http.HttpServlet.service(javax.servlet.ServletRequest, javax.servlet.ServletResponse)
    void org.apache.jasper.servlet.JspServlet$JspServletWrapper.service(javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse, boolean)
    void org.apache.jasper.servlet.JspServlet.serviceJspFile(javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse, java.lang.String, java.lang.Throwable, boolean)
    void org.apache.jasper.servlet.JspServlet.service(javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse)
    void javax.servlet.http.HttpServlet.service(javax.servlet.ServletRequest, javax.servlet.ServletResponse)
    void org.apache.tomcat.core.ServletWrapper.doService(org.apache.tomcat.core.Request, org.apache.tomcat.core.Response)
    void org.apache.tomcat.core.Handler.service(org.apache.tomcat.core.Request, org.apache.tomcat.core.Response)
    void org.apache.tomcat.core.ServletWrapper.service(org.apache.tomcat.core.Request, org.apache.tomcat.core.Response)
    void org.apache.tomcat.core.ContextManager.internalService(org.apache.tomcat.core.Request, org.apache.tomcat.core.Response)
    void org.apache.tomcat.core.ContextManager.service(org.apache.tomcat.core.Request, org.apache.tomcat.core.Response)
    void org.apache.tomcat.service.http.HttpConnectionHandler.processConnection(org.apache.tomcat.service.TcpConnection, java.lang.Object[])
    void org.apache.tomcat.service.TcpWorkerThread.runIt(java.lang.Object[])
    void org.apache.tomcat.util.ThreadPool$ControlRunnable.run()
    void java.lang.Thread.run()
    void org.apache.jasper.servlet.JspServlet.service(javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse)
    void javax.servlet.http.HttpServlet.service(javax.servlet.ServletRequest, javax.servlet.ServletResponse)
    void org.apache.tomcat.core.ServletWrapper.doService(org.apache.tomcat.core.Request, org.apache.tomcat.core.Response)
    void org.apache.tomcat.core.Handler.service(org.apache.tomcat.core.Request, org.apache.tomcat.core.Response)
    void org.apache.tomcat.core.ServletWrapper.service(org.apache.tomcat.core.Request, org.apache.tomcat.core.Response)
    void org.apache.tomcat.core.ContextManager.internalService(org.apache.tomcat.core.Request, org.apache.tomcat.core.Response)
    void org.apache.tomcat.core.ContextManager.service(org.apache.tomcat.core.Request, org.apache.tomcat.core.Response)
    void org.apache.tomcat.service.http.HttpConnectionHandler.processConnection(org.apache.tomcat.service.TcpConnection, java.lang.Object[])
    void org.apache.tomcat.service.TcpWorkerThread.runIt(java.lang.Object[])
    void org.apache.tomcat.util.ThreadPool$ControlRunnable.run()
    void java.lang.Thread.run()

  • Jdev 11.1.2.0.0 AdfJarLibrary AModule as Application Module Instance

    Hi all,
    My Adf library "MainAdfLib" are added with other sub-libraries as "Application Module Instance" modality.
    In "MainAdfLib" project i see all datacontrol details , here are all ok,
    but when i added the project "MainAdfLib" in one of my view-controller projects i don't see the datacontrols details (view object ecc.).
    Why...
    Regards
    gio

    ok john, so it work, but i have many sub-adfJArlibrary linked to MainAdfJarLibrary
    i have performed the same operation, but i don't see the datacontrols details ,
    i'll try to remove all the sub-adfJarLibrary and recompile and then connect all to the main.
    p.s. i have migrated from 11.1.1.5.
    thanks
    gio

  • How to get the application module instance in backing bean.

    This is Ramesh, I am new to JDeveloper world.
    In my current application I have change password screen which allows user to change there password.
    Here this is a pop-up page. Here I don't have the view object and pagadef for this changepassword.jspx file.
    My aim is to call the Application Module method which takes the user name, old password and new password.
    In backing bean I am trying to call this method by using
    MyProjAM obj = _binding.getDataControl().getApplicationModule();  //throw null pointer exception.
    _binding is the object of DCBindingContainer. 
    ( I have created the parameter called "binding" as my managed bean property and values as #{binding})
    But the above line is throwing the NullPointerException.
    Could you please help me to come out of this problem.
    Thanks and Regards,
    Ramesh Biradar.

    If your page has no page definition, then #{bindings} will be null during the request for that page.
    If you need your page to invoke a data control method when you press a button, the simplest (and declarative) way is publish your AM method on the AM's client interface, then drop the method as a button from the data control palette onto your page. You don't even need a backing bean to accomplish this.
    That said, you can refer to a data control in a backing bean using the expression #{data.[i]YourAppModuleNameDataControl.dataProvider}
    So, assuming you have a helper method like this:
      public static Object EL(String expression) {
        FacesContext ctx = getFacesContext();
        Application app = ctx.getApplication();
        ValueBinding bind = app.createValueBinding(expression);
        return bind.getValue(ctx);
      }and assuming that your application module is named SRService
    and assuming that you have correctly nominated any Application Module custom methods as being available to clients by selecting them on the "Client Interface" panel of the application module editor, then in a backing bean you can acquire an instance.
    Then, the ADF design time will have automatically generated you a custom AM client interface named SRService and you can reference that service interface in your backing bean by using code like this:
            SRService svc = (SRService)EL("#{data.SRService.dataProvider}");
            svc.yourCustomMethod(your,args);

  • How to say application module(s) to consume only one DB connection

    Hi,
    In my application, i use UI Shell template. All of my task flows are said to have new transaction always and not to share the data control. i have bunch of application modules (not nested AM) with many view objects. All the view objects are custom java data source implemented and none of them requires DB connection as they interact with DB using tuxedo connection. Expected concurrent users will be around 800.
    i can understand that application module requires DB connection for activation/passivation, but how can i say all of my application modules to consume only one DB connection??
    Thanks in advance.
    Raghuraman

    Jobinesh,
    My application is based on UI tab shell template with each and every task flow set to begin with new transaction always.
    I was using database tables for LOV view objects data population alone. Now that also has been changed to custom view data source implementation because of client requirement (LOV data needs to be cached till user-browser session)
    With the new implementation,
    1. I have some AMs with instances of entity driven VOs. With this, I do transaction with legacy system through Tuxedo. Custom view data source implementation is done to populate data from service. Similarly Update to service will happen by reading transaction listener list on save.
    2. I also have couple of AMs with instances of non entity-driven VOs, which will be used as read-only table/LOV. For this also custom view data source implementation is done by reading the reference database table only one time during deployment.
    3. As of now, none of my AMs are specified as Shared AM.
    Questions:
    1. I want to utilize the AM passivation/activation feature to control memory usage. I came to know "*The passivation process saves information used by the AM into the passivation store - usually a database*". I have a database, from where i am reading data for LOV during deployment. Can i have the single connection of that database configured for all the AMs (Both tuxedo transaction VO's AM and LOV VO's AM) so that i can avail this feature. If so, how can i configure all the AMs to consume only one connection?
    2. Any other way to avail this AM passivation/activation without database.
    Thanks in advance.
    Raghu

  • How to access application module from ActionForm Execute?

    I've got a very simple ADF/UIX/Struts application where I'm trying to create a simple Login function. I have a /loginAction data action pointing to a login.uix page forward. The login.uix page has a <struts:form> on it with a user and a password field. There is a LoginBean with the corresponding get/set values. I have an ADF model created with a boolean login(String username, String password) function exposed as a client method.
    Eventually, when I have this basic part working, then I'll actually be using an ActionForward mapping to dispatch to different home pages, based on the particular login account (the name of the forward will be stored in the authentication table).
    I've tried overriding Execute(), since that is where you can return the appropriate ActionForward mapping, but that does not have a DataActionContext passed in -- so I can't get to the application module.
    I've also looked at processComponentEvents, but that doesn't have any ActionForward results nor a way to pass back ActionErrors (in case the login fails).
    How do I call my login client method when a user has entered a username/password and pressed the Submit button?

    Here is another solution as provided by Oracle Support in response to a TAR that I opened:
    I had described my need to access a login() function defined in my Application Module, returning true/false if the login succeeds/fails. Here is the reply, posted with permission:
    I have gotten the following information back from one of the development folks pertaining to the question you asked.
    His suggestions are as follows:
    1) Expose the method as a client method on the App module
    2) On the pageflow create a new DataAction
    3) Drag and drop the logon method from the AppModule operations node and drop it onto the new data Action
    3) Edit the set-property values that are created in the Struts metadata for this new DataAction to use the correct expressions to get the logon info to pass to the middle tier.
    e.g.
    <action path="/authenticateUser" className="oracle.adf.controller.struts.actions.DataActionMapping" type="AuthenticateUserAction" name="DataForm"
    unknown="false">
    <set-property property="modelReference" value="authenticateUserUIModel"/>
    <set-property property="methodName" value="authenticateUserUIModel.authenticateUser"/>
    <set-property property="resultLocation" value="${requestScope.methodResult}"/>
    <set-property property="numParams" value="2"/>
    <set-property property="paramNames[0]" value="${param.logonUsername}"/>
    <set-property property="paramNames[1]" value="${param.logonPassword}"/>
    <forward name="fail" path="/logon.do"/>
    <forward name="success" path="/menu.do"/>
    </action>
    So in this case the values of the logonUsername and logonPassword fields in the form that submitted to this DataAction are passed as the two parameters that my authenticateUser method on the AppModule requires.
    I have also overriden the data action class to customise the findForward() method to route the user depending on if the method call worked or not.
    And here's the code for the customized FindForward in the DataAction:
    protected void findForward(DataActionContext actionContext) throws Exception
    HttpServletRequest request = actionContext.getHttpServletRequest();
    HttpSession session = request.getSession();
    String target = "fail";
    //Get the result of the Model Method call
    JUCtrlActionBinding method = actionContext.getCustomMethod();
    boolean successfulLogon = ((Boolean)method.getResult()).booleanValue();
    if (!successfulLogon)
    // If the logon fails we need to do the following
    // 1. Increament the counter once this exceeds 3 any logon will fail
    // 2. Create an error message to display on the logon screen
    // note this is a non specific error to prevent hackers from
    // knowing that they at least got the username right or from
    // knowing that there is a Max attempts value if they are trying
    // an automated attack
    Integer attempts = (Integer)session.getAttribute("logonAttempts");
    int intAttempts = 0;
    if (attempts != null)
    intAttempts = attempts.intValue();
    session.setAttribute("logonAttempts", new Integer(++intAttempts));
    //The error message comes out of the ApplicationResources.properties file.
    actionContext.getActionErrors().add("general",new ActionError("logon.error.logonFailed"));
    this.saveErrors(actionContext.getHttpServletRequest(),
    actionContext.getActionErrors());
    else
    //If connection was OK do we need to save the username in a cookie?
    String remember = (String)request.getParameter("logonRemember");
    int cookieLife = 0; //Expire
    if ( remember != null && remember.length()>0 )
    cookieLife = 2592000;
    String name = (String)request.getParameter("logonUsername");
    Cookie userCookie = new Cookie("CARA_USER_COOKIE",name);
    userCookie.setMaxAge(cookieLife);
    actionContext.getHttpServletResponse().addCookie(userCookie);
    target = "success";
    actionContext.setActionForward(target);
    I hope this helps anyone looking to implement something similar. It also illustrates the "preferred" way of executing a client method and working with the result.

  • How to call application module from ServletContextListener

    Hi,
    I've got an application that requires authenticated users. However, before the application starts I'd like to do some DB initialization.
    So I created a ServletContextListener and in contextInitialized method I try to createRootApplicationModule.
    Due to authentication / authorization requirements, createRootApplicationModule fails with:
    ov 12, 2008 12:09:33 AM oracle.adf.share.security.authentication.JAASAuthenticationService doLogin
    INFO: LoginContext.login...
    javax.security.auth.login.LoginException: Invalid null input: name
         at javax.security.auth.login.LoginContext.init(LoginContext.java:229)
         at javax.security.auth.login.LoginContext.<init>(LoginContext.java:367)
         at javax.security.auth.login.LoginContext.<init>(LoginContext.java:444)
         at oracle.adf.share.security.authentication.JAASAuthenticationService.doLogin(JAASAuthenticationService.java:102)
         at oracle.adf.share.security.authentication.JAASAuthenticationService.login(JAASAuthenticationService.java:89)
         at oracle.adf.share.security.authentication.JAASAuthenticationService.login(JAASAuthenticationService.java:71)
         at oracle.jbo.common.UserAznUtil.authenticate(UserAznUtil.java:62)
         at oracle.jbo.common.UserAznUtil.authenticateUser(UserAznUtil.java:29)
         at oracle.jbo.server.ApplicationModuleImpl.prepareSession(ApplicationModuleImpl.java:6387)
         at oracle.jbo.server.ApplicationModuleImpl.prepareSession(ApplicationModuleImpl.java:6356)
         at oracle.jbo.server.ApplicationPoolMessageHandler.doPoolMessage(ApplicationPoolMessageHandler.java:171)
         at oracle.jbo.server.ApplicationModuleImpl.doPoolMessage(ApplicationModuleImpl.java:8377)
         at oracle.jbo.common.ampool.ApplicationPoolImpl.sendPoolMessage(ApplicationPoolImpl.java:4364)
         at oracle.jbo.common.ampool.ApplicationPoolImpl.prepareApplicationModule(ApplicationPoolImpl.java:2421)
         at oracle.jbo.common.ampool.ApplicationPoolImpl.doCheckout(ApplicationPoolImpl.java:2207)
         at oracle.jbo.common.ampool.ApplicationPoolImpl.useApplicationModule(ApplicationPoolImpl.java:3086)
         at oracle.jbo.common.ampool.SessionCookieImpl.useApplicationModule(SessionCookieImpl.java:453)
         at oracle.jbo.common.ampool.SessionCookieImpl.useApplicationModule(SessionCookieImpl.java:424)
         at oracle.jbo.common.ampool.SessionCookieImpl.useApplicationModule(SessionCookieImpl.java:419)
         at oracle.jbo.client.Configuration.getApplicationModule(Configuration.java:1395)
         at oracle.jbo.client.Configuration.createRootApplicationModule(Configuration.java:1363)
         at oracle.jbo.client.Configuration.createRootApplicationModule(Configuration.java:1335)
    Can I somehow explicitly login a valid user or exclude the specific application module from authorization?
    Regards
    J

    Hi,
    no, the function is not related to user session. It's actually data synchronization between two systems.
    We'd prefere to keep it in middle tier, through web services on one side and AM on the other. This way we are platform / RDBMS independent.
    I could use a fake system user, eg. "sync" with password "sysnc", but how do I "log on" such user in my EJB code? If I could somehow access AM login context and call login with username and password...?
    Edit:
    it also puzzles me that it's possible to have a page within the aplication that allows anonymous access. The only difference in security context seem to be _isHttp property. getUserPrincipaly returns JpsAnonymousUserImpl in both cases, IsAuthenticated() is false in both cases...
    Edited by: Jernej Kase on Nov 13, 2008 8:57 PM

Maybe you are looking for

  • Multiple IPs in Call Manager

    Hi, We need to configure multiple  IP addresses in a Call Manager version 8. Our customer has three diferent IP networks: One for management, one for signaling and one for media. Call Manager is connected to those networks using three NICs with diffe

  • Dynamically determine the height of Top-of-page of an ALV report

    Hi all, I wanted to know if there is a way to determine and set the height of an HTML-TOP-OF-PAGE based on it contents? Thanks in advance Shabir

  • Philadelphia VFP User Group--Tuesday, April 14--"Document Management within Visual FoxPro"

    The Philadelphia VFP User Group meets Tuesday, April 14 at 7:00 PM in room 104, DeVry University, 1140 Virginia Drive, Fort Washington, PA. As usual, feel free to bring some dinner and come as early as 6:30 PM. This month, member Jim Connolly will sp

  • Goods return best practice

    Hi, Kindly help me out in following senario I raise a purchase order for 100 qty of goods at $2. I do a MIGO and receive all the quantity in to my Inspection stock (QM is activated). 80 items are OK and 20 not. So 80 of them are transfer posted to un

  • No Configuration on Server or Server Error

    Hi All, I have created a track for custom development in the NWDI system. I have added standard SCA files in the track.I am able to see this track in DTR perspective. But when I go  to DC perspective and try to import configuration from  the server.