Want to store http session in db

i am using oracle 9i. I want that when user logon his session should be recorded into db, for that i have created the following:
create table co_session(
session_id number(10) primary key,
co_id number (9) constraint session_fk1 references company(co_id),
start_date timestamp(0) default sysdate,
end_date timestamp(0));
create sequence session_pk_seq
start with 1 increment by 1;
create or replace trigger session_pk_trig
before insert on co_session
referencing new as new
for each row
begin
select session_pk_seq.nextval into :new.session_id from dual;
end;
HttpSession session=req.getSession(true);
     session.putValue("id",co_id);
     PreparedStatement ps1=cnn.prepareStatement("insert into co_session(co_id) values(?)");
     ps1.setString(1, co_id);
     ps1.executeUpdate();
what i want is the query for logout that when the user logout this should be recorded into db
Message was edited by:
user573936

What you want is auditing.
ALTER SYSTEM SET audit_sys_operations=TRUE
SCOPE=SPFILE;
ALTER SYSTEM SET audit_trail=db SCOPE=SPFILE;
AUDIT SESSION;Bounce the database and all connections will be
logged in sys.aud$.
You can query it with
select * from dba_audit_trail;
when am running (ALTER SYSTEM SET audit_sys_operations=TRUE SCOPE=SPFILE) the error appears
illegal option for ALTER SYSTEM

Similar Messages

  • Cannot Store HTTP Session error

    We are using SAP MII Version 12.0.11 Build(19)
    In the Netweaver SAP logs we are getting scores of the following error:
    application [XMII] Cannot store HTTP session with id [(J2EE1985000)ID1148896350DB00216050084636765028End] to failover. Session data may be lost. Probably session data is not serializable or a failover storage error has occurred.
    The error is: com.sap.engine.services.failover.exceptions.PersistentStorageException:
    Exception id: [00215AD51B4000C00000922A000017EC00049425438C91E7]
    This is not a "High Availability" server and there isn't a failover storage.
    What does this error really mean? Any ideas?

    It would appear that you are on the latest patch, and I wonder if this issue you mention is a result of item #5 where it mentions that "Session data is not serialized":  https://service.sap.com/sap/support/notes/1512526

  • How can I flag HTTP session attributes to not be replicated ?

              WLS 5.1 SP8 - In memory replication of a stateful servlet. Is
              there any way to flag data that has been, or is being, loaded into
              a HTTP session so as to not be replicated ? It's a long story,
              but we have some data loaded into a hashtable, more specifically
              a Properties object, stored in our session. With the hastable
              already loaded into the HTTP session, weblogic does not detect
              when we add values to the table, and therefore does not replicate
              the changes. Which is ok since WLS is working as designed. To
              get around this we load the hashtable back into the session everytime
              we add a value to the hashtable. Yup, I know that's ugly. Anyway,
              what I'm trying to find out if is there is an attribute that we
              can set to indicate, to not replicate this data or that data.
              Something along the lines of a attribute on a per hastable value
              basis. For example, I load value A into my hashtable, then I
              need to put my hashtable into the session to get it replicated.
              Next I load value B into the hastable, and again to get it replicated
              I have to load the entire hashtable back into the session. The
              problem here is that the entire table gets replciated. Does anyone
              know if I can set an attribute on value A, when I'm adding value
              B, so as to not replicate value A when I reload the table ? Of
              course all goal is to not store so much data in the session, but
              I'm trying to find a work around until that is completed.
              Thanks,
              David
              

              Where can I find documentation on the details of how Weblogic decides what will
              be replicated in the HTTPSession object (for example, it only replicates attributes
              which are set or updated using "setAttribute()"?
              Prasad Peddada <[email protected]> wrote:
              >Robert,
              >
              > It is true that we replicate only when you call setAttribute in case
              >of servlets.
              >
              >In case of EJB it is slightly different. EJB sends diff's across the
              >wire. It doesn't
              >replicate the entire state with every request.
              >
              >-- Prasad
              >
              >Chris Palmer wrote:
              >
              >> I think Viresh was referring to modifying part of one attribute causing
              >the whole
              >> of that attribute (i.e. the hashtable) to be replicated.
              >>
              >> Is it actually true though that the behaviour would be different in
              >a stateful
              >> session EJB? I had assumed that the WHOLE ejb state would be replicated
              >each time
              >> (i.e. after each invocation), without even the benefit of having a
              >mechanism such
              >> as setAttribute() to flag the attributes that had changed...
              >>
              >> Chris
              >>
              >> Robert Patrick wrote:
              >>
              >> ? Huh? Since when does it always replicate the entire HttpSession?
              > We were
              >> ? told that it uses a hook in the setAttribute() call to determine
              >which
              >> ? attributes have changed and only replicates those attributes. I
              >know this to
              >> ? be the case because if I retrieve a previously stored attribute from
              >the
              >> ? HttpSession and modify it, my changes do not get replicated unless
              >I call
              >> ? setAttribute again...
              >> ?
              >> ? Robert
              >> ?
              >> ? Viresh Garg wrote:
              >> ?
              >> ? ? Servlet sessions don't work on diffs, so no matter what you do,
              >entire
              >> ? ? Hashtable will be replicated. If you want the optimization for
              >only
              >> ? ? replicating the diff ( the stuff that has changed between 2 updates)
              >,
              >> ? ? consider using stateful session bean and having hashtable part
              >of
              >> ? ? conversational state of stateful session bean.
              >> ? ?
              >> ? ? The solution that you suggested on your own for your problem is
              >not ugly
              >> ? ? as the same solution is used by many customers that I know of.
              >This is
              >> ? ? particularly a problem for people that use Java Beans and use the
              >set
              >> ? ? Property directive of Java Bean in JSP. There also in our auto
              >generated
              >> ? ? code, we put the JavaBean back in HTTP Session, when a setter is
              >called to
              >> ? ? enforce replication.
              >> ? ?
              >> ? ? Keep in mind that whatever we do for replication, we want to support
              >it
              >> ? ? using ONLY standard servlet API and we don't want to introduce
              >any WLS
              >> ? ? specific API to achieve this, and so putting value back in session
              >is the
              >> ? ? only way.
              >> ? ?
              >> ? ? Viresh Garg
              >> ? ? Principal Developer Relations Engineer
              >> ? ? BEA Systems
              >> ? ?
              >> ? ? Dave Javu wrote:
              >> ? ?
              >> ? ? ? WLS 5.1 SP8 - In memory replication of a stateful servlet.
              >Is
              >> ? ? ? there any way to flag data that has been, or is being, loaded
              >into
              >> ? ? ? a HTTP session so as to not be replicated ? It's a long story,
              >> ? ? ? but we have some data loaded into a hashtable, more specifically
              >> ? ? ? a Properties object, stored in our session. With the hastable
              >> ? ? ? already loaded into the HTTP session, weblogic does not detect
              >> ? ? ? when we add values to the table, and therefore does not replicate
              >> ? ? ? the changes. Which is ok since WLS is working as designed.
              >To
              >> ? ? ? get around this we load the hashtable back into the session everytime
              >> ? ? ? we add a value to the hashtable. Yup, I know that's ugly.
              >Anyway,
              >> ? ? ? what I'm trying to find out if is there is an attribute that
              >we
              >> ? ? ? can set to indicate, to not replicate this data or that data.
              >> ? ? ? Something along the lines of a attribute on a per hastable value
              >> ? ? ? basis. For example, I load value A into my hashtable, then
              >I
              >> ? ? ? need to put my hashtable into the session to get it replicated.
              >> ? ? ? Next I load value B into the hastable, and again to get it replicated
              >> ? ? ? I have to load the entire hashtable back into the session. The
              >> ? ? ? problem here is that the entire table gets replciated. Does
              >anyone
              >> ? ? ? know if I can set an attribute on value A, when I'm adding value
              >> ? ? ? B, so as to not replicate value A when I reload the table ?
              >Of
              >> ? ? ? course all goal is to not store so much data in the session,
              >but
              >> ? ? ? I'm trying to find a work around until that is completed.
              >> ? ? ? Thanks,
              >> ? ? ? David
              >
              

  • Maintain the HTTP session

    I am building a small J2ME application that opens a HTTP connection to the server. The application requires user authentication.
    But, each time I open a HTTP connection to the server, the server creates a new HTTP session.
    Is there any way to maintain the session between server calls?
    Thanks

    [ssljivic],
    Perhaps you may want to post parts of your code that is doing the HttpConnection calls before any of us on the forum can advise or share our experiences.
    Session management should be done by the webserver that your J2ME application is making HttpConnection to. The CLDC/MIDP APIs provides the RMS javax.microedition.rms package that offers a developer a way to persistently stored data on the device. Data from the RMS store can be compared with the data by the session manager on the webserver to identify the J2ME client and thus obtaining back the previous sessions' state, very much like the concepts of cookies in a normal HTTP browser.
    My 2 cents worth, HTH.
    ~Allen Lai
    Developer Technical Support
    SUN Microsystems
    http://www.sun.com/developers/support/

  • Bw web report plugin http session hangs at the server side

    Hi,
    I am having problems when closing the browser of a BW web report. After I closed the browser by going File->close, I ran SM04 and found out the Plugin HTTP session hangs at the server side.
    How can we terminate the Plugin HTTP session at the server side when user closes the internet browser?
    I did implement a logoff function at my web template, if user clicks on the logoff, the Plugin HTTP session is terminated at server side correctly. But As you know, 50% of time user will close the report by closing the internet browser instead of clicking the logoff. That leaves lots of hanging Plugin HTTP sessions at our server side.
    By the way, we actived our BEX service at the SICF.
    Thanks for help!
    JA

    Hi
    If you want to avoid a blank page with logoff button, add opener=0
    <a href="<SAP_BW_URL CMD='LOG_OFF' ~command='logoff'
    >" onClick="javascript:window.close(opener=0);">Log off</a>
    If you want to close the session via X, use this code:
    create a sapscript function
    function closeSession()
    logoff()
    window.unload=CloseSession()
    However, the Plugin HTTP session isn't killed.
    Regards

  • In-memory replication of http session is not working in BEA7 cluster

              Hi everyone,
              I have 3 managed servers in Bea7.0 SP4 in a cluster. The client requests are sent
              through apache web server. I have given cluster address as URL in httpd.conf of
              apache server which sends the client requests for dynamic pages such as JSPs and
              servlets to the weblogic cluster.
              Load balancing is working fine. I ensured this from the log files of all the 3
              servers. All the 3 servers are getting different client requests and thus load
              balancing is working.
              Now, I wanted to achieve Fail-over. I do not think that i should use proxy plug-in
              for this. I feel the cluster itself will handle fail-over provided i make the
              http session as memory replicated.
              I updated the weblogic.xml with the following entry :
              <session-descriptor>
              <param-name>PersistentStoreType</param-name>
              <param-value>replicated</param-value>
              </session-param>
              </session-descriptor>
              I guess this is sufficient to make the http session as cluster aware.
              But when I shutdown server1, the user connected to server1 will be kicked out
              of the session and come to login page through server2 or server3 which are running
              fine.
              Could anyone help me to achieve http session as cluster aware. Does it indicate
              that I have to go for WLS proxy – HttpClusterServlet to achieve fail over for
              http session ?
              BTW, for your info, i am using setAttribute() and getAttribute() while manipulating
              the session.
              thanks in advance.
              

              Hi Ryan,
              Thanks for ur valuable input.
              I can see failover working.
              But, I can not continue with the same session in my application.
              I printed session Ids before and after failover, I found both are different.
              I guess session replication is a responsibility of weblogic/apache plugin.
              If not please let me know which all settings I should do to make failover working?
              Thanks again.
              Plad
              "ryan upton" <ryanjupton at learningvoyage dot com> wrote:
              >Plad,
              >
              >Are you trying to gracefully shut down the server? If you are then the
              >problem that you say you can't identify is simply the server's default
              >behavior which is to wait for all non-replicated sessions to be dropped
              >or
              >timed out before killing the process. Try forcing the shutdown: kill
              >-9 the
              >PID or CTRL-C if you started the server from the command line. You can
              >also
              >check the ``Ignore Sessions During Shutdown" checkbox under the server's
              >control tab in the admin console, this should allow you to shut down
              >gracefully without waiting for session timeout. BTW your sequence is
              >off
              >in #5 below, the replication doesn't occur upon failure, the replication
              >has
              >already happened once you created the session object on the first server,
              >I
              >think maybe you're confusing replication with failover.
              >
              >~RU
              >
              >"Plad" <[email protected]> wrote in message
              >news:[email protected]...
              >>
              >> Hi,
              >> I have 2 managed servers in a cluster.
              >>
              >> 1. I have got a DNS name configured which maps to these 2 managed server's
              >IP
              >> addresses.
              >> 2. I can browse my site using this DNS name.
              >> In HTTPD.conf I have :
              >>
              >> ServerName dev.a.b.net
              >>
              >> <IfModule mod_weblogic.c>
              >> WebLogicCluster 10.1.38.232:7023,10.1.34.51:7023
              >> MatchExpression *.*
              >> </IfModule>
              >>
              >> LoadModule weblogic_module modules/mod_wl_20.so
              >>
              >> 3. I have adeded session descriptor in weblogic.xml , also enabled
              >proxy
              >plugin
              >> in weblogic console.
              >>
              >> 4. I tested accessing my application using DNS url after shutting down
              >alternatively
              >> each manaed server. I can access application.
              >>
              >> 5. Now, problem comes when I access a managed server1 , keeping server2
              >down.
              >> I am able to access my application.
              >> Now, I start the server2.
              >> (Here I am supposing that replication should occur)
              >> Then I am shutting down server1.
              >> But, this time the server log shows me following:
              >>
              >>
              >> 9:58:51 AM GMT+05:30 NOTICE Web application(s) chlist still have
              >non-replicated
              >> sessions after 2 minutes of initiating SUSPEND. Waiting for non-replicated
              >sessions
              >> to finish.
              >> 10:00:51 AM GMT+05:30 NOTICE Web application(s) chlist still have
              >non-replicated
              >> sessions after 4 minutes of initiating SUSPEND. Waiting for non-replicated
              >sessions
              >> to finish.
              >>
              >> I am unable to make out where the problem is?
              >> Can it be a problem of Liecense? Is there any specialcluster liecense
              >for
              >weblogic8?
              >>
              >> Hoping to get replies.
              >> Thanx.
              >> Plad
              >>
              >> "ryan upton" <ryanjupton at learningvoyage dot com> wrote:
              >> >See my reply to your first post, but I've also added a few comments
              >here.
              >> >
              >> >"jyothi" <[email protected]> wrote in message
              >> >news:[email protected]...
              >> >>
              >> >> I guess someone from bea support team only can answer both your
              >question
              >> >and mine.
              >> >> As per my knowledge, we do not need to do any setup at Apache
              >side
              >> >regarding
              >> >> cluster other than mentioning cluster address as URL while
              >contacting
              >> >WLS
              >> >> from apache.
              >> >>
              >> >> I hope someone from Bea, will help us. I do not think that we
              >> >go for
              >> >WLS
              >> >> proxy plug-in using HttpClusterServlet for making session replication.
              >> > I
              >> >strongly
              >> >> feel that the cluster itself be able to manage the fail-over of
              >> >http
              >> >sessions
              >> >> provided we put the entry "PersistentStoreType" in weblogic.xml
              >> >regarding
              >> >> the session replication.
              >> >>
              >> >
              >> >The cluster does handle the management of Sessions. The clustered
              >> >applications still create the Session objects and the cluster manages
              >> >them
              >> >as per your deployment descriptor settings (replicated, JDBC, File)
              >however
              >> >the proxy has to be aware of which server the client has an affinity
              >> >for
              >> >(only with replicated sessions) and it does that by reading a cookie
              >> >passed
              >> >back from the server that handled the initial request and created
              >the
              >> >primary session object. The proxy has a list of both the primary
              >and
              >> >secondary server locations from this cookie that it can use to failover
              >> >the
              >> >request if the primary server fails. Clusters _DO NOT_ failover nor
              >> >do they
              >> >load balance, that's the job of your proxy, whether you're using the
              >> >HTTPClusterServlet, WLS Plug-in or a more sophisticated hardware load
              >> >balancer like Big IPs F5
              >> >
              >> >> jyothi
              >> >>
              >> >
              >> >~RU
              >> >
              >> >
              >>
              >
              >
              

  • How do I change my flash settings? I said I wanted to be prompted about flash wanting to store things on my computer but the prompts are too frequent and annoying!

    How do I change my flash settings? I said I wanted to be prompted about flash wanting to store things on my computer but the prompts are too frequent and annoying!

    New versions of Flash have a panel installed on your system for control of settings.
    In Windows XP, Windows Start > Settings > Control Panel > Flash Player, click on each tab and change the "Ask..." setting. Most likely your prompts are coming from the "Storage" tab. Using any of the "Block..." settings may make Flash inoperative on some sites.
    '''If this reply solves your problem, please click "Solved It" next to this reply when <u>signed-in</u> to the forum.'''
    Not related to your question, but...
    You may need to update some plug-ins. Check your plug-ins and update as necessary:
    *Plug-in check: https://www-trunk.stage.mozilla.com/en-US/plugincheck/
    *Adobe Shockwave for Director Netscape plug-in: [https://support.mozilla.com/en-US/kb/Using%20the%20Shockwave%20plugin%20with%20Firefox#w_installing-shockwave Installing ('''''or Updating''''') the Shockwave plugin with Firefox]
    *Adobe PDF Plug-In For Firefox and Netscape: [https://support.mozilla.com/en-US/kb/Using%20the%20Adobe%20Reader%20plugin%20with%20Firefox#w_installing-and-updating-adobe-reader Installing/Updating Adobe Reader in Firefox]
    *Shockwave Flash (Adobe Flash or Flash): [https://support.mozilla.com/en-US/kb/Managing%20the%20Flash%20plugin#w_updating-flash Updating Flash in Firefox]
    *Next Generation Java Plug-in for Mozilla browsers: [https://support.mozilla.com/en-US/kb/Using%20the%20Java%20plugin%20with%20Firefox#w_installing-or-updating-java Installing or Updating Java in Firefox]

  • Ok here goes.  I have so much music I don't want to store it all on my computer and would like to store on an external hard drive.  So if all my music is on the external hard drive, how will iTunes see it in order to play the music.  Thanks

    ok here goes.  I have so much music I don't want to store it all on my computer and would like to store on an external hard drive.  So if all my music is on the external hard drive, how will iTunes see it in order to play the music.  Thanks

    This article might help you moving/relocating your library :
    http://support.apple.com/kb/ht1449
    Cheers AF

  • Define HTTP Session Attribute in a Custom Authenticator

    Hello everyone I developed sucessefully a Custom Authenticator for WLS10 that interacts with a web service.
    But now I need to provide an object to the web applications with the some user information.
    I was wondering defining the object in the HTTP Session but I dont know how to do it via de LoginModule of the custom authenticator.
    Can anyone provide me some tips?
    thanks in advance.

    What kind of user information do you need to pass on to the webapplication ? username can be retrieved by request.getRemoteUser() (after successful login).
    May be you need to clarify little bit more on what you want to achieve.
    -Utpal

  • Model session not in sync with Http Session

    Hi All,
    I have an application developed in JDev 11.1.1.4 and we are not using ADF Security for login.
    The problem occurring is randomly some of the LOV on my home page are getting null (having no data). These LOVs are populated using the values passed as bind parameter from the login values (basically HTTP session values at web layer). So i added a method in all the task flow to set the session value at the model layer (default method) . Also on each call to the Am Impl call i am setting the value in the HTTP session and then invoking the method, but some how what happens is the Model level session value is not in sync with HTTP session and the list gets empty.
    Any inputs what i can do to get out of this prblm ?
    thnk

    In this case you need to overwrite the activateState/passivateState method of your am and store/reads the values from the xml structure you get as parameters to this methods.
    For more detailed information check the docs http://download.oracle.com/docs/cd/E12839_01/web.1111/b31974/bcstatemgmt.htm#sm0495
    By the way, this is nothing you need to open an SR on as it's working as designed.
    Timo

  • Want to store the text of most recently executed query in a table

    Hi,
    I know that there is a data dictionary table or view (i forget the name, if someone can tell, i will appreciate) which can show me the most recently executed query. If i am using some web based front end and want to store the most recently executed query (not only select but also updates, inserts and deletes statments)
    into a table, is it possible that i can do this through some sort of triggers. I want to use this for auditing inert, update or delete. Your help in this matter will be highly appreciated.
    Thanks
    Muhammad Ejaz

    Hi,
    I am not sure how to get result but the tables from which you can get the sql statements are v$sqltext, v$session
    Hari

  • How to do http session stickiness based on URL patterns?

    Is there a feature within the WL plugin for Apache that would allow me to emulate the "jvmroute" session stickiness behaviour as provided by Tomcat and its plugin. I would like to have the control to tie requests from http clients to particular WLS servers in a cluster depending on the URL. For example http://foo.com/web01 requests would be forwarded to an appsererver app01 and so on. For all other requests (e.g http://foo.com/web), the WL plugin would do its normal load balancing ignoring the stickiness. From my understanding the WLS inbuilt http session stickiness is based on JSessionIDs which are exchanged using cookies - which is something i cannot use in my case since i want the stickiness based on URL patterns.
    I am using WLS 10.0 with Apache 2.2.4 on Linux.
    Thanks
    Ramdas

    Session is not replicated across all the servers in the Cluster.
    Apache knows which server to go using the JSession ID.
    There is a concept of primary and secondary, secondary is selected based on the replication groups there are configured in the cluster.
    you can configure the cluster so that /web01 requests go to different cluster, and /web requests go to different cluster.
    but you can get all the funtiionalities from the single cluster.
    Do you have any java caching that you are not able to replicate across the cluster ?(I know this can be done too).
    let me know what you are actually trying to solve by doing the behavior you explained.

  • Is Is the option: "Do you want to save this session?" gone? I can't find it anywhere in options.

    When one closes the Firefox browser in 3.xx versions, if the "warn me about closing multiple tabs" button is enabled, option listed as the following question: "Do want to save this session?" would be given as "yes" or "no". This provided the convenience of opening the browser with all the original tabs from the last session: a VERY usable option. It is nowhere to be found with 4.xx versions. If it was removed please re-install with the next upgrade release. If its still available, tell me how to enable it. Reese

    Firefox now always stores the old session, and you can access it by going to the History menu and selecting "Restore Previous Session"
    If you want Firefox to display the message to save the session, it can be turned back on by changing some preferences.
    # Type '''about:config''' into the location bar and press enter
    # Accept the warning message that appears, you will be taken to a list of preferences
    # Locate the preference '''browser.tabs.warnOnClose''', if its value is set to '''false''', double-click on it to change its value to '''true'''
    # Repeat this for these 3 preferences '''browser.warnOnQuit''', '''browser.warnOnRestart''' and '''browser.showQuitWarning'''
    If you always open the last set of tabs, an alternative approach is this:
    # Click the orange Firefox button, then select options to open the options window
    # Go to the General panel
    # Change the setting "When Firefox starts" to "Show my windows and tabs from last time"

  • Prevent user from setting a parameter in url. Always use http session variable

    In my xsql page I want to prevent a user from seeing data that he is not allowed to see. I am thinking of implementing this by reading a http session variable (like userid=xxx) to be used in my query. I want to be absolutely sure that the userid variable cannot be set manually by the user, for instance by manipulating the url (like: mypage.xsql?userid=123). How can I do this?

    Sorry guys, already found it. Thanks to a reply from our lead-guru Muench on another post in this forum. Look here for the answer:
    http://download-west.oracle.com/otndoc/oracle9i/901_doc/appdev.901/a88894/adx10xsq.htm#1023490
    Search for "Understanding the Different Kinds of Parameters".

  • Use HTTP Session to pass Object from Web Dynpro for Java to JSP page

    Is it possible to get a handle on the HTTP Session object from within a Web Dynpro application? I want to place a Java object in there that can be retrieved by a JSP page.
    Thanks in advance.

    Hi Tom Cole,
       You can try this. i am not sure if this will work or not.
    HttpServletRequest request = ((IWebContextAdapter) WDWebContextAdapter.getWebContextAdapter()).getHttpServletRequest();
    You can also try this.
    IWDRequest mm_request = WDProtocolAdapter.getProtocolAdapter().getRequestObject();
    HttpServletRequest request = (HttpServletRequest)mm_request.getProtocolRequest();
    IWDRequest basically wraps the HttpServletRequest. if you are using NW04s then the getProtocolRequest() may not be available.
    Regards,
    Sanyev

Maybe you are looking for