HttpSession retrieval with sessionId

I'm working with stateless EJB, passing in its methods objects included in
          HttpSession objects. Of course RMI serialization prevents me to update the
          objects in the HttpSession, but their copies.
          To achieve this, could I pass sessionId, and from the EJB retrieve the
          original HttpSession object?
          I see the HttpSessionContext interface has the method getSession(sessionId),
          but it's deprecated. Is there anything similar?
          Any help would be appreciated
          

HttpSession session = request.getSession(false);
log("SESSIONID> " + session.getId());
log("CREATIONTIME> " + session.getCreationTime());
log("ISNEW> " + session.isNew());
When I use this bit of code, I'm getting a NullPointerException on the methods for the session object.
The getSession(false) always returns null. Even with this piece of code, I'm
receiving different sessionID's for the same session.
     HttpSession session = request.getSession(false);
     if (session == null) {
          session = request.getSession(true);
     log("SESSIONID> " + session.getId());
     log("CREATIONTIME> " + session.getCreationTime());
     log("ISNEW> " + session.isNew());
Extract of log file :
[24/12/2004 14:59:01:086 CET] BeatAndSoundServlet: SESSIONID> xtuzav6361
[24/12/2004 14:59:01:086 CET] BeatAndSoundServlet: CREATIONTIME> 1103896741086
[24/12/2004 14:59:01:086 CET] BeatAndSoundServlet: ISNEW> true
[24/12/2004 14:59:01:096 CET] BeatAndSoundServlet: -> showPlanning
[24/12/2004 14:59:07:094 CET] BeatAndSoundServlet: -> showAll
[24/12/2004 14:59:07:094 CET] BeatAndSoundServlet: SESSIONID> ioilxw6391
[24/12/2004 14:59:07:094 CET] BeatAndSoundServlet: CREATIONTIME> 1103896747094
[24/12/2004 14:59:07:094 CET] BeatAndSoundServlet: ISNEW> true
[24/12/2004 14:59:07:094 CET] BeatAndSoundServlet: -> showPlanning
[24/12/2004 14:59:25:251 CET] BeatAndSoundServlet: -> showAll
[24/12/2004 14:59:25:251 CET] BeatAndSoundServlet: SESSIONID> 9vknmj63i1
[24/12/2004 14:59:25:251 CET] BeatAndSoundServlet: CREATIONTIME> 1103896765251
[24/12/2004 14:59:25:251 CET] BeatAndSoundServlet: ISNEW> true
[24/12/2004 14:59:25:251 CET] BeatAndSoundServlet: -> showPlanning
My browser is enabled for cookies. The entry 'session.useCookies=true' exists in the zone.properties file. Strange...
Tom

Similar Messages

  • "The SPListItem being updated was not retrieved with all taxonomy fields." Exception while updating a taxaonomy field

    Hi All,
    I'm getting this exception "The SPListItem being updated was not retrieved with all taxonomy fields." when i try to programatically update a taxonomy field of a list item. Can any1 pls tell me why this exception occurs ???

    Recently hit this myself, as well.  Turns out it's a central admin setting that throttles the lookup return count, and Taxonomy fields are just lookups under the hood.
    Go into Central Administration, Manage Web Applications, select your web application, and then in the ribbon choose the dropdown under General Settings select Resource Throttling.  Find the setting for "List View Lookup Threshold" and raise
    it from the default 8 (can go up to 1000, but 20 is likely fine depending how many lookup fields you're pulling back in your SPListItem).

  • Content-based image retrieval with SQL/MM Still Image

    Hi
    With ORDIMage signature matching being deprecated in 11g, does anyone have any experience of performing content based image retrieval with SQL/MM Still Image?
    Thanks
    Brian

    The details in that thread is the only information that can be shared.
    Melli
    Oracle Multimedia

  • Retrieve with Java

    I would like to how can i make a retrieve with Java Api ? is it possible ?Before i was using Excel/VBA to make a retrieve .

    Look at the sample code in the samples\japi\DataQuery.java file. It has examples of all of the major operations.Tim TowApplied OLAP, Inc.

  • Retrieving NodeID-SessionID-SeqNum within UCCX Scripting

    Hi,
         I am working on UCCX 7.0 scripting where in I need to retrieve a unique number for the call. This unique number needs to map to the NodeID-SessionID-SeqNum of the AGent Wrap-Up Data Detail Report. I need to retrive this number in my script and write it into a custom table to be used as a primiray key in that custom table. Thus, this unique ID will link the CCDR in the standard historical reports to the custom table that I create. The custom table is being created to store some responses from the callers and will contain columns like CallID ( a unique ID), Reponse1, Response2 etc.
    I tried retrieing the 'Identifier' in the GetContactInfo() step in my script assuming that this ID would be similar to the SeqNum in the NodeID-SessionID-SeqNUm of the historical reports but the 2 numbers are entirely different and hence I am unable to link the reports with the data in my custom table.
    Any thoughts on how to work this through?
    Thanks,
    DM

    I am not modifying the UCCX DB. I will be creating a new DB in an external SQL server that will have a table to record the reponses of the survey. Actually, here is the actual scenario.
    1. Caller calls into the contact center. Gets routed to an agent.
    2. At the end of the call, the agent will transfer the call to this script (Route point) that would basically do a typical IVR functionality of asking a few questions and recording the responses.
    3. These responses will then be written into an external DB (on an external SQL server) such that the table will have a unique ID, somehting like a call ID.
    4. At a later point, the customer wants to map these reponses to any standard report that has the same unique ID such that, they know the entire call from end-to end.
    COming to using enterprise variables, using SetEnterpriseData would display this call within CAD or wouldn't it? Also, as described above, the call gets transferred to a different route point.
    If you think I can still achieve the above scenario using the Call Variables, Can you please elaborate on the steps?
    Thanks in advance,
    DM

  • Issues with sessionId and persistent cookie in WL6.1

              I am using WL6.1 and I discovered the following from a brief experiment using a
              JSP which sets persistent cookies. The results are the same when I use IE browser
              or the HDML emulator.
              The name of the weblogic session cookie (weblogic.xml) is "_ses".
              Steps below. The server logs are included:
              1. Delete the persistent cookies relevant to the server.
              2. Access the jsp. SessionId is generated, say 12345.
              3. Close browser. My_Cookie1=blah is saved on client.
              4. Access server again. The cookie My_Cookie1=blah sent
              5. The server sets the SessionId to Cookie1=blah. The sessionId is set from the
              persistent cookie. Also, the String after the first underscore is the sessionId.
              When I change the name of the weblogic session cookie (weblogic.xml) to something
              without an underscore, such as "JSESSIONID" or "someCookieName", and repeat the
              steps, the sessionId is not attempted to be read from the persistent cookie.
              Why is this so?
              Thanks,
              Niranjan
              LOG AFTER HITTING FIRST TIME (STEP 2)
              ================================
              test.jsp: Hit
              session id (O8tS4HMN3KSYK!1003180768699)
              ctr: null
              --------- HTTP REQUEST HEADERS BEGIN -------------
              DEVSNIFF-header(1): Accept=image/gif, image/x-xbitmap, image/jpeg, image/pjpeg,
              application/vnd.ms-powerpoint, application/vnd.ms-excel, app
              lication/msword, */*
              DEVSNIFF-header(2): Accept-Language=en-us
              DEVSNIFF-header(3): Accept-Encoding=gzip, deflate
              DEVSNIFF-header(4): User-Agent=Mozilla/4.0 (compatible; MSIE 5.01; Windows NT
              5.0)
              DEVSNIFF-header(5): Host=nk
              DEVSNIFF-header(6): Connection=Keep-Alive
              --------- HTTP REQUEST HEADERS END -------------
              LOG AFTER HITTING SECOND TIME (STEP 5)
              ===================================
              test.jsp: Hit
              session id (Cookie1=59631091!1003180798903)
              ctr: null
              --------- HTTP REQUEST HEADERS BEGIN -------------
              DEVSNIFF-header(1): Accept=image/gif, image/x-xbitmap, image/jpeg, image/pjpeg,
              application/vnd.ms-powerpoint, application/vnd.ms-excel, app
              lication/msword, */*
              DEVSNIFF-header(2): Accept-Language=en-us
              DEVSNIFF-header(3): Accept-Encoding=gzip, deflate
              DEVSNIFF-header(4): User-Agent=Mozilla/4.0 (compatible; MSIE 5.01; Windows NT
              5.0)
              DEVSNIFF-header(5): Host=nk
              DEVSNIFF-header(6): Connection=Keep-Alive
              DEVSNIFF-header(7): Cookie=My_Cookie1=59631091
              --------- HTTP REQUEST HEADERS END -------------
              CHANGED _ses TO JSESSIONID (RESULT: CORRECT SESSION ID GENERATED)
              ==========================
              test.jsp: Hit
              session id (O8tZKVgE4LuPo!1003182377496)
              ctr: null
              --------- HTTP REQUEST HEADERS BEGIN -------------
              DEVSNIFF-header(1): Accept=image/gif, image/x-xbitmap, image/jpeg, image/pjpeg,
              application/vnd.ms-powerpoint, application/vnd.ms-excel, app
              lication/msword, */*
              DEVSNIFF-header(2): Accept-Language=en-us
              DEVSNIFF-header(3): Accept-Encoding=gzip, deflate
              DEVSNIFF-header(4): User-Agent=Mozilla/4.0 (compatible; MSIE 5.01; Windows NT
              5.0)
              DEVSNIFF-header(5): Host=nk
              DEVSNIFF-header(6): Connection=Keep-Alive
              --------- HTTP REQUEST HEADERS END -------------
              test.jsp: Hit
              session id (O8tZRy1Wq3o9T!1003182407901)
              ctr: null
              --------- HTTP REQUEST HEADERS BEGIN -------------
              DEVSNIFF-header(1): Accept=image/gif, image/x-xbitmap, image/jpeg, image/pjpeg,
              application/vnd.ms-powerpoint, application/vnd.ms-excel, app
              lication/msword, */*
              DEVSNIFF-header(2): Accept-Language=en-us
              DEVSNIFF-header(3): Accept-Encoding=gzip, deflate
              DEVSNIFF-header(4): User-Agent=Mozilla/4.0 (compatible; MSIE 5.01; Windows NT
              5.0)
              DEVSNIFF-header(5): Host=nk
              DEVSNIFF-header(6): Connection=Keep-Alive
              DEVSNIFF-header(7): Cookie=My_Cookie1=88575204
              --------- HTTP REQUEST HEADERS END -------------
              [test.jsp]
              

    Issue 1 is a know "feature" with Macs using an optical output.
    Issue 2 is still unresolved. Why can't Front Row act as a video jukebox just as well as it can for audio.
    Issue 3 is still unresolved. If I select a libray that has both audio and video files, Front Row will only play the audio and not the video. Seems like it should be smart enough to "switch" to play that video.
    Issue 4 seems to be resolved. I run visualizer all the time now and my TV does not switch out of 1080i any more.
    Issue 5 seems to be resolved. I think the trick is that the TV show name has to be filled in for the system to recognize it as a TV show. Guess Apple didn't orginally figure people would add TV shows not purchsed through the iTunes store.
    Issue 6 was realted to using files that are copy protected. But why iTunes XML file can't just keep the name that I want in it's directory rather than the name that is embedded in the file is still a mystery to me.

  • Delete emails from server after retrieving with IMAP protocol?

    Hi,
    I am using Mail as my email program and have set up my account with IMAP.
    When I use the POP protocol, I get the option to 'Remove copy from server after retrieving message'. When I set up Mail with the IMAP protocol, there is no such an option. The result is that my server inbox is slowly filling up and I manually have to login on my server to delete older messages.
    Is there a setting to automatically remove retrieved messages from my email server using IMAP?
    Thanks for your help.
    Erik

    Dear Thomas,
    Thanks for the clarification! Now I understand the mechanism.
    Still I would like to know if there is a way to automatically remove retrieved messages from the e-mail server. Would it help to automatically move my incoming messages in INBOX to a different mailbox in Mail.app? How would I set this up?
    Thanks for the response!
    Erik

  • When I save an rtf file in text edit, it retrieves with codes

    Every time I save an RTF file since lion, when I later retrieve a file it's code filled file. Does anyone know what this is and how to prevent it (or tell text edit to retrieve normally)?
    example from a recent file:
    {\rtf1\ansi\ansicpg1252\cocoartf1138\cocoasubrtf510
    {\fonttbl\f0\fswiss\fcharset0 Helvetica;\f1\fswiss\fcharset0 ArialMT;}
    {\colortbl;\red255\green255\blue255;\red26\green26\blue26;}
    \margl1440\margr1440\vieww14700\viewh12880\viewkind0
    \pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx792 0\tx8640\pardirnatural
    \f0\b\fs24 \cf0 1. ball rolling with ishta\
    \b0           -get a schedule\
                        bridge\
                        classes (<15 stud/class)          \
              -appointment with mbo\
                        get link for table web site\
              -our web site\
                        change language\
                                  the table\
                                  ishta Yoga at the table\
              -figuring out announcing of it\

    I resolved this by using the open... menu and unchecking "Ignore Rich Text Commands"

  • Partial document/node retrieval with DOM

    I have constructed a DOMDocument of an XML input:
    - <email>
    - <folder name="inbox" id="">
    - <message id="54321">
    <time_received>2003-07-16 09:30:05</time_received>
    <sender>John St.</sender>
    <to> "aaa"</to>
    <to>"bbb"</to>
    <importance>High</importance>
    <subject>My subject</subject>
    <body>THis is great</body>
    </message>
    - <message id="12345">
    <time_received>2003-07-16 09:30:10</time_received>
    <sender>Tim Rice</sender>
    <to>"ccc"</to>
    <to>"ddd"</to>
    <subject>My subject 2</subject>
    <body>THis is great 2</body>
    </message>
    </folder>
    </email>
    I created a getter method which retrieve value using the tag, like
    get("to") returns "aaa", and another get("to") returns "bbb"
    I use getElementByTagName(...) to do this, but the problem is that
    another get("to") will return "ccc". As you can see for the XML file, this
    is not good because the "ccc" is within next "message" tag.
    I want to provide another method to let the user select within which "message"
    the getter method is functional.
    I seemed to me that I have to create some "partial" doc pointing to the sub-nodes.
    but I don't know how to do it, anyone has some idea about this?
    besides, XPath seems can deal with it , but I am not allow to use it...
    Thanks in advance!

    I'm not sure I follow, but I would consider creating your own objects that represent messages, and iterate through your xml/dom with xpath to build your objects. then get rid of the dom document and work with your collection of "message" objects. I just use DOM as as part of an adapter to convert xml data into the applications object model - abstract out the xml/dom dependencies from your app logic.

  • Free text retrieval with Context Cartridge

    I am wondering whether it would a problem to create a Java
    application doing free text retrieval via Context Cartridge.
    I mean by that :
    1. JDBC call via thin Oracle driver with CONTAINS in WHERE
    clause. Is it supposed to work ?
    2. Assuming we have several hits in a BLOB can we provide
    functionality ( next hit prev hit ) in textarea field for Java
    frame.
    null

    This one was forwarded to JDBC experts. Two experts (A and B)
    replied. Their answers are below.
    Michael Mitiaguin (guest) wrote:
    I am wondering whether it would a problem to create a Java
    application doing free text retrieval via Context Cartridge.
    I mean by that :
    1. JDBC call via thin Oracle driver with CONTAINS in WHERE
    clause. Is it supposed to work ?
    A. YES.
    B. There is no limitation in JDBC of using CONTAINS in WHERE
    clause.
    2. Assuming we have several hits in a BLOB can we provide
    functionality ( next hit prev hit ) in textarea field for Java
    frame.
    A. I don't really get what you mean. If you mean that you want to
    map a Java Frame to a BLOB column and depending upon the hit in
    the Java frame, you want to read the data from a certain position
    (offset), then yes. If you are using 8.0.X drivers, you can use
    the dbms_lob.read call. If you are using 8.1.X drivers, you can
    use Blob.getBytes call.
    B. It can be achieved by creating a wrapper of using the
    following method in oracle.sql.BLOB in 8.1 driver.
    public long position(byte[] pattern,
    long start)
    throws SQLException
    Determines the byte position at which the specified byte pattern
    begins within the BLOB value that this Blob object represents.
    Begin search at position start. Parameters:
    pattern - the byte array for which to search
    start - the position at which to begin searching; the first
    position is 1
    Returns: the position at which the pattern appears, else -1.
    Throws: SQLException - if there is an error accessing the BLOB
    null

  • Data retrieval with C#

    Greetings Guys,
    I am developing some analytical tools that make calls to
    databases. Currently programming them in C#.
    I want to make the tools available on a webpage (local
    server) so that that the access to the tools instant (hopefully
    blink of an eye).
    My 3 short questions are:
    (1) If i am setting up a website structure in dreamweaver,
    what do i need to consider up front so that i can connect all the
    C# files later.
    (2) Can dreamweaver do the same by itself without me coding
    in C#? i.e. Connecting to the databases (MS access right now, sql
    server later) and retrieving arrays of data?
    (3) Do you know that dreamweaver maintains the integrity of
    data without corrupting it?
    Your help is appreciated in advance.
    Khattab

    1) I wouldn't recommend DW for developing C# apps.
    2) DW allow you to create connections to the DB.
    2) DW does not have anything to do with maintaining or
    managing data. DW is just an interface to create web pages, it is
    not like a DBMS or anything like that.
    DW does not support the .NET framework very well at all, it
    is nearly non-existent. I would recommend using Visual Studio for
    .NET development.

  • No Data retrieved with AJAX Call HTMLDB_GET when using Safari Browser

    In my apex (4.0) app i have certain page a which uses JS AJAX htmldb_get to pull some data from an on-demand process using xml structure
    var get = new htmldb_Get(null, $v('pFlowId'),
    'APPLICATION_PROCESS=get_markerdata', $v('pFlowStepId'));
    if (!MEBMarkerdataXML) {// Tabelle mit Kunden leer? Dann aus DB abfragen
    MEBMarkerdataXML = get.get('XML');
    l_Count = MEBMarkerdataXML.getElementsByTagName("Kunde").length;
    I ran into a strange behavior when using Safari Browser (Mac and Windows) when opening the page.
    As long as the process retrieves less than 50 rows everything works fine. The data is pulled from the OnDemand Process and delivered to the browser; the XML Data can be selected in JS for further processing
    <<<<<<<<<<<<<< HTTP Traffic taken from Safari <<<<<<<<<<<<<<<
    Anfrage-URL:http://80.149.218.10:8080/apex/wwv_flow.show
    Anfragemethode:POST
    Status-Code:200 OK
    Anfrage
    Content-Type:application/x-www-form-urlencoded
    Origin:http://80.149.218.10:8080
    Referer:http://80.149.218.10:8080/apex/f?p=41107101:43:1599514482232751::
    User-Agent:Mozilla/5.0 (Windows NT 5.1) AppleWebKit/534.55.3 (KHTML, like Gecko) Version/5.1.5 Safari/534.55.3
    Formulardaten
    p_request:APPLICATION_PROCESS=get_markerdata
    p_instance:1599514482232751
    p_flow_id:41107101
    p_flow_step_id:43
    Antwort
    Cache-Control:no-cache
    Content-Type:text/xml;charset=UTF-8
    Date:Thu, 03 May 2012 10:19:35 GMT
    Pragma:no-cache
    Server:Apache-Coyote/1.1
    Transfer-Encoding:Identity
    X-DB-Content-length:53329
    X-ORACLE-IGNORE:IGNORE, IGNORE, IGNORE, IGNORE
    <<<<<<<<<<<<<<<<
    When calling for more then 50 rows Safaris shows a POST Error -1001 and no Data is delivered.
    This occurs only on some Mac's and my Dev WIN-XP PC using SF Browser; never on iPad/iPhone . Never when using FF on Mac or PC.
    I googled a lot of different Sources, it seems to be a Timeout Problem when making a long runing AJAX Call. But i did not find any useful hint.
    Any Ideas from the APEX & HTTP Gurus?
    Regards
    Peter

    It's just that in my experience htmldb_Get.get() is troublesome for browsers, due to the fact it performs a synchronous request. The browser can do nothing else while it waits for the response. I've seen Firefox really struggle with it in the past couple years. Also, I've seen no good reason to use synchronous XMLHttpRequest calls. As you can see, it's simple to refactor a call to htmldb_Get.get() into a call to htmldb_Get.GetAsync().
    For your case in particular, I was just guessing Safari have implemented a timeout to ensure that they don't end up waiting indefinitely for a request that never returns as this would be fatal. You're probably hitting that timeout.
    I don't think htmldb_Get is officially documented anywhere, but you can find the source here... http://apex.oracle.com/i/javascript/uncompressed/apex_4_0.js
    There is also a pure jQuery way to perform AJAX request, I recommend using this because at least it's documented. Here's a snippet of a typical APEX AJAX request done the jQuery way:
    apex.jQuery.ajax({
      dataType: "xml", //supports text, xml, json, jsonp, script, or html
      type: "post",
      url: "wwv_flow.show",
      traditional: true,
      data: {
        p_request: "APPLICATION_PROCESS=get_markerdata",
        p_flow_id: $("#pFlowId").val(),
        p_flow_step_id: $("#pFlowStepId").val(),
        p_instance: $("#pInstance").val()
      success: function (data, textStatus, jqXHR) {
        // Do your thing in here
      error: function (xhr, ajaxOptions, thrownError) {
        // Handle error in here
    });Then you can refer to great documentation here... http://api.jquery.com/jQuery.ajax/

  • I would like to store my books and be able to retrieve with out available  wifi

    i am using ipad air,16gb,with wifi&cllular connection.main purpose of it is to up load books and acesses them while i commute where wifi and cellular services are not available.is it possible to retrieve stored books with out wi fi &cellular connection?.

    Without the wifi/Cellular connection you are limited to the books that you have already downloaded to the device.
    Either download what you wish to read before hand from iCloud, or connect to iTunes and manage your books on your device from there.
    Hope this helps.
    PJRS.

  • Can i retrieve with new phone

    if my iphone 4 battery dies can I retrieve my text and messages with a new phone

    Yes you can IF the iPhone 4 is backed up to iTunes/iCloud then whatever is on the iPhone 4 (including texts) would be saved in this back up. What you would do is restore the back up to the new iPhone and the text messages would show on the new iPhone.

  • Compare image retrieved with client_image (webutil) to images (blob) in tab

    Hello,
    I have the following situation:
    webform loading client images into a table (using client_image package from webutil)
    I want to check if this image has already been loaded or not.
    If not loaded ok else reject with raise_application_error on the table's trigger.
    with a before insert trigger I inserted the :new.image into a temp table. but when reading and comparing I saw that the length of the image is still 0.
    Is there a way to pass the image (actual size completely) in webforms to a procedure? Because when testing this ( asigning the image field to a blob variable) I got the same result length 0?
    Ho can I get around this problem?
    thanks for the help
    Erwin

    Hello,
    The Image Item is probably the most "vague" of all. You cannot have its size and you cannot get/set its content outside the read_image_file() built-in. It is a complete "black box".
    Francois

Maybe you are looking for

  • How to delete entire data in the hierarchy table,?

    hi friends i need to delete entire data in the hierarchy table which contains parent child relationship,when i am selecting entire records and choose the option delete from the context menu, it is not deleting, and i have to delete one by one or i ha

  • Can I still trade my iPhone 4 for $150 if it's been opened?

    Ok, so a couple weeks back I took my iPhone 4 to the the Apple store because my power button wasn't working right. They told me my phone no longer was under warranty which I guess was fine and I would have to pay $150 along with my phone for another

  • BDLS in system refresh

    HI all I did a system refresh of BI .After running BDLS the logs in BDLS shows success. But logical systems are not getting converted.When I checked in SLG1it shows no coversion has taken place. Can any one help me to proceed further and change my lo

  • Document splitting issue plz..

    hi all, i have an issue here ; we are using document splitting based on profit centers. I posted vendor invoice in a company code 1 and clearing the invoice using company code 2.which will create a cross company posting and in both company codes the

  • Find the presence of a string in a schema

    i have a problem I want to create a procedure where i input the schema name. The procedure should check all the tables and attributes in that schema and check whether data is begining with "ABCD". If so it should give the table name and attribute nam