Binding POJOS across network

I would like to bind two POJO objects across the network. (ie when a setter function is called on the server, the client version of the object gets updated by calling the same function). I was trying to come up with a generic solution, unfortunately it seems hard in Java. The best solution i came up with is to send a runnable object to the client every time a setter function is called. This runnable will be able to run on the client to call the same setter function and sync the two objects. This solution is lengthy and not so clean. Can you suggest another?

ralph961 wrote:
I would like to bind two POJO objects across the network. (ie when a setter function is called on the server, the client version of the object gets updated by calling the same function).Which describes RMI.
Long years of practical use with various schemes like that have shown that solutions that attempt 'setters' like that are not practical however. Any non-trivial solution with even moderate traffic will generate way too much traffic.
Thus one codes to the business cases instead.

Similar Messages

  • FileLock Doesn't Work Across Network

    I have found a case in which FileLock doesn't work. I'm trying to use FileLock to prevent two instances of the same process to run simultaneously on different machines (or the same machine) on the network. I actually saw two processes, one on each of two Linux machines obtain a lock on the same file at the same time.
    Can I be sure that FileLock is calling fcntl and not flock (which wouldn't work over the network)?
    Is there any way to fix this or get around it??
    Here is the relevant code:
    try{
         File lockFile = new File(getLockFilename());
         lockFile.createNewFile();  // Throw out the boolean return value; it doesn't matter if this succeeded.
         FileChannel fc = new FileOutputStream(lockFile).getChannel();
         fileLock = fc.lock();
    catch (FileLockInterruptionException flie){
         // Allow this one.
    catch (IOException ioe){
            // Report the exception, release the lock if obtained and exit.
    // Code executed while the file is locked includes setting up and registering an RMI server object.
    try{
         fileLock.release();
    catch (IOException ioe){
         logger.warn("Unable to relase file lock:  " + ioe.getClass().getName() + ":  " + ioe.getMessage());
    }

    I suppose when you say "across network", you mean via
    nfs?Yes.
    Have each machine check some central point (or all
    other nodes) for the existence of a server. Of course
    there could be some synchronization problems, so you
    might check several times. Even if the remote
    interface is successfully exported, have it check one
    final time to ensure. To be paranoid, you could have
    it check often.We have a strong requirement not to have a central server, which has made coding this a headache. It would be pretty unacceptable to query every machine on our network (most of which probably aren't running any related process at any one time and are probably running other jobs) any time someone wants to start one of these processes on any machine. (There could be hundreds of these processes running at once with different parameters; it's just that no two with the same parameters are allowed to run at once. Each of these will act as a separate RMI server so other processes can communicate with the running process for other purposes besides just determining whether it is running.) A registry can only contain objects on one machine, right? Or can I somehow bind everything on the same host even though that's not where the objects are?? I am already writing the name of the successful host for one parameter set to a file and barring other processes with the same parameters from executing if looking up the process on that host succeeds. This works in most cases, but there is a race condition if two processes start around the same time and both read the file before either has written its host name there. That's why I'm trying to use a file lock on a different file so the read-bind-write sequence happens while the file is locked.

  • Lightroom Library Accessible across network?

    Is there a way to have the library and all edits, etc. available to multiple users on a network? I work with four other photographers and a couple of art directors who all have access to a single server loaded up with tetrabytes of images sorted by assignments in respective folders. We've been using ACR and Bridge to view, assign metadata, and edit, duplicating RAW files for multiple processing interpretations, etc. I'm interested in seeing if Lightroom will help with our workflow, but a centralized library is absolutely necessary to start. Thanks for any help.

    >As I understand it, the library itself won't be accessible on the network in v1.
    johnbeardy, "Lightroom Library Accessible across network?" #1, 31 Jan 2007 7:24 am
    That's what I heard as well. It's a shame as with the advent of cheap NAS storage, it is very common for photographers to have all their data on the network and only the applications on the computer.
    I don't have a need for multiple users of the same library, but I do need to keep the library on NAS storage. That should be a simple fix for Adobe to implement. It's also an important fix as there have been several instances of people on the labs forums finding that they could not install Lightroom as they had redirected their "My Documents" directory (on Windows) onto a network mount.
    Full multi-user support is more complex and probably does require a database transplant to something with a more advanced locking concept than SQLite.

  • Copy folder across network to network sharepoint

    I want to set up a crontab or even a script crontab can run to
    create a folder with date and name of computer and transfer
    a folder with files in it to the server where the sharepoints are located.
    Also, what about authentication? I can set up a user with no password, but how would the script or crontab be set for a specific username and/or password?
    I know how to create the folders and have used the cp command.
    I am very unsure on how to setup a way to transfer the files to a share point across network.
    Any ideas?

    Check this link out - http://troy.jdmz.net/rsync/index.html
    I use it to copy a folder from one server to another as a kind of off-site backup strategy.

  • Binding shared variable in executable across network

    I can't seem to get a shared variable to bind from an executable on another computer back to a source variable on the main machine.
    I can get the remote variable to change with programmatic access.  Is it possible to have shared variables in an executable bind to a PSP URL on another computer?  This is labview 2011.
    I can see everything with NI Distributed System Manager, and the programmatic access changes the remote variable, so it's not a network issue.
    Thanks for any insights.  This just doesn't seem to work the way NI's online white papers say it shoud.

    What I don't understand is why after binding to a specific URL, the "Shared Variable Deployment" screen of the application builder makes the target "my computer". 
    I probably could get this to work if I changed the network address of "my computer" in the ini file created in Application Builder?
    This seem a strange way for this binding process to work.  If the absolute target (for shared variable bound to another variable and referencing "absolute") was retained when the VI goes through the application builder, it would make for sense.
    I can't get this to work any way with using bound variables.  The only way this works is using programmatic access to shared variables in the built app, and I don't consider this the same thing.
    My conclusion is that shared variable binding and appropriate absolute references to deployed variable libraries do not survive passing through the application builder with their absolute references intact.

  • How can i use iphoto pics on another mac across network for screen saver?

    how can i use iphoto pics on another mac A across the home network for the screen saver on Mac B?
    within iPhoto i can see the mac A's shared library AOK on Mac B but Mac A's library doesn't show up in the screen saver list on Mac B ;-(
    tia
    Barry

    That's exactly what I tried to do, but the iPhoto librry doesn't show up in the pulldown menu. If I click "Choose Folder", the iPhoto library is greyed out and unable to be selected.
    For some reason, iPhoto is an option in the pulldown library on my older iMac but not on my MacBook Pro. What gives?

  • Can't print across network with LaserJet 1220

    I'm trying to print across our home wireless network  from my Windows 7 64-bit computer to a LaserJet 1220 connected to a Windows XP 32-bit computer.  My computer sees the printer in the network, but when I try to install it on my computer, it searches the web for a driver but can't find one.  There must be a way to get this to work.  Any ideas?

    How about this? 
    Windows 7 and HP All in One Printers
    Disclosure: I'm just guessing, and have not yet tried Windows 7.

  • Connecting 32 bit XP machine across network to HP Laserjet 2200d on Windows 7 64 bit machine

    I am trying to connect a 32bit machine running Windows XP across the network to an HP 2200d Laserjet Series PLC 5 printer installed on a 64 bit machine running Windows 7 - The printer can be seen by the XP machine across the network but when I tried installing printer drivers I kept getting incorrect driver errors. (The HP printer had previously been connected directly. i.e., no network - to the XP machine before I bought the new computer and it worked fine.)
    So I went to HP website and found two links on how to connect a 32 bit XP machine to the HP printer installed on 64 bit Windows 7, by setting up an x86 option on the host Windows 7 machine. These web pages are as follows:
    http://h20000.www2.hp.com/bizsupport/TechSupport/Document.jsp?objectID=c02171232&lang=en&cc=us&taskI...
    and
    http://h20000.www2.hp.com/bizsupport/TechSupport/Document.jsp?objectID=c02030517
    I carefully followed the instruction and downloaded and tried ALL drivers I could fine on the following HP LaserJet 2200 driver download page - but non of them worked  http://h20000.www2.hp.com/bizsupport/TechSupport/SoftwareIndex.jsp?lang=en&cc=us&prodNameId=28862&pr...
    I keep getting the error message "The specified location does not contain the driver HP LaserJet Series PCL 5 for the requested processor architecture."  I even downloaded and tried to install the universal printer driver via the Setup.exe file that was downloaded but I received the error: 0x800f0214.
    Any suggestions would be greatly appreciated.
    Thanks,
    Dan

    I am trying to connect a 32bit machine running Windows XP across the network to an HP 2200d Laserjet Series PLC 5 printer installed on a 64 bit machine running Windows 7 - The printer can be seen by the XP machine across the network but when I tried installing printer drivers I kept getting incorrect driver errors. (The HP printer had previously been connected directly. i.e., no network - to the XP machine before I bought the new computer and it worked fine.)
    So I went to HP website and found two links on how to connect a 32 bit XP machine to the HP printer installed on 64 bit Windows 7, by setting up an x86 option on the host Windows 7 machine. These web pages are as follows:
    http://h20000.www2.hp.com/bizsupport/TechSupport/Document.jsp?objectID=c02171232&lang=en&cc=us&taskI...
    and
    http://h20000.www2.hp.com/bizsupport/TechSupport/Document.jsp?objectID=c02030517
    I carefully followed the instruction and downloaded and tried ALL drivers I could fine on the following HP LaserJet 2200 driver download page - but non of them worked  http://h20000.www2.hp.com/bizsupport/TechSupport/SoftwareIndex.jsp?lang=en&cc=us&prodNameId=28862&pr...
    I keep getting the error message "The specified location does not contain the driver HP LaserJet Series PCL 5 for the requested processor architecture."  I even downloaded and tried to install the universal printer driver via the Setup.exe file that was downloaded but I received the error: 0x800f0214.
    Any suggestions would be greatly appreciated.
    Thanks,
    Dan

  • Can't bind computer to network in 10.6.7

    We have several Macbook Pro's we just received and they came standard with 10.6.6.  When I try to bind them to our active directory network in 10.6.6 it works without a charm.  But if I upgrade the OS to 10.6.7 before trying to bind them I get an error that I don't have suffiecient access to authorize it.  I'm using the same setting as in 10.6.6 that worked before. 
    While I don't mind binding them at 10.6.6 I'm just afraid that at some point the machine we receive will come with 10.6.7 standard and would like to figure out why this is occuring.

    I'm not a Active Directory specialist but this is a very comon issue.
    I recomend you two readings:
    http://blog.michael.kuron-germany.de/category/mac/
    http://www.macwindows.com/snowleopardAD.html
    I hope these informations help you.

  • Sharing FAT-32 External HDD across network with a PC?

    I have an External Driver that is formated as a FAT-32. I have it connected to my Mac. Would it be possible to share this driver across the network (not a wireless network) so that my PC can see the drive?

    Found a reply in another post

  • Sharing Photos across Network - Features Of

    Hi
    I want to share my Library across the network with other users. I also want them to be able to copy and paste my pictures or atleast save them and also to be able to Search them.
    I've tried this with 2 machines running iPhoto 5.04 and also 2 running 6.0.2 but I can't copy and paste unless I move the image from the Shared Album to the local Library and I can't search the Shared Library at all as it's greyed out.
    Anyone know if it's possible to do a Search on a Shared Library and how? (wherher apple supported or not)
    Thanks Matt
    Macs o Plenty   Mac OS X (10.4.6)  

    Okay. I think I have the solution. As I read it, you have two issues. First, you need to be able to share. Second, you want to copy photos from one computer to the other.
    1. Go under the preferences section of iPhoto (under sharing) on the computer you want to share from and select "Share my photos". Make sure that you have either selected "Share Entire Library" or checked certain albums if you chose "Share Selected Albums." If you don't pick any albums with that option, nothing will show up on the other/destination computer.
    On the other computer, go to the preferences section of iPhoto (under sharing) and make sure the option to "Look for shared photos" is selected. If so, you should see the library from the sharing computer show up in your album list. You should now be able to browse all of the libraries on the sharing computer (or at least the ones you selected, if you did not choose to share all of them).
    2. To copy photos over to the library of the other computer (the one that is accessing the shared library of the first computer), select the photos that you want to add and drag them over to your library folder. iPhoto will start importing them for you.
    That should take care of it. Let me know if it does not. You would not normally need to open any ports on your router as long as both computers are on the same network.
    One more thing, if you want password protection, make sure to put a password under the sharing preferences for the computer you are sharing from.

  • Iphoto 2 to iphoto 6 no pictures across network

    When I bought the new Imac I went about tranferring the pictures from the powermac. I did so Buy grabbing the folder in finder dragging it across the network and dropping it on iphoto on the new mac. Well this only worked for some. About 400 of my 1500 pictures tranferred and now i'm missing the folders for 06 and 05. On the PowerMac iphoto now says there are no photos. On the iMac only 400 transfered.
    From searching the forums I've found this wasn't the best way to do it.
    I've also tried rebuilding the library using option+shift
    I've searched for the folders and have found the folders on the imac but with only 1 picture in 2005 and yesterdays uploaded pics in the 06.
    Also I had upgraded the powermac to tiger. Before i had tried transferring all the pictures.
    Thanks in advanced,
    Patrick

    Hi PFMC,
    I would drag the iPhoto Library folder on the new Mac to the desktop for now.
    Next, copy the iPhoto Library folder from the old Mac to the Pictures folder of the new Mac. Make sure the name is "iPhoto Library"
    The next step is simply a precaution to make sure permissions are correct especially if the user names are different on the computers.
    -First make sure your iPhoto Library folder has the correct permissions for you, the user. Do this by highlightling the iPhoto Library folder, hit Command i to bring up the info pane.
    Make sure you are the owner and have read and write permissions. Click the button at the bottom of the window.
    Now...
    Launch iPhoto and it will tell you the library will need to be upgraded. Let it do it's thing and depending on how large the library is, it might take awhile.
    I don't know how well the iPhoto 2 library upgrade will be as it is a big jump in versions. If it works then that great. If it doesn't you might just have to create a new library and import just the photos from the old library.
    Let me know how the upgrade goes.

  • Permissions Issues Across Network

    Hi all, I am running into permissions errors when accessing files over a network. Our network is simple, consists of two external USB drives and a linksys network appliance that they both plug into. I am trying to synch the two drives and can mount them locally, but the drive I am trying to back up to is showing read only permissions. How can I change permissions globally to be read / write for all drives that are mounted?
    Thanks in advance for you help.

    Accessing the various user folders across the network works the same as it does on the machine itself - if you don't log in to an account you are not supposed to be able to see into it (logging in as a guest will allow access to the public folders). Permissions on an external drive don't usually count for much, since just about anyone can check that 'ignore' box (although the drive won't mount at all in an account that has no access privileges). The system sometimes doesn't like to copy certain items from a user account, but copying (or creating an encrypted disk image) from within the user account and then moving it to the external drive should work OK.
    A couple of pages with permissions information:
    http://docs.info.apple.com/article.html?artnum=106712
    http://www.osxfaq.com/Tutorials/LearningCenter/AdvancedUnix/ugp/index.ws

  • Can Apple Remote Desktop route audio to selected computers across network?

    Can ARD be used to route audio output (e.g. from iTunes) across the network? If not, suggestions would be appreciated.
    I remember that there was a -display option on Unix commands that let us run applications remotely and wondered if that might be a start to getting this task to work.
    The intention is to feed audio-streamed data out to networked iMacs for use during classroom tests, controlled from a central admin computer in a different room. None of the classroom iMacs in question have iTunes on them, since it was removed to keep the machines more focused on classroom activities.

    Sorry but no, ARD does not support audio across the network in any form.
    Airfoil supports streaming of audio to other computers. I don't know if it will stream to multiple computers simultaneously, but you could check.
    Regards.

  • Sending  and recieving packets across network

    In my work, I had to send raw packets across the network. I had developed a program in Java using Socket class. It is sending packets but not recieving any.
    Please give me a solution for the same.

    import java.net.*;
    import java.io.*;
    public class SocketExample
    public static void main(String args[]) throws UnknownHostException
    try{
    byte b[] = new byte[20];
    b[0] = 0x00;
    b[1] = 0x6e;
    b[2] = 0x04;
    b[3] = 0x7f;
    b[4] = 0x74;
    b[5] = 0x5b;
    b[6] = 0x7e;
    b[7] = 0x72;
    b[8] = 0x59;
    b[9] = 0x7a;
    b[10] = 0x00;
    b[11] = 0x0e;
    b[12] = 0x50;
    b[13] = 0x00;
    b[14] = 0x24;
    b[15] = 0x00;
    b[16] = 0x73;
    b[17] = 0x2a;
    b[18] = 0x00;
    b[19] = 0x00;
    InetAddress inet = InetAddress.getByName(args[0]);
    Socket skt = new Socket(inet,1025);
    skt.getOutputStream().write(b,0,19);
    System.out.println("Written the bytes");
    DataInputStream dis = new DataInputStream(skt.getInputStream());
    byte c[] = new byte[20];
    int k = dis.read(c,0,19);
    System.out.println(k);
    for(int i=0;i<20;i++)
         System.out.println(c);
    }catch(IOException ioe){System.out.println(ioe);}
    Hello ejb, is it now as you told? This code is also not working fully. Printing wtiittenbytes, then continous loop.
    Prasanth.r

Maybe you are looking for

  • Can I create a new calendar in ICal on my iPad?

    Can I create a new calendar in ICal on my IPad?

  • JRE 1.5 plugin for Firefox on Linux works as root but not as an other user

    I am trying to usel the JRE plugin for Firefox on Fedora Core 4. I downloaded and installed it as "root" and created the symbolic link so Firefox can "see" it. It now works just fine if I run Firefox as "root", but if I run it as any other user, it t

  • Colon In  MSS Address Field

    Dear All, We are implementing MSS. Under Team Information -->Employee Information --> general Information >Personal Data iView, the address lines contain a " : "(colon) . When I check the application in the Content Administration>Web Dynpro>mss~eepro

  • Edi messages for stock transfer

    Hello gurus, lately our company has start to use service of the external warehouse. I was asked to organise the process of the inventory stock transfer between warehouse in system, but our external warehouse is 3rd party which is running another syst

  • Change the x axis scale markers in a waveform graph

    Hello all, I am looking at an unusual graphing problem that hopefully has been solved.  The problem is because an pre-existing DAQ graph does things in a chart-like manner. The application context is that I measure a signal vs. test length.  During t