Communication between different JVMs

Hallo,
is there a simple way, to exchange data between different java sessions? At the moment I store the needed data to a table and load it in my java procedures when ever I need them.
But because this data is temporary, it wouldn't really be necessary to store the data. It's just for communication between the different JVMs. Is there an other way to do this, too?
Thanks, Christian

Christian, I may have misunderstood your question, but, until java version 1.4, the only way for different JVMs to communicate was via sockets, or secondary storage (the file system -- which includes databases).
In java version 5.0 (previously version 1.5), there is a new feature known as class data sharing.
But since you posted to the "Database >> JVM" forum, I can't help thinking that you are referring to different database JVMs. Is that correct? In any case, sockets and secondary storage are your only options there as well.
Good Luck,
Avi.

Similar Messages

  • Communication between different JVM in one computer

    hi
    I need to communicate a java program with another java program,
    I use a file to realize this. But my two program should read the file periodicaly, I use timer.
    But it is not good. It will ocuppy some CPU time.
    I look for some good way in JDK DOC, I can not find some one.
    So what are methods to commucate between JVM

    My A application it will need to transfer some data into another B application.
    And only A application find some data need to transfer to B application, or invoked by user that there is need to transfer data, it wlll write the data to B application.
    In other case, B application still run it's service and task.

  • Communication between multiple JVMs

    We have a Java toolkit that is shipped as a JAR file. The toolkit is ported from a C++ DLL running on Windows. Therefore, in both instances (Java and C++), we can't control who loads us or when.
    I need to communicate between different JVMs running on the same machine. The communication is very simple: "Is this user logged on in your JVM?" I send a string to the other JVM and I get back a boolean. I don't need to worry about crossing machine boundaries. Also, I'm not expecting to have a huge number of JVMs running. Maybe 3 or 4 could be likely. However, the solution does need to scale in case there are more than that. I'm not setting a limit on the number of JVMs either.
    The C++ code handled this situation very easily and elegantly. It created a named system semaphore (mutex) whenever a user logged on. The name of the mutex was the username. So, if there were multiple instances of the DLL running in separate processes (EXEs), we could easily tell if this user was logged on in another instance. We'd try to create the system semaphore - it would fail saying the name already exists. Therefore, we'd know the user was already logged on. The named system semaphore provided the means for a machine-global list - which is exactly what we wanted. It also had this extra benefit: if the process terminates normally or abnormally, the system semaphore is removed from memory. This means: the application is terminated, the user is no longer logged on, and we can relog this user on.
    Therefore, I have 2 requirements:
    1) A machine-global list where we can place a string. Keep in mind, it doesn't absolutely have to be a machine-global list. A suitable means to talk to other JVMs is acceptable too.
    2) If the process exits normally or abnormally, the string(s) get removed (for this JVM) from the list. Abnormal termination is the more important one to focus on because lots of people of varying skill levels use our toolkit. Abnormal terminations can be common.
    The first thought is to store these in a file. That solves #1, but not #2. I've seen the JIPC package. However, I'm not too crazy about requiring 3rd party developers to start up another program (JIPC) before they start up their application. As I said, we're just a toolkit so we can't control when or who loads us. It's not totally out of the question, but I'd prefer something else.
    I have a fairly involved solution that involves sockets. The first JVM creates a ServerSocket on a specific port and becomes the server. Subsequent JVMs also try to create the ServerSocket on the same port. They get a BindException because the ServerSocket already exists, so they know they're clients. Then, they create a client socket and talk to the server that way. This gets a little hairy when the server goes away. The clients will scramble to become the server and then all the other clients need to reconnect to the new server.
    This proposed solution sounds like it will address both requirements. However, I'm looking for something simpler. I'm asking this forum for help in case there's an easier way to do this. I don't have the breadth of experience with Java yet to know if there's a simpler way to fix this. If I have to go with the socket solution, I will. I just didn't want to overlook something simple that is already built into Java.
    Thanks for any tips or suggestions

    Thanks for the response.
    FileLock. We still have to target JDK 1.3 so we can't use FileLocks (at this point)
    JNI: That's an interesting idea. I suspect many people are using our software on Windows. Therefore, we could probably fix it in Windows the same as in the C++ code. If they're not on Windows, we could use the Sockets approach.
    I also had another idea: how about hashing the username string into some integer (or long) value. Then use the hashed value to lock some other resource: like the port number passed to ServerSocket. I know ServerSocket only accepts 0 - 0xFFFF so this obviously won't work. But is there some other system-wide thing we could lock given an integral value?

  • Communication between two jvm (client and server)

    Hi ,
       I want to access the UME service of the SAP J2EE Container using a stanalone client application.
    So the client would be running on remote JVM.
    Here we use the JNDI service to communicate between the client and server.
    p.put(Context.INITIAL_CONTEXT_FACTORY,"com.sap.engine.services.jndi.InitialContextFactoryImpl");
                        p.put(Context.PROVIDER_URL, providerURL.trim());
                        p.put(Context.SECURITY_PRINCIPAL, securityPrinciple.trim());
                        p.put(Context.SECURITY_CREDENTIALS, securityCredentials.trim());
                        Context ctx = (Context) new InitialContext(p);
                        Object objRef = ctx.lookup(ejbName.trim());
    I want to know that is the communication between the client and server secured in this scenario
    Best Regards
    Manoj

    Okay, the client and server VMs are different implementations of the Hotspot engine. Hotspot basically takes the Java bytecode from your .class files and turns it into native machine instructions at runtime. (The optimizations are actually much more complex than that, but that's the basic concept.)
    The client VM is so named because it's designed to be used for GUI-type applications interacting with the user. It is designed to have a quicker startup and smaller memory footprint.
    The server VM uses more memory and is typically slower at starting up than the client VM, but can often perform ridiculously fast. This of course depends completely on the particular code being run, and you should probably profile and see which VM works better for your application.
    Some interesting optimizations are performed by the 1.4.1 server VM, such as: removal of array-bounds checks (when it determines that the index can't become out of bounds), inlining of methods, and more.
    Here is a link to more info if you're interested:
    http://java.sun.com/products/hotspot/docs/whitepaper/Java_HotSpot_WP_Final_4_30_01.html

  • Communication between different SolMans

    Hi all,
    is it possible to connect different SolMans (for bpm) between each other?
    As far as I know, this was introduced with EHP 01 (SP19), but I can't any documentation about that.
    Some experiences or hints would be great?
    Thanks!
    Georg

    Hi Georg,
    it happened that I had to look something up about CCMS and I found the following article:
    http://help.sap.com/saphelp_sm40/helpdata/en/d7/28cbcf6dfd455ca8257bf5939a7c48/content.htm
    According to this description you can connect several CENs to your Solution Manager. And a Solution Manager can be a CEN itself. So I think you should be able to consolidate your BPM data via CCMS.
    --> CCMS and system monitoring in the SAP Solution Manager
    BR André

  • ADFS not communicating between different interanl and exteral domains

    Hi friends,
    I have one ADFS server which is on my LAN and a proxy server installed in DMZ. My internal AD domain is (i.e cricket.co.nz) which is different from the external public domain (i.e nzcricket.co.nz). I need to communicate from my ADFS server to Yammer with
    my external domain name (nzcricket.co.nz). But due to different domain I facing issues to make them communicated.
    My servers are on windows 2012 r2.
    Anyone who can help me. Thanks in Advance.
    Salluu

    The URL of your ADFS server should be the same internally and externally.
    You should look at setting up a split-brain DNS to make sure that nzcricket.co.nz is resolved to the local IP of the ADFS server for clients in the LAN and to the public IP of the ADFS proxy when clients are on the internet.
    Note: Posts are provided “AS IS” without warranty of any kind, either expressed or implied, including but not limited to the implied warranties of merchantability and/or fitness for a particular purpose.

  • Communicating between different DCs

    Hi,
    I want to communicate between two DC's .( output from one is input to other.
    First DC contains an input form and second DC contains an output form which displays the data entered in ofirst DC. Can someone tell the procedure or required weblogs? How to proceed for this.
    I know that it is possible through interface controller. But what to write in that?
    Wat does getDescription and execute method do?
    Please explain in detail
    Regards,
    Piyush

    Hi Piyush,
    Have to gone through the tutorial <a href="https://www.sdn.sap.comhttp://www.sdn.sap.comhttp://www.sdn.sap.com/irj/sdn/developerareas/webdynpro?rid=/library/uuid/bd0e0401-0801-0010-aaab-d0e1742da383">designing Component-Based Web Dynpro Applications (38)</a>. This tutorial describes in detail how to develop component based web dynpro's.
    I feel the only additional step required when the two components are in separate DC's is that you will have to add the component to the public part.
    I have not tried this out but i feel this is what you are looking for.
    Thanks and Regards
    Sidharth

  • IDOC communication between different basic type releases.

    Has anyone run into a scenario where a newer SAP release would like to send a message to a partner with an older SAP release, using a basic type that does not exist in the older system?  (eg. DELVRY05 which only exists in release 700)
    In this scenario, what is the best practice, other than to have the newer SAP system send an older basic type that does exist in the receiving partner?
    Thanks.

    Hi,
    You can do this by specifying the older release in the partner profile outbound settings (for message type).
    Under the "Outbound options" tab there is a field "Seg. release in IDoc type". There you can specify the older release and the IDoc will automatically be depricated when it is received in the receiving system.
    Regards,
    Gajendra.

  • Communicating between JPanels

    Hi,
    I have a program that has a number of JPanels:
    - 1 JPanel on the left, split into 4 vertically, each cell holding another JPanel:
    Each of the 4 panels contains 2 buttons controlling various connections.
    - 1 JPanel on the right of the window, holding a few JLabels acting as status indicators.
    The desired action is as follows:
    when a user clicks a button on the left hand side of the window, the content of a JLabel on the right hand side of the window is changed to reflect the change.
    However, the program will not compile. I initially tried having a copy of the right hand side status object inside the classes that created the left panels...this did not work, although i can't see why.
    How can I communicate between different panels within the same frame?
    Thank you.
    M.

    throw up the code till we take a look. When communicating between different components in a GUI I normally pass a reference of the current component which caused the action to the constructor of the Action handler which will process it.

  • Communication between servers on different FIs

    Just want to verify communication between UCS servers on same chassis but having active vNICs on different FIs (Diagram attached). I suppose all commuication between server-A & server-B will happen through Layer 2 switch as server-A will generate an ARP request for Server-B, that will be passed over to FI-A and then to L2 switch down to FI-B, where server-B will respond back with it's MAC that will then be passed to Server-A via FI-B to L2 switch to FI-A.I don't expect any traffic between servers A & B be routed via firewall? Is there anything I need to be careful about in this design? Going forward we will have multiple subinterfaces on the firewall for different VLANs and all servers will use Firewall as default gateway.

    you may want to look at the throughput of your firewall for server-server traffic in different VLANs. If your L2 switch is 10G but your firewall is only 1G then you could have a potential bottle neck.

  • I have burned CDs before from 2gb to 7gb using different types of discs. Now I get this error message Apple error The disc can't be burned because communication between the computer and the disc drive failed (error code 0x80020022). What should I do

    I have burned CDs before from 2gb to 7gb using different types of discs. Now I get this error message Apple error The disc can't be burned because communication between the computer and the disc drive failed (error code 0x80020022). What should I do

    Reset the SMC, as per > Resetting the System Management Controller (SMC)
    1. Shut down the computer.
    2. Unplug the computer's power cord.
    3. Wait fifteen seconds.
    4. Attach the computer's power cord.
    5. Wait five seconds, then press the power button to turn on the computer.
    Then zap the PRAM/NVRAM as per > About NVRAM and PRAM
    1. Shut down the computer.
    2. Locate the following keys on the keyboard: Command, Option, P, and R. You will need to hold these keys down simultaneously in step 4.
    3. Turn on the computer.
    4. Press and hold the Command-Option-P-R keys. You must press this key combination before the gray screen appears.
    5. Hold the keys down until the computer restarts and you hear the startup sound for the second time.
    6. Release the keys.
    Then retry the Disc Drive.

  • Communication between the DNS/DHCP Manager and OES Server

    No communication between the DNS/DHCP Manager Console and OES server (status,start,stop)
    The screenshot shows the tab "DHCP (OES Linux)" in the DNS / DHCP Manager console
    in the bottom of the image it shows the state of the DHCP servers.
    allDHCP.JPG
    The dhcp service is started on all these servers
    You can see that the status is known only for four servers.
    The button "start/stop DHCP service" works fine on this servers and
    the dhcp service can be canceled and also restarted
    But the status of the "dhcp service" is not recognized for all the other DHCP servers
    and so we can not start or stop dhcp service on these servers.
    All servers were installed at different times (last three years) with OES11 and
    are upgraded to OES11SP2 with all patches.
    The server keto (DHCP_keto) is a new installation OES11SP2 few days ago.
    All OES servers were set up identically from me. LDAP, LUM, DMS, DHCP works fine.
    Which service on the OES server is responsible for
    communication (status indicator) between the DNS/DHCP Manager and the OES serve?
    How the status query is performed by the DNS/DHCP Manager?
    How can I test the communication to the server on the client (console)?
    Which configurationfiles I should be compare on the server?
    Thanks in advance
    Gernot

    gernot,
    It appears that in the past few days you have not received a response to your
    posting. That concerns us, and has triggered this automated reply.
    Has your problem been resolved? If not, you might try one of the following options:
    - Visit http://www.novell.com/support and search the knowledgebase and/or check all
    the other self support options and support programs available.
    - You could also try posting your message again. Make sure it is posted in the
    correct newsgroup. (http://forums.novell.com)
    Be sure to read the forum FAQ about what to expect in the way of responses:
    http://forums.novell.com/faq.php
    If this is a reply to a duplicate posting, please ignore and accept our apologies
    and rest assured we will issue a stern reprimand to our posting bot.
    Good luck!
    Your Novell Forums Team
    http://forums.novell.com

  • Communication between RAC instances

    Hi,
    I see different answers for this Communication between RAC instances in google.
    1. UDP
    2.Distributed Lock Manager (DLM)
    which one of is correct?

    both of them are correct on different layers. The IP protocol used over the interconnect is udp and one of the protocols/mechanism implemented above that is DLM.

  • Communication between RAC instances in google.

    Hi,
    I see different answers for this Communication between RAC instances in google.
    1. UDP
    2.Distributed Lock Manager (DLM)
    which one of is correct?

    Pl do not post duplicate threads - Communication between RAC instances
    Srini

  • Communication between client and server

    I am using sockets for communication between the client and the server. is there any other way that i can use for communication between the client and server???

    Plenty of ways: JMS, SOAP, RMI, a RESTful API, writing-files-to-a-shared-directory-on-the-disk, Sneakernet, ...
    Some of them use sockets (or better TCP/IP) as the underlying protocol.
    But to give you a good answer, you would have to tell us why you want a different way. I hope you're not searching for a different way just for the sake of being different.

Maybe you are looking for