How to pass remote objects from server to server?

hi,
if you
1) have two servers, A and B
2) one client, C
3) and B obtains a reference to an object in A
is it possible to pass that reference to C, in such a way that once C has the reference it no longer needs to know B even exists, and can communicate directly with A?
thanks
asjf

It sounds like you are having A server as some kind of a cross-server registry for B.
Your problem can be broken into two steps:
1. Either A looks up B (via RMI), and keeps a reference (to later be handed to C), or B looks up A and makes some kind of a "register" call, again A then holding a reference to B which will be passed to C.
2. C asks A for the reference and A returns it.
The mechanics OUGHT TO BE pretty simple; B is declared as a UnicastRemoteObject, so any attempt to pass or return a B passes or returns a remote reference.
I say OUGHT TO because I haven't tried this scheme.

Similar Messages

  • How to pass an object from jsp to other jsp using SendRedirect

    How to pass an object from one jsp to the other jsp using ssendRedirect with out using the session
    I am having 2 jsps
    x.jsp and y.jsp
    From x.jsp using sendRedirect iam going to y.jsp
    From x.jsp i have pass an object to the y.jsp
    Is it possible without putting the object in session
    Is it possible using EncodeUrl
    Please help me Its Urgent

    Is it possible without putting the object in sessionAnything is possible. Would you accept that it is very difficult?
    When you send a redirect, it tells the browser to send a new request for the target page. That means any request parameters/attributes are lost.
    Is it possible using EncodeUrl response.encodeURL() puts the session id into a url if the browser does not support cookies. It is purely for retaining the session.
    There are two ways that you can communicate across a sendRedirect.
    1 - use the session
    2 - pass a parameter in the url.
    parameters are string based, so passing objects is almost out of the question.
    Potentially you could serialize your object, encode it in base64 (so it is composed completely as characters) and pass it as a parameter to the other page, where you retrieve it, unencode it, and then load the serialized object.
    Or you can just use the session.

  • [urgent[ Passing object from server to the midlet

    I am building a search function for my mobile application..
    I created a servlet "SearchServlet.java" that basically send a query to the dbase to retrieve the values in the database.
    In this servlet, I store the results in an arraylist..
    The servlet works just fine *I've tested it in the browser and accessed it through the local host"..
    The concern now is, what if I need to call the servlet from the midlet application..
    How to pass the object from the server to the midlet?
    Could someone explain to me the mechanism to pass the object?
    What object should be the return value in SearchServlet.java?
    Thank you very much..

    First of all use sober language on forums, its not
    your private forum where you can use your abusive
    language.And even if it is than its not good manners
    to speak in public.Well, quite honestly, my language was not that abusive... I aleady told you that that it's wrong several times... No response on those (at least nothing showing that i would be wrong). And if you keep linking to that code, I find that very anoying.
    Second of all. the try catch block sends response
    back to J2me app request.Its upto developer whatever
    response he wants to send back. There is nothing
    wrong in that.No, all it does it declare a string, nothing more, nothing less. No need to catch any exception!
    third of all if you think that writeUTF method is
    totally wrong, then why dont you show me the
    improved solution or correct solution. After all its
    forum site, if you know the better solution please
    show me rather than always criticising and using
    abusive languages.I told you several times that you should read the api docs! It's all in there and you see why you should not read data with readline() when you write that data with writeUTF(). If you fail to do that, and are not capable to learn from that, then that's your own problem. Sure I could show you what it should be (and I beleive I did more than ones), but what does that teach you? Not a lot! Only to keep coming back here and ask more questions that can be found if you take two minutes of time and read docs or search the internet using google or whatever search engine you like (or even the forum search enigne, since that is also rarely used). I'm not talking about you in particular, but about the general level of the questions asked here. 75% of the answers can be found with a little more effort, and in less time than it would take to wait for someone else to come up with an answer.
    So please, read what writeUTF() does, and you'll understand what's wrong.
    Let me show you:
    Writes a string to the underlying output stream using UTF-8 encoding in a machine-independent manner.
    First, two bytes are written to the output stream as if by the writeShort method giving the number of bytes to follow. This value is the number of bytes actually written out, not the length of the string. Following the length, each character of the string is output, in sequence, using the UTF-8 encoding for the character. If no exception is thrown, the counter written is incremented by the total number of bytes written to the output stream. This will be at least two plus the length of str, and at most two plus thrice the length of str. What does readline() do? It reads UTF-8 text until some endline character. So it will also read the two length bytes of the wirteUTF method. Is this good? No, it's not. If the lengt is to long, it could even insert extra text characters in the line that should not be there, since readline doesn't know anything about the length bytes, and theats them as normal UTF-8 text.
    If you think I dont understand API properly than make
    me explain, thats what forums are for...You never said you didn't understand the api docs... I think they are very clear
    To end it I really doubt that you are developer/
    coder. If you think yourself too perfect please guide
    me.I'm not perfect, I'm just putting effort into finding solution myself.
    If you are going to continue such an attitude I have
    to report to Java forums administrator.I realy don't mind.
    Note to original user who posted this message: I am
    sorry to write such a comment in your thread, but
    "deepspace" user really needs some help.Please, if you want to make a comment, be constuctive. Talking about abusive language... This might be subtle, but it still is abusive! Tell that to all the users I helped already... I bet I'm the most active user here at the moment and I think I helped a whole lot of them very well. Some didn't like my method at first, but in the end, most wil apriciate what I did. I like to let user find out stuff for themselfs, and not give them what they want. They learn much more thay way for sure!

  • How to send an object from one application to another?

    Hi all,
    I have two applications over the same server. The first application needs to send an object to the other application.
    I try to put the object as a session attribute, but in the moment that the second application tries to get the attribute, the attribute doesn't exist.
    Does anybody now how can pass an object from the one application to the other?

    You can also use JMS

  • Hi,how can i transport objects from one server to other like (Dev To Qty)

    Hi Sir/madam,
       Can u explain how can i transport objects from one server to other like (Development To Quality To Production).
    Regards,
    Vishali.

    Hi Vishali,
    Step 1: Collect all Transports(with Packages) in Transports Tab(RSA1)- CTO
    Step 2: Release the subrequests first and then the main request by pressing Truck button
    Step 3: STMS or Customized transactions
    Object Collection In Transports:
    The respective Transports should have the following objects:
    1. Base Objects -
    a. Info Area
    b. Info object catalogs
    c. Info Objects
    2. Info Providers u2013
    a. Info Cubes
    b. Multi Providers
    c. Info Sets
    d. Data Store Objects
    e. Info Cube Aggregates
    3. Transfer Rules u2013
    a. Application Components
    b. Communication Structure
    c. Data Source replica
    d. Info Packages
    e. Transfer Rules
    f. Transformations
    g. Info Source Transaction data
    h. Transfer Structure
    i. Data sources (Active version)
    j. Routines & BW Formulas used in the Transfer routines
    k. Extract Structures
    l. (Note) If the transfer structures and related objects are being transferred without preceding
    Base Objects transport (e.g. while fixing an error) it is safer to transport the related Info
    Objects as well.
    4. Update Rules u2013
    a. Update rules
    b. Routines and formulas used in Update rules
    c. DTPs
    5. Process Chains u2013
    a. Process Chains
    b. Process Chain Starter
    c. Process Variants
    d. Event u2013 Administration Chains
    6. Report Objects u2013
    a. Reports
    b. Report Objects
    c. Web Templates
    Regards,
    Suman

  • How to pass record Group from Forms with DATA_PARAMETER to Reports Server

    How to pass record Group from Forms with DATA_PARAMETER to Reports Server using RUN_REPORT_OBJECT?
    When we use products on run time we are using data_parameter for passing record Groups to reports via run_product but now we have to use application server and reports server for same reports.
    We met with <FRM-41214 Unable to run reports> for passing DATA_PARAMETER to reports server when used RUN_REPORTS_OBJECT.
    How can we pass record Group from Forms with DATA_PARAMETER to Reports Server using RUN_REPORT_OBJECT?
    Thanks,
    Arif

    Hi Mandeep,
    Could you please tell me how can i pass data parameter from forms to report through run_product.

  • Pass a object from one jar to another jar file

    I have a common jar file which will communicate to the server for data validation purpose.But after validation it has to invoke different different jar file based on its response from the server.So, I might have a object which has to pass from the common jar file to a specific jar file.So, I like to know what will be the best procedure to achieve it.
    Please help me out.

    arpitak wrote:
    Yes,jar file holds class files.one of class files wants to trigger a method of a class file which resides in different jar file.this is the situation I tried to describe.Let consider there are three jar files like JAR A,JAR B ,JAR C.Here JAR A is a common jar where other two jar could be used as a plug in. So based on the condition any one of them (JARS) will be triggered by the common jar(JAR A).this is the situation.The class file of JAR A will trigger some method or main method of the JAR B/JAR C.So,here how could I pass a object from one jar to another is my main question.
    Is it clear now?
    I need a solution for this very urgently.Are you looking for a plug-in framework? That is, dynamically discovering and loading plugins. I am not experienced in developing or using plugins. However Googling "java plugin" brings up JPF.
    If you just have multiple jars that have different classes, the JVM will load the appropriate classes if it can find the jars through the standard classloader on the classpath or through a customer classloader.

  • How to pass a JavaBean from servlet to JSP?

    Hi there,
    I am working on a project that needs to handle quite a few client requests and I want to use the Front Controller pattern that is described in the J2EE pattern page.
    The steps described in the front controller pattern is that:
    1. A servlet (controller) process the client request.
    2. It calls the appropriate cammand object and the cammand object gets the data from the data source and returns a JavaBean that contains the required data.
    3. The servlet dispatch to the appropriate View (jsp page)
    4. The JSP page displays the data in the JavaBean to the user.
    However, I don't know how to pass the JavaBean from the servlet to the JSP page when the servlet forwards the control to the JSP page. Should I make the JavaBean with a request scope or higher? If so, how to uses it in the JSP page? Just refer by the ID of the JavaBean.
    If any one knows there is an example or tutorial on how to use this pattern, please let me know.
    Thank you !
    Regards
    Edmund

    Could you please give more info? i tried to do this, but always get a "Class not found exception":
    response$jsp.java:65: Class org.apache.jsp.TestBean not found. TestBean bean = null;
    although the class TestBean (no package name => defalt package) is in the WAR file and the Servlet seems to instantiate it (otherwise an exception would occur sooner in the TestServlet code).
    my JSP code is:
    <%@ page language="java" info="Response page" %>
    <jsp:useBean id="bean" class="TestBean" />
    <%
    TestBean bean2 = (TestBean) request.getAttribute("TheBean");
    %>
    <html>
    <body>
    Your value: <%= bean2.getValue() %><BR>
    My val: <%= bean2.getNewValue() %><BR>
    <P>
    Date: <%= new Date() %>
    <P>
    Neuen Wert eingeben
    </body>
    </html>
    --------------

  • How to pass JSON object for a PUT operation of restful

    Hi,
    I am trying to proxy restful call through an OSB proxy and I would like to know how I can pass json object via OSB proxy to an external rest service for a PUT operation? I am using Oracle 11g.
    I have created a business service, that point to the external rest service and created a proxy service that route to the business service. I thought it automatically takes the JSON, which is the data need to be send to the rest service, but didn't work, I get 405 error in the osb access log. is that how it works, or there is something else I need to do? if so, can you please help and tell me how?
    appreciate any kind of help.
    thanks
    Marwa.

    Hi Anju,
    Most of the example I see is dealing with data being pass either as query-string or html form. We are passing JSON object from the UI and rest services are configured to take JSON. therefore, in the PUT and POST data are passed either as an attachment or part of the request object. Do you know or have an example how to do it? I don't need to any kind of transformation of data because I need JSON on both end and I am trying to use the OSB proxy in between my UI and rest services to take advantage of monitoring capability of the OSB.
    appreciate any help, my deadline is getting close and I kind stuck.
    Thanks
    M.

  • MVC2.0-- how to pass bean object to jsp

    Hi All,
    Anybody please tell me how to pass bean class object from controller to jsp ?
    I am developing an application in MVC2.0.
    I am creating an object of bean class in controller servlet and want to pass this object to jsp so anybody please tell how to pass this object to jsp.
    ControllerServlet--
    Bean obj = new Bean();
    Bean --
    public String aMethod() {
    return data;
    I have to use this method in my jsp and I am creating an object of this bean in controller servlet.
    Please help
    Thanks
    Please reply soon

    Hi,
    Thanks for your response. I knew it is possible with session objects. But I want to perform this operation with out using session objects. Is there a way to accomplish this with out using Session objects.
    Please help.
    Thanks

  • How to pass the data from a input table to RFC data service?

    Hi,
    I am doing a prototype with VC, I'm wondering how VC pass the data from a table view to a backend data service? For example, I have one RFC in the backend system with a tabel type importing parameter, now I want to pass all the data from an input table view to the RFC, I guess it's possible but I don't know how to do it.
    I try to create some events between the input table and data service, but seems there is no a system event can export the whole table to the backend data service.
    Thanks for your answer.

    Thanks for your answer, I tried the solution 2, I create "Submit" button, and ser the mapping scope to  be "All data rows", it only works when I select at least one row, otherwise the data would not be passed.
    Another question is I have serveral imported table parameter, for each table I have one "submit" event, I want these tables to be submitted at the same time, but if I click the submit button in one table toolbar, I can only submit the table data which has a submit button clicked, for other tables, the data is not passed, how can I achieve it?
    Thanks.

  • How to pass multiple values from workbook to planning function ?

    Hi,
    I have created Planning function in Modeler and it has one parameter(Variable represents = Multiple single values).
    When executing the planning function by create planning seq. in the web template : I see value of variable store data like ...
        A.) input one value -> V1
        B.) input three values -> V1;V2;V3
    This function execute completely in web.
    However, I want to use the planning function in workbook(Excel).
    The value of variable can't input V1;V2;V3... I don't know how to pass multiple values from workbook to parameter(Multiple single values type) in planning function ?
    thank you.

    Hi,
    Please see the attached how to document (page no 16).
    <a href="https://www.sdn.sap.comhttp://www.sdn.sap.comhttp://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/f0881371-78a1-2910-f0b8-af3e184929be">how to</a>
    Hope this was helpful
    thanks

  • Regarding how to pass the data from web dynpro to workflow

    hi gurus,
    how to pass the data from web dynpro to workflow.
    Regards
    vijay

    Check this [thread|SAP_WAPI_START_WORKFLOW;

  • How to pass the data from web dynpro to workflow.

    hi gurus,
    how to pass the data from web dynpro to workflow.
    Regards
    vijay

    Hi
    you can use function module
    data   ls_input_container  TYPE swr_cont.
    data   lt_input_container  TYPE TABLE OF  swr_cont.
    CALL FUNCTION 'SAP_WAPI_START_WORKFLOW'
        EXPORTING
          task            = ptask
        IMPORTING
          return_code     = lv_return_code
          new_status      = lv_new_status
        TABLES
          input_container = pinput_container
          message_lines   = lt_message_lines
          message_struct  = lt_message_struct.
    where you pass the data in imnternal table "pinput_container" as
      ls_input_container-element = 'KUNNR'.
      ls_input_container-value = ls_skna1-kunnr ."wd_this->lv_kunnr.
      APPEND ls_input_container TO lt_input_container .
      ls_input_container-element = 'CLUSER'.
      ls_input_container-value = lv_cluser.
      APPEND ls_input_container TO lt_input_container .
      ls_input_container-element = 'BUKRS'.
      ls_input_container-value = lv_bukrs. " youe value as per requirement.
      APPEND ls_input_container TO lt_input_container .
      ls_input_container-element = 'VKORG'.
      ls_input_container-value = ls_sknvv-vkorg. " youe value as per requirement
      APPEND ls_input_container TO lt_input_container .
      ls_input_container-element = 'VTWEG'.
      ls_input_container-value = ls_sknvv-vtweg. "youe value as per requirement.
      APPEND ls_input_container TO lt_input_container .
      ls_input_container-element = 'SPART'.
      ls_input_container-value = ls_sknvv-spart. "youe value as per requirement.
      APPEND ls_input_container TO lt_input_container .
    *Also Forgot to mention where ptask is your workflow ID *
    Regards,
    Arvind
    Edited by: Arvind Patel on May 14, 2010 7:38 AM

  • HOW TO PASS THE DATA FROM SELECTION SCREEN TO STANDARD TRANSACTION?

    HI,
    HOW TO PASS THE DATA FROM SELECTION SCREEN TO STANDARD TRANSACTION?
    thanks,
    samba.

    By selection screen, what do you mean?   There is no selection screen in WDA as there was in classic dynpro. Do you mean you are using the Select-Options reusable component?  Are you wanting to call a standard transaction via ITS - SAPGUI for HTML?  Please provide more details to your question.

Maybe you are looking for

  • F150- Free selection issue

    Hi, Dunning run is carried out only for a particular group of Industry (KNA1-BRSCH)  in the transaction F150. It is not even selecting a single customer in the group when we consider it in the free selection. I have not ticked the exclude check box i

  • How do I update iMessage on my macbook pro?

    So I've had my iMessage turned off for a while because I was just getting it serviced and didn't want to risk whomever was looking at my macbook getting bombarded with random messages here and there, and I just turned it on. It's all fine and dandy a

  • Rotate didn't stay rotated once loaded to Youtube. Please help!

    I'm so frustrated, I can't believe it. I took a video of my grandbaby trying to line dance and I turned my camera so it was taking a portrait clip. When I realized I couldn't rotate it with quicktime, I paid for the $30 upgrade to pro because it said

  • Cant use VPN on LAN but can on WIFI

    Hi I am curently running 10.8.2 and when connected to the metwork using a LAN cable I cant use any of my VPN connections... But when I disconnect form the LAN and turn on WIFI all VPN's work??? Any ideas?

  • Can I change the location of the Info popup window?

    Whenever I double click an event to edit or add information, it appears at the far upper left corner of my screen. I have to move my mouse that way to edit it; on a 27 inch screen that is very inconvenient. If I move the window and close it, the next