[ADF, JDev12.1.3] That is the approach recommended to store the information of the logged-on user?

Hallo,

I would like to know which are:

  • approaches possible and advised to store the main information (which will be used throughout the application) of the user that is logged;
  • for each of the approaches that are the main advantages and disadvantages.

For example

I have my doubts if store info in variables private module request or if I'd better use the HttpSession.

The use of HttpsSession back to store the information in a range session bean?

A scope session bean should be used only to store information?

Sorry if these question may be stupid but I'm starting to take care of the security of my application and I am a bit confused about the available possibilities.

I use ADF Essentials, so I can't use ADFSecurity.

Thank you

Federico

I have my doubts if store info in variables private module request or if I'd better use the HttpSession.

Never use app module variables to store data. If you need to store data in the model project, you can use the UserData card, but you must implement the serialization/deserialization.

Read this blog post for more information: http://andrejusb.blogspot.com/2012/05/solution-for-sharing-global-user-data.html

The use of HttpsSession back to store the information in a range session bean?

They are similar.

Difference is that you can put data directly to the session http (as an attribute) and if you use managed bean then keep you data in the attributes of bean and framework will put bean in scope of the session.

A scope session bean should be used only to store information?

Well, do not store the amount of data in session bean because it will influence the performance of the server (if the number of users increases you need more RAM, if you assign more RAM to the server it will be time for garbage collection, will also increase if you have clustering then great session bean (s) will increase the time of synchronization of the session) ", etc...)

Dario

Tags: Java

Similar Questions

  • What are the causes of the log of user account on missing cursor in Windows XP? I have two trays of office that they have this same problem. If you restart them the cursor returns?

    What are the causes of the log of user account on missing cursor in Windows XP? I have two trays of office that they have this same problem. If you restart them the cursor returns?

    Hi DaddyJeff,

    1. don't you make changes before the show?
    2. are you referring to the cursor in the area of user password on the login screen of Windows?
    3. when the cursor goes missing, the mouse pointer works on screen?

    It is difficult to say what is causing this problem. If the mouse pointer freezes or stops working, then we recommend you to reinstall the mouse. To do this, try the following steps:
    a. sign in to Windows.
    b. Click Start, click Run, type devmgmt.msc, and then click ok.
    c. in the list of objects, expand mice and other pointing devices.
    d. right click on the sub element and click on uninstall.
    e. unplug the mouse and plug it back.
    f. the Device Manager, select an item in the list, click the Action menu, click scan for hardware changes.
    g. check if the mouse is detected, if so, then install it.

    See mouse USB which is connected to a USB 2.0 hub is not detected by Windows XP


    Note:
    if the problem persists, restore the computer to an earlier time. See How to restore Windows XP to a previous state

    Visit our Microsoft answers feedback Forum and let us know what you think.

  • Show/hide menu based on the logged in user

    Hello

    12.1.3 Jdev

    I want to show/hide some menu items based on the logged in user.

    I will explain the current design:

    In my application, I created a menu as below. (It is created using 'Create or Update ADF Menu' file adfc_config).

    ibis_menu. XML

    <?xml version="1.0" encoding="windows-1252" ?>
    <menu xmlns="http://myfaces.apache.org/trinidad/menu">
      <itemNode id="itemNode_home" label="Home" action="goHome" focusViewId="/home"/>
      <itemNode id="itemNode_transaction" label="Transaction" action="goTransaction" focusViewId="/transaction"/>
      <itemNode id="itemNode_customer" label="Customer" action="goCustomer" focusViewId="/customer"/>
      <itemNode id="itemNode_upload" label="Upload" action="goUpload" focusViewId="/upload"/>
      <itemNode id="itemNode_profile" label="Profile" action="goProfile" focusViewId="/profile"/>
      <itemNode id="itemNode_serviceRequest" label="Service Request" action="goServiceRequest"
                focusViewId="/serviceRequest"/>
      <itemNode id="itemNode_report" label="Report" action="goReport" focusViewId="/report"/>
    </menu>
    

    I have a navigation pane in my Pages that use this menu as below:

    <af:navigationPane hint="bar" id="np1" value="#{ibis_menu}" var="menuInfo">
                            <f:facet name="nodeStamp">
                                <af:commandNavigationItem id="ni1" text="#{menuInfo.label}"
                                                          destination="#{menuInfo.destination}"
                                                          action="#{menuInfo.doAction}"/>
                            </f:facet>
                        </af:navigationPane>
    

    Now, I want to hide some items on the menu, depending on the Type of user loggedIn. I have the userType stored in the managed bean.

    How can I get this feature.

    An approach which I think is as below:

    Define a variable for each itemNode in a managedbean(session scope) and who associate with the property ' visible ' / ' rendering ' of the itemNode in the Menu xml.

    Please let me know is a good way to do it or is there another solution better?

    See you soon

    AJ

    So, maybe this can help:

    http://www.Oracle.com/technetwork/developer-tools/ADF/learnmore/48-sitemenu-protection-169190.PDF

  • How can I get the ENTERPRISE_ID of the logged-on user?

    Hello

    Is there a PL/SQL function that I could use to get the ENTERPRISE_ID of the user logged on so that I can use it in a report query for example as below.

    SELECT package.function

    FROM DUAL;

    "package.function" must be able to return to the ENTERPRISE_ID of the logged in user.

    Kind regards

    Santhosh Jose

    I think that you can access the ENTERPRISE_ID with:

    • SYS_CONTEXT ('FND_VPD_CTX', 'ENTERPRISE_ID')

    Assuming that the ApplCore session has been initialized or alternatively:

    Note that since it is related to the VPD implementation, that you can't question simply through companies, rather restrictions are applied at the level of the table. Also note that since its code internal, it is subject to change without notice.

    --

    Jani Rautiainen

    Relationship with the developers of Applications in fusion

    https://blogs.Oracle.com/fadevrel/

  • [ADF, JDev12.1.3] Which is the best way to define the properties of CIU/fragments of pages. Is the approach that I have used a good choice (for a beginner)?

    Hallo,

    in my app, that I have a lot of pages and fragments in which properties (for example rendered text, disabled, Selected,...), lots of user interface components must be set, before/when the page is displayed, depending on the session and pageFlow scope attributes.

    So far I have created for each page/one backingBean brought bean fragment in which I defined an attribute for each property defined (e.g. 2 properties for each UIC: UIC is 10...) "I have 20 attributes to manage in the bean).

    Then, I linked each attribute of the bean to the respective UIC property. You can see in this my thread (unfortunately without answers ) [ADF, JDev12.1.3] backingBean bean: a lot of properties to set for lots of CIU... is better by using the properties of the binding or access code (created by ID) UIC? a small example. I put the attributes the bean Builder (or in a function of 'action' if the APP properties must be set based on the interaction of the user).

    I would like to know:

    • If it is a good approach / recommended / safe or if there is a better way;
    • If the scope backingBean is OK, or if a larger scope would be better.

    As I asked in the thread in the link above, the situation can become difficult to manage if the PPP for which setting, properties are very different.

    So I'd like if there is no alternative that I can use to get the same result with less effort.

    For example, using the class ComponentReference or invokeOnComponentAPI could simplify my life? And their use could I always use backingBean brought beans?

    Thank you

    Federico

    Federico, please understand that this forum has no sla. I have other work to do, who pays my bills. I will do my best to help, but you can not expect the instant replay.

    (1) you must not use the bean to init your beans. You can delay load or init your beans instead.

    (2) as Frank and says you can use a bean to view range and use it to make your calculations as long as you know how their parameters go to the btf

    (3) you should always use the reference of the component if you bind a component to a bean. Make a habit of all scopes.

    As we do not know how you calculate the State and how often it changes while the Working Group is on the page, it is difficult to give further advice.

    Timo

  • [ADF, JDev 12.1.3] How to hide menu items based on the logged in user

    Hallo,

    When the user logs on successfully, the applitacions led him to the main.jspx page.

    The main.jspx page has a menu bar that contains all of the available menus, submenus and menu items.

    After the connection, when the main.jspx page loads I would hide all the menus, submenus and menu items that the user is not qualified to see/use (I read the database).

    You kindly tell me which is the way the cleaner to achieve?

    Thank you

    Federico

    user10709360 wrote:

    Hello rohanwalia,

    Sorry, but I need more help

    I guess that the solution is to create a method in the AM who - reading form the database - returns a structure that indicates for each menu item should be visible or hidden.

    • How can I use the data returned by this method?
    • I call in a managed bean specifically dedicated to the management of the menu? Can I also use the already existing media bean, I created for the page?
    • What scope should have the bean?
    • Don't you think that it is better to define a 'visible' variable Boolean (initilized depending on the result of the AM method) for each menu item and how to bind the Visible property of each menu item to the variable respective in the bean in the bean?
    • Or I can loop the result of the method AM setting the Visible property of the menu items? In this case, I guess that all the menu items must be mapped into the bean by user interface variable. Am I wrong?
    • Is it not possible to write a method which, of the AM directly, hide the menus not necessary on the page (so without using a bean)?
    • In general, which are the correct always to hide menu items:
      • (1) before the page is sent to the browser (as "I can do it with PHP);
      • (2) once the page is loaded in the browser (as I can do it with JavaScript)?

    If you could give me some more detailed advice... I would be very happy.

    Thank you

    Federico

    (1) its best to make the treatment inside the method. You can return the parameters as normal java method.

    (2) Yes, you can use bean already exists in the project. But better to create a separate bean for this task of menu.

    (3) scope should be request unless you need to persist the attributes between requests.

    (4) Yes it is possible. You can define and initialize a Boolean variable with the results you get from the table based on the menu items should be made visible.

    (5) If you use the approach to point 4, then also you have to loop through the table menu items and set Boolean variables of bean. Yes you are right for the second part.

    (6) I'm not sure about this approach. How will you map it to your menu mode. It takes research.

    (7) before the page is loaded. I share with you links in above post with which you can do this.

    I hope this helps.

    Thank you

  • How to get the logged in user name of BPM worklist.

    Hello

    In my SOA application I have attached the external form of ADF to human task. In the list of tasks, when the action is run on human task, I want this username to be stored somewhere in the payload or any other variable. Because I want to use this username more far in workflow.so that all configurations are necessary. Please suggest.


    Thank you.

    Hello, please try this feature as below:

    public String getUserLogin() get WorkflowException,
    BPMIdentityException,
    {BPMUnsupportedAttributeException}
    String userId = "";
    IWorkflowServiceClient wfSvcClient;
    ITaskQueryService queryService.
    IWorkflowContext wfContext;

    Get the username of the user login
    String contextStr = ADFWorklistBeanUtil.getWorklistContextId ();
    wfSvcClient = WorkflowService.getWorkflowServiceClient ();
    queryService = wfSvcClient.getTaskQueryService ();
    wfContext = queryService.getWorkflowContext (contextStr);
    userId = wfContext.getUser ();

    Returns the user name;
    }

    Kind regards.

  • time of the logged in user tracking

    I need to build a simple connection and offer a view of the visitor a clip and then disconnect. I need to store it in a database, how long the user was logged in using ASP. Can anyone help? I can make the connection that I just need to know how to connect in time to connected users.

    Store the time connecting in a session variable:

    Session ("logintime") = now

    Calculate the elapsed time in seconds:

    DateDiff ("s", Session("logintime"), now)

  • [ADF, JDev12.1.3] Which is the right place (for example, bean or AM) to create and store secret data that the user is unable to intercept?

    Hallo,

    in my page, when the user clicks on a button, I'have run an operation and in particular generate a code PIN and password that the user must not not know/interception.

    The STEM must be kept "secretly" in the comic book.

    I created a function to generate the PIN code in the 'Utils' to the ViewController project class.

    In the managed bean associated page I would deal with the click of the button through its ActionListener function.

    In this function I would also generate PIN call the "generatePIN" works and finally store the PIN in the comic book.

    Is the bean, the right to 'place' where build and store the PIN in the database?

    Maybe I'd better to generate the PIN and then store it throug a function of the module of the Application?

    Thank you

    Federico

    Well, he should go to the model because it is part of business process and is not part of the presentation of data.

    (AMImpl, VOImpl, or same ViewRowImpl are good places to write such code)

    The STEM must be kept "secretly" in the comic book.

    I don't know what that means exactly.

    Aspect of security, no matter where you place code (in the model or ViewController) because both are executed inside the Java virtual machine server-side.

    If you need to secure communications between WLS and DB, then open the database by using the SSL protocol connection (or create the stored procedure and generate PIN directly in db)...

    Dario

  • [ADF, JDev12.1.3] What is the right approach to manage the Value property of a Date of entry through a bean?

    Hallo,

    I created a custom search form by dragging on the CIU af:inputText and af:inputDate.

    I have some difficulties in the treatment of af: inputDate CIU.

    I've linked the Value of each af:inputDate property to a Date variable in a range backingBean bean.

    It is the correct type of Date or can I use the String type?

    When the user clicks the button to search for the form of the search_action in the bean creates the query with parameters (identified by (?) because I am using SQL Server as DBMS).

    Then, I need programmatically check the values of af: inputDate CIU and then use them to define the query parameters.

    Are there property should I settle for FA: inputDate CIU to "do a good job? For example Valdiator, converter...?

    I see that when I use the calendar of af: inputDate, the field is entered in the format dd/mm/yyyy is good for me but I'm not able to uderstand how to treat the value to check by program and then use it to set a parameter to the query of VO.

    I also want to set the initial value of some CIU af:inputDate in the bean. It takes for example the 1st of the month 6 months ago. What code would I use to do this?

    You could you kindly help me (better if give me a simple example)?

    Thank you

    Federico

    I've linked the Value of each af:inputDate property to a Date variable in a range backingBean bean.

    It is the correct type of Date or can I use the String type?

    Date type is correct.

    Are there property should I settle for FA: inputDate CIU to "do a good job? For example Valdiator, converter...?

    Well, if you need validate the date, then you will need validator (or check the value in managed bean)

    It goes the same for the converter.

    I see that when I use the calendar of af: inputDate, the field is entered in the format dd/mm/yyyy is good for me but I'm not able to uderstand how to treat the value to check by program and then use it to set a parameter to the query of VO.

    In your beans, you will get the Date value, so no matter how it is displayed on the user interface.

    To date handling, you can use standard java api as java.util.Calendar

    I also want to set the initial value of some CIU af:inputDate in the bean. It takes for example the 1st of the month 6 months ago. What code would I use to do this?

    Use standard java api to calculate the new date, then assign accessor value in your bean (for example, in the constructor of the bean)

    Dario

  • [ADF, JDev12.1.3] Page of the input parameters: 1) expression for a value of type enum? (2) can they be used to initialize CIU?

    Hallo,

    I have a backingBean extended myBean bean 'associate' to a page fragment used in a stubborn workflow.

    I want to declare to the fragment in the settings of btf 2 who have a fixed value. Their values should be copied in 2 myBeanattributes.

    An attribute is Boolean, and I guess it does not give any problem, but the other is to an enum type that is defined in the myBean bean itself.

    I have to write in "value *" pass the enum value to var enum in myBean?

    And if the "value *" have been a public static final string of a Java class in the application Module which expression I should use?

    I would like to use parameters of entry Page to initialize (hide, show,...) in myBean some component of the user interface in the page fragment? Is this possible without intervention in any problem? Can kindlu give you some tips to achieve this?

    Thank you

    Federico

    It also works with range backingBean?

    I don't know (I just created a few vars inside managed bean in my application of playground).

    The fragment contains a search with table form and it's always the same, whereas the bean (containing the search called action when the user clicks on the button 'Search') should take the page settings to compose the search query according to them.

    Yes, but that are not exactly 'page settings' because you retrieve the values of the url of the page, right?

    In conclusion, the problem is that I should switch to the different settings depending on the btf bean where the fragment is used.

    You have a better idea to achieve this?

    Then why you are not using the BTF settings (they will be in pageFlowScope)

    Dario

  • Information of the logged-on user does not appear after the user updates their information

    I created 2 pages. Page 1 has a recordset that only displays the users username and password, I made a filter on the recordset as username = var = MM_Username session. When he clicks on update, which is just a link to page 2, they go to page 2 which has a Recordset which filters their modules in the same way and allows them to update their username and password. I used a behavior to update this page as well. Thus, when the user updates their information it modifies the database information and works very well.

    The problem: when the user returns to the page 1 to see their update of username and the password that they have just updated, it is EMPTY. No info displays on the screen, even when I refresh the page. There if MM_Username var isn't refreshing while connected. Because when the user disconnects and connects, it displays new user name and password on page 1.

    It DOES not work when I take the filter out of the 1 Recordset page, but that doesn't make me all good b/c the user must of course only to see their information.

    I'm under DW CS3, php and mysql.

    Help, please! Thank you.

    I know a little php and takes care of everything.

    Great, because this will save my gibberish long habit ;-)

    I m attaching a screenshot of the login page updated the PHP code, which has only three new lines to take custody of.

    Line 1: Add the primary key to the 'users' table to the query

    Line 2: Add function mysql_fetch_row whose resource is the existing variable in $LoginRS

    Line 3: Add the Session Variable MM_user_id and assign the $row variable [0] (see line 2).

    Well, that s, and on other pages, you can define a query such as...

    "SELECT username, password FROM users WHERE id" is equal to the Session Variable MM_user_id

  • Enter the name of the logged-on user

    is it possible to enter the user name of the person who is recorded in the APEX?

    I have a package following changes to a database and at the moment the USER* variable 'ANONYMOUS' poster

    Thank you.

    This should work as long as tolower is a function that is available to your user.

    I think Oracle built-in function is lower (v ('app_user')).

    Earl

  • How to determine the logged in user - BI Publisher

    Hello

    I'm building a SQL base report BI Publisher. I use BI Publisher integrated with the E - Business Suite for all users of ebiz can connect to BI Publisher

    I have a requirement that my LOV parameter query must be restricted based on the user connected BI Publisher. I have the required select statement that just asking the connected to the user to provide. But I don't know if there is no variable standard BI can I use in my SQL query

    Thank you
    SouhL

    Published by: SouhL Sep 14, 2008 01:04

    Hey Shashi,

    http://winrichman.blogspot.com/2008/09/how-to-get-logged-in-OBIEE.html

    Use the OPE session variables available as: xdo_user_name

    Select: xdo_user_name of double wil go search, connect it in USER :)

  • Remove the log-in user

    We have two users on one single computer, two separate log-ins, how can I remove one of the users, all have two access it administration.

    This article describes how to add and remove accounts:

    "How to create and configure user accounts in Windows XP"
      <>http://support.Microsoft.com/kb/279783 >

    HTH,
    JW

Maybe you are looking for