Session Binding Question

Hello All,
I might be missing something, but I am trying to bind a session when a user logs
in and out of my web application in order to be able to actively track online usage,
however I can't seem to get it to work.
I would appreciate any help that may shed some light on the problem.
I invoke the bind listener in a servlet thus:
session.setAttribute("listener", listener);
I have a simple BindListener Class:
import javax.servlet.http.*;
public class BindListener implements HttpSessionBindingListener
public int numSessions = 0;
public BindListener()
public synchronized void valueBound(HttpSessionBindingEvent event)
numSessions++;
public synchronized void valueUnbound(HttpSessionBindingEvent event)
numSessions--;
public int getNumSessions()
return numSessions;
However when I call a jsp page to monitor the online connections with the command
BindListener listener = new BindListener();
listener.getNumSessions()
It always reports a 0 value even though I have serveral sessions running.
Can anyone help explain why the counter is not working?
I would extremely grateful of any assistance on this issue.
Thanks in advance.
Regards
Les,

Greetings,
I would appreciate any help that may shed some light
on the problem.First, it's important to understand a couple things about binding listeners:
1. A session binding listener is an object that listens for its own binding; IOW, it receives notifications when it specifically is bound to or unbound from the session; and
2. A session binding listener is specific to the session to which it is bound.
I invoke the bind listener in a servlet thus:
session.setAttribute("listener", listener);After the container binds the specified listener instance to this particular session, it calls the object's valueBound method...
Conversely, when (after) the object is removed from the session by calling
    session.removeAttribute( "listener" );or
    session.invalidate();  // Which implicitly calls the above ;)then it's valueUnbound method is called.
I have a simple BindListener Class:
import javax.servlet.http.*;
public class BindListener implements
HttpSessionBindingListener
public int numSessions = 0;
public BindListener()
public synchronized void
valueBound(HttpSessionBindingEvent event)Synchronizing this method only keeps multiple threads from concurrently calling it on this instance... Since it's the current container instance that calls these (container callback) methods, there will (should) be only one thread calling it...
numSessions++;
}numSessions will only ever be 1 (at most), since this method only gets called when the instance is bound to the session - which is only when your user logs in. Again, session objects ('listener' or otherwise), unless persisted, exist only for the life of the current session...
public synchronized void
valueUnbound(HttpSessionBindingEvent event)
numSessions--;
}Refer again to the above. Incidentally, what are you trying to achieve with this?
public int getNumSessions()
return numSessions;
}Refer again to the above. :)
However when I call a jsp page to monitor the online
connections with the command
BindListener listener = new BindListener();This simply invokes the class' constructor and - most importantly in this case ;) - creates a new instance of the class, and...
listener.getNumSessions();
It always reports a 0 value even though I haveSince this is a new instance whose 'numSessions' member is initialized to '0', the accessor is reporting correctly.
To get an existing listener object for the current session use:
<jsp:useBean id="listener" scope="session" class="BindListener"/>...then one of:
<jsp:getProperty name="listener" property="numSessions"/>
<%-- or --%>
<%= listener.getNumSessions() %>Keep in mind, however, that the above only retrieves the listener object for, again, the current session and whose 'numSessions' will still only be '1' (as currently implemented ;).
serveral sessions running.A session is a reference to a client's life in the application (refer to thread http://forum.java.sun.com/thread.jsp?forum=13&thread=249978 for further discussion on "session life"); one session cannot access the (in memory ;) information of other sessions...
Can anyone help explain why the counter is not
working?Refer again to all the above. :)
I would extremely grateful of any assistance on this
issue.If your goal is to track "online usage" then you're on the right track. However, as explained, the current implementation will only count the current session. To keep track of all sessions for a user your bean needs to persist and re-load the current count statistics for the user. The following illustrates:
import java.io.*;
import java.util.*;
import javax.servlet.http.*;
* <p>Tracks user login counts.  A count of user's accesses is stored
* in a file within the webapp space.</p>
* <p>NOTE: This class is intended only to illustrate a method for
* managing persistent session tracking.</p>
* @author     Tony "Vee Schade" Cook, [email protected]
public class SessionTracker implements HttpSessionBindingListener
     * <p>Creates a new session tracking instance.
     * @param  sessionFile     the user specific session file.
    public SessionTracker( File sessionFile )
        this.sessionFile = sessionFile;
     * <p>Loads current session count.
    public void valueBound( HttpSessionBindingEvent event )
        Properties data = new Properties();
        try {
            data.load( new FileInputStream( sessionFile ) );
            numSessions = Integer.parseInt( data.getProperty( "count" ) );
        catch( Exception ex ) {
            /* Assume no persistent data, or corrupt/invalid...
             * either way, accept default numSessions = 0
        /* Remember this session too! ;)
        numSessions++;
     * <p>Stores current session count for later retrieval.
    public void valueUnbound( HttpSessionBindingEvent event )
        Properties data = new Properties();
        data.setProperty( "count", Integer.toString( numSessions ) );
        try {
            data.store( new FileOutputStream( sessionFile ), sessionFile.toString() );
        catch( Exception ex ) {
            /* Sorry, Charley - "log" the error for the administrator.
            ex.printStackTrace();
     * <p>Returns current session count for this user.
    public int getNumSessions()
        return numSessions;
    private File sessionFile;
    private int numSessions;
}The above should actually be using a database for the persistence if you also want to be able to efficiently access the count statistics from a separate session. Yet, the above illustrates what is needed (session persistence) and should get you started in the right direction. :)
I hope this helps.
Thanks in advance.
Regards
Les,Regards,
Tony "Vee Schade" Cook

Similar Messages

  • Policy agent 2.2 amfilter local authentication with session binding failed

    Hi All,
    I have policy agent 2.2 for weblogic 8.1 sp4 installed on redhat linux. All are working fine in my development box. But I was running all the process under user root, so today I decided to change it to a regular user, joe. I changed all the files' owner for weblogic server and policy agent from root to joe, and restart server as user Joe. After the change, I can not access the application on Weblogic server. I changed file ownership back to root and restart weblogic server as root, still same error.
    Here is the error I got:
    10.4.4 403 Forbidden
    The server understood the request, but is refusing to fulfill it. Authorization will not help and the request SHOULD NOT be repeated. If the request method was not HEAD and the server wishes to make public why the request has not been fulfilled, it SHOULD describe the reason for the refusal in the entity. This status code is commonly used when the server does not wish to reveal exactly why the request has been refused, or when no other response is applicable.
    Here is the error I found from agent log file, amFilter:
    AmFilter: now processing: SSO Task Handler
    05/24/2006 06:27:08:127 PM PDT: Thread[ExecuteThread: '14' for queue: 'weblogic.kernel.Default',5,Thread Group for Queue: 'weblogic.kernel.Default']
    SSOTaskHandler: caching SSO Token for user uid=amAdmin,ou=People,dc=etouch,dc=net
    05/24/2006 06:27:08:127 PM PDT: Thread[ExecuteThread: '14' for queue: 'weblogic.kernel.Default',5,Thread Group for Queue: 'weblogic.kernel.Default']
    AmBaseSSOCache: cached the sso token for user principal : uid=amadmin,ou=people,dc=etouch,dc=net sso token: AQIC5wM2LY4Sfcx4XY/x/M7G1Y3ScVjFj8E3oT0BV45mh0Q=@AAJTSQACMDE=#, cache size = 1
    05/24/2006 06:27:08:127 PM PDT: Thread[ExecuteThread: '14' for queue: 'weblogic.kernel.Default',5,Thread Group for Queue: 'weblogic.kernel.Default']
    SSOTaskHandler: SSO Validation successful for uid=amAdmin,ou=People,dc=etouch,dc=net
    05/24/2006 06:27:08:128 PM PDT: Thread[ExecuteThread: '14' for queue: 'weblogic.kernel.Default',5,Thread Group for Queue: 'weblogic.kernel.Default']
    AmFilter: now processing: J2EE Local Logout Task Handler
    05/24/2006 06:27:08:128 PM PDT: Thread[ExecuteThread: '14' for queue: 'weblogic.kernel.Default',5,Thread Group for Queue: 'weblogic.kernel.Default']
    AmFilter: local logout skipped SSO User => amAdmin, principal =>null
    05/24/2006 06:27:08:128 PM PDT: Thread[ExecuteThread: '14' for queue: 'weblogic.kernel.Default',5,Thread Group for Queue: 'weblogic.kernel.Default']
    AmFilter: now processing: J2EE Local Auth Task Handler
    05/24/2006 06:27:08:128 PM PDT: Thread[ExecuteThread: '14' for queue: 'weblogic.kernel.Default',5,Thread Group for Queue: 'weblogic.kernel.Default']
    LocalAuthTaskHandler: No principal found. Initiating local authentication for amAdmin
    05/24/2006 06:27:08:128 PM PDT: Thread[ExecuteThread: '14' for queue: 'weblogic.kernel.Default',5,Thread Group for Queue: 'weblogic.kernel.Default']
    LocalAuthTaskHandler: doing local authentication with session binding
    05/24/2006 06:27:08:129 PM PDT: Thread[ExecuteThread: '14' for queue: 'weblogic.kernel.Default',5,Thread Group for Queue: 'weblogic.kernel.Default']
    LocalAuthTaskHandler: Local authentication failed, invalidating session.05/24/2006 06:27:08:129 PM PDT: Thread[ExecuteThread: '14' for queue: 'weblogic.kernel.Default',5,Thread Group for Queue: 'weblogic.kernel.Default']
    WARNING: LocalAuthTaskHandler: Local authentication failed for : /portal/index.jsp, SSO Token: AQIC5wM2LY4Sfcx4XY/x/M7G1Y3ScVjFj8E3oT0BV45mh0Q=@AAJTSQACMDE=#
    05/24/2006 06:27:08:129 PM PDT: Thread[ExecuteThread: '14' for queue: 'weblogic.kernel.Default',5,Thread Group for Queue: 'weblogic.kernel.Default']
    AmFilter: result =>
    FilterResult:
         Status      : FORBIDDEN
         RedirectURL     : null
         RequestHelper:
              null
         Data:
              null
    -----------------------------------------------------------

    Hi,
    I'm having the exact same problem in the Prod environment, but on a Sun App Server. In development all is fine, in prod we now have:
    ERROR: AmFilter: Error while delegating to inbound handler: J2EE Local Auth Task Handler, access will be denied
    java.lang.IllegalStateException: invalidate: Session already invalidated
    at org.apache.catalina.session.StandardSession.invalidate(StandardSession.java:1258)
    at org.apache.catalina.session.StandardSessionFacade.invalidate(StandardSessionFacade.java:164)
    at com.sun.identity.agents.filter.LocalAuthTaskHandler.doLocalAuthWithSessionBinding(LocalAuthTaskHandler.java:289)
    at com.sun.identity.agents.filter.LocalAuthTaskHandler.authenticate(LocalAuthTaskHandler.java:159)
    at com.sun.identity.agents.filter.LocalAuthTaskHandler.process(LocalAuthTaskHandler.java:106)
    at com.sun.identity.agents.filter.AmFilter.processTaskHandlers(AmFilter.java:185)
    at com.sun.identity.agents.filter.AmFilter.isAccessAllowed(AmFilter.java:152)
    at com.sun.identity.agents.filter.AmAgentBaseFilter.doFilter(AmAgentBaseFilter.java:38)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:210)
    at org.apache.catalina.core.ApplicationFilterChain.access$000(ApplicationFilterChain.java:55)
    at org.apache.catalina.core.ApplicationFilterChain$1.run(ApplicationFilterChain.java:161)
    at java.security.AccessController.doPrivileged(Native Method)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:157)
    at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:263)
    at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:551)
    at org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContextValve.java:225)
    FilterResult:
    Status : FORBIDDEN
    RedirectURL : null
    RequestHelper:
    null
    Data:
    null
    Also, we I debug I see:
    LocalAuthTaskHandler: No principal found. Initiating local authentication for ...
    Did you receive any solution for this?
    Many, many thanks,
    Philip

  • Webcache  and session binding

    hello
    I have defined site in webcache like: site.domain.com:80 a set propert session binding.
    But when I connect to site with this url: site.domain.com (without port number), i get internal server errors due lost sessions - session binding is ignored for this url
    How can I configure webcache to use session binding for site without port number ?
    alias doesn't help - port number is requierd.
    thank you.

    I would think these are prety much the same thing? are you typing in http: as well?
    i.e.
    http://site.domain.com:80
    http://site.domain.com
    What do you have setup in Webcache for the session binding? which session binding options have you tried? The session binding options are underneath the origin to server link in webcache.

  • Session Binding/Oracle 9iAS

    Hi,
    I am experiencing a problem with session binding whilst using Oracle 9iAS. The same code works without problem in Tomcat. For some reason in Oracle, the session seems to invalidate before the valueUnbound() is called? (The session is being added correctly but is never removed from my list of active users)
    Can anyone help with this or know of a workaround? Thanks in advance.
    I am using the following code:
    In log in class we add to the session:
    session.setAttribute("user",userID);
    session.setAttribute("userList",userList.getInstance());
    In log out class we just do following:
    session.invalidate();
    And in the servlet we have a timeout set as follows:
    session.setMaxInactiveInterval(60);
    import javax.servlet.http.*;
    import java.util.*;
    * Class maintains the number or ACTIVE sessions. 
    * valueBound()  -  when user logs on, the session is added to this list
    * valueUnbound() - when user logs off or is timed out, user is removed from list
    * getUserCount() - returns number of users with active sessions
    public class userList implements HttpSessionBindingListener
      private static userList list = null;     
      private Set users = new HashSet();     
      private userList()
      {          super();     }     
      public static userList getInstance()
        if (list == null)          
        {          list = new userList();          }          
        return list;     
      public void valueBound(HttpSessionBindingEvent sbe)
        System.out.println(sbe.getSession().getAttribute("user"));
        users.add(sbe.getSession().getAttribute("user")); //Add the session     
        System.out.println(" ----- adding the user to the active list ----- ");
      public void valueUnbound(HttpSessionBindingEvent sbe)
        System.out.println(" ----- trying to remove user from active list ----- ");
        try
        { users.remove(sbe.getSession().getAttribute("user"));     }  //Remove the session
        catch (Exception e)
        { System.out.println("session was already invalidated"); }
      public synchronized int getUserCount()
        return users.size(); //Returns the no of live user sessions     
      public synchronized Set getUserList()
        return users; //Returns the names of live user sessions     

    Thanks. We have tried this but it still falls over when doing the valueUnbound(). The error is as follows:
    session was already invalidated java.lang.IllegalStateException: Session was invalidated
    So it seems Oracle is invalidating my session before getting to the method. This would be ok as long as the session is cleaned up, but we are using connection pooling and this is the only way I know to maintain a list of our active users. Obviously we cant rely on them logging out and we need to know when the session times out.
    Can anyone help here with another way of knowing when the session times out?

  • Session Binding on Web Cache acting as load balancer

    Hi gurus,
    I have Web Cache 10.1.2 acting as load balancer on the front-end machine, and two OracleAS 10.1.2 enterprise edition installations behind it. The load balancing configuration is done and is working well. The Web Cache (acting as load balancer) routes requests the to the two OracleAS installations very well.
    Now I need to set up session binding, so that a request from the same client is directed to the same OracleAS installation (in the same session). I am really a novice on session binding - could you pl let me know what I need to do?
    Going through the Web cache admin guide, I did try to use JSESSIONID but without much success. Specific Qs:
    1. Do I need to enable session binding at only the back-end OracleAS installations, or also at the front-end Web Cache (acting as load balancer).
    2. If I use JSESSIONID - is it generated by Web Cache / HTTP Server automatically, or do I need to write a J2EE application to generate it?
    Thanks a lot in advance.
    Navneet.

    hi,,,
    i neesd some help in ur issue,
    i face a problem woth web cache in Load balancing ,, it is not working...
    my case is same to ur case, BUT i have AS10g ( 9.0.4 )
    and i got this err
    "FRM-92101: There was a failure in the forms server during startup.
    This could happen due to invalid configuration.
    Please look in the web-server log file for details."
    i followed metalink notes and configration. and Configuring Oracle HTTP Server by modifying the httpd.conf file.
    - CookieTracking On
    - and CookieName xxxxxxx
    and still the same prob ...
    could u help me plz.
    and is it because my AS version which is 10g(9.0.4) ?
    this is my emil : [email protected]

  • WSIF Binding Question

    I have a question about the capabilities of WSIF Bindings.
    In our current environment we have several session beans that we want to invoke from a BPEL process. We would like to invoke the session bean using a local interface and not the remotee interface. Is this possible?
    Some of the parameters for the methods on our EJB takes Java classes generated by the XMLBeans tool. As a result the classes are not serializable. Does WSIF require parameters to be serializable?
    Thanks,
    Frank

    A single instance is created at the first invocation [note: The initiate( null ) operation is invoked if the class is an instance of IWSIFJavaService].
    That single java object is invoked (concurrently) by all the process instances when they reach an <invoke> node which leverage WSIF Java binding.
    Edwin

  • Session Timeout Question in EME

    If I login to eManager Web and instead of logging out I just close the browser will I be logged out? Will the license be released? What is the session timeout for this and is it possible to set this value?

    If you close the browser in e-Manager Enterprise Web instead of logging out there is a TimeOut that will release your license. This can be seen and is reported on in the e-Manager logs. By default the session TimeOut value is 30 minutes. You can find this and/or change this value by opening "<installdir>\Empirix\EmpAppServer\server\default\deploy\jbossweb-tomcat55.sar\conf\web.xml" in a notepad. Once the file is open, go the the ?Default Session Configuration? Section. Here you can change the TimeOut value. You will then need to save the file and restart the Empirix Application Service. The idle sessions are retired after the specified timeout is reached and the licenses are also checked upon this value. I hope this answers your questions.

  • General Design With Database and Session Bean Question

    I have an application I am developing where users connect to individual databases located on a server. When they login an admin table is accessed which shows what databases they have permissions to. I am then storing the connection to the database in a backing bean. Hoping to use this connection throughout the session. Is this a good practice to have a users connection left open over the session? I can't create a database pool for each individual database and each user for that database.
    If I can store that database connection in a session bean. How do I access that connection from another bean. Or from another java class? I am using Glassfish for my application server with JSF1.2. I have looked at resource injection but have not had any luck with sharing the session bean information.
    Sorry if this is a trivial question. I have been a Java developer for years. But just starting developing webapps using JSF.
    Thanks

    JuCobb2 wrote:
    I am then storing the connection to the database in a backing bean. Hoping to use this connection throughout the session. Is this a good practice to have a users connection left open over the session? No it is not. Why should you do so? Always keep the lifetime of connection, statement and resultset as short as possible.

  • V$SESSION columns question

    Hi Gurus
    I have a question regarding of the meaning of some columns in the V$SESSION table. I wonder what does the values in the following columns means?
    ROW_WAIT_O
    ROW_WAIT_F
    ROW_WAIT_B
    TADDR
    LOCKWAIT
    I find out that these columns always have some values when my users unable to log into the application. Even I kill the session that have lockwait, other users are still unable to connect and it happens around once every 2 months.
    Thanks for the answer in advanced
    Oui

    V$SESSION
    This view lists session information for each current session.
    Column Datatype Description
    SADDR
    RAW(4 | 8)
    Session address
    SID
    NUMBER
    Session identifier
    SERIAL#
    NUMBER
    Session serial number. Used to identify uniquely a session's objects. Guarantees that session-level commands are applied to the correct session objects if the session ends and another session begins with the same session ID.
    AUDSID
    NUMBER
    Auditing session ID
    PADDR
    RAW(4 | 8)
    Address of the process that owns this session
    USER#
    NUMBER
    Oracle user identifier
    USERNAME
    VARCHAR2(30)
    Oracle username
    COMMAND
    NUMBER
    Command in progress (last statement parsed); for a list of values, see Table 3-3. These values also appear in the AUDIT_ACTIONS table.
    OWNERID
    NUMBER
    The column contents are invalid if the value is 2147483644. Otherwise, this column contains the identifier of the user who owns the migratable session.
    For operations using Parallel Slaves, interpret this value as a 4-byte value. The low-order 2 bytes of which represent the session number, and the high-order bytes the instance ID of the query coordinator.
    TADDR
    VARCHAR2(8)
    Address of transaction state object
    LOCKWAIT
    VARCHAR2(8)
    Address of lock waiting for; NULL if none
    STATUS
    VARCHAR2(8)
    Status of the session: ACTIVE (currently executing SQL), INACTIVE, KILLED (marked to be killed), CACHED (temporarily cached for use by Oracle*XA), SNIPED (session inactive, waiting on the client)
    SERVER
    VARCHAR2(9)
    Server type (DEDICATED| SHARED| PSEUDO| NONE)
    SCHEMA#
    NUMBER
    Schema user identifier
    SCHEMANAME
    VARCHAR2(30)
    Schema user name
    OSUSER
    VARCHAR2(30)
    Operating system client user name
    PROCESS
    VARCHAR2(9)
    Operating system client process ID
    MACHINE
    VARCHAR2(64)
    Operating system machine name
    TERMINAL
    VARCHAR2(30)
    Operating system terminal name
    PROGRAM
    VARCHAR2(48)
    Operating system program name
    TYPE
    VARCHAR2(10)
    Session type
    SQL_ADDRESS
    RAW(4)
    Used with SQL_HASH_VALUE to identify the SQL statement that is currently being executed
    SQL_HASH_VALUE
    NUMBER
    Used with SQL_ADDRESS to identify the SQL statement that is currently being executed
    PREV_SQL_ADDR
    RAW(4)
    Used with PREV_HASH_VALUE to identify the last SQL statement executed
    PREV_HASH_VALUE
    NUMBER
    Used with SQL_HASH_VALUE to identify the last SQL statement executed
    MODULE
    VARCHAR2(48)
    Contains the name of the currently executing module as set by calling the DBMS_APPLICATION_INFO.SET_MODULE procedure
    MODULE_HASH
    NUMBER
    The hash value of the above MODULE
    ACTION
    VARCHAR2(32)
    Contains the name of the currently executing action as set by calling the DBMS_APPLICATION_INFO.SET_ACTION procedure
    ACTION_HASH
    NUMBER
    The hash value of the above action name
    CLIENT_INFO
    VARCHAR2(64)
    Information set by the DBMS_APPLICATION_INFO.SET_CLIENT_INFO procedure
    FIXED_TABLE_SEQUENCE
    NUMBER
    This contains a number that increases every time the session completes a call to the database and there has been an intervening select from a dynamic performance table. This column can be used by performance monitors to monitor statistics in the database. Each time the performance monitor looks at the database, it only needs to look at sessions that are currently active or have a higher value in this column than the highest value that the performance monitor saw the last time. All the other sessions have been idle since the last time the performance monitor looked at the database.
    ROW_WAIT_OBJ#
    NUMBER
    Object ID for the table containing the ROWID specified in ROW_WAIT_ROW#
    ROW_WAIT_FILE#
    NUMBER
    Identifier for the datafile containing the ROWID specified in ROW_WAIT_ROW#. This column is valid only if the session is currently waiting for another transaction to commit and the value of ROW_WAIT_OBJ# is not -1.
    ROW_WAIT_BLOCK#
    NUMBER
    Identifier for the block containing the ROWID specified in ROW_WAIT_ROW#. This column is valid only if the session is currently waiting for another transaction to commit and the value of ROW_WAIT_OBJ# is not -1.
    ROW_WAIT_ROW#
    NUMBER
    The current ROWID being locked. This column is valid only if the session is currently waiting for another transaction to commit and the value of ROW_WAIT_OBJ# is not -1.
    LOGON_TIME
    DATE
    Time of logon
    LAST_CALL_ET
    NUMBER
    The last call
    PDML_ENABLED
    VARCHAR2(3)
    This column has been replaced by column PDML_STATUS
    FAILOVER_TYPE
    VARCHAR2(13)
    Indicates whether and to what extent transparent application failover (TAF) is enabled for the session:
    NONE - failover is disabled for this session
    SESSION - the client is able to fail over its session following a disconnect
    SELECT - the client is able to fail over queries in progress as well
    See Also:
    Oracle9i Database Concepts for more information on TAF
    Oracle9i Net Services Administrator's Guide for information on configuring TAF
    FAILOVER_METHOD
    VARCHAR2(10)
    Indicates the transparent application failover method for the session:
    NONE - failover is disabled for this session
    BASIC - the client itself reconnects following a disconnect
    PRECONNECT - the backup instance can support all connections from every instance for which it is backup
    FAILED_OVER
    VARCHAR2(3)
    Indicates (YES|NO) whether the session is running in failover mode and failover has occurred
    RESOURCE_CONSUMER_GROUP
    VARCHAR2(32)
    Name of the session's current resource consumer group
    PDML_STATUS
    VARCHAR2(8)
    If ENABLED, the session is in a PARALLEL DML enabled mode. If DISABLED, PARALLEL DML enabled mode is not supported for the session. If FORCED, the session has been altered to force PARALLEL DML.
    PDDL_STATUS
    VARCHAR2(8)
    If ENABLED, the session is in a PARALLEL DDL enabled mode. If DISABLED, PARALLEL DDL enabled mode is not supported for the session. If FORCED, the session has been altered to force PARALLEL DDL.
    PQ_STATUS
    VARCHAR2(8)
    If ENABLED, the session is in a PARALLEL QUERY enabled mode. If DISABLED, PARALLEL QUERY enabled mode is not supported for the session. If FORCED, the session has been altered to force PARALLEL QUERY.
    CURRENT_QUEUE_DURATION
    NUMBER
    If queued (1), the current amount of time the session has been queued. If not currently queued, value is 0.
    CLIENT_IDENTIFIER
    VARCHAR2(64)
    http://download-west.oracle.com/docs/cd/B10501_01/server.920/a96536/ch3171.htm#1122127
    Joel P�rez

  • Session var question

    never mind...got it
    Edited by: mbowles on Aug 27, 2009 6:03 AM

    To answer your question no. For security reasons, you cannot retrieve a sessoin using its ID.
    Is it an extremely secure piece of information?
    If the servlet and applet are talking to the same web application, you could possibly pass the data via the application scope (have a map in application scope, keyed by the session ID, and put the value to pass in that)
    Its not completely secure, because any servlet/jsp in the application can view that data, but it is a sidestep hack to accomplish what you wish :-)

  • NI session manager question

    I use NI session manager to control instrument,when I get the instrumenthandle and  can testing .but my question is :
    if I close instrument power and not close NI teststand,but the teststand can run sucess ,my dll document run in demo.
    but I think there must be a error ,and the dll return value is 0. in fact ,if the instrument closed, the return value maybe a negative.
    how can I deal with it ?

    Hello Sean,
    I want to make sure I fully understand your question.  Do you have a DLL that you are calling in your TestStand sequence as a code module?  If so, does a function within the DLL return a negative number if the instrument is not powered?  Is your overall question how can you determine whether the return value from the DLL is negative and make a decision based on this result?  Thanks in advance for these answers!
    Matt G.
    National Instruments
    Applications Engineering

  • Session object question put vs. putValue vs. setAttribute?

    I have the following code:
    <%@ page import="java.util.*" %>
    <jsp:useBean id="EducationBean" class="java.util.Hashtable" scope="session" />
    <%
    String swCurrFileName = "swcontrol.jsp";
    Enumeration params = request.getParameterNames();
    while (params.hasMoreElements()) {
         String name = (String)params.nextElement();
         EducationBean.put(name, request.getParameter(name));
    %>
    My question is I can't find any documentation on the put command, whats the difference between 'put', and 'putValue', and 'setAttribute'? When I try using the 'putValue' or 'setAttribute' command I get errors.
    What I'm trying to do is store form values in a session object across several pages, and on the last page display all the form values from the previous pages.

    the object you are calling put on is a java.util.Hashtable. put places an object into the table to be keyed off of another object. In your case, your key is the variable name and the object to be stored is your parameter from that name.
    the putValue and setAttribute are methods on the session object. They both do the same action as above, but are for HttpSession objects. putValue is deprecated and you should be using setAttribute, but most WebServers have putValue() pointing to the setAttribute() method. hope this helps.

  • Http Binding question

    Hello guys.
    I'm new in SOA Suite :) I have question about HTTP binding adapter. I downloaded MS wfetch application to test my REST composite application. I try invoke my composite :
    Host: 192.168.10.2:8001\r\n
    Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8\r\n
    Accept-Language: en-us,en;q=0.5\r\n
    Accept-Encoding: gzip,deflate\r\n
    Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7\r\n
    Content-Type: application/x-www-form-urlencoded\r\n
    \r\n
    entry_id=test&entry_type=eee&file_name=aaa&mime_type=fff&meta_data=rrrr
    At response I got :
    HTTP/1.1 500 Internal Server Error\r\n
    When I try to invoke my REST composite using xml it's work fine !! At Oracle MAN :
    For HTTP POST request methods, you can select a payload type of either URL-encoded (ampersand-separated name-value pairs) or XML.
    Please help me.
    Edited by: user5427713 on Feb 22, 2011 11:49 PM
    Edited by: user5427713 on Feb 22, 2011 11:50 PM

    Thank you. I created composite where interface is JCA HTTP Bindung Adapter. At Adapter configuration I set
    Verb : POST
    Payload Type : url-encoded
    Endpoint : /soa-infra/services/CDP/CDPProxyREST/ProxyInterface
    At Wfetch :
    Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8\r\n
    Accept-Language: en-us,en;q=0.5\r\n
    Accept-Encoding: gzip,deflate\r\n
    Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7\r\n
    Content-Type: application/x-www-form-urlencoded\r\n
    \r\n
    entry_id=test&entry_type=eee&file_name=aaa&mime_type=fff&meta_data=rrrr&uploadedFile=ddddd
    I got response error :
    HTTP/1.1 500 Internal Server Error\r\n
    X-Powered-By: Servlet/2.5 JSP/2.1\r\n
    X-ORACLE-DMS-ECID: 0000ItIYiI55yWK5qVp2iY1DN_6b00147b\r\n
    When I create request :
    Content-type: text/xml\r\n
    SOAPAction: "Request-Response"\r\n
    \r\n
    <soapenv: ... >
    <root:root><root:entry_id>ssadsd<root:entry_id><root:.......</root:root>
    I got normal response with data without error.

  • Postmerge session event question

    We have implemented a custom session event listener that utilizes the postmerge session event.
    We have observed some unexpected behavior and were hoping that the product architect or manager could explain this behavior.
    We have the following graph of objects:
    A has a many-to-many privately owned collection of B
    B in turn has a many-to-many privately owned collection of C
    After commiting a transaction involving object A we observe:
    postMerge event for A
    postMerge event of each of A's privately owned Bs
    yet NO postMerge event for any of B's privately owned Cs
    Questions:
    1) Is this the expected behavior?
    2) Since we need to do some processing of Cs, we are using the postMerge event that occurs on Bs to update the Cs. Is this a safe/correct approach?
    3) In a transaction that involved only updates to Cs, (no changes to A or B), would we see a postMerge event for each updated C?
    Thanks in advance for any clarification you can provide.
    ...Steve

    You could paste the results (tkprof ?) of the trace.
    The "missing" time could be an uninstrumented wait --- i.e. a wait event that is not captured in v$session_event. Particularly because you are using external calls.
    For example, see "Case Study 1" at http://blog.tanelpoder.com/2007/08/27/advanced-oracle-troubleshooting-guide-part-2-no-magic-is-needed-systematic-approach-will-do/
    Hemant K Chitale

  • Session cookie question?

    This is a really stupid question but i need the answer lol is a session cookie and a session the same thing? if not whats different and which is better to use to see if a user is logged on my site?

    A "session" is stored in memory on the server and is bound to a specific "sessionId". The sessionId is stored in a cookie by default. When the browser submits the cookie the webserver can use that value to link an existing session to that client.

Maybe you are looking for