Query about Session Management  in WebDynpro Component.

Hi to all, My Requirement is that,i have to Capture User-ID From Logon-Ticket and it will be use in the web-dynpro component,that access the Data From R/3 Server
(Back-end). and according to the login-ID information Captured from the Logon-ticket, i will do some task that will interact with the Bapi(R/3) on the basis of User-ID information. How Can I Do This.....Or How Can I Maintain the USer-Login Information into Portal and Use That in the Web-Dynpro Component embeded in the Portal.......
Plz if any-one have idea about, Help Me.......................
Thnx & Regard's
Dheerendra K. Shukla

Jitender,
You blindly copy example for stand-alone Java application and suggest it to server-side J2EE application... Not the best option...
Even this code could be improved:
public Connect1()
  /* no need to have instance variable */
  /* if it is used in single method */
  final JCO.Client connection = null;
  try
    /* Change the logon information
       to your own   system/user */
    connection = JCO.createClient
      "001",       /* SAP client    */
      "<userid>",  /* userid        */
      "****",      /* password      */
      null,        /* language      */
      "<host>",    /* host name     */
      "00"         /* system number */
    connection.connect();
    try
      System.out.println(connection.getAttributes());
      /* and other operations with live connection */
    finally
      /* always release resources         */
      /* original code has potential leak */
      connection.disconnect();
  catch (final Exception ex)
    ex.printStackTrace();
    /* DO NOT CALL THIS IN WEB-AS!!!          */
    /* THIS STOPS COMPLETE SERVER INSTANCE!!! */
    /* System.exit(1); */
    /* Re-throw instead or report in different manner */
    throw new RuntimeException(ex);
Worth to mention that Adaptive RFC model handle connections better then this.
Also note that WDSystemLandscape.getClient(LOGICAL_SYSTEM_NAME) allows to get connection without hardcoding connection details.
To summarize, what you advise is a plain "no-no".
And this code will works in same way as Java Print API for printing from WD -- see Re: how to print table data on click of a button
You guys are playing interesting game with each other ))
Valery Silaev
EPAM Systems
http://www.NetWeaverTeam.com

Similar Messages

  • Query about session management

    Hi all,
    I want to reset the session creation time how can i do it? My problem is I want to reset the Lastaccess time of the session to its creation time? I not sure It has possibilities? Is any possibilities to do it?
    regards,
    mahe

    There's nothing in the HttpSession interface to do that, so no.
    Why are you trying to deceive your application server?
    Are you sure you understand all the server's internal mechanisms which use the last access time, and the security implications of changing the data?

  • Help me about session management

    i need session management sample coding and database connection

    Any other version apart from XE. (XE is free for production use and therefore has this tablepsace limit).
    In order of increasing licensing cost (and I don''t know the cost)
    Oracle 10g Standard Edition One
    Oracle 10g Standard Edition
    Oracle 10g Enterprise Edition
    You should be using version 10.2.0.1 or later

  • A query about cachePolicy Attribute of the Component in Flex

    Hi ,
    why does each componnent has cachePolicy attribute ??
    will this really takes care of the caching issue if we use
    <mx:Application cachePolicy="false"/>
    Please let  me know
    Thanks in advnace .

    Hi ,
    why does each componnent has cachePolicy attribute ??
    will this really takes care of the caching issue if we use
    <mx:Application cachePolicy="false"/>
    Please let  me know
    Thanks in advnace .

  • Session Manager - SQL QUERY

    I want to get the query fired by OBIEE to database. I'm able to get it through the session manager in the Administration Settings. But for some reports it is firing multiple queries.
    Is there any way to combine them?

    Hi,
    It depends on your datamodel. If the BI server 'thinks' it is the best way to get the desired results it makes multiple queries and stitches the datasets together into one result set. You can raise your logging level to see what happens.
    Good Luck,
    Daan Bakboord
    http://obiee.nl/

  • How WebDynpro/JCO do the session management?

    Hi expert,
    Current we have one R3 system as our backend system, we would like to extend it via Webdynpro java and JCO in the frontend, but we don't know how java do the session management with backend R3 system?
    For  example, user logon in the frontend and connect to R3 via JCO, after once calling, I would like to store somthing in R3 system so that the second calling of this user can reuse it to save time and improve performance, would it be possible to do it via JCO?
    Thanks.

    Ya,
    Have a look at following threads.
    Maintaining caching for a user session in webdynpro
    <b>- Chintan</b>

  • Consuming webservice in a webdynpro component

    Hi Experts,
    I have a third party free webservice as WSDL link.My requirement is to make use of that webservice in my webdynpro component.
    Can any body give me a step by step approach to consume that webservice in my webdynpro Component.
    If possible, Provide me some good material for consuming webservice in a webdynpro component.
    Awaiting for a useful reply.
    Thanks,
    Ramanan.p

    hi,
    Few indroductory sessions
    /people/thomas.jung/blog/2007/12/17/consuming-services-with-abap -Consuming webservices with webdynpro.
    It is possible to create webservice in ABAP as well as in Webdynpro.
    ABAP Webservice:
    http://wiki.open-esb.java.net/Wiki.jsp?page=BAPIWEBSERVICE
    http://www.sappro.com/downloads/SAPXI.pdf
    Webdynpro Webservice:
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/244e7923-0a01-0010-5887-fe0b0c6dbb8d
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/30f1b585-0a01-0010-3d96-ad0ea291c4f9
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/media/uuid/db785a70-0701-0010-858c-eee0ec4fe1b3
    In Web Dynpro ABAP there is nothing special about calling a web service. Unlike WD Java, there are not dedicated model object types in WD ABAP. WD ABAP simply has the ability to interact with other ABAP development object types. You can call function modules, ABAP classes, even modules in old dynpro apps.
    So calling the webservice from ABAP therefore is just the process of generating the ABAP Proxy Class. This is the same process regardless of if you want to use this proxy class from WDA or any other type of ABAP development object. You can then call the proxy class from WDA just like any other type of ABAP class. There is a service wizard option in later support package levels that includes an option for ABAP Proxy classes - although it doesn't generate the proxy class it just generates the code and context for the call to an already existing proxy class. The service wizards in WD ABAP are not required however. They are just shortcut code generators and often can't even generate a complete context for a complex web service proxy - so expect to do some manual adjustment after running the wizard.
    Edited by: Mahalakshmi kothuri on Jun 1, 2008 4:17 PM

  • Session Management API

    I'm looking for some way to query the weblogic container about servlet sessions
    by id. I'd like to create a management program that is supplied a session id,
    performs a lookup against WL session manager, and dumps the data in that session.
    Is there such an API or interfaces? Any docs, examples, etc. in that direction
    would be appreciated.

    Such API is not provided since it would constitute a security
    hole.
    James wrote:
    I'm looking for some way to query the weblogic container about servlet sessions
    by id. I'd like to create a management program that is supplied a session id,
    performs a lookup against WL session manager, and dumps the data in that session.
    Is there such an API or interfaces? Any docs, examples, etc. in that direction
    would be appreciated.

  • Session management problems with SSO

    Hi all-
    I've been getting an Apex app tied to SSO as a partner app (per http://www.oracle.com/technology/products/database/application_express/howtos/sso_partner_app.html). So far, it sort of works. If I go to my apex app, it redirects me to SSO, where I authenticate and end up back in the apex app. Great. Here are two problems I've run into:
    1. If I am already authenticated to SSO, and I go to my apex app (url like: http://host/pls/apex/f?p=101:1), my browser goes into an infinite redirect (url like: http://host/pls/apex/f?p=101:1:::::FSP_AFTER_LOGIN_URL:\f? p=101|1|||||FSP_AFTER_LOGIN_URL|\f?p=101|1|||||FSP_AFTER_LOGIN_URL|\f? p=101|1|||||FSP_AFTER_LOGIN_URL|\f?p=101|1|||||FSP_AFTER_LOGIN_URL|\f? p=101|1|||||FSP_AFTER_LOGIN_URL|\f?p=101|1|||||FSP_AFTER_LOGIN_URL|\f? p=101|1|||||FSP_AFTER_LOGIN_URL|\f?p=101|1|||||FSP_AFTER_LOGIN_URL|\f? p=101|1|||||FSP_AFTER_LOGIN_URL|\f?p=101|1|||||FSP_AFTER_LOGIN_URL|\f? p=101|1|||||FSP_AFTER_LOGIN_URL|\f?p=101|1|||||FSP_AFTER_LOGIN_URL|\f? p=101|1|||||FSP_AFTER_LOGIN_URL|\f?p=101|1|||||FSP_AFTER_LOGIN_URL|\f? p=101|1|||||FSP_AFTER_LOGIN_URL|\f?p=101|1|||||FSP_AFTER_LOGIN_URL|\f? p=101|1|||||FSP_AFTER_LOGIN_URL|\f?p=101|1|||||FSP_AFTER_LOGIN_URL|\f? p=101|1|\\\\\\\\\\\\\\\\\\\). To resolve, I have to clear cookies.
    2. If I am using my apex app, then log out of SSO (in another browser window), I can still click around in my apex app (i.e., apex thinks I'm still authenticated).
    Anyone have any thoughts? I'm wondering if I need to do something in page session management (under authentication schemes) to fix #2, but I have no clue about #1.
    Thanks
    Rob

    Hi Scott-
    Thanks for the info on #2 - I'll work on that after I get #1 sorted out, since it's the more dire problem. Here's some more info:
    Apex version = 3.0.1.00.08
    SSO SDK = ssosdk902.zip
    I set it up as "My Application as Partner App." I used "MY_PARTNER_NAME" as SSO Partner Application Name. In the list of SSO Partner Apps on the SSO Admin page, my partner app name is also MY_PARTNER_NAME. It gives the following info:
    Login URL:      https://sso_host/pls/orasso/orasso.wwsso_app_admin.ls_login
    Single Sign-Off URL:      https://sso_host/pls/orasso/orasso.wwsso_app_admin.ls_logout
    Home URL: http://apex_host/pls/apex
    Success URL: http://apex_host/pls/apex/RBLICK.YOUR_PACKAGE.PROCESS_SUCCESS
    Logout URL: http://apex_host/pls/apex
    RBLICK is the schema owning the apex app. In there, I created a package called YOUR_PACKAGE:
    create package YOUR_PACKAGE as
    procedure process_success(urlc in varchar2);
    end YOUR_PACKAGE;
    CREATE PACKAGE BODY YOUR_PACKAGE AS
    procedure process_success(urlc in varchar2) as
    begin
    wwv_flow_custom_auth_sso.process_success(
    urlc=>urlc,
    p_partner_app_name=>'MY_PARTNER_NAME');
    end process_success;
    END YOUR_PACKAGE;
    Anything look obviously wrong to you?
    Thanks!
    Rob

  • Hello, I have a big problem with Firefox: Session Manager & Undo Closed Tab addons are not working, Sync Is not working. History is working. How to fix this?

    Firefox remembers history but doesn't remember closed tabs, sessions.
    It happened after updating Fox to v. 19.0.2 on one computer.
    In Firefox Options is set Use Custom Settings For History, everything is checked except Always Use Private Browsing Mode. So I am not in private browsing.
    When I press on Undo Closed Button nothing happens & in session manager Save Session Button is greyed out. I've tried installing other add-ons that can remember tabs. tried to disable/reinstall these 2 add-ons. Did't help. On my 2nd computer I have same add-ons, same settings and they are working normally. on 3rd computer undo closed tabs works also. How to fix this? I decided to ask before doing Firefox Reset...
    Sync is a separate problem. It works, but quite often it logs me out of Sync account. Then I can log in only using long recovery key and password (choosing option I don't have device with me because it does not accept keys for pairing device.)
    Thanks for reading.

    I have exactly the same settings in Options (in both computers)
    for history, these 2 add-ons and all other stuff in Options. The only difference is that on 1 pc sessions can be saved and closed tabs can be reopened, on other main pc they stopped to work. + no any other add-on that does similar things works on this pc.
    It is also interesting that I can reopen closed visited sites from History Panel, but not by pressing the Button. For now I only manually bookmark links to a temporary folder.
    Recently (some 2 month ago) I pressed x and Firefox closed all tabs without saving them without displaying save & quit pop up.
    so I changed 4 settings in about.config
    browser.tabs.warn on close true
    browser.warn on quit true
    browser.warn on restart true
    browser.show.quit warning true
    but the problem with sessions appeared only 1 week ago.
    So I guess the problem is not with the History settings or other settings. Seems that something responsible for button or for storing info about tabs/sessions got corrupted. :(

  • Adding a new field to a standard webdynpro component's layout

    Hi all,
      I need to add a new field to a standard webdynpro component's( in my case the component is ''/SAPSRM/WDC_UI_SC_DOTC_BD')  layout.How do i go about adding a new field to the standard component's lay out?
    can anyone help me with the necessary details?
    Regards,
    Abhinay.

    Check if this is useful to you (Login required)
    https://websmp105.sap-ag.de/~sapidb/011000358700001969972008E.pdf
    Rgds/Kiran

  • Deploy Error when using Stateful Session Bean inside Webdynpro

    Hi,
    I'm trying to create a webdynpro project that uses a stateful session bean
    I have created DC's for a EJB Module project, Enterprise Application and Webdynpro component. Created the bean, built it, added it's package to the public part, added the EJB Module to the EAR project. Built the EAR project. Added the EJB Module project and Enterprise Application project as a used DC in the Webdynpro DC.
    In the Webdynpro DC I added com.sap.archive-packaging.default.update-descriptors=true in the build.properties file of the cfg directory. (using the navigator view) That resolved an error while building it.
    Deployed the Enterprise Application DC without problems.
    Tried to deploy the Webdynpro DC but I get the following error:
    Jun 16, 2008 9:40:46 AM /userOut/deploy (com.sap.ide.eclipse.sdm.threading.DeployThreadManager) [Thread[Deploy Thread,5,main]] WARNING:
    [012]Deployment finished with warning
    Settings
    SDM host : 10.64.36.74
    SDM port : 50018
    URL to deploy : file:/C:/DOCUME~1/JESCHA~1/LOCALS~1/Temp/temp59822company.nl~projempactcmp.ear
    Result
    => deployed with warning : file:/C:/DOCUME~1/JESCHA~1/LOCALS~1/Temp/temp59822company.nl~projempactcmp.ear
    Finished with warnings: development component 'projempactcmp'/'company.nl'/'local'/'20080616094022':Caught exception during application startup from SAP J2EE Engine's deploy service:java.rmi.RemoteException: Error occurred while starting application company.nl/projempactcmp and wait. Reason: Clusterwide execption: server ID 6060950:<--Localization failed: ResourceBundle='com.sap.engine.services.deploy.DeployResourceBundle', ID='com.sap.engine.services.deploy.container.DeploymentException: <--Localization failed: ResourceBundle='com.sap.engine.services.deploy.DeployResourceBundle', ID='Failed implicit start for company.nl/projempejb : Unknown state(5)', Arguments: []--> : Can't find resource for bundle java.util.PropertyResourceBundle, key Failed implicit start for company.nl/projempejb : Unknown state(5)', Arguments: []--> : Can't find resource for bundle java.util.PropertyResourceBundle, key com.sap.engine.services.deploy.container.DeploymentException: <--Localization failed: ResourceBundle='com.sap.engine.services.deploy.DeployResourceBundle', ID='Failed implicit start for company.nl/projempejb : Unknown state(5)', Arguments: []--> : Can't find resource for bundle java.util.PropertyResourceBundle, key Failed implicit start for company.nl/projempejb : Unknown state(5) (message ID: com.sap.sdm.serverext.servertype.inqmy.extern.EngineApplOnlineDeployerImpl.performAction(DeploymentActionTypes).REMEXC)
    Deployment exception : Got problems during deployment
    Does anyone know what this error means and how to resolve it. I searched the forum but only found errors that look like this relating to XI not to Webdynpro.......
    Thansk,
    Jeschael
    Edited by: J.V. Lebbink on Jun 17, 2008 6:52 AM

    Default is 30mts.
    This is done as a parameter in orion-ejb-jar.xml. Please look at the EJB Guide at http://otn.oracle.com/docs/products/ias/doc_library/903doc_otn/generic.903/a97677/dtdxml.htm#634197 for details
    regards
    Debu

  • Bug in session manager. If you work for Sun, please take a look.

    While evaluating what it would take to transition from Iplanet 6 to Sun Webserver 6.1, I found a problem with the Sun Webserver's s1ws60 session managers. If the page is not explicitly flushed before ending, the session cookie JSESSIONID is never sent. So as long as the user continues to visit small pages, they keep getting new sessions (because they are never sent a session id, so the session manager creates a new one every time they visit). The session cookie is sent if larger pages are visited (the buffer is automatically flushes). The session cookie is also sent if out.flushBuffer() is explicitly called within the JSP. This problem was not present in IWS6.0.
    The problem has been tracked down to a combination of the code in com.iplanet.server.http.session.IWSSessionManager (found in the "plugins" directory) and the JSP's Java code generated by a component of the webserver (Catalina?). Under Iplanet, the code generated in the finally{} section of the JSP first flushed the buffer, then called releasePageContext. Under Sun Webserver, the code generated just calls releasePageContext without explicitly flushing the buffer before the call. When flushing the buffer for a non-committed response, the headers are first generated and sent, along with any cookies, including the session cookie. The server only sends the session cookie if, among other things, the session satisfies "_session.isNew()". The order of events in releasePageContext ensures that this is never true when used in combination with IWSSessionManager. I don't have the source code to verify this, but from experimentation I think this is the reason: Before the buffer is flushed, the session is saved by IWSSessionManager.update(session), which at line 498 calls "sn.unsetNew()". So the session is never isNew() when it gets around to sending the session cookie. This can be resolved by either adding an explicit buffer flush to the finally{} section of the JSP, or removing the unsetNew() call from IWSSessionManager. Since I don't know where the code that generates the JSP is (or if I can even change it), I ended up removing the sn.unsetNew() call from the update() function.
    Here's the code generated in the finally{} section using IWS6 and Sun Webserver:
    Iplanet 6
            } finally {
                if (out != null && (out instanceof org.apache.jasper.runtime.JspWriterImpl)) {
                    ((org.apache.jasper.runtime.JspWriterImpl) out).flushBuffer();
                if (_jspxFactory != null) _jspxFactory.releasePageContext(pageContext);
            }Sun Webserver
            } finally {
                _jspx_releaseTags(_jspx_curTag, null);
                if (_jspxFactory != null) _jspxFactory.releasePageContext(pageContext);
            }

    I posted a bug report on this.

  • Web service authentication/session management using Axis2

    I'm creating a web service using Axis2 where the client will need to login to the service and maintain a session. I'm trying to figure out a good way to do this. I've read the article on the following link:
    http://www.developer.com/services/article.php/3620661/Axis2-Session-Management.htm
    and it describes 4 main ways of doing this: Request Session Scope, Soap session scope, Transport session scope, and Application scope. However, it doesn't give much detail in actually implementing this. It says to add a parameter to services.xml like this:
    <service name="foo" scope=" transportsession">
    </service>
    but what about the actual code that goes in the server and client to actually handle the login process and verify the username/password in an SQL database on the server? I'm having a lot of trouble finding a good tuturial on this. Can anyone point me in the right direction? I'm also open to other ideas that don't necessarily directly involve Axis2.

    Session management for a web service and already answered. Locking.

  • Session management for a web service

    I am building a web service where the user will need to login and the application will need to maintain a persistent session. I am using Apache Axis2 for client/server communication via SOAP/XML. What would the simplest and most common way of doing this? I know I could implement session management from scratch similarly to how a browser does it, using cookies, but I'd rather use standard Java libraries for this. Am I correct in assuming that even though I'm using Axis2, the solution doesn't really have anything to do with Axis2 since Axis2 is basically just a way for the client/server to send messages to each other?
    I've read a lot of information online about this, but there's so much information that it's hard to know where to start. Basically I'm just looking for someone to point me in the right direction on what classes to use and so on. I just need a simple username password authentication and session management system for a web service.

    Container Managed Authentication. Does everything you need.

Maybe you are looking for

  • Adobe Presenter 9 Video Editing

    I have a question for anyone who can answer this: Would Adobe Presenter 9 allow me to take a longer video and cut it up into smaller pieces to incorporate into a presentation? I have a slide deck being used in conjunction with recorded Instructor-Led

  • Application builder.

    Hello, I have a program running in the LABVIEW programming mode. How can it be that it runs without any problem, and when I want to build the same application it with the Application builder he can't solve or find all needed vi's. Is this magic or a

  • Transaction launcher parameter not handed over to ERP system

    Hi experts, We generated an R3 transaction launcher via the wizzard. We try to hand over the BP_NUMBER to the ERP system. This does not work. The entitiy collection in the gdc is not filled. Actually it gets the gdc form the view controller of the ac

  • Invoke task flow from backing bean?

    Hi, Is there a way to invoke task flow from a backing bean? If yes, how? Thanks in advance

  • Switch between desktops using mouse wheel

    Just a simple question - is there a possibility to switch desktop with use of the mouse wheel on the desktop background? I know it is possible in XFCE, but how about KDE or GNOME? Why it is important to me - I have simplified changing desktops by set