Passing interface through rmi

Hi,
I would like to know if its possible to pass an interface through RMI. I have currently 2 applications connected through RMI. In application A, we have the full running simulation, so is it possible to pass the whole running simulation over to application B through RMI such that whatever is happening on application A would be shown on application B dynamically.
If rmi cannot do this, what other alternatives do I have. Thanks in advance!

Yes, you can do this.
You would not be passing an interface however, you would be passing object A. So make sure A is serialisable, as well as all the objects it is using.
The receiving VM will need the class files for the objects being used by A, so you have two options:
The classes can be in the static classpath of VM B.
The classes can by dynamically loaded from a file server, as needed.
The first option is simplest, the second is the most flexible.
One more thing; when you send the simulation A to VM B, you have performed an object 'pass-by-value' which normally does not happen in Java. Therefore, A will be running in VM B, but you will also have your original version, still running in VM A.
I hope that made sense, for additional insight, you may want to take a look here:
https://cajo.dev.java.net
Best of luck,
John

Similar Messages

  • Passing a UNIXProcess across the wire through RMI

    hi....
    Well, is it possible to send a remote UNIXProcess across the wire through rmi?
    when Iam trying to do that the following exception is being thrown....
    java.rmi.UnmarshalException: error unmarshalling return; nested exception is:
         java.io.WriteAbortedException: writing aborted; java.io.NotSerializableException: java.lang.UNIXProcessThanks for any help.
    cheers.......

    well, since we are talking about streaming, sockets will definitely be closer to what you want. however, in many ways sockets are more work to setup and manage compared to rmi. but, if you are sticking with the core jdk i would definitely recommend using sockets, because streaming over rmi is not easy to implement, and you're much better off dealing with sockets. of course, since you are probably already using rmi for the high level communication, using a library like RMIIO allows you to leverage the existing communication infrastructure, instead of dropping down to sockets for the input/output streaming. each side has its pros and cons.

  • Does my MacBook passes audio through Mini Display Port or not?

    I recently bought a Mini DisplayPort > HDMI adapter in order to display my MacBook on my TV. Other users of the same adapter publicly stated that they got video AND audio out, but I got only video.
    I've been searching this online for two days now and I still don't know why (I even searched this support forum, but I must admit that I got a little lost and decided to write my own topic). All I discovered was that some MacBooks have this capacity (to port audio along with video through Mini DisplayPort) and others don't.
    I'm using a white MacBook unibody bought new and latest on late 2009. It's the first model with multitouch trackpad and without FireWire port. Its model name is "MacBook 6,1", I guess.
    Does anybody know for sure if It CAN, in fact deliver audio+video through the Mini DisplayPort if I'm using a compatible HDMI adapter?
    Thanks.

    These models pass audio through the display port:
    iMac (Late 2009), MacBook Pro (Mid 2010), MacBook (Mid 2010), and Mac mini (Mid 2010) supply multichannel audio (up to 8 channels) and video signals over Mini DisplayPort. To connect your television or other HDMI devices to your Mac, use select third-party Mini DisplayPort to HDMI adapters that conform to the VESA v1.1a DisplayPort Interoperability Guidelines. The following adapters adhere to these standards:
    - Moshi Mini DP to HDMI Adapter with Audio Support
    - Griffin Video Display Converter (Mini DisplayPort to HDMI and DVI)

  • Pass parameter through standard page "import xml content and actions"

    Dear Portal experts,
    As you know, a standard portal page is configured to allow the import of XML file. It is located in the portal in the path system admin -> transport -> xml content and actions -> import
    I configured a quick link u201Cimportu201D to the page so now the link http://myserver:port/irj/portal/import allows me to access directly to this screen.
    What I would like to do now is to pass the parameter related to u201Cfile nameu201D through this screen meaning that I would like that http://myserver:port/irj/portal/ import/filename=C:\test.xml  fills automatically the fields u201CXML fileu201D with  C:\test.xml 
    Please do you know how to achieve this ?
    Thank you very much and regards

    hi,
    @Maksim :
    When user launch an URL like http://myserver:port/irj/portal/ import/*filename=C:\test.xml, he is requested to provide username and password; as this link is a shortcut for the upload xml page, there is a check of authorization and only portal admin that have authorization and permission on this page/iview will be able to upload xml file through the URL. Hope this clarify.
    @Kumar :
    thank you for your answer. What a pity to not be able to pass parameter through standard portal page/iview particularly knowing that we can pass paramater through many kinds of iviews (transactional iview, url iview, VC iview...). I explored some option on file com.sap.portal.ivs.init.par but this was unsuccessful. However, thanks to this [link bellow|http://wiki.sdn.sap.com/wiki/display/Snippets/ComponenttouploadXMLfilewithPCD+objects], I was able to upload through URL the XML file.
    The problem is that I can upload only XML file that are stored in the server not in the local user computer. My requirement is to be able to upload local XML file stored on user's computer.
    If someone could provide and idea/solution, I would be very grateful.
    Cheers

  • Interface through XI or P2P - How to decide?

    We are in the process of implementing XI for a client.
    The client currently has about 600 point to point interfaces connecting more than 200 applications to SAP (and to each other).
    We are in the process of routing these point-to-point interfaces through XI.
    My concern is:
    Is there a strategy or guideline to decide which of the existing interfaces should be moved through XI and which of these should continue as point-to-point?
    I need inputs from the technical angle as well as the business perspective.
    In case I need to pose this question in a business forum too...comments on this will be welcome.
    Thanks in advance,
    Prasad Kamath

    Hey Prasad,
    To address few of the  queries,
    Firstly with cost.
    In this case as there are more number of legacy applicaiton and i would assume there is huge amount data being transfered btw legacy and sap the cost involved including licesnse will be on the higher side.
    Time lines again depending upon the complexity varies.
    If the organization has already implemented sap and want to consolidate upon it in a long term then XI is the best way out. P2P might be the current solution but the complexity of managing such interfaces in a lng term tends to get tedious and higher on the maintenance as you don't have certralized monitoring of such interfaces.
    Most important is to have a understanding where sap currently sits in the organizaton in terms of strategy and commitment of the leadership in pushing the drive to leverage on it. At the end of the day now focus has moved from cost ot business benfits.
    You cannot avoid BPM in this case.
    The customer has some set SLAs which they intend to achieve with XI...for example an end-to-end JCO call takes less than 1 second in the current landscape.....whether we can achieve this from XI...
    Abt GRC i suppose the following links will give a insight
    www.cio-weblog.com/50226711/sap_goverernace_risk_mgmt_compliance_approach_understanding.php
    www.sap.com/belux/solutions/grc/pdf/Solutions_for_GRC_OV.pdf
    <b>Cheers,
    *RAJ*</b>

  • Is it possible to pass parameters through eventlisteners?

    Hello everyone!
    Inside a .fla file I have some buttons and each button will tween a different image to the stage. All the images are outside the stage in the same x and y position and I just need to tween the x coordinate.
    Now I'm working with an external document class where I'm trying to hold all my functions and I'm stucked with the Tweens. I'm willing to stay away from the flash tween engine and I'm trying to work with tweenLite.
    My question is: Is it possible to pass parameters through eventListeners so I can use something like this inside my docClass?
         public function animeThis (e:MouseEvent, mc:MovieClip, ep:int):void { //ep stands for endPoint.
         TweenLite.to(mc, 2, {x:ep});
    If this is possible, how am I supposed to write the listeners so it will pass the event to be listened for AND those parameters? And how to build the function so it will receive those parameters and the event?
    If this is not possible, what's the best approach to do this?
    Thanks again!

    So, I understand you need to match buttons with corresponding visuals.
    Here is a suggested approach.
    Since SimpleButton is not a dynamic class, I suggest you have an enhanced base class for these buttons that extends SimpleButton. What is enhanced is that button has reference to the target.
    I wrote code off the top of my head and it may be buggy. But concept is clear:
    This is base class for all the buttons:
    package 
         import flash.display.DisplayObject;
         import flash.display.SimpleButton;
         public class NavButton extends SimpleButton
              public var targetObject:DisplayObject
              public function NavButton()
    Now, this is your doc class that utilizes this new buttons:
    package 
         import flash.display.DisplayObject;
         import flash.display.MovieClip;
         import flash.display.Sprite;
         import flash.events.Event;
         import flash.events.MouseEvent;
         public class DocClass extends Sprite
              private var btnArray:Array;
              private var visuals:Array;
              // references to objects being swapped
              private var visualIn:MovieClip;
              private var visualOut:MovieClip;
              public function DocClass()
                   if (stage) init();
                   else addEventListener(Event.ADDED_TO_STAGE, init);
              private function init(e:Event = null):void
                   removeEventListener(Event.ADDED_TO_STAGE, init);
                   // buttons and MCs shouldn't be in the same array - otherwise it is counterintuitive
                   // assuming all the objects are on stage
                   btnArray = [price_btn, pack_btn, brand_btn, position_btn];
                   visuals = [g19_mc, g16_mc, g09_mc, g04_mc];
                   configObjects();
              private function configObjects():void
                   var currentVisual:MovieClip;
                   var currentButton:NavButton;
                   for (var i:int = 0; i < btnArray.length; i++)
                        currentVisual = visuals[i];
                        // hold original positioin
                        currentVisual.hiddenPosition = currentVisual.x;
                        currentButton = btnArray[i];
                        // set target MC
                        currentButton.targetObject = currentVisual;
                        currentVisual.addEventListener(MouseEvent.CLICK, placeObject);
                        currentButton.addEventListener(MouseEvent.CLICK, placeObject);
              private function placeObject(e:MouseEvent):void
                   // if NavButton is clicked - make new visual targeted for moving in and currently visible object subject for moving out
                   if (e.currentTarget is NavButton) {
                        visualOut = visualIn;
                        visualIn = NavButton(e.currentTarget).targetObject;
                   else {
                        // otherwise - move visual out
                        visualOut = visualIn;
                   swapVisuals();
               * Accompishes visuals swapping
              private function swapVisuals():void {
                   if (visualIn) TweenLite.to(visualIn, .3, { x:0 } );
                   if (visualOut) TweenLite.to(visualOut, .3, { x:visualOut.hiddenPosition } );

  • "secured by passing data through LWAPP tunnels."

    Hi,
    The WLC v4.1 Config Guide says,
    "all Layer 2 wired communications between
    controllers and lightweight access points are secured by passing data through LWAPP tunnels."
    Is it correct that this is only true for the LWAPP Control channel which is encrypted - the LWAPP Data channel is in clear text which WireShark has no problem parsing, right?
    Regards, MH

    Only LWAPP control message payloads are encrypted. As you've stated however LWAPP data payaloads are not encrypted as the wired network is assumed to be relatively secure (compared to wireless).
    Additional Reference Appendix B in this document:
    http://www.cisco.com/en/US/netsol/ns340/ns394/ns348/networking_solutions_white_paper0900aecd805e0862.shtml

  • SQL Server interfaces through Schduler Agent

    Hi All,
    I have a SQL server source and 1 oracle source.For running the SQL server through agent , I have updated the odiparams.sh file as
    ODI_SECU_DRIVER=oracle.jdbc.driver.OracleDriver
    ODI_SECU_DRIVER=com.microsoft.sqlserver.jdbc.SQLServerDriver
    ODI_SECU_URL=jdbc:oracle:thin:@<hostno>:1521:DWHPROD1
    ODI_SECU_URL=jdbc:sqlserver://<hostno>:1433
    ODI_SECU_USER=odimaster
    ODI_SECU_ENCODED_PASS=aYyXCYqP5mHizfQzZJqURp
    ODI_SECU_WORK_REP=WORKREP
    ODI_USER=SUPERVISOR
    ODI_ENCODED_PASS=a7yXqYMFSzGapZjJUIq7CQ4np
    I'm able to execute the SQL server interfaces through this using the listener agent.
    I start the agent using
    ./agent.sh -port=20911
    ANd the agent starts.
    However when I try to start the scheduler agent using
    ./agentscheduler.sh -name="Test_Agent" -port=20911
    it gives me error
    com.microsoft.sqlserver.jdbc.SQLServerException: Login failed for user odimaster
    Now if i remove the sql related things from the odiparams i.e remove these statements
    ODI_SECU_DRIVER=com.microsoft.sqlserver.jdbc.SQLServerDriver
    ODI_SECU_URL=jdbc:sqlserver://<hostno>:1433
    After removing these statements,the scheduler agent works fine.
    I want to start the scheduler agent for SQL SERVER interfaces as well.Please let me know if you have any pointers for the same.
    Thanks,
    Pritika

    Hi ,
    ODI_SECU_DRIVER and ODI_SECU_URL is related to ODI master repository .
    You can have single master repository only which in turn can have multiple work repository .
    So odiparams.sh file can have only 1 entry for ODI_SECU_DRIVER and ODI_SECU_URL.
    You define your source and target data server information in Topology which will be stored in ODI repository .
    You don't have to specify the data server information in odiparams.sh .
    Regarding "whereas with these statements in odiparams.sh,Im able to execute the SQL Server interfaces using an agent"
    agent will not look into odiparams.sh file for repository parameters .. that is why it is working .
    But agentscheduler looks for repository parameters in odiparams.sh .. and your odiparams.sh file is not correct .. that is why it is failing .
    Thanks,
    Sutirtha

  • Sending a java.lang.reflect.Constructor through RMI

    Hi all,
    java.lang.reflect.Constructor is not serializable and therefore cannot be sent through RMI.
    The API documentation for java.lang.reflect.AccessibleObject says:
    "Setting the accessible flag in a reflected object permits sophisticated applications with sufficient privilege, such as Java Object *Serialization* or other persistence mechanisms, to manipulate objects in a manner that would normally be prohibited."
    I cannot fully understand that. Would this help provide a workaround for sending a Constructor throup RMI ? if so, how ?
    Thank you

    Gen.Java wrote:
    Hi all,
    java.lang.reflect.Constructor is not serializable and therefore cannot be sent through RMI.It wouldn't make any sense for it to be. I suspect you're imagining some magical scenario that is actually impossible, such as simply sending a constructor to a remote object, and having it somehow instantiate a class it knows nothing about. Whatever it is you're trying to achieve, this isn't the way to do it. So how about you tell us what that is
    The API documentation for java.lang.reflect.AccessibleObject says:
    "Setting the accessible flag in a reflected object permits sophisticated applications with sufficient privilege, such as Java Object *Serialization* or other persistence mechanisms, to manipulate objects in a manner that would normally be prohibited."
    I cannot fully understand that. Would this help provide a workaround for sending a Constructor throup RMI ? if so, how ?No. Sending constructors by RMI makes no sense. See above. As is usual in these cases, you've asked a question on some hacky solution to a problem, rather than the problem itself. Let's talk about that: the problem itself. What are you trying to achieve?

  • How to pass arraylist through URL ?

    Hi,
    Can we pass arraylist through URL using params.put ?
    If so then how to access each value?..because pageContext.getParameter with return string...
    Any other method can we use ?
    Thanks

    You should store in on the session or transaction depending on the scope.

  • What type of license should the user be assigned when passing transactions through the DI Server?

    What type of license should the user be assigned when passing transactions through the DI Server?
    We used to assign indirect access licenses to users that were just using the DI Server.  We have one add-on developer that says that the user has to be a Profession license. Current environment is SAP B1 9.0 PL10.  My understanding was that you could have up to 10 users assigned to a single DI Server license.

    Hi,
    From the license guide,
    Indirect Access – has access to any SSP solutions (developed with the SAP Business One DI-API) only. The Indirect Access license is bundled with the DI server. Users who have an Indirect Access license can access a limited number of application forms, but cannot perform any functions with the SAP Business One application. Users who have an Indirect Access license can access an unlimited number of SSP solutions
    Thanks & Regards,
    Nagarajan

  • How can i extract data strings (temp. press. rel.hum etc) using a Virtual interface through an RS-232 connection​?

    How can i extract data strings (temperature, pressure, relative humidity etc) using a Virtual interface through an RS-232 connection?

    Try this.  It is in LV 8.5.
    Note the double % in the format string.  This is so the % in the input string is treated as a percent rather than a code.
    You may also have to work with the line feed characters in case they are different in the string coming in compared to how the string shows up in the web browser.
    Message Edited by Ravens Fan on 02-12-2008 10:19 PM
    Attachments:
    Example_BD.png ‏4 KB
    Untitled 11.vi ‏9 KB

  • Does OS X Mountain Lion not include MPI (Message Passing Interface)?

    Hi,
    Does OS X Mountain Lion not include MPI (Message Passing Interface) as Lion did? I need that to compile CUDA 5.0 examples.
    I'm running Mountain Lion 10.8 without any updates yet.

    I take this statment from the link I posted
    Note: Unlike most UNIX-based operating systems, OS X does not use a preallocated disk partition for the backing store. Instead, it uses all of the available space on the machine’s boot partition.
    to basically mean it's limited only by the disk space.
    There is also this:
    Both OS X and iOS include a fully-integrated virtual memory system that you cannot turn off; it is always on. Both systems also provide up to 4 gigabytes of addressable space per 32-bit process. In addition, OS X provides approximately 18 exabytes of addressable space for 64-bit processes. Even for computers that have 4 or more gigabytes of RAM available, the system rarely dedicates this much RAM to a single process.
    To give processes access to their entire 4 gigabyte or 18 exabyte address space, OS X uses the hard disk to hold data that is not currently in use. As memory gets full, sections of memory that are not being used are written to disk to make room for data that is needed now. The portion of the disk that stores the unused data is known as the backing store because it provides the backup storage for main memory.

  • BAPI for Generating Gate Pass Number through LECI

    Hi Experts,
    Can anyone plz. tell me the BAPI for Generating Gate Pass Number through LECI.
    Thanks in Advance.

    Yes, look this blog /people/gustavo.gil/blog/2011/03/25/leci-registrar-accesos-de-medios-de-transporte-y-visitantes-a-la-compantildeiacutea-register-means-of-transportvisitor
    Regard,

  • Error While Connecting through RMI

    Hi,
    I am getting the following error when connecting to the server through RMI.This problem is occurring only in Linux and when connecting remotely.In windows we are able to succeed and if both server and client in the same machine able to connect.The problem persists when connecting to the server remotely in Linux.
    Caused by: java.rmi.NoSuchObjectException: no such object in table
    at sun.rmi.transport.StreamRemoteCall.exceptionReceiv edFromServer(StreamRemoteCall.java:255)
    at sun.rmi.transport.StreamRemoteCall.executeCall(Str eamRemoteCall.java:233)
    at sun.rmi.server.UnicastRef.invoke(UnicastRef.java:1 42)
    Can anybody please help me regarding this.
    Thanks in advance,
    Thanks & Regards,
    Jyothi.

    The remote object has been unexported, probably via DGC action. The solution is to hold a static reference to it in the server JVM.

Maybe you are looking for

  • How to Populate a Block when someone select something from an LOV

    Hi I have a form that has 2 blocks Block 1 has one field called customers.. It's a list of values where you can select customer_number. Block 2 has several fields like country, state,city,address1. Here is what I need to do. When the user pick a cust

  • How to check the records in Master Data Table?

    Hi,    I am trying to load the Master Data Table using the Flat File.Now how to check the records in Master Data Table? I done the following way: Info Provider->Info Object->Right Click->Display Data or Maintain Master Data But it's not showing the r

  • My camera has disappeared. HELP!

    I have searched, looked in media file. It is just gone.  My short cut button doesn't work.  I still have video camera, but no camera. My pictures are still there..  What I have done so far.  searched many time in every folder in my torch back up and

  • Excise- Accounting Document Problem

    Dear All, I got a situation where when i am creating a PO for 2 quantity & creating 'CVD' invoice for .240 quantity & same i am utilizing at the time of GRN but when i post the MIGO system shows the entry related to excise but not generate 'Accountin

  • Sync outlook cal with ical/cloud

    Hi Everyone I have been searching for days to fix a problem with sync my outlook on my mac with ical and icloud with no luck I have an imac, mac book pro and an iphone 5. I use outlook on my imac for new appointments and contacts. When I insert a new