How to use Session Broker ? (Where to add Session Broker Code)

Hi all,
My requirement is, I have to use two different database session in one Top Link.
I know it can be done using Session Broker, but where actually I need to add that code ? I am using JDeveloper 10.1.2.0.0(Build 1811) as i need to implement this in a BPEL process. Is it possible use Session Broker with this version , if so how to do that ?
Thanks in advance,
Anant.

Hello Anant,
Not sure what code you are refering to. Using a SessionBroker is similar to how you would use a regular session, and can be configured using sessions.xml or through java code. If you are using java code, you would do this where ever you first acquire the sessionbroker and login.
Please refer to the docs on what it is and how it is used:
http://download-west.oracle.com/docs/cd/B25221_04/web.1013/b13593/sesun007.htm#CACGDDHE
The docs are for TopLink 10.1.3, and though I think TopLink 10.1.2 (9.0.4.5) is what ships with Jdev 10.1.2, they should still apply.
Best Regards,
Chris

Similar Messages

  • How to use session in webservice?

    In C#, can use session variable in a webservice object.
    How to use session in Java webservice?
    Who can give me a example?
    Thanks a lot

    Did I use session in a wrong way?No, you are using the session correctly. The code looks fine.
    Check
    - your spelling of the attribute names - obviously they must match
    - the ids of the sessions you get both times: session.getId(). If they have different ids, then most probably the session is being lost somewhere.
    There are a number of reasons to lose a session. If you close the browser, invalidate the session in code, or lose the cookie recording the id. This happens when you change from https to http, so a session can be lost that way.
    The session is normally maintained by session cookies. If you close your browser you lose the cookie. If you have disabled cookies on your machine then it also might not work.
    In cases such as that you should be using the method response.encodeURL() to maintain the session for you in any hyperlinks you produce. Struts normally handles that for you though if necessary.
    Hope this helps,
    evnafets

  • How to use session object in jsp

    hi all
    marry christmas
    can anyone plz tell me how to use session obect in jsp
    rachna
    Message was edited by:
    rachna_arora82

    hi rachna,
    JSP has a default(implicit) session object...... use the getSession(true) method on the session object and then going u can either get or set attributes depending on the requirement
    That was in general and now with the issue u have got..... what u can do is that the u can create session for every user who logs in and when he/she tries to login again then u can probably check for the existing session object in the JSP and perform the logic as required..... any clarifications plzzzzzzz let me know
    Thanks n Regards
    Naveen M
    Message was edited by:
    Novice_inJAVA
    Message was edited by:
    Novice_inJAVA

  • How to use at last/ at end of in this code

    Hi,
    i want to do sum for each and every line item of the delivery quantity and compare it with final purchase order quantity if it is equal do not display in the output.(how to use at last/at end of ) in this code,
    below code wat i have ritten is only comparing first record with final purchase order quantity and displaying the output, but i want sum of every line item and compare with final quantity(purchase order quantity)
    if possible try modify this code
    clear:wa_final,wa_kopoo,wa_likpp1.
        loop at it_kopoo into wa_kopoo.
          move wa_kopoo-ebeln to wa_final-ebeln.
          move wa_kopoo-ebelp to wa_final-ebelp.
          move wa_kopoo-matnr to wa_final-matnr.
          move wa_kopoo-txz01 to wa_final-txz01.
          move wa_kopoo-menge to wa_final-menge.
          move wa_kopoo-meins to wa_final-meins.
          move wa_kopoo-werks to wa_final-werks.
          move wa_kopoo-matkl to wa_final-matkl.
          move wa_kopoo-reswk to wa_final-reswk.
          move wa_kopoo-aedat to wa_final-aedat.
          move wa_kopoo-ekgrp to wa_final-ekgrp.
          move wa_kopoo-EINDT to wa_final-EINDT.
        read table it_likpp1 into wa_likpp1 with key vgbel = wa_final-ebeln
                                                     vgpos = wa_final-ebelp.
          if sy-subrc eq 0.
            if wa_final-menge > wa_likpp1-LFIMG.
            else.
              continue.
            endif.
          endif.
          append wa_final to it_final.
          clear:wa_final,wa_kopoo,wa_likpp1.
        endloop.
      endif.

    Hi,
    Try this:
    define one more internal table it_final1 similar to i_final .
    CLEAR:wa_final,wa_kopoo,wa_likpp1.
    SORT it_kopoo BY ebeln ebelp.
    LOOP AT it_kopoo INTO wa_kopoo.
      move-corresponding wa_kopoo to wa_final.
      COLLECT wa_final INTO it_final1.
      CLEAR: wa_kopoo, wa_final.
    ENDLOOP.
    sort it_final1 by ebeln ebelp.
    LOOP AT it_final1 INTO wa_final.
      READ TABLE it_likpp1 INTO wa_likpp1 WITH KEY vgbel = wa_final-ebeln
                                                   vgpos = wa_final-ebelp.
      IF sy-subrc EQ 0.
        IF wa_final-menge NE wa_likpp1-lfimg.
          APPEND wa_final TO it_final.
        ENDIF.
      ENDIF.
    ENDLOOP.
    Regards,
    Subramanian

  • How to use Property Editor from an Add-In?

    Hi,
    I am writing a WYSIWYG add-in for JDev that allows users to put some object into a JPanel instance.
    Thess object has properties such as left, right, width, height, etc.
    - Question: how to use JDev's property editor to allow users change properties of thess object?
    - Another word: how to user JDev's Property Editor API from an add-in?
    I looked at the document. It does not give me enough information about Property Editor.
    Thanks in advance,
    Trung

    Hello Prasad,
    You are on the right avenue - launch an external application which can connect to running Outlook instance and then close it. After this you can launch Outlook anew. Here are the steps required to get the job done:
    1. Use the Marshal.GetActiveObject method which obtains
    a running instance of the specified object from the running object table (ROT) - Outlook in your case, for example:
    // Check whether there is an Outlook process running.
    if (Process.GetProcessesByName("OUTLOOK").Count() > 0)
    // If so, use the GetActiveObject method to obtain the process and cast it to an Application object.
    application = Marshal.GetActiveObject("Outlook.Application") as Outlook.Application;
    then use the
    Quit method to close the running instance. The
    associated Outlook session will be closed completely; the user will be logged out of the messaging system and any changes to items not already saved will be discarded.
    2.  Use the
    Start method of the System.Diagnostics.Process class to start Outlook anew.

  • How to use Session scope in jsp page

    Hello, I have login form, where user provides username and password. Then click on submit, it will forward to validation.jsp. Where it will check in database make sure username and password exit. Now i can also retrive accountid of perticular user. I want to put that username and accountid in session scope. so all other pages can use that username and accountid. How can i do that. I'm new at this, so please provide me example too. Here is my code for login.jsp and validation.jsp..
    Validation.jsp
    <%@ page import="java.util.*" %>
    <%@ page import="java.sql.*" %>
    //String name = request.getParameter( "username" );//
    //session.setAttribute( "accountID",accountID );//
    <%
    String connURL = "jdbc:oracle:thin:@orca.csc.ncsu.edu:1521:ORCL";
         Connection conn = null;
         Statement stmt = null;
         ResultSet rs = null;
    Class.forName("oracle.jdbc.driver.OracleDriver").newInstance();
    conn = DriverManager.getConnection(connURL, "vapatel","pjdas");
    stmt = conn.createStatement();
    String user=request.getParameter("userName");
    String password=request.getParameter("password");
    boolean entrance=false;
    stmt.excuteQuery("SELECT AccountID From Password WHERE USERNAME='"+user+"'");
    rs = stmt.executeQuery("SELECT * FROM Password WHERE USERNAME='"+user+"' AND PASSWORD='"+password+"'");
    while(rs.next()){
    String dbUser = rs.getString("USERNAME");
    String dbPassword= rs.getString("PASSWORD");
    if ((user.equals(dbUser)) && (password.equals(dbPassword))){
    entrance=true;
    if (entrance==true){%>
    <jsp:forward page="form.jsp"/>
    <%}
    else{%>
    <jsp:forward page="login.jsp"/>
    <%}
    %>

    hi,
    to put something into session scope in a jsp page use:
    session.setAttribute("counter", Integer.toString(5));to retrieve is from a jsp page use:
    String counterAttribute = (String)session.getAttribute("counter");

  • How to use Session Key-based Request Targeting Mechanism in OCCAS ??

    I read Session Key-Based Request Targeting(chapter 5) in Developing SIP Applications.
    But, I don't work my application using this mechanism.
    I add sesssionKey function with @SipApplicationKey annotation.
    I deploy this application. And then, other machine send INVITE request.
    My application received INVITE request. But sessionKey function is not called before doInvite function is called.
    I used @SipApplicationKey(applicationName="...") annotation.
    It didn't work.
    sample code is following.
    Could someone help me?
    import javax.servlet.ServletConfig;
    import javax.servlet.ServletContext;
    import javax.servlet.ServletException;
    import javax.servlet.sip.SipFactory;
    import javax.servlet.sip.SipServlet;
    import javax.servlet.sip.SipServletMessage;
    import javax.servlet.sip.SipServletRequest;
    import javax.servlet.sip.SipServletResponse;
    import javax.servlet.sip.SipURI;
    import javax.servlet.sip.URI;
    import javax.servlet.sip.annotation.SipApplicationKey;
    public class app2SipServlet extends SipServlet {
    private static final long serialVersionUID = 1L;
    public static SipFactory sipFactory;
    public static ServletContext sc;
    public void init(ServletConfig cfg) throws ServletException {
    super.init(cfg);
    sipFactory = getSipFactory();
    sc = getServletContext();
    trace("+++ app2SipServlet Initialization");          
    @SipApplicationKey
    public static String sessionKey(SipServletRequest req) {
    String appid = req.getHeader("ApplicationID");
    System.out.println("application id : " + appid);
    return appid;
    @Override
    public void doRequest(SipServletRequest req)     throws ServletException, IOException {
    trace(req, "doRequest()");
    super.doRequest(req);
    @Override
    protected void doInvite(SipServletRequest req) throws ServletException, IOException {
    URI from = req.getFrom().getURI();
    String user = ((SipURI)from).getUser();
    trace(user + " : " + req.getSession().getApplicationSession().getId());
    trace(user + " : " + req.getSession().getApplicationSession().getApplicationName());
    SipServletResponse resp = req.createResponse(200);
    resp.send();
    trace(resp);
    }

    How many servlets you have defined in your sip.xml .If there are multiple you may want to check if
    -- You have defined main-servlet ?
    -- or Is deployment descriptor version 1.0 or 1.1

  • How to use session variable in JSP function  & How to use both JSP  Servlet

    Hi,
    I am new to JSP and servlets
    Still I am devloping a website in JSP. I am not mixing JSP with servlets, but I do create Java files for bean, logic and database works.
    I try to keep the hard coding part out of JSP.
    I dont how to use both JSP and Servlets in combination.
    Hence If needed I write some functions in JSP.
    but it gives me error
    +<%! public void abc()+
    +{+
    int intUserId = Integer.valueOf((Integer) session.getAttribute("MySession_UserID"));
    +}+
    +%>+
    Saying cannot find symbol session
    1) So can u please tell how can I access session variables within JSP function
    2) And also give me some links/tutorials about useing both JSP and Servlets in combination.
    Thanks
    Venkat

    The application architecture when you use Servlets and JSP in a standard MVC pattern is explained here (under the heading "Integrating Servlets and JSP Pages") and here ...

  • How to use an own plugin to add 3d-content

    Hi,
    I have started to develop a plugin for Acrobat 8.0 that will add some kind of 3d-content to an existing model. I tried somewhat, but I face the problem that I can't find out how to use the plugin in Acrobat with Javascript. I added the .api file in the folder Acrobat/Plugins and the plugin is loaded.
    But I can't find out how to use the methods of the plugin. I always get the error: 'can't found [methodname]'. Do you need to use some kind of prefix, or whatever. Perhaps this is a newbie question, but I can't find out it in the documentation.
    Any help will be fine!
    Regards,
    Ewout

    > I face the problem that I can't find out how to use the plugin in Acrobat with Javascript.
    That's right. You can't.
    >
    >But I can't find out how to use the methods of the plugin.
    You cannot use the methods of a plug-in. They are for its own internal
    use.
    A plug-in registers for call backs. Most obviously menu selections,
    but also selecting a tool, clicking on a button, opening a document,
    changing page etc. Also it can register an "idle" procedure to be run
    when Acrobat is not busy, at intervals. Your plug-in code is run, by
    Acrobat, at these moments.
    Aandi Inston

  • How to use session tracking

    i am making shopping mall project .
    ist page conatins list of product avaiale
    2nd page contains list of manufacturuer avaible
    problem:-
    i want to display on 3rd page the product seleted by user in 1st page
    i used session tracking concept.but problem is the value is coming null in third page
    please tell me how to solve my problem

    If it is like a shopping cart, I suggest you to look for a good shopping cart examples available plenty online.
    But if its just about keeping session variables and using them the following works.
    Test with a simple example. Have three jsp files like a.jsp, b.jsp and c.jsp.
    put the following in a.jsp
    <% session.setAttribute("Mobile","Nokia");%>
    <%=session.getAttribute("Mobile")%>
    <a href="b.jsp">Go to B.jsp</a>Print the value of session variable - <%=session.getAttribute("Mobile")%> in b.jsp and c.jsp
    And in b.jsp have a link to c.jsp and so on. Once you set a session variable, it lives as long as your session doesnt expire.
    Try it. and also look for more session tracking examples online.
    Message was edited by:
    passion_for_java

  • How to use session cookie property of System object?

    Hi all,
    I have searched all over the SDN but didnt get anything relevent so here i am posting my query...
    My scenario is as follows:
    I have created a KM document iview that launches an HTML page, on click of button of HTML page a VC iview is launched. On this iview i have a button that hits BI query.
    PS: A system object is created for the connectivity bet portal and backend BI server.
    PS: i have configured SSO between portal and backend.
    Now when i click on button on iview that fetches the data from backend, i am asked for authentication pop-up, although i have configured SSO why i am asked to enter UID and PWD again??
    In system object there is a property named
    <b>"session cookie = MYSAPSSO2"</b>
    So should i use this property so that cookie will get transfered from one session to other session when i click button on iview??
    If yes then HOW??
    Is there any other setting remained in Visual Admin?? or Backend or portal?
    What could be the missing??
    PS: User id are same on portal & backend.
    Any help will be highly appreciated...
    Regards,
    Ameya
    Thanks in advance
    Message was edited by:
            Ameya Pimpalgaonkar
    null
    Message was edited by:
            Ameya Pimpalgaonkar

    Hi Ameya,
    I do not know the exact answer.However you should look for something called JSESSION ID.
    Have a look at the thread:
    Re: Problems Using Application Integrator for BSP Application
    Reg SSO Logon Tickets and Browser sessions
    How to use jsessionid while making HTTP calls??
    Hope you find something which can help you.
    Regards
    Atul Shrivastava

  • How to use session in Struts

    Hello, there:
    It's a simple question.
    I have a web app which has a login page, in its action class I create an object, user, and save it into session by using request.getSession(true).setAttribute("user", user).
    In another action class, I want to use the info of user then I use request.getSession(true).getAttribute("user"); however, the returned object is NULL. Did I use session in a wrong way?
    Thanks,
    Sway

    Did I use session in a wrong way?No, you are using the session correctly. The code looks fine.
    Check
    - your spelling of the attribute names - obviously they must match
    - the ids of the sessions you get both times: session.getId(). If they have different ids, then most probably the session is being lost somewhere.
    There are a number of reasons to lose a session. If you close the browser, invalidate the session in code, or lose the cookie recording the id. This happens when you change from https to http, so a session can be lost that way.
    The session is normally maintained by session cookies. If you close your browser you lose the cookie. If you have disabled cookies on your machine then it also might not work.
    In cases such as that you should be using the method response.encodeURL() to maintain the session for you in any hyperlinks you produce. Struts normally handles that for you though if necessary.
    Hope this helps,
    evnafets

  • How to use session state protection

    I use Apex 3.2.1
    I access my site by a url passing a parameter like this : f?p=101:1:0::::ITEM1:1234567. There is no login and password to access the site.
    The value of the parameter ITEM1 is the authorization of the first page, with a database function for the verification.
    To secure my site I want to use session state protection so, I enabled it , then I defined "Arguments Must have checksum" for the page 1.
    Now , when i try to acces my site with the same url it does not work.
    it is the first time a try to use session state protection, could someone tell me what's wrong?

    Hi user5719906,
    I would suggest that as you need to pass an item and are unable to generate a checksum as you are not yet logged in, that you will need to allow arguments without checksum for this page.
    This could be a bit of a hole in your security, but as long as you know it is there and clear the cache for all pages that you branch to, you should be able work around it.
    The issue is that a malicious user can set page and application items via the url to an unsecured page.
    Regards
    Michael

  • How to use standard Search Input Help (return 2 data code and desc) ?

    Hi,
    Please advise how to use standard Input Help provided by SAP and return 2 data (code and description) ? because the standard Input Help only return the code only ?
    Thank You and Best Regards
    Fernand

    >
    Saket  Abhyankar wrote:
    > Hi,
    >
    > I think you need to go for 'Search Help Exit' or OVS.
    >
    > Regards,
    >
    > Saket.
    That is not true that this is the only way.  The standard Data Dictory based search help can return more than one value as long as there are multiple exporting values defined in the search help, the search help is attached to a Data Dictionary Structure, and this same data dictionary structure is used as the source of the context node. You can read more about this in the online help:
    http://help.sap.com/saphelp_nw70ehp1/helpdata/en/47/9f724642314aabe10000000a42189b/frameset.htm
    The Note section under Integration:
    If an input help structure is stored in a field in the ABAP Dictionary, and if you want to use the field mapping of search help parameters stored in the ABAP Dictionary as the field name for the structure for your Web Dynpro input help, then map your context nodes to this structure. This ensures that all components of the structure are available dynamically at runtime as attributes of the node.
    If the context node is not mapped to the structure, the data element's input help can be used if there is one.

  • How to use the One-to-One mapping in Java Code

    Dear all:
    I have set the direct mapping and named query,
    and have written web service of login.
    I can login successfully.
    Now,I want learning about One-to-One mapping.
    I have setting the One-to-One mapping,
    then what can I do latter?
    I do not found any paper showing how to use it in web service?
    Somebody help me?thx all.

    Following code worked for me:
    import oracle.javatools.resourcebundle.BundleFactory;
    import java.util.ResourceBundle;
    * This method retrieves localized strings from a given XLIF resource bundle.
    * @param bundleName The XLIF bundle from which the localized string is to be retrieved.
    * @param key The key of the localized string.
    * @return The localized string retrieved from the given XLIF bundle.
    public static String getXlifLocalizedString(String bundleName, String key) {
    if (StringUtils.isEmpty(key)) {
    return key;
    if (StringUtils.isEmpty(bundleName)) {
    return "[" + key + "]";
    String localizedString = null;
    ResourceBundle resourceBundle = null;
    try {
    resourceBundle = BundleFactory.getBundle(bundleName);
    localizedString = resourceBundle.getString(key);
    } catch (Exception e) {
    LOG.log(Level.SEVERE, "Problem in loading XLIF resource bundle: " + bundleName, e);
    return "[" + key + "]";
    return localizedString;
    }

Maybe you are looking for