Creating / Handling multiple sessions

How can I create multiple sessions with Servlets/JSP?
The requirement is this:
An admin-type user logs into my application. There, he can see a list of normal (non-admin) users, and should be able to log into those users accounts. Therefore, it is necessary to start a new session as this user, while the he should still be able to be logged into his admin account (and log into more users accounts, if need be). So, the admin session must remain valid, and for each login into a user account, a new session must be created.
I understand that this is not possible using the standard cookie-based approach, so I turned them off for the respective context in Tomcat and encoded all URLs using <c:url ...>. Still, I don't know how to start a new session, there seems to be no method to do this. When there is an active session, getSession(false) returns it, that's all I get. So how do I create a new session with a new session id?
While trying to figure this out, I also noticed some odd behavior in Tomcat (Version 6, though this might apply to other Tomcat Versions or even other web containers. If no session is yet active (like, on the Login page of the application), or the active session is being invalidated (as after logout), a new session is created every time one of those pages is accessed. This also happens if no session id is given at all in the URL (and, probably, if an expired session id is submitted, I didn't try this one yet).
This is not good, simply speaking. This way, the web container will quickly get swamped with ghost sessions that were, on my part, never created, and never used; still, they hang around until they expire, of course.
Any ideas? :)

BalusC wrote:
Tyrathect wrote:
Bad approach? Could you elaborate please? :)It is just plain cumbersome and coding is impossible without horrible hacks.Hm, why cumbersome? The only difference between your approach and mine is that I would use two seperate sessions, as if the user had logged in using his username and password, while you would use one session for both.
As for coding, I see no need for hacks. The admin is supposed to be able to create users, enter/change some contact data and do some settings for the users accounts, and log in as that user (without having to ask him for his login credentials) for support cases etc. Where is the need for hacks here? Except maybe if there is no way to create a session from another session...
but it wouldn't allow for an admin to look into more than one user account at once (right?) which is somewhat a requirement.So you want to impersonate more than one user simultaneously? What's the benefit of this? If you want to switch between users, just go back to the admin panel and pick another user.Yes, or rather, support staff will want to do this.
This is a common scenario in the company I work for, where 3 support people serve about 1000 active customers (of another, PHP-based project). Customer calls, a supporter will use the admin account to log in to his account and have the problem explained. If the solving takes longer, he will tell the customer that he will look into it and call back when it's sorted out. Now while he is working on this, the next customer calls, so the supporter will use the admin account again to log in this account, also, to have the problem explained etc. If the second problem is solved quickly, he will then just log out of the second customers user session and simply continue working on the first customers problem which is still active in another browser window.
Now, if the support people can have only one user session open at a time, they will have to close the first customers user session they were working in (probably having to save some work only halfway done) when the second customer calls, log in to that second customers account, help him, log out of the account to go back to the admin panel, log back into the first customer account, resume work there.
Long story short, while the first approach enables them to do small tasks on the side while working on a bigger problem, this is not possible in the second approach.
Still, any idea about the rogue sessions when I wrote about in the last paragraph?I don't understand your doubt. Every request should take place in a session. If it isn't there or if it is invalidated/expired, then the appserver will create one. I don't see how that is a problem.Ok, if this is normal behavior, then no problem. I just got suspicios when sessions kept appearing while I was not creating any myself.

Similar Messages

  • How to handle multiple session in ADF using jdevloper11g

    Hello All
    i want to use the form in Multiple sessions.
    i have one sign up form. user enter only 4 to 5 fields & he may not fill the the manditory field & he left.but data base dont give the error to him. but next day he will come at the next day to complet his sign up i.e. when he commit the all detail that time all validation will hapen.
    for that i use one table without constrain to store the temarory detail.& use other table (with constrains) for final submition.
    1) i creat the view n entity for temparory table
    2) & also i create views n entity for Final table
    n i create one methos in viewRowImple file in that file i overrid create method from using this i set the value from tempary to final table...
    but when user left the manditory field then it allow to submit the data in temparory field but when i copy that data to final table(with constrain) n user submit the data then validation happn i.e. "this fild is mandatory".when i click this error message it goes to first screen.
    IS Thiis Possible.. in ADF

    Generally this can be done.
    I see a problem with your use case, which has nothing to do with jdev or java:
    How do you identify the user when he comes back to finish the form?
    For this you can't use information like session cookie or IP address because they change.
    So you have to save some information about the user which lets you identify him when he comes back. All other requirements can be implemented by ADF.
    Timo

  • How to handle multiple sessions in Script recorder

    Hi,
    I have a requirement to update certain records from a program. For that I have to put a breakpoint the program (which I did manually).
    Now when I use the scripting tool to record the events, only events related to the original session gets recorded. Any events on the newly opened debugger mode is not recorded !
    However, I can record the events in the debugger separately.
    So I have 2 scripts which are session dependent. In Session 1 my program runs and in session 2 (which opens the debugger in runtime) my edits need to be done.
    How to create a VB script which can handle this session issue?
    Went through this blog by Scriptman and since i am new couldnt get it working !!
    Please help me with a framework to handle this issue.
    Activate a session via Gui scripting
    Thanks,
    Jaywant

    Hi Thomas,
    Yes I have to handle both the session simultaneously.  Let me illustrate further.
    I have to update some (10k- 15k) products from a z table in CRM. We have a custom program for this.
    So, i use se38 and insert a breakpoint in the program (to make the updates to a field) and then execute it. Now I start my script recorder. Provide inputs to the program and hit execute.
    At this point my script recorder is running on the se38 window and not on the debugger window !
    I change the values and press F8. These manual updates do not get captured by script recorder.
    But, if I start my recorder once the debugger window was opened already, I can capture all these changes.
    So we have things like this...
    Script1.vbs --> Events captured in se38
    Script2.vbs --> Events captured in the debugger
    If I merge them and run, the recorder is not handling the new debugger session and the execution halts to get the "excel is waiting for another ole action"
    Thanks,
    Jaywant

  • How do I create a program with multiple sessions?

    I need to allow multiple sessions with this program.
    I realize that it involves threading of some sort, but I'm pretty new to this area and am not sure how I should go about this.
    Here are the instructions:
    "�     Write an application that will create an online dictionary a data file will be supplied that contains a list of words and their meanings. The hash table will contain a key (the word in question) and a value (byte offset of the word meaning stored in a random access file). You will also provide methods for entering, searching and deleting words online. The program must allow for multiple sessions."
    I have most of this all done, and have a dictionaryBroker ready to write the add, delete and search methods.
    But what about the mutliple sessions?
    I'm thinking that my hashTable and RandomAccessFile classes are both going to have to be singleton.
    What I want is for multiple people to be able to run the program at the same time, but if one person adds or deletes a record, I want it to update instantly for everyone.
    But it also needs to run smoothly for everyone using it.
    Thanks for any help, I just need a little push in the right direction here to help get me going.

    Well here is the entire assignment:
    &#61607;     Write an interface for a hash table that satisfies the following criteria:
    The hash table will contain a key (String) and a value (Object)
    Allow for a specific load capacity, if the capacity is exceeded the table is rehashed. The rehash may be called independently
    Must allow for maintaining the hash table (adding modifying etc) the key will not be changed
    Must allow for retrieving information from the table
    Must allow addition using a Map object or one key, value pair at a time
    The addition using a Map and the rehash must be a two pass approach
    �     Implement the interface.
    �     Write a test routine to test all aspects of the interface. The test must calculate the efficiency of your hashing algorithm.
    �     Write an application that will create an online dictionary a data file will be supplied that contains a list of words and their meanings. The hash table will contain a key (the word in question) and a value (byte offset of the word meaning stored in a random access file). You will also provide methods for entering, searching and deleting words online. The program must allow for multiple sessions.
    Submission
    Submit your eclipse project or executable jar file through WebCT. An efficiency of 70% or better must be attained for the assignment to be graded.
    I'm in Canada, not the US.
    It says online dictionary, but I don't think we actually have to do that. I'm pretty sure I can just use a simple GUI to allow them access to the dictionary.
    So, I'm assuming that I just have to make sure that if multiple people are trying to access it at the same time it needs to update at the same time or something. The hashtable was the main part of the assignment so this part shouldn't be too large.

  • How can we handle multiple applications in session method

    how can we handle multiple applications in .. session method.
    can any body reply me.
    thanks

    Hari,
    hi Check out this sample code to use session method
    REPORT  ztest_report
    NO STANDARD PAGE HEADING
                            LINE-SIZE 255
                            MESSAGE-ID ZRASH.
                    Internal Table Declarations                          *
    *--Internal Table for Data Uploading.
    DATA : BEGIN OF IT_FFCUST OCCURS 0,
             KUNNR(10),
             BUKRS(4),
             KTOKD(4),
             ANRED(15),
             NAME1(35),
             SORTL(10),
             STRAS(35),
             ORT01(35),
             PSTLZ(10),
             LAND1(3),
             SPRAS(2),
             AKONT(10),
           END OF IT_FFCUST.
    *--Internal Table to Store Error Records.
    DATA : BEGIN OF IT_ERRCUST OCCURS 0,
             KUNNR(10),
             EMSG(255),
           END OF IT_ERRCUST.
    *--Internal Table to Store Successful Records.
    DATA : BEGIN OF IT_SUCCUST OCCURS 0,
             KUNNR(10),
             SMSG(255),
           END OF IT_SUCCUST.
    *--Internal Table for Storing the BDC data.
    DATA : IT_CUSTBDC LIKE BDCDATA OCCURS 0 WITH HEADER LINE.
    *--Internal Table for storing the messages.
    DATA : IT_CUSTMSG LIKE BDCMSGCOLL OCCURS 0 WITH HEADER LINE.
    DATA : V_FLAG1(1) VALUE ' ',
    "Flag used for opening session.
           V_TLINES LIKE SY-TABIX,
           "For storing total records processed.
           V_ELINES LIKE SY-TABIX,
           "For storing the no of error records.
           V_SLINES LIKE SY-TABIX.
           "For storing the no of success records.
             Selection screen                                            *
    SELECTION-SCREEN BEGIN OF BLOCK B1.
    PARAMETERS : V_FNAME LIKE RLGRAP-FILENAME,
                 V_SESNAM  LIKE RLGRAP-FILENAME.
    SELECTION-SCREEN END OF BLOCK B1.
             Start-of-selection                                          *
    START-OF-SELECTION.
    *-- Form to upload flatfile data into the internal table.
      PERFORM FORM_UPLOADFF.
           TOP-OF-PAGE                                                   *
    TOP-OF-PAGE.
      WRITE:/ 'Details of the error and success records for the transaction'
      ULINE.
      SKIP.
             End of Selection                                            *
    END-OF-SELECTION.
    *-- Form to Generate a BDC from the Uploaded Internal table
      PERFORM FORM_BDCGENERATE.
    *--To write the totals and the session name.
      PERFORM FORM_WRITEOP.
    *&      Form  form_uploadff
        Form to upload flatfile data into the internal table.
    FORM FORM_UPLOADFF .
    *--Variable to change the type of the parameter file name.
      DATA : LV_FILE TYPE STRING.
      LV_FILE = V_FNAME.
    *--Function to upload the flat file to the internal table.
      CALL FUNCTION 'GUI_UPLOAD'
        EXPORTING
          FILENAME                      =  LV_FILE
        FILETYPE                      = 'ASC'
          HAS_FIELD_SEPARATOR           = 'X'
        HEADER_LENGTH                 = 0
        READ_BY_LINE                  = 'X'
        DAT_MODE                      = ' '
      IMPORTING
        FILELENGTH                    =
        HEADER                        =
        TABLES
          DATA_TAB                      = IT_FFCUST
        EXCEPTIONS
          FILE_OPEN_ERROR               = 1
          FILE_READ_ERROR               = 2
          NO_BATCH                      = 3
          GUI_REFUSE_FILETRANSFER       = 4
          INVALID_TYPE                  = 5
          NO_AUTHORITY                  = 6
          UNKNOWN_ERROR                 = 7
          BAD_DATA_FORMAT               = 8
          HEADER_NOT_ALLOWED            = 9
          SEPARATOR_NOT_ALLOWED         = 10
          HEADER_TOO_LONG               = 11
          UNKNOWN_DP_ERROR              = 12
          ACCESS_DENIED                 = 13
          DP_OUT_OF_MEMORY              = 14
          DISK_FULL                     = 15
          DP_TIMEOUT                    = 16
          OTHERS                        = 17
      IF SY-SUBRC = 0.
    *--Deleting the headings from the internal table.
        DELETE IT_FFCUST INDEX 1.
    *--Getting the total number of records uploaded.
        DESCRIBE TABLE IT_FFCUST LINES V_TLINES.
      ENDIF.
    ENDFORM.                    " form_uploadff
    *&      Form  Form_bdcgenerate
        Form to Generate a BDC from the Uploaded Internal table
    FORM FORM_BDCGENERATE .
    *--Generating the BDC table for the fields of the internal table.
      LOOP AT IT_FFCUST.
        PERFORM POPULATEBDC USING :
                                    'X' 'SAPMF02D' '0105',
                                    ' ' 'BDC_OKCODE'  '/00' ,
                                    ' ' 'RF02D-KUNNR' IT_FFCUST-KUNNR,
                                    ' ' 'RF02D-BUKRS' IT_FFCUST-BUKRS,
                                    ' ' 'RF02D-KTOKD' IT_FFCUST-KTOKD,
                                    'X' 'SAPMF02D' '0110' ,
                                    ' ' 'BDC_OKCODE'  '/00',
                                    ' ' 'KNA1-ANRED'  IT_FFCUST-ANRED,
                                    ' ' 'KNA1-NAME1' IT_FFCUST-NAME1,
                                    ' ' 'KNA1-SORTL'  IT_FFCUST-SORTL,
                                    ' ' 'KNA1-STRAS' IT_FFCUST-STRAS,
                                    ' ' 'KNA1-ORT01' IT_FFCUST-ORT01,
                                    ' ' 'KNA1-PSTLZ' IT_FFCUST-PSTLZ,
                                    ' ' 'KNA1-LAND1' IT_FFCUST-LAND1,
                                    ' ' 'KNA1-SPRAS' IT_FFCUST-SPRAS,
                                    'X' 'SAPMFO2D' '0120',     
                                    ' ' 'BDC_OKCODE'  '/00',
                                    'X' 'SAPMF02D' '0125',     
                                    ' ' 'BDC_OKCODE'  '/00',
                                    'X' 'SAPMF02D' '0130',     
                                    ' ' 'BDC_OKCODE'  '=ENTR',
                                    'X' 'SAPMF02D' '0340',     
                                    ' ' 'BDC_OKCODE'  '=ENTR',
                                    'X' 'SAPMF02D' '0360',
                                    ' ' 'BDC_OKCODE'  '=ENTR',
                                    'X' 'SAPMF02D' '0210',     
                                    ' ' 'KNB1-AKONT'  IT_FFCUST-AKONT,
                                    ' ' 'BDC_OKCODE'  '/00',
                                    'X' 'SAPMF02D' '0215',
                                    ' ' 'BDC_OKCODE'  '/00',
                                    'X' 'SAPMF02D' '0220',     
                                    ' ' 'BDC_OKCODE'  '/00',
                                    'X' 'SAPMF02D' '0230',     
                                    ' ' 'BDC_OKCODE'  '=UPDA'.
    *--Calling the transaction 'fd01'.
        CALL TRANSACTION 'FD01' USING IT_CUSTBDC MODE 'N' UPDATE 'S'
        MESSAGES INTO IT_CUSTMSG.
        IF SY-SUBRC <> 0.
    *--Populating the error records internal table.
          IT_ERRCUST-KUNNR = IT_FFCUST-KUNNR.
          APPEND IT_ERRCUST.
          CLEAR IT_ERRCUST.
    *--Opening a session if there is an error record.
          IF V_FLAG1 = ' '.
            PERFORM FORM_OPENSESSION.
            V_FLAG1 = 'X'.
          ENDIF.
    *--Inserting the error records into already open session.
          IF V_FLAG1 = 'X'.
            PERFORM FORM_INSERT.
          ENDIF.
    *--Populating the Success records internal table.
        ELSE.
          IT_SUCCUST-KUNNR = IT_FFCUST-KUNNR.
          APPEND IT_SUCCUST.
          CLEAR IT_SUCCUST.
        ENDIF.
    *--Displaying the messages.
        IF NOT IT_CUSTMSG[] IS INITIAL.
          PERFORM FORM_FORMATMSG.
        ENDIF.
    *--Clearing the message and bdc tables.
        CLEAR : IT_CUSTBDC[],IT_CUSTMSG[].
      ENDLOOP.
    *--Getting the total no of error records.
      DESCRIBE TABLE IT_ERRCUST LINES V_ELINES.
    *--Getting the total no of successful records.
      DESCRIBE TABLE IT_SUCCUST LINES V_SLINES.
    *--Closing the session only if it is open.
      IF V_FLAG1 = 'X'.
        PERFORM FORM_CLOSESESS.
      ENDIF.
    ENDFORM.                    " Form_bdcgenerate
    *&      Form  populatebdc
          FOrm to Populate the BDC table.
    FORM POPULATEBDC  USING    VALUE(P_0178)
                               VALUE(P_0179)
                               VALUE(P_0180).
      IF P_0178 = 'X'.
        IT_CUSTBDC-PROGRAM = P_0179.
        IT_CUSTBDC-DYNPRO = P_0180.
        IT_CUSTBDC-DYNBEGIN = 'X'.
      ELSE.
        IT_CUSTBDC-FNAM = P_0179.
        IT_CUSTBDC-FVAL = P_0180.
      ENDIF.
      APPEND IT_CUSTBDC.
      CLEAR IT_CUSTBDC.
    ENDFORM.                    " populatebdc
    *&      Form  FORM_OPENSESSION
          Form to Open a session.
    FORM FORM_OPENSESSION .
    *--Variable to convert the given session name into reqd type.
      DATA : LV_SESNAM(12).
      LV_SESNAM = V_SESNAM.
    *--Opening a session.
      CALL FUNCTION 'BDC_OPEN_GROUP'
       EXPORTING
         CLIENT                    = SY-MANDT
         GROUP                     = LV_SESNAM
         HOLDDATE                  = '20040805'
         KEEP                      = 'X'
         USER                      = SY-UNAME
         PROG                      = SY-CPROG
    IMPORTING
       QID                       =
       EXCEPTIONS
         CLIENT_INVALID            = 1
         DESTINATION_INVALID       = 2
         GROUP_INVALID             = 3
         GROUP_IS_LOCKED           = 4
         HOLDDATE_INVALID          = 5
         INTERNAL_ERROR            = 6
         QUEUE_ERROR               = 7
         RUNNING                   = 8
         SYSTEM_LOCK_ERROR         = 9
         USER_INVALID              = 10
         OTHERS                    = 11
      IF SY-SUBRC <> 0.
        WRITE :/ 'Session not open'.
      ENDIF.
    ENDFORM.                    " FORM_OPENSESSION
    *&      Form  FORM_INSERT
          fORM TO INSERT ERROR RECOED INTO A SESSION.
    FORM FORM_INSERT .
    *--Inserting the record into session.
      CALL FUNCTION 'BDC_INSERT'
        EXPORTING
          TCODE                  = 'FD01'
        POST_LOCAL             = NOVBLOCAL
        PRINTING               = NOPRINT
        SIMUBATCH              = ' '
        CTUPARAMS              = ' '
        TABLES
          DYNPROTAB              = IT_CUSTBDC
        EXCEPTIONS
          INTERNAL_ERROR         = 1
          NOT_OPEN               = 2
          QUEUE_ERROR            = 3
          TCODE_INVALID          = 4
          PRINTING_INVALID       = 5
          POSTING_INVALID        = 6
          OTHERS                 = 7
      IF SY-SUBRC <> 0.
        WRITE :/ 'Unable to insert the record'.
      ENDIF.
    ENDFORM.                    " FORM_INSERT
    *&      Form  FORM_CLOSESESS
          Form to Close the Open Session.
    FORM FORM_CLOSESESS .
      CALL FUNCTION 'BDC_CLOSE_GROUP'
        EXCEPTIONS
          NOT_OPEN    = 1
          QUEUE_ERROR = 2
          OTHERS      = 3.
      IF SY-SUBRC <> 0.
      ENDIF.
    ENDFORM.                    " FORM_CLOSESESS
    *&      Form  FORM_FORMATMSG
          Form to format messages.
    FORM FORM_FORMATMSG .
    *--Var to store the formatted msg.
      DATA : LV_MSG(255).
      CALL FUNCTION 'FORMAT_MESSAGE'
        EXPORTING
          ID        = SY-MSGID
          LANG      = SY-LANGU
          NO        = SY-MSGNO
          V1        = SY-MSGV1
          V2        = SY-MSGV2
          V3        = SY-MSGV3
          V4        = SY-MSGV4
        IMPORTING
          MSG       = LV_MSG
        EXCEPTIONS
          NOT_FOUND = 1
          OTHERS    = 2.
      IF SY-SUBRC = 0.
        WRITE :/ LV_MSG.
      ENDIF.
      ULINE.
    ENDFORM.                    " FORM_FORMATMSG
    *&      Form  form_writeop
          To write the totals and the session name.
    FORM FORM_WRITEOP .
      WRITE :/ 'Total Records Uploaded :',V_TLINES,
               / 'No of Error Records :',V_ELINES,
               / 'No of Success Records :',V_SLINES,
               / 'Name of the Session :',V_SESNAM.
      ULINE.
    ENDFORM.                    " form_writeop
    Don't forget to reward if useful..

  • Can we create multiple session in BDC using Call session?

    Hi Experts,
    Can we create  multiple sessions in BDC using Call Session?
    Scenario:
    Program has to upload 1 million records,so can we programmatically create multiple sessions such that after every 50thousand records we create a different session.
    For moment due to large number of records BDC DYNPRO and BDC Field are unable to hold the large number of records,due to which we get a Out of memory error.
    Thanks in advance.
    Shilpa

    Hi
    If ITAB is your table with the data to be transfered:
    Open the first session:
    CALL FUNCTION 'BDC_OPEN_GROUP'.........
    IF SY-SUBRC = 0.
      FL_OPEN = 'X'.
    ENDIF.
    LOOP AT ITAB.
    IF FL_OPEN = SPACE.
    Create new session
    CALL FUNCTION 'BDC_OPEN_GROUP'.........
    IF SY-SUBRC = 0.
       FL_OPEN = 'X'.
    ENDIF.
    ENDIF.
    Here elaborate your data and fill BDCDATA
    Insert the transaction:
    CALL FUNCTION 'BDC_INSERT'
    IF SY-SUBRC = 0.
      COUNT = COUNT + 1.
      IF COUNT = COUNT_MAX.
        COUNT = 0.
    Close the session
        IF FL_OPEN = 'X'.
          CALL BDC_CLOSE_GROUP
          IF SY-SUBRC = 0.
            FL_OPEN = SPACE.
          ENDIF.
        ENDIF.
      ENDIF.
    ENDLOOP.
    Max

  • Can XSQL create multiple session variables using only one database call?

    Right now if I want to set session variables for username and accesslevel, I code out like this:
    <xsql:set-session-param name="name" bind-params="username password">
    SELECT DISTINCT USERNAME
    FROM LKUP_USER
    WHERE USERNAME = ? AND PASSWORD = ? AND ACCESSLEVEL = 0
    </xsql:set-session-param>
    <xsql:set-session-param name="authlvl" bind-params="username password">
    SELECT DISTINCT ACCESSLEVEL
    FROM LKUP_USER
    WHERE USERNAME = ? AND PASSWORD = ? AND ACCESSLEVEL = 0
    </xsql:set-session-param>Is there any way to do it so that I don't have to do multiple queries to the database to set session variables? i.e., something like this:
    <xsql:set-multiple-session-param name="user authlvl" bind-params="username password">
    SELECT DISTINCT USERNAME,
    ACCESSLEVEL
    FROM LKUP_USER
    WHERE USERNAME = ? AND PASSWORD = ? AND ACCESSLEVEL = 0
    </xsql:set-multiple-session-param>Sort of like how bind-params works. Setting bind-params="username password" makes the first ? akin to username and the next ? akin to password.
    Is this functionality already in existence?
    Thanks!
    Malik Graves-Pryor

    Not currently possible to collapse into one request without doing it in a custom action handler.
    A custom action handler can:
    [list=1]
    [*]Get the current JDBC connection from the XSQLPageRequest
    [*]Get the SQL statement to perform using the function getActionElementContent
    [*]Handle any bind parameters specified an a bind-params attribute on the action element by calling handleBindVariables()
    [*]Execute and fetch the row from the query
    [*]Check to see that the return value of getPageRequest().getRequestType() equals the value "Servlet"
    [*]Cast the page request to an XSQLServletPageRequest and call getHttpServletRequest()
    [*]Call getSession() on the request
    [*]Set the session variables you want to
    [*]Close the JDBC statement
    [list]
    will consider a built-in enhancement for a future XSQL release.

  • Create multiple sessions

    Basically,
    I have to create multiple sessions and sessionIDs on one
    server, and then pass it off to various clients based on their IP
    address. Is this possible (to transfer sessions like that)? How can
    I create multiple sessions on the server?

    Not sure why you might want to do this but I think it may be
    possible doing a screen scrape against the url with the app you
    want to create the session on.
    Essentially you would need a page the client hits, that would
    then do a cfhttp call to the app where you want to create a
    session. The cfhttp return will contain a structure and you should
    have a new cfid and cftoken on there. do a <cfdump
    var="#cfhttp#"> to see what's in there. You'd grab these to
    values out of the return and do a cfcookie and set the cfid and
    cftoken values to the values you grabbed out of cfhttp.
    I've never done this before, but I don't see off hand why it
    wouldn't work. If the cfcookie thing doesn't work you may try a
    cflocation addtoken='no' and and a url the specifies the cfid and
    cftoken from the cfhttp call.

  • How to create/design a servcie request screen to handle multiple sets of request details ?

    Hi All,
    There is a business requirement to create a service request template to handle user account creation requests for a specific application. The inputs for this request is user name and email ID. The account creation requests are made by the dept managers. Most of the time the dept managers make multiple account creation requests at the same time.
    I have already created a service request screen that has "Username" and "Email ID" as input fields . But the problem with this design is for every single account a new service request need to be raised. 
    I want to redesign the service request screen so that it can handle multiple user account requests with a single service request. The number of users for each request varies.
    Is there a way to dynamicaly add multiple input field sets (User name and Email ID),  when creating a new service request ? or Is there any other way to achive this requirement ?
    Thanks.

    Could it be that those users you are asking permission for with this particular service request already exist in VSM system (as an example when VSM is integrated with AD)? If yes, then you can use custom Multiple Value QD [of the Person entity] to select required persons and add as many persons as you like to your request.
    Otherwise it may require deeper analysis of your business requirements. For now I have only some ideas to use Service Actions or custom javascript to create more advanced customer portal interface.
    In this case I would suggest to contact Alemba PSO for an extra service if possible.
    Regs, Gytis

  • Multiple session handling in the Web UI

    Hi all,
    According to the SAP help documentation, a user can have multiple sessions open in the Web UI. However after a certain period, inactive sessions are terminated. This is certainly the behaviour that we witness on our system, the second inactive session times out after about 25 minutes.
    Does anyone know how to adjust the time out of this second session, this appears to be independent of the general timeout for htttp which is set at 2hours according to the transaction SMICM.
    Thanks in advance
    Paul

    Follow the steps mentioned  by Pankaj.
    Even after this the debugger did not start, do the steps below so that HTTP debugger is on
    1) Run the T-code SICF
    2) Search for the service name CRM_UI_FRAME in the service name. click on F8
    3) Select CRM_UI_FRAME and click on the Edit Menu. Select the option Debugging --> Activate Debugging
    4) This opens a pop up, give your user name and click on OK.
    Now start running the application. The debugger should start.
    Hope this helps.
    Regards,
    Vinay

  • Multiple session bean problem

    Hi,
    I am developing an admin module to my web app and have created a 2nd session bean to manage data within the admin component of the site just to keep things cleaner and more logical. However there is a problem which I cannot overcome.
    The source code to my main website is located in soulsurfing package. The source code to my admin website is located in soulsurfing.admin package. Inside this package is the java code to my admin web pages and a 2nd session bean called adminSessionBean. So far so good.
    I dropped a database table into my admin page which created a cachedrowset (CustomerRowSet) in my adminSessionBean and a data provider on my admin page (CustomerDataProvider). Ok things are still going well until now.
    There are two main issues i'm facing.
    1. Setting a breakpoint in my code and trying to step through the code line by line (F10) fails whenever the adminSessionBean appears in the line of code. In actuality the system just hangs until I exit debug mode in which the page finishes loading ok. If I step into the code (F11) it still works ok and if there is no breakpoint at all it loads ok too so there is something wrong with the debugger.
    2. Most importantly there is a problem with either the cachedrowset or the data provider because it simply does not return any data from the database. The sql query works fine in both MySQL and when running from creator too so no problem here. If I put a line of code in to capture the sql statement such as String test_var3 = getAdmin$adminSessionBean().getCustomerRowSet().getStatement().toString() a null exception is thrown. However if I ditch the 2nd session bean (adminSessionBean) and run everything exactly the same through the original session bean (SessionBean1) located in soulsurfing package then it all works fine so there must be conflict somewhere with having multiple session beans perhaps in different packages.
    Can anybody help me?
    Below is the java code to my web page that sets and executes the cachedrowset in the prerender method that is failing. Further below that is the code to my 2nd session bean.
    Thanks.
    customer_list.java
    package soulsurfing.admin;
    import com.sun.rave.web.ui.appbase.AbstractPageBean;
    import com.sun.rave.web.ui.component.Body;
    import com.sun.rave.web.ui.component.Form;
    import com.sun.rave.web.ui.component.Head;
    import com.sun.rave.web.ui.component.Html;
    import com.sun.rave.web.ui.component.Link;
    import com.sun.rave.web.ui.component.Page;
    import javax.faces.FacesException;
    import com.sun.rave.web.ui.component.TextField;
    import com.sun.rave.web.ui.component.Button;
    import com.sun.rave.web.ui.component.PageSeparator;
    import com.sun.rave.web.ui.component.StaticText;
    import com.sun.rave.web.ui.component.Table;
    import com.sun.rave.web.ui.component.TableRowGroup;
    import com.sun.rave.web.ui.component.TableColumn;
    import com.sun.data.provider.impl.CachedRowSetDataProvider;
    import com.sun.rave.web.ui.component.MessageGroup;
    import com.sun.rave.web.ui.model.DefaultTableDataProvider;
    public class customer_list extends AbstractPageBean {
        private int __placeholder;
        private void _init() throws Exception {
            customerDataProvider.setCachedRowSet((javax.sql.rowset.CachedRowSet)getValue("#{adminSessionBean.customerRowSet}"));
        private Page page1 = new Page();
        public Page getPage1() {
            return page1;
        public void setPage1(Page p) {
            this.page1 = p;
        private Html html1 = new Html();
        public Html getHtml1() {
            return html1;
        public void setHtml1(Html h) {
            this.html1 = h;
        private Head head1 = new Head();
        public Head getHead1() {
            return head1;
        public void setHead1(Head h) {
            this.head1 = h;
        private Link link1 = new Link();
        public Link getLink1() {
            return link1;
        public void setLink1(Link l) {
            this.link1 = l;
        private Body body1 = new Body();
        public Body getBody1() {
            return body1;
        public void setBody1(Body b) {
            this.body1 = b;
        private Form form1 = new Form();
        public Form getForm1() {
            return form1;
        public void setForm1(Form f) {
            this.form1 = f;
        private TextField textField1 = new TextField();
        public TextField getTextField1() {
            return textField1;
        public void setTextField1(TextField tf) {
            this.textField1 = tf;
        private TextField textField2 = new TextField();
        public TextField getTextField2() {
            return textField2;
        public void setTextField2(TextField tf) {
            this.textField2 = tf;
        private Button button1 = new Button();
        public Button getButton1() {
            return button1;
        public void setButton1(Button b) {
            this.button1 = b;
        private Button button2 = new Button();
        public Button getButton2() {
            return button2;
        public void setButton2(Button b) {
            this.button2 = b;
        private PageSeparator pageSeparator1 = new PageSeparator();
        public PageSeparator getPageSeparator1() {
            return pageSeparator1;
        public void setPageSeparator1(PageSeparator ps) {
            this.pageSeparator1 = ps;
        private StaticText staticText1 = new StaticText();
        public StaticText getStaticText1() {
            return staticText1;
        public void setStaticText1(StaticText st) {
            this.staticText1 = st;
        private StaticText staticText2 = new StaticText();
        public StaticText getStaticText2() {
            return staticText2;
        public void setStaticText2(StaticText st) {
            this.staticText2 = st;
        private Table table1 = new Table();
        public Table getTable1() {
            return table1;
        public void setTable1(Table t) {
            this.table1 = t;
        private TableRowGroup tableRowGroup1 = new TableRowGroup();
        public TableRowGroup getTableRowGroup1() {
            return tableRowGroup1;
        public void setTableRowGroup1(TableRowGroup trg) {
            this.tableRowGroup1 = trg;
        private MessageGroup messageGroup1 = new MessageGroup();
        public MessageGroup getMessageGroup1() {
            return messageGroup1;
        public void setMessageGroup1(MessageGroup mg) {
            this.messageGroup1 = mg;
        private CachedRowSetDataProvider customerDataProvider = new CachedRowSetDataProvider();
        public CachedRowSetDataProvider getCustomerDataProvider() {
            return customerDataProvider;
        public void setCustomerDataProvider(CachedRowSetDataProvider crsdp) {
            this.customerDataProvider = crsdp;
        private TableColumn tableColumn2 = new TableColumn();
        public TableColumn getTableColumn2() {
            return tableColumn2;
        public void setTableColumn2(TableColumn tc) {
            this.tableColumn2 = tc;
        private StaticText staticText4 = new StaticText();
        public StaticText getStaticText4() {
            return staticText4;
        public void setStaticText4(StaticText st) {
            this.staticText4 = st;
        private TableColumn tableColumn3 = new TableColumn();
        public TableColumn getTableColumn3() {
            return tableColumn3;
        public void setTableColumn3(TableColumn tc) {
            this.tableColumn3 = tc;
        private StaticText staticText5 = new StaticText();
        public StaticText getStaticText5() {
            return staticText5;
        public void setStaticText5(StaticText st) {
            this.staticText5 = st;
        private TableColumn tableColumn11 = new TableColumn();
        public TableColumn getTableColumn11() {
            return tableColumn11;
        public void setTableColumn11(TableColumn tc) {
            this.tableColumn11 = tc;
        private StaticText staticText13 = new StaticText();
        public StaticText getStaticText13() {
            return staticText13;
        public void setStaticText13(StaticText st) {
            this.staticText13 = st;
        public customer_list() {
        protected adminSessionBean getAdmin$adminSessionBean() {
            return (adminSessionBean)getBean("admin$adminSessionBean");
        protected soulsurfing.ApplicationBean1 getApplicationBean1() {
            return (soulsurfing.ApplicationBean1)getBean("ApplicationBean1");
        protected soulsurfing.SessionBean1 getSessionBean1() {
            return (soulsurfing.SessionBean1)getBean("SessionBean1");
        protected soulsurfing.RequestBean1 getRequestBean1() {
            return (soulsurfing.RequestBean1)getBean("RequestBean1");
        public void init() {
            super.init();
            try {
                _init();
            } catch (Exception e) {
                log("customer_list Initialization Failure", e);
                throw e instanceof FacesException ? (FacesException) e: new FacesException(e);
        public void preprocess() {
        public void prerender() {
            try {
                if (getAdmin$adminSessionBean().getFilter1().equalsIgnoreCase("")) {
                    getAdmin$adminSessionBean().getCustomerRowSet().setString(1, "%");
                } else {
                    getAdmin$adminSessionBean().getCustomerRowSet().setString(1, getAdmin$adminSessionBean().getFilter1());
                if (getAdmin$adminSessionBean().getFilter1().equalsIgnoreCase("")) {
                    getAdmin$adminSessionBean().getCustomerRowSet().setString(2, "%");
                } else {
                    getAdmin$adminSessionBean().getCustomerRowSet().setString(2, getAdmin$adminSessionBean().getFilter2());
                getAdmin$adminSessionBean().getCustomerRowSet().execute();
                customerDataProvider.refresh();
                customerDataProvider.cursorFirst();
                getAdmin$adminSessionBean().setRowCount(customerDataProvider.getRowCount());
                getAdmin$adminSessionBean().setMsg(getAdmin$adminSessionBean().getRowCount() + " records returned.");
                //i have a breakpoint here which hangs when stepping over code however works if breakppoint not set
                String test_var1 = getAdmin$adminSessionBean().getFilter1();
                int test_var2 = getAdmin$adminSessionBean().getRowCount();
            } catch (Exception e) {
                log("Exception occurred!!", e);
                error("Error: "+e.getMessage()); //null exception is being caught
        public void destroy() {
            customerDataProvider.close();
    adminSessionBean.java
    package soulsurfing.admin;
    import com.sun.rave.web.ui.appbase.AbstractSessionBean;
    import javax.faces.FacesException;
    import com.sun.sql.rowset.CachedRowSetXImpl;
    public class adminSessionBean extends AbstractSessionBean {
        private int __placeholder;
        private void _init() throws Exception {
            customerRowSet.setDataSourceName("java:comp/env/jdbc/SoulSurfing_User");
            customerRowSet.setCommand("SELECT * \nFROM customer ");
            customerRowSet.setTableName("customer");
        private CachedRowSetXImpl customerRowSet = new CachedRowSetXImpl();
        public CachedRowSetXImpl getCustomerRowSet() {
            return customerRowSet;
        public void setCustomerRowSet(CachedRowSetXImpl crsxi) {
            this.customerRowSet = crsxi;
        public adminSessionBean() {
        protected soulsurfing.ApplicationBean1 getApplicationBean1() {
            return (soulsurfing.ApplicationBean1)getBean("ApplicationBean1");
        public void init() {
            super.init();
            try {
                _init();
            } catch (Exception e) {
                log("adminSessionBean Initialization Failure", e);
                throw e instanceof FacesException ? (FacesException) e: new FacesException(e);
        public void passivate() {
        public void activate() {
        public void destroy() {
        private String filter1 = "";
        public String getFilter1() {
            return this.filter1;
        public void setFilter1(String filter1) {
            this.filter1 = filter1;
        private String filter2 = "";
        public String getFilter2() {
            return this.filter2;
        public void setFilter2(String filter2) {
            this.filter2 = filter2;
        private int rowCount;
        public int getRowCount() {
            return this.rowCount;
        public void setRowCount(int rowCount) {
            this.rowCount = rowCount;
        private String msg;
        public String getMsg() {
            return this.msg;
        public void setMsg(String msg) {
            this.msg = msg;
    }

    Hi Harini,
    What I didn't explain in my initial post is that there are more than 2 views in my application.  There are a total of 9 jsp's so far, so I coded multiple controllers due to the high amount of views.  After taking the HTMLB training class, I noticed that the examples used contained no more than 2 jsp's, so only 1 controller was needed.
    However, I talked with another Portal developer, and he suggested that it would be simpler to code the application using only 1 controller.  The problem is, I will have 1 LOOOOONG controller since there are many buttons across all of the jsp's (hence many events that will need to be handled) and many beans that need to be populated.
    Harini, thanks very much for offering to view my par file.  I think I have solved the problem on my own, but could you let me know what the design standard is for an application of this size?  Think of an online banking application that needs to handle bill payment (paying the bill, viewing past payments, etc.,).
    Would you use 1 controller for this type of application?
    Thanks very much for your help.
    -Jamie

  • Multi User session mgmt, Multiple Session objects

    I am creating a multiple user web application where in each user information is handled separately. when user log in a session is created and all info of this user is stored in this session object. But when another user logs in information of first user is displayed for the second user and overwriting the first user info in session object.
    Question : Can each user have a different session object so that session info is not overwritten.
    thanks
    Kaushik
    [email protected]

    If I understand it correctly, eventhough the two users are in different sessions, their session information is being mixed up...correct.
    Are you using JSP? If you are using JSP, and you declared the variables in the <%! variable x = new String("Test"); %>, then that variable is considered static. Therefore, when another user logs in and you replace the variable, you are changing the static variables value...Remember, JSP is basically compiled into a java class, and you are creating a static variable by doing what I think you are doing.
    Do you think you can provide more information as to what you are doing?

  • IE running under XP can't handle multiple SWF files, Why?

    I noticed that IE 8 running under Windows XP cannot handle multiple swf files in one page.
    Up to about 10 files is no problem they are loaded and we can play them ( buttons that start a small audio file).
    But more of these files in one page will stop IE.
    Firefox ( 3.6.28) runs them fine.
    And also IE 8 and/or Firefox under Windows 7 handles them perfectly.
    Has anyone any idea what can cause this and how to resolve this?
    Thanks,
    Onno Tomson
    The Netherlands

    Sorry...I still don't get it. What is it about Windows FUS that keeps iTunes from running running the process twice? It can run many other non-Apple windows apps in multiple user sessions (commercial apps, open source apps, audio/video apps, networked apps). I can even run two different virtual machines at the same time under two different user sessions.
    Why can iTunesHelper.exe run twice but iTunes.exe cannot? Why can I run Safari at the same time? Quicktime Player runs fine under multiple user sessions.
    Blaming it on Windows and/or FUS sounds like FUD. Can anyone give a valid technical reason? Semaphores? Mutexes? An admission (and explanation) that the Windows version is purposely crippled?

  • Multiple Sessions in CMC for the same user

    Hello,
    Version:  BOE XI R2 SP3
    A user opens an Xcelsius Dashboard.  As they are using the dashboard, multiple calls are being made through QaaWS to the database.  In CMC, we can see multiple sessions created for that user.  However, this is not 100% consistent.
    Why are there multiple sessions created for one user consuming one dashboard?  Shouldn't everything result in one session?
    Thank you,
    Scott

    Thank you Greg,
    The user shows multiple session after opening and refreshing just one Xcelsius Dashboard over and over again.  It is using QaaWS to get its data.
    Also, as you mentioned, we are also seeing problems with Logout.  Sometimes, users click the logout, but their session does not terminate.  Other times, it does terminate.  And, also, sometimes the logout button does not work.  The user is forced to just close the browser window.
    Any ideas?
    Scott

  • Multiple sessions in a single database connection.

    I have copied the following text from Forms Developer2000
    "At runtime, Form Builder automatically establishes and manages a single connection to ORACLE. By default, one user session is created for this connection. However, the multiple-sessioning feature of ORACLE allows a single client to establish multiple sessions within a single connection. ORACLE transaction-management and read-consistency features all are implemented at the session level, so creating multiple sessions allows a single user to have multiple, independent transactions."
    If ORACLE allows a single client to establish multiple sessions within a single connection, I want to leverage on this feature in my application which uses BC4J.
    Can anybody tell me if
    1. its possible achieve this in Java(BC4J).
    2. If Yes, How?
    regards,
    vikrant

    Thank you for your valuable suggestion.
    I believe createing multiple root Application
    Modules, will create as many number of connections to
    database, hence multiple transactions.
    But What I wanted was multiple sessions in a single
    connection, who's behavior will be similar to two
    different connections.Could you tell me the advantage you're looking for in multiple sessions in one connection vs. multiple connections (where connections may be pooled)?
    Thanks.
    Sung

Maybe you are looking for

  • Oam11g and oim 9.1.0.2 SSO

    anyone done sso with oam11g and oim 9.1.0.2? I seem to be having issue where OAM11g sessions and header variables not getting over.

  • "White screen qith Apple Icon while on call"

    I have a iphone6 IOS 8.1, 16 GB.While speaking in-between the calls the display changes to "White screen with the Apple symbol" for about 5 sec & after 5 sec the display changes to normal.While the screen change the call gets blank and gets connected

  • How to burn imovie with windows

    I have a new ipad and I want to buy imovie but I do not own a Mac computer. I use windows vista. What would be a good program to use to burn my imovie projects to a DVD?

  • Problems displaying correct caracter set (German Umlaute)

    Hi everybody, Our development server had a crash some weeks ago, forcing us to reinstall and resetup the Coldfusion server. Since then, where has been some problems. One of those problems occures in displaying the correct character set. German Umlaut

  • Making backups of zones created in Zeta File System (ZFS)

    Hello, We have several zones installed in /export/zones. /export/zones is using ZFS as its file system. We would like to make backups (preferrably to tape), but get the following messages when we try: tcas:root> ufsdump 0uf /dev/rmt/0cn /export/zones