How to get a session identifier in Model project

How can I get any web session context identifier in a ViewImpl class?

Tee hee hee deadlock.
Gho - there is no direct way to do so; perhaps you can explain the use case you are trying to achieve (for example, if you need the user name, there might be a quick and easy answer for you). The general answer is that you would pass in the information needed from the view layer (which does have access to the http session). If it's a bind variable you're trying to set, you can use an ExecuteWithParams binding in the view layer.
For more information, please provide your use case, and we'll try to help.
john

Similar Messages

  • How to get HTTP session in Applcation Module IMPL file

    Hi Guys,
    Can any one tell me how to get HTTP session in Applcation Module IMPL file ?
    thnks

    You can, but that's not a best practice.
    Re: How to reach HttpContext from model Project

  • How to get transacted session in direct mode with jmsra adapter

    Hi,
    I use MQ 4.4u1 release with GF in EMBEDDED mode. I configured several connection factories with NoTransaction/LocalTransaction/XATransaction support. In my app I get a connection factory from JNDI tree, create connection/session/producer and send several messages to queue. Everything works fine when I don't use transactions. But, when I want to send messages in one transaction, the connection always provided to me non-transacted session. The session created via
    Session session = connection.createSession(true, Session.SESSION_TRANSACTED);
    request. I check the session transacted state and acknowledge mode right after i get it:
    log.fine("Session: " + session + "; transacted: " + session.getTransacted() + "; ackMode: " + session.getAcknowledgeMode());
    The log shows me that the session is not transacted and ackMode is 0 (DUPS_OK_ACKNOWLEDGE). If I try to commit the session after messages were sent I get the correct exception:
    javax.jms.IllegalStateException: MQJMSRA_DS4001: commit():Illegal for a non-transacted Session:sessionId=3361979872663370240
    Does anyone know how to get transactional session in direct mode?
    Thanks, Denis.

    I mentioned LOCAL because I misread your post and thought you were suggesting that LOCAL mode behaved differently.
    If you want to send messages in a transaction from within a Servlet then I think you're expected to use a UserTransaction: Here's an example that worked for me:
            Connection connection = outboundConnectionFactory.createConnection();
            Session session = connection.createSession(true, Session.SESSION_TRANSACTED);
            userTransaction.begin();
            MessageProducer producer = session.createProducer(outboundQueue);
            int numberOfMessages = 10;
            for (int i = 0; i<numberOfMessages; i++) {
                Message message = session.createTextMessage("Hello world");
                producer.send(message);
            userTransaction.commit();
            connection.close();I obtained the UserTransaction with this resource declaration:
        @Resource(name = "java:comp/UserTransaction")
        private UserTransaction userTransaction;The EJB spec explicitly states that local transactions aren't supported in EJBs; I haven't found such an explicit statement for Servlets but suspect that JMSRA is taking the same approach.
    As for imq.jmsra.direct.disableCM property - this appears to disable connection pooling and from your post changes other behaviour as well. How did you find out about it (other than by examining the code)? As far as I can see this is not a documented feature and is not necessarily tested or supported.

  • How to get the session name of a batch input

    hi everybody
    does anybody know how to get the session name of a batch input?
    I have to put the name of the session at the end of my program so that the user can click on the session name to go directly to SM35 to run the batch input when the program ends

    Hi sia,
    1. Table is APQI
    2. field name for session name is GROUPID
    regards,
    amit m.

  • How to get the TableSorter File in to project

    Hi
    I am developing Table Example application.
    i want to implement table sort on that table.
    to implement that we need TableSorter Java Class to achive this.
    so please let me know how to get that file in to my project.
    regards
    mmukesh

    From the above reply you can get the TableSorter.java file.
    Follow the below steps to achieve sorting the table:
    1. Create a folder in the src->packages folder say util
    2. Place the TableSorter.java in that folder.
    3. Create a Context variable in the view say 'sorter' and in its properties enter the type say com.test.util.TableSorter
    4. Get the table and assign the sorter context to it.
    IWDTable table = (IWDTable)view.getElement("<table name>");
    wdContext.currentContextElement().setSorter(new TableSorter(table,wdThis.wdGetSortAction(),null));
    5. Create a method sort and write the below code: (the node in the code refers to the table)
             wdContext.currentContextElement().getSorter().sort(wdEvent,wdContext.<node tablename>);
    Hope this helps.
    Regards,
    Amar.
    Message was edited by:
            Amar Bhagat Challa

  • EVS - how to get selected values back into model?

    Hi all!
    I am new to ‘WebDynpro’ but I’ve got a closer look to the tutorials but since I didn’t found a hint for my problem I try it this way! The situation is the following:
    I am using selector fields to support the user with some constants to choose from but it is still possible to enter the data directly into the input field.
    I followed the tutorial for this purpose with the difference that I initialized the selector fields with data coming from the model. This happens in the ‘wdDoInit()’ of the view controller.
    The problem is how to get the selected value back into the model without forcing the user to use the F4-Help or trigger a ‘onEnter’ event on the input field.
    Due to the modification of the data type at runtime I can’t bind the attribute of the view context holding the selected value to another one of a custom controller context.
    I hope there is a simple solution because I am just asking for a common functionality on a web site.
    Thanks in advance!
    Frank

    Reiner,
    I cannot fully understand your requirements, but probably my solution described in blog post <a href="/people/valery.silaev/blog/2006/03/10/minus-evs-plus-ovs-value-help-smart-input">Minus EVS, Plus OVS == value help + "smart" input</a> will help you.
    My idea was to use OVS instead of EVS with pair of calculated "proxy" attribute and real attribute. Real attribute has enumeration, proxy attribute used for input. In my solution real attribute is always synchronized with proxy attribute...
    Valery Silaev
    EPAM Systems
    http://www.NetWeaverTeam.com

  • How to get the session variable value in JSF

    Hi
    This is Subbus, I'm new for JSF framewrok, i was set the session scope for my LoginBean in faces-config.xml file..
    <managed-bean-name>login</managed-bean-name>
    <managed-bean-class>LoginBean</managed-bean-class>
    <managed-bean-scope>session</managed-bean-scope> like that...
    So all parameter in LoginBean are set in session right ?... for example i used userId is the Parameter...
    Now i need to get the the userId parameter from that session in my another JSP page.. how i get that ?..
    Already i tried
    session.getAtrribute("userId");
    session.getValue("userId");
    but it retrieve only "null" value.. could u please help me.. it's very urgent one..
    By
    Subbus

    Where i use that..is it in jsp or backend bean...
    simply i use the following code in one backend bean and try to get the value from there bean in the front of jsp page...
    in LogoutBean inside
    public String getUserID()
         Object sessionAttribute = null;
         FacesContext facescontext=FacesContext.getCurrentInstance();
         ExternalContext externalcontext=facescontext.getExternalContext();
         Map sessionMap=externalcontext.getSessionMap();
         if(sessionMap != null)
         sessionAttribute = sessionMap.get("userId");
         System.out.println("Session value is...."+(String)sessionAttribute);
         return (String)sessionAttribute;
         return "fail";
    JSP Page
    <jsp:useBean id="logs" scope="session" class="logs.LogoutBean" />
    System.out.println("SS value is ...."+logs.getUserID());
    but again it retrieve only null value.. could u please tell me first how to set the session variable in JSF.. i did faces-config only.. is it correct or not..
    By
    Subbus

  • How to get second session in second browser

    I have got an B2B application that has 3 types of users - [System]Admin , Vendor & Clients.
    In one of the use cases an 'Admin' user can launch a new window [browser] on behalf of client or a vendor and do whatever he wants . All the while, his ie. admin user's ID is maintained in the first browser.
    The issue I am facing is when I open a new/second browser [on clicking of a link] on behalf of vendor /client, my admin user ID is getting replaced with Vendors/Client in the first browser as well. Mean to say, I am able to open a new browser, work on behalf of a client /vendor but when going bak to the first browser[admin's] user ID and other admin user related information is not available and are found to be replaced by the vendor/client information
    FYI: User ID is fetched/maintained from Session.
    Can anybody tell me how to create a seperate session for the second browser so that I can parallely work on behalf of my ownself[as a Admin user] and also on behalf of a Vendor/Client user on two different browsers.
    Message was edited by:
    Venkyt

    Should i use target "new" instead "invoice"?Doesn't matter. Managing the sessions as I said it is the safest way IMO. From the first request, get the session ID, add it to a hidden input field and then go by that, instead of asking for a session ID that maybe has changed.
    Or use a cookie, or simply continue working in the same window.

  • How to get apex session id to insert into a table....mimic of a global temp

    Hi,
    I want to mimic the beavior of a global temporary table by using a regular table and feed a column that will contain session id...but i don't get how to obtain the session id in APEX ?
    Any suggestion ?
    Regards.

    You can use the APP_SESSION variable.
    See:
    http://download-west.oracle.com/docs/cd/B32472_01/doc/appdev.300/b32471/concept.htm#BEIEHEJI

  • How to get an session BackingBean out of the FacesContext

    Hi,
    I want to make my appliction userdependent (each user only see's his own data).
    There fore I created a UserBackingBean with a session scope.
    An attribute of my other backingbeans is the User object. In my UserBackingBean I want to create a static method that returns the current user. Only I don't know how to get the UserBackingBean from a FacesContext.
    Please help?
    Romano

    ... and if you decide there MAY be several users logged in simultaneously, you can get the user associated with the current session by doing :
    FacesContext facesContext = FacesContext.getCurrentInstance();
    ExternalContext externalContext = facesContext.getExternalContext();
    Map sessionMap = externalContext.getSessionMap();
    UserBackingBean userBackingBean = (UserBackingBean)sessionMap.get("userBackingBean");assuming you labeled your UserBackingBean managed bean "userBackingBean" in your faces-config.xml

  • How to get the data from the model node like a table ?

    I want to get the data from the model node  once a record ,and the node  is bound to a internal table in the RFM which I called in the R/3 system. Who can give me some advice to achive it?Thank you!!

    Hi,
    To get the data from the node:
    wdContext.node[your node name].current[node name]_InputElement().get[specific element in the node];
    or you van use:
    wdContext.current[your node]Element().get[your element in the node];
    examples:
    wdContext.nodeZ_Mepro_Po_Detail_Stock_Distri_Input().currentZ_Mepro_Po_Detail_Stock_Distri_InputElement().getUcpd_Flag();
    wdContext.currentT_Delv_ReqsElement().getShelflife();
    regards,

  • How to get user session details ?

    Hello.
    I can get user session details querying the "USER_AUDIT_SESSION" view against my developing database.
    I have written a PL/SQL function to retrieve those session details. When I executed the function on the production database I have not got any records. It seems that the underlined view is not being refreshed in the production environment.
    Is there any other view or table, available to unprivileged users, I can use to get session details such as the connection timestamp and the user action ?

    Thanks for the reply.
    Ok, I might check it using a non DBA user, I am not sure, though.
    All the database queries have to be executed under a normal user connection.
    I would like a way to get session details not using "user_audit_session".
    Is there any table or view, available to a default profile user, which has session details and has records as a default behaviour?
    As far as I could check disable audit_trail seems to be the normal behaviour of the clients of my application. There is no records in "user_audit_session".

  • How to get list of user connected to project server by day wise

    HI,
    I need to get a report as how many times user  is connected to the project server in a week.
    I have enabled web analytical reports but its showing only how many times a user is connected to site.I need date also
    Project server 2010 version.
    Can any one help me.
    EX:
    Resource name           Date                 Connected (yes/No)
    Vijay  kumar            1-11-2014             yes
    Vijay  kumar            2-11-2014             yes               
    Vijay  kumar            3-11-2014             no
    Vijay  kumar            4-11-2014             yes
    Vijay  kumar            5-11-2014             yes
    Vijay  kumar            6-11-2014              no
    Vijay  kumar            7-11-2014             yes
    Thank You, Kumar KSV

    What Badal Ratra gave you would be the basis for your query to populate your own table...Project Server does not give you a way to do a daily connect report
    One of the ways I would go about doing this would be to run a nightly query to update a table - fill it in with the necessary data and run your report off that newly created table
    High Level Steps:
    (1) Create a table in the Reporting Database call DailyVisits
    (1a) The table would have Name/Date/Connected columns 
    (1b) You wouldn't need a no answer for connected columns since the answer would always be yes, the result set would ONLY have users who connected for each day.  And really you would only need 2 columns since the "connected" column would always
    be Yes...
    (2) Create a query that would query the published database (msp_resources) for the current day and store the result set in the table DailyVisits
    (3) Put this query in a nightly task to append to the DailyVisits table @ 11:55pm (for example)
    (4) Let the query run and you'll have only the users who connected for that day - the DailyVisits table would represent users who visited every day.  
    As long as the query runs nightly you'll have the information you're looking for - the one caveat is that it will only be starting from the day you start running the query.  
    You could also append the older user (last_connect) information from the resources table from other users to populate the dates but that would only represent a single entry/single last connect date.  This "old" information would represent the
    base for the table.
    hth

  • How to get top 10 actively used TFS projects?

    We have 100+ projects inside a TFS collection, how to find the (say to 10 or 15) most actively used projects? Idealy the activities will include any actions like CI/CO, build, member addition, etc.
    Thanks

    Hi Peter,  
    Thanks for your post.
    As far as I know there’s no a default way to get such top 10 actively team projects report. You should create your custom report using TFS API to achieve that, pleas refer to the discussions in this similar post:
    https://social.msdn.microsoft.com/Forums/vstudio/en-US/984d1796-e195-4765-9f55-e2a45bc37c80/how-to-get-a-list-of-active-projects-from-tfs-?forum=tfsgeneral. 
    For this scenario, please submit it to User Voice site at: http://visualstudio.uservoice.com/forums/121579-visual-studio. Microsoft engineers will evaluate them
    seriously.  
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

  • Here Is How To Get FCE Icons For Use In Projects etc.

    A few months ago RyanManUtd wanted an FCE icon to use in a project.
    I managed to provide one after much fiddling but it was not perfect.
    I have now discovered how to save an icon in seconds which is near-perfect and can be superimposed easily.
    To get the icons simply ctrl-click the FCE icon in the Applications folder (not the Dock) and select "Show Contents".
    Open the Contents folder and you will find several FCE icons. Double-click them to open them in Preview and select the largest.
    Then choose File>Save As, and make sure you save it as a PNG file with transparency.
    You can then superimpose it over anything in your projects or in Photoshop like this:-
    Most other apps have similar icons.

    But I don't know how to get the BlueTooth cursor to stay put and not move! I tried clicking the right side of my BlueTooth mouse and that makes the cursor stay still, but it is hard to click that right click without also pushing the left side of the mouse to make a left click.
    Never in my life have I ever used any click buttons on my mouse.
    Anyhow, when I did the clumsy right click on my mouse and went to Edit there was NO OPTION TO CREATE A STILL FRAME! ¿Qué pasa here?
    Lorna
    Message was edited by: Host

Maybe you are looking for

  • Posting to a servlet from a class in a jar on the server

    I'm trying to modify a 3rd party applet that displays documents pulled from a database to post back to the server whenever the user pages up/down into a new document. The primary functionality of the applet is in place and working, the only change I

  • Privacy Settings on MacBook Pro

    I'm trying to change a security setting on my MacBook Pro to allow an app to be downloaded. The lock in the corner is locked but when I try to unlock it, it stays locked. I'm logged in as administrator and have opened the lock under Users. Why can't

  • I need a visually impaired configuration that 1) standardizes all the fonts on a page to one size, so that ... (cont'd)

    2) they can all be maximized to the largest possible size, while 3) NOT forcing table columns larger than the screen width so that all the text in a column STAYS ON THE DAMNED SCREEN! Is there a way to do this (so far the add ons have come up lacking

  • How to check for Auto Allocated Serial Numbers

    Hi I have chosen ALLOCATE SERIAL NUMBERS = YES in Organization Parameters Form. I have set the Item SERIAL GENERATION = AT SALES ORDER ISSUE at Item Level. Done with the creation of Sales Orders Done with Releasing a SO(Auto Allocate = NO and Auto PI

  • Working X-Fi and Nforce4 AMD Chip

    Hello Creative, i asked several times but i got no answer, maybe in this thread. I have a Tyan Thunder K8WE without SCSI, means a Nforce4 AMD board. AND i have a X-Fi Xtreme! WHY i have dont have the same problems like all the others? My X-Fi has a H