How to uniquely identify a users session

Hi,
I need to identify a users session, I am aware of the wwctx_api.get_user function but this returns the user name, my problem is that, how do I identify a session, if the user logs on twice then the get_user() function is not unique basically I need to identify the session by some kind of id number and no the users name.
or can I stop a user logging on twice ?
thanks in antcipation.
SD.

it will cause problems in the database !..
in another words it is overloading objects.........

Similar Messages

  • Help with Oracle Streams. How to uniquely identify LCRs in queue?

    We are using strems for data replication in our shop.
    When an error occours in our processing procedures, the LCR is moved to the error queue.
    The problem we are facing is we don't know how to uniquely identify LCRs in that queue, so we can run them again when we think the error is corrected.
    LCRs contain SCN, but as I understand it, the SCN is not unique.
    What is the easy way to keep track of LCRs? Any information is helpful.
    Thanks

    Hi,
    When you correct the data,you would have to execute the failed transaction in order.
    To see what information the apply process has tried to apply, you have to print that LCR. Depending on the size (MESSAGE_COUNT) of the transaction that has failed, it could be interesting to print the whole transaction or a single LCR.
    To do this print you can make use of procedures print_transaction, print_errors, print_lcr and print_any documented on :
    Oracle Streams Concepts and Administration
      Chapter - Monitoring Streams Apply Processes
         Section - Displaying Detailed Information About Apply Errors
    These procedures are also available through Note 405541.1 - Procedure to Print LCRs
    To print the whole transaction, you can use print_transaction procedure, to print the error on the error queue you can use procedure print_errors and to print a single_transaction you can do it as follows:
    SET SERVEROUTPUT ON;
    DECLARE
       lcr SYS.AnyData;
    BEGIN
        lcr := DBMS_APPLY_ADM.GET_ERROR_MESSAGE
                    (<MESSAGE_NUMBER>, <LOCAL_TRANSACTION_ID>);
        print_lcr(lcr);
    END;
    Thanks

  • Identify the user session

    Hi. There is a well known way to identify a "user" in the Servlet by using the Session object and the SessionID, even if the user has not loged in by Jaas.
    But outside the Servlet scope (in an EJB for instance) how can I know that information?
    By using jndi I can discover Who is the Principal, what can help when the user has identified himself.
    Thanks

    sessionContext.getCallerPrincipal()

  • How to check whether a user session is null or not

    Hi
    I am using Jdeveloper 11.1.2.2
    I have a use case of running some Junit test case, this is the problem I have :
    There are some Junit tests which are written for some VO's. While testing insert and update operation in Junit there is two mandatory columns Created by and Updated by to be entered for committing into the database.
    These values are taken from the UserName of the current UserSession .
    So for getting the these values for each user I thought of displaying a JPanel before the test is run, where the user enters the Username and password which is validated and the user is verified.
    First, I need to check whether there is a session present or not. For checking this, I wrote a createUserSession() and did like this inside it :
    if(fixture.getApplicationModule().getSession().getUserData().isEmpty())If so to show the Jpanel and get the user details and verify the user.
    But while running the test itself I found that the session is already present, now I just have to input the values based on who is the user.
    But Junit doesn't run the tests in the order in which the test are written. So I have to call this in all the test cases.
    The Question is :
    How can I check whether the session is already present or not, so that I don't have to ask the user every time while every test is running to enter the Username and Password ?
    Thanks,
    Nigel.
    Edited by: Nigel Thomas on Jul 30, 2012 10:26 AM

    Hi,
    wondering why don't you create test users and then automatically log them in as Jan Vervecken did on the threads I pointed you to. This way your test cases run without user interaction. To test if a session exists for a user, I would put a custom property into user data. If this property exists, the user session is an existing one. However, make sure the information you save into the user data survives passivation as otherwise the information you get out of this is not accurate. See: http://tompeez.wordpress.com/2011/07/08/jdev-always-test-your-app-with-applicationmodule-pooling-turned-off/
    Frank

  • How to check if a user session is active in Java application server

    Hi Experts,
          We have a online scenario with a third party system by which a portal user will launch the third party application in a new window from portal. The SSO will work at the third party web application with the dynamic key that is generated by calling a webservice for that user. Now, as the user works on the launched screen, they will have to check whether the user (logged in portal) session is still active. ie., they will be periodically calling a service hosted by SAP java application server to find out whether the corresponding user who launched the session is still logged in or logged out.
    So, my question is, how can i find out programatically whether a user/user's session is still logged in/active in SAP Netweaver Java AS? We are in version 7.3.
    Kindly help me in this regard.
    Regards
    Vijay.K

    Hi Vijay,
    Could you check below links
    Tracing Single User Sessions - Administration - SAP Library
    Display and Manage User Sessions (SAP Library - Tools for Monitoring the System)
    Hope this helps.
    Regards,
    Deepak Kori

  • How to accept more concurrent user sessions

    Hi all,
    Which parameters are directly responsible for number of user
    sessions.Precisely which parameters are to change to accept more number of
    users sessions.If you could suggest some value for those parameter to
    accept 1000 user sessions ..it would be helpful.
    regds,
    AD

    Hi,
    PROCESSES = User processes
    SESSIONS = Max no. of user and system sessions
    TRANSACTIONS = Max. number of concurrent active transactions
    These parameters should change in init.ora
    Regds,
    Thomas.

  • How can I use active user session that's in an application scope Hashtable?

    First of all, is it possible to use the same session after a user exits and then returns?
    Second, if it is possible, then please tell me what I need to do. So far, this is what I have been doing...
    1.) The user submits login credentials
    2.) The user is authenticated.
    3.) The user does not have an existing session, so a new one is created.
    4.) The user closes the browser.
    5.) The user returns to login page and submits login credentials.
    6.) The user is authenticated.
    7.) The user has an existing session, so it should be used.
    This is where I'm having trouble. All active sessions for my application are stored in a Hashtable. I have been using <%@ page session="false" %> so that a new session is not automatically created. Each time before I create a new session, I check my Hashtable to see if that user has an existing session. If a session exists for that user, then I would like to continue using that session if possible. I have used the methods request.getSession() and request.getSession(false), but a new session is always returned.
    I could create a new session, copy the attributes from the old session(which is stored in my Hashtable) to the new session, and then invalidate the old session, but I'd rather not do that.
    Is there a way that I can use existing sessions that I have stored in my Hashtable?

    First of all, is it possible to use the same session after a user exits and then returns?No, I don't think so. Let me explain why. When the server creates a session object for each client, it needs to know which client is making the request. Remember that HTTP is a stateless protocol. Every time a client makes a request, it sends some sort of session id to the server to let the server know who is trying to make the request. The server will then check to see if a session object exists for that particular client and if so, it will make sure that the max inactive interval (maximum time alloted for that client's session) has not been exceeded. If every thing is okay, then the client can access the session object to get values that were previously placed there. There are many ways that servers try to keep track of clients. One way is to have the clients write the session ID using cookies. But, many people like disallow cookies. So some servers do what is known as URL rewriting. That is, they will write the session ID on the end of the query string. This can also be accomplished programmatically, but it can be taxing to do. Anways, the point is that the client and the server have to have some sort of link between each other and that link is the session ID. So, if the browser is closed, the session ID is lost. That particular client will be forced to get a new session ID the next time the following code is executed:
    //create a session object and set its values
    HttpSession session = request.getSession(true);>
    Second, if it is possible, then please tell me what I
    need to do. So far, this is what I have been doing...
    1.) The user submits login credentials
    2.) The user is authenticated.
    3.) The user does not have an existing session, so a
    new one is created.
    4.) The user closes the browser.
    5.) The user returns to login page and submits login
    credentials.
    6.) The user is authenticated.
    7.) The user has an existing session, so it should
    be used.If you really want to do something like this, you could make up your own ID and store it as a cookie on the client. I've never tried anything like this before so you would have to do your own research. Are you sure you want to do something like this. There is a reason why it works the way it does. There is also a reason why you want to keep the session timeout value some what small. Let me give you an example of some craziness with sessions. A client we once had wanted to keep their sessions open for 4 hours because they said there clients simply did not like to log in all the time. I nearly gasped when I was told we needed to do this. When you make the session time out large (i.e. the maxInactiveInterval( )), then session objects stick around longer in the server. Let's say a client logs into the server and receives a session object. Then, the client makes a few requests. The server knows to keep the session alive as long as the time between requests has not exceeded 4 hours. Then the client closes the browser. How is the server suppose to know that the browser was closed. Well, it doesn't. It just knows to check times between requests. So, that particular session object won't be garbage collected until the session times out. What if a whole bunch of clients did this. Yucko. The server would have a whole bunch of session objects living in memory. What a waste. This is all above and beyond the typical security problems that can arise from having a session open for so long. To make a long story short, you really shouldn't do what you are trying to do unless it is the nature of the app.
    >
    This is where I'm having trouble. All active sessions
    for my application are stored in a Hashtable. I have
    been using <%@ page session="false" %> so that a new
    session is not automatically created. Each time
    before I create a new session, I check my Hashtable
    to see if that user has an existing session. If a
    session exists for that user, then I would like to
    continue using that session if possible. I have used
    the methods request.getSession() and
    request.getSession(false), but a new session is
    always returned.
    I could create a new session, copy the attributes from
    the old session(which is stored in my Hashtable) to
    the new session, and then invalidate the old session,
    but I'd rather not do that.
    Is there a way that I can use existing sessions that I
    have stored in my Hashtable?

  • How to track the login user session in webdynpro

    Hi all,
            I have a new requirement as Explained below
    User will login from portal with login username and password.
    I want to retive that information.
    How to keep track of that information in webdynpro
    Thanks & Regards
    Padma N

    Hi Padma,
    First you need to add the security.jar file by following the given steps
    Right Click on Project-Propertyjava Build PathLibrariesWDRuntime
    Com.sap.security_2.0.0
    public void LoginUser( )
        //@@begin LoginUser()
         String LogonID;
           try{
              // create an user object from the current user
              IWDClientUser wdUser=WDClientUser.getCurrentUser();
              IUser user=wdUser.getSAPUser();
              //LogonID=user.getUniqueName();
              wdComponentAPI.getMessageManager().reportSuccess(user.getFirstName()" "user.getLastName().toUpperCase());
              //wdComponentAPI.getMessageManager().reportSuccess(LogonID.toUpperCase());
              wdComponentAPI.getMessageManager().reportSuccess("Logon User ID : "+wdUser.getClientUserID().toUpperCase());
           }catch(Exception e){
              e.printStackTrace();
        //@@end
    Thanks
    Anup

  • How to trace for multiple user sessions?

    Hello -
    I have a username from the app that has 7 connections to the database. What is the easiest way that I can run the 10046 trace event across all 7 sessions, and also name the trace files so they can be recognized in user_dump?
    Thanks in advance!

    Check what sid and serial# has session:
    select sid, serial# from sys.v_$session where ...
    start tracing session with:
    execute dbms_system.set_sql_trace_in_session(sid, serial#, true);
    stop tracing with
    execute dbms_system.set_sql_trace_in_session(sid, serial#, false);
    Look into udump directory for trace files:
    The default name for a trace files is INSTANCE_PID_ora_TRACEID.trc where:
    INSTANCE is the name of the Oracle instance,
    PID is the operating system process ID (V$PROCESS.OSPID); and
    TRACEID is a character string of your choosing.

  • How to know if user (session) is authenticated in other application (SSO)

    Hi folks!
    We've deployed various J2EE applications in some OC4J instances. So far the applications used SSO Authentication against OiD (LDAP), but we need a public access application.
    The problem is the following: we need a different behaviour in this last application (without authentication characteristics) depending on one user is authenticated within other application that required SSO login.
    How could check if current user (session) si authenticated against SSO, for example, in ADF-STRUTS DataAction class?
    We tested the gerRemoteUser() method but is only works within the applications requering login.
    Please, anyone could guide me?
    Mike
    Thanks!

    Hi,
    Oracle AS Single Sign ON stores some of the attributes of an authenticated user in a browser cookie - the name of the Cookie is SSO_ID.
    You cannot get any information from this Cookie. The Cookie is avaliable only to the Oracle AS Single Sign ON and is meant to be used only by it. You cannot read any useful information from the Cookie as it is higly encrypted.
    If you need to know the name of the currently logged in user, your application should be a Partner Application or an External Applciation to Oracle AS Single Sign On.
    The reason is simple - you can use your browser to connect to many Websites protected by Oracle AS Single Sign ON. Thus, if your application isn't a Partner or an External Application registered with SSO, your application can't establish a context.
    Hence, your application needs to be registered as a Partner Application or an External Application with SSO.
    An application which is nto registered with SSO cannot get the User information from SSO. The getRemoteUser() method would always return a null in such cases.
    Regards,
    Sandeep

  • Forms max user session 11gR2

    Hi,
    I have three simple questions, can anyone help me to find out the answers.
    What is the max user session for oracle forms 11.1.2.1 version?
    If the max user sessions limit reached how can we handle it?
    How can i get max user session for forms 11.1.2.1 version through sql code?
    Thank You!
    Dilli Babu. S

    What is the max user session for oracle forms 11.1.2.1 version?
    How can i get max user session for forms 11.1.2.1 version through sql code?
    Not sure what you mean by "max user session", but since you mention sql code, then I have to think that you mean database sessions. If so, you can check out SESSIONS parameter :
    SQL> sho parameter sessions
    If you mean something different, please clarify.

  • How to fin out each user is member of which subsites/sites groups

    we have new web application whic has ropund 10 sites collections and each site collection as number of subsites.
    we are using AD users and sharepoint security Groups .
    how can we identify a user is invited/part of which all all subsites?

    here is the script which will list users with their permissions....
    http://sharepointnomad.wordpress.com/2009/03/30/list-site-users-and-their-roles-for-all-sites-using-powershell/
    another good one.
    http://techtrainingnotes.blogspot.com/2010/12/sharepoint-powershell-script-to-list.html
    Please remember to mark your question as answered &Vote helpful,if this solves/helps your problem. ****************************************************************************************** Thanks -WS MCITP(SharePoint 2010, 2013) Blog: http://wscheema.com/blog

  • Monitoring user session in vCloud.

    Hi,
    How i can get amount user sessions which connecting to Web interface or VMRC?
    Netstat and similar tools show TCP "streams", but one user generate  > 1 "stream".
    If i use AMQP, i can see notification about user login, but no notification about logout.
    I have tried use JMX, API, netstat, but did not reach the result.
    Any ideas?

    The following parameter is set to 0 by default (installation), change it to 1. The following is from the formsweb.cfg file:
    # EM config parameter
    # Set this to "1" to enable Enterprise Manager to track Forms processes
    em_mode=1

  • Uniquely indentifying a user's machine

    My team and I have established a statistics service that allows our program to send data to a PHP script, which then stores the data in a MySQL table, but now we need a way to uniquely identify the user's computer so that duplicate occurrances don't appear and throw our statistics off.
    We considered just building a huge string of all the System.getProperty() values, then calling hashCode() on it, but even that doesn't seem unique enough. We're completely out of ideas.
    Can anyone think of a good way this could be accomplished?

    Consider using the MAC address of the network interface. I use the following to get All the MAC addresses associated with a computer.import java.io.*;
    import java.util.*;
    import java.util.regex.*;
    public final class MACAddress
        public final static List<String> getMacAddresses() throws IOException
            final ArrayList<String> macAddressList = new ArrayList<String>();
            final String os = System.getProperty("os.name");
            final String[] command;
            if(os.startsWith("Windows"))
                command = windowsCommand;
            else if(os.startsWith("Linux"))
                command = linuxCommand;
            else
                throw new IOException("Unknown operating system: " + os);
            final Process process = Runtime.getRuntime().exec(command);
            // Discard the stderr
            new Thread()
                public void run()
                    try
                        InputStream errorStream = process.getErrorStream();
                        while (errorStream.read() != -1)
                        errorStream.close();
                    catch (IOException e)
                        e.printStackTrace();
            }.start();
            // Extract the MAC addresses from stdout
            BufferedReader reader = new BufferedReader(new InputStreamReader(process.getInputStream()));
            for (String line = null; (line = reader.readLine()) != null;)
                Matcher matcher = macPattern.matcher(line);
                if (matcher.matches())
                    macAddressList.add(matcher.group(1).replaceAll("[-:]"," "));
            reader.close();
            return macAddressList;
        static private Pattern macPattern = Pattern.compile(".*((:?[0-9a-f]{2}[-:]){5}[0-9a-f]{2}).*", Pattern.CASE_INSENSITIVE);
        static final String[] windowsCommand = {"ipconfig","/all"};
        static final String[] linuxCommand = {"/sbin/ifconfig","-a"};
        public final static void main(String[] args)
            try
                for (String macAddress : getMacAddresses())
                    System.out.println("  MAC Address: " + macAddress);
            catch(Throwable t)
                t.printStackTrace();
    }

  • Killing User Sessions upon closing window

    How can we kill the user session people if people just go in
    and close the window by hitting x on the top of the browser? Any
    feedback and help would be greatly appreciated.

    Technically, you can't kill a user's session upon them
    closing the window.
    What you _can_ do is use J2EE session tracking, or a
    transient cookie that gets deleted when the browser quits. That
    still doesn't kill the session when they close the window. The
    session remains active until the timeout time has elapsed.

Maybe you are looking for

  • Help Counting Vowels and Consonants using a class

    I'm currently working on a class project where I need take a user inputed string and count how many vowels and/or consonants are in the String at the user discretion. I have the main logic program working fine. However, the trouble I'm running into i

  • Showing filter in dynamic list by default

    I have a form using the ADDT dynamic list behaviour. What I'd like to do is show the filter items automatically when that form opens rather than have the user click on the Filter button. Does anyone know how to do that? Thanks in advance for any advi

  • Workflow to close Parent Task if all Children Tasks are Marked as Complete

    Hi All, I am struggling in creating a workflow which would mark my parent task as complete once all children tasks(I have subgrid in parent task where I add children tasks) have been marked as complete. I would assume it would be on a wait condition

  • Create a new session bean in a Composite Application DC.

    Hi, I need to create a new Stateless Session Bean in our Composite Application DC which already has some Application services and we need to use these services in the new session bean. Another requirement is that we need to provide a custom JNDI Name

  • HT201386 How can I create tags or captios in iPhoto now?

    i am trying to put a tag on each photo in iPhoto, which was possible with ios7 , I can't find the option in Ios8  .