Multiple vs single JVM

I was working a problem with connection pooling and it was pointed out that to utilize pooling all my workstations would have to be using the same JVM.
I am not clear how one determines how to use the JVM locally or remotely, or some other way?
Would anyone have an simple explanation for this and care to share it?
TIA

I was working a problem with connection pooling and
it was pointed out that to utilize pooling all my
workstations would have to be using the same JVM.Either wrong or phrased poorly.
Obviously if you are relying of any Java API code and you are using different versions then that is a problem. That is not specific to pooling however. For example you can't use Generics in 1.3 because they didn't exist in 1.3.
Or alternatively just because a pool is running on one box doesn't mean that a pool needs to run on another box. There is no resource sharing between boxes, so conceptually that is not possible.
>
I am not clear how one determines how to use the JVM
locally or remotely, or some other way?
That doesn't make much sense.
A VM runs on a box.
You don't "use" it remotely. You could VPN via telnet into a box and run the VM on that remote box, but none of that has anything to do with java (it is VPN/telnet.)
Or you could have a client app and and a server app. But then there are still two VMs, one on each box.

Similar Messages

  • Multiple applets, single JVM == out of memory

    Consider the following applet (MS IE 6, JRE 1.4.2_04)
    public class DgAppletTest extends JApplet
    double nums[];
    public void init() {
    nums = new double[10000000];
    public void start() {
    public void stop() {
    public void destroy() {
    This does nothing except allocate a large array. When this is delivered to the browser as part of an html page, a JVM instance is created and so on. The plug in control panel confirms the memory usage. When the user closes the browser window, the applet is "destroyed" but curiously the memory is not gc'ed. The next time the page is delivered the same JVM is used with the current memory situation. The result is that very soon the memory is exhausted.
    Once upon a time, Microsoft launched each browser instance into a separate process. No longer, although there is a registry hack to make it do so. When as a separate process, each browser window instantiates a new JVM. In this scenario, there's no problem. However, hacking the registry is not a solution, nor is telling the end user to modify JVM startup parameters.
    So, what am I not doing? (calling the gc within the applet has no effect on this). What's the trick to get the JVM to actually destroy the destroyed applet?
    Thanks

    http://forum.java.sun.com/thread.jspa?threadID=605153&messageID=3276004
    Quote from another thread:
    Objects are never null. Only references can be null. If you set the only reachable
    reference to the object to null (or to any value other than pointing at that object), then the
    object becomes eligible to be garbage collected. When--or if--it actually gets cleaned up
    is beyond your control, but it's guaranteed to happen if the memory is needed.
    Which is basacally the same as what this tells you:
    http://java.sun.com/developer/technicalArticles/ALT/RefObj/
    under
    Softly Reachable

  • Multiple Standalone Persistence Manager Servers in a single JVM?

    Greetings [Kodo 3.4.1, Oracle9i]
    I am currently working on introducing the Kodo Standalone Persistence
    Manager Server into our architecture. One issue is that our application
    accesses several different databases, each via a separate
    PersistenceManagerFactory. This would mean (I think) that I would need to
    start a separate Standalone PM Server for every database, which would mean
    about 10 different JVMs running, just for the required Standalone PM
    Servers...
    The question... Will it be possible and sensible to run multiple
    "Standalone" Persistence Manager Servers within a single JVM? The idea
    would be for me to write a threaded server, where each of my threads invokes
    kodo.jdbc.runtime.StartPersistenceManagerServer.run(someJDBCConf), where I
    provide a JDBCConfiguration for each database I want to connect to. This
    means that my server will effectively be listening for clients on several
    different ports and accessing several databases all from within the same
    JVM.
    Is this feasible? Anyone with access to the source, can you say that the
    StartPersistenceManagerServer.run() method may be safely run in several
    different threads?
    I suppose another option would be to use the HTTP Persistence Manager Server
    and then simply deploy 10 servlets, one per database... But I'm trying to
    avoid introducing a servlet container into the mix.
    Thanks
    Drew

    Hi Marcus and thanks...
    Yes, I want to use Remote Persistence Managers. Currently we have a 2-Tier
    application, but we need to introduce a 3rd tier to be able to use the
    DataCache. If we don't do this, then each running application will have
    it's own DataCache, which will not "see" changes in other running
    application DataCaches. I have tried to attach a "before" and "after"
    diagram to illustrate...
    Now if we extend this a bit further, and say that instead of just one
    database, our application actually needs to access 10 different databases
    (so 10 different PersistenceManagerFactories and 10 different DataCaches),
    then hopefully it is clear that we would then need 10 separate Standalone
    Persistence Manager Servers. I have attempted to attach another diagram to
    illustrate.
    I don't really want to start up 10 Remote PM servers, I would rather just
    have one server, which brings me back to my original question... Can I run
    them all in a single JVM?
    Cheers and thanks
    Drew

  • Multiple applications on a single JVM

    I was looking at some of the disadvantages of running multiple apps on a single JVM and then I came across this sentence which I donot totally comprehend. I guess somebody here would be able to shed some light
    JVMs tend not to scale well past four processor configurations, which limits the viability of the single-JVM model on larger machines

    It means a single JVM won't take as much advantageof
    an 8 CPU system as multiple JVMs will.Yes I understand the lingual meaning of the sentence,
    what I am struggling with is its semantic meaning.
    Why can't a single JVM take advantage of 8 processor
    r CPU? Are there any limitations associated with a
    single JVM and in case there are what could they be?If I remember correctly the inherent concurrency limitations of JVM prevent it from fully utilizing the processing power of the machine. There is a limitation to the heap size one JVM can have, no. of thread pools that could be supported so multiple JVMs provide additional heap size, multiple thread pools, each corresponding to the application associated with the JVM, thus enabling to use the extra processing power.

  • Multiple web apps sharing same cache in a single JVM ?

    Is it possible to share cache across multiple web apps running in the same app server (multiple web apps, single JVM) ?
    Thanks for any info.

    Hi Bob,
    Cluster membership is scoped to the ClassLoader, so if your application server provides a ClassLoader-per-application, this will work fine.
    This is supported for both Coherence (NamedCaches) and Coherence*Web (HTTP sessions).
    Jon Purdy
    Tangosol, Inc.

  • Running multiple java-apps in single JVM?

    We have about 125 Citrix clients running on 5 Citrix Servers. We are investigating a new very big development project which will cover about 10 main projects with 15 Applications each. The complete project will be written in Java.
    Basically, each module will have it's own JVM. BUt, when each client runs a couple of modules, the servers will surely run out of memory...
    I searched for way's to run different modules within 1 single JVM but it seems to be 'not done', because of 'System.exit()', 'Static Variable' probs to name only 2.
    Any idea's on how to implement this?
    thanks.

    thanks for the reply.
    Yes, I assume the server will run out of memory.
    1) Our citrix servers are consuming about 3/4th of their 4Gb memory capacity without any java_application running.
    2) Each of our 5 Citrix servers has 25 users active
    3) Each JVM takes about 20mb memory
    4) Each user will run at least 3 app's simultaneously
    Abouve results in 3*20=60Mb / user * 25= 1,5Gb memory extra needed.
    Can you give me an example of a Thread.sleep(60000) test_pgm?
    and/or an example for a "classloader" program to launch each app in its ow sandbox (in same JVM)?
    (eventually a link to get more info on this)
    thanks

  • Multiple RMI servers in single JVM

    Hi,
    I have a RMI server listening to requests from internal network as well as external network. RMI returns the hostname as part of the stub. So to ensure that the subsequent RMI calls work fine I need to ensure that jama.rmi.hostname is set to correct value.
    With 2 network IPs on 1 machine (internal & external), one option was to use a domain name as hostname and set it as java.rmi.hostname. Unfortunately, my client is not allowing use of DNS. So the hostname can be set only as an IP address.
    Is there some way I can start 2 RMI servers in single JVM. While starting first one I can set hostname as internal IP and then while starting the other one I set hostname as external IP.
    Problem is I don't know if such a solution can be setup. I read somewhere that from jdk1.4, System.setProperty("java.rmi.server.hostname", "172.25.17.41"); will set hostname dynamically. So all future requests will use the latest hostname.
    Important thing is some way to make sure both networks can connect to my JVM through RMI.

    I get it, you're going down the path I hate. I have undone this so many times ... (essential when deploying RMI Proxies).
    Don't know why your intranet clients can't connect, unless it's the local binding of the server socket.
    If you must explore this horrible kludge around a Sun kludge (and overload the SF mechanism even further), you may as well go the whole hog and have the SSF corresponding to each CSF bind its ServerSocket to the local address that you're going to embed in the CSF. Then you really know who can connect and who can't.
    When writing SFs you need to think about what equality of socket factories really means. It only needs to imply that both socket factories being compared observe the same superimposed protocol (e.g. SSL), or that they both don't superimpose a protocol at all, so outbound or incoming calls really really can share the same port.
    SF equality generally doesn't need to extend as far as whether the embedded host names (in your case - ugh!) are the same, or the port numbers if you want go the whole hog and bypass the stub's remote reference info altogether.

  • Is there a way to import a choice list in multiple (or single) selection fields?

    Is there a way to import a previously created choice list in multiple (or single) selection fields in forms central? 

    Hello Dr. Ryan,
    Unfortunately there is no way to move this data into FormsCentral.
    As far as your question about using PDFs with FormsCentral, 'soon' is actually 'now'! You have two options:
    1) Author a new form with FormsCentral. From the distribute tab, save a submission-enabled PDF form. You can send this form out to your recipients and their responses will be collected on FormsCentral.
    2) Import an exsiting PDF form into FormsCentral from the dashboard, and then submission-enable it. Distribute the submission-enabled version and responses will be collected on FormsCentral.
    Thanks!
    Shannon

  • Single JVM, two nodes, separate override files configuration?

    This question might have surfaced before in the forums but even after going through several posts I couldn't get a decent understanding on how this works. Here is my question...
    I wanna bring up two coherence nodes in a single JVM, both independent and unrelated to each other. These two nodes have different cache-config xml files, and also override files. My question is how do I configure these nodes such that they work with two separate override files. I don't wanna use -Dtangosol.coherence.override because my doing this, this system property applies to both the nodes so I can't keep the override xml files separate.
    So, what is best way to accomplish this such a way that the nodes don't collide with each other by using a common override files?
    I hope I am clear.
    Thank you.

    Hi,
    Both the solution I posted and Jon's solution rely on a ClassLoader to isolate the Coherence nodes within the JVM. We do not use this in Production but we do use it as part of our build process and run over 18,000 test cases with a single JVM cluster, so in that respect it works well. I think if you used it in Production you would need to have done a lot of testing to make sure that there are no very subtle issues that might come back to bite you later.
    The reason doing what you want is difficult is because Coherence uses a number of singletons at runtime - for example the Cluster instance, and without using a class loader it is difficult to have more than one of these. Coherence also uses a lot of System properties to override configuration values so these may need to be isolated too.
    Finally using a class loader would make if difficult for your application code to interact with the two isolated nodes inside the single JVM.
    It might be better if you told us why you think you need to run two nodes in a single JVM - what requirement are you trying to meet? There might be a much more sensible solution to your requirements. As NJ has suggested using Extend might be one solution but without knowing more about what you want to do I couldn't say for sure.
    If you don't know what Extend is then read the documentation - The Client Guide covers Extend http://docs.oracle.com/cd/E24290_01/coh.371/e22839/toc.htm and the rest of the documentation is here http://docs.oracle.com/cd/E24290_01/index.htm
    JK

  • Report Question - Multiple CSQ - Single Avg Queue Time?

    Multiple CSQ - Single Avg Queue Time?
    I haave multiple CSQs, and I'm able to get certain data like Service Level averaged for all of them becuase I can get the data from reports, but not so for Average QueueTime (time to answer) - anyone have ideas on how to do this? 
    Note, averaging the CSQ averages won't be accurate because of significant differences in number of calls for each.
    Hope this makes sense.
    Thanks!
    Cisco CRS Historical Reports Release 6.0(1)

    HI
    I think Best Practice is Multiple reports with single query
    Any way If LO connections refresh 5 time the query will refresh 5 timesRegards
    Venkat

  • 2 processes in a single JVM.

    Hi All,
    is it possible to run more than one independent processes in a single JVM.
    Thanks in Advance,

    Do you mean like
    java Application1
    then
    java Application2
    You only need one JVM, but you will need two instances of it. For example, if you are using Windows you would need two DOS/Command Prompt boxes open and to start the applications in each window.
    Jack573

  • Possible to set CacheSize for the single-JVM version of the data cache?

    Hi -
    I'm using Kodo 2.3.2.
    Can I set the size for the data cache when I'm using a subclass of the single-JVM version of the
    data cache? Or is this only a feature for the distributed version?
    Here are more details...
    I'm using a subclass of LocalCache so I can display the cache contents.
    The kodo.properties contains these lines:
    com.solarmetric.kodo.DataCacheClass=com.siemens.financial.jdoprototype.app.TntLocalCache
    com.solarmetric.kodo.DataCacheProperties=CacheSize=10
    When my test program starts, it displays getConfiguration().getDataCacheProperties() and the value
    is displayed as "CacheSize=10".
    But when I load 25 objects by OID and display the contents of the cache, I see that all the objects
    have been cached (not just 10). Can you shed light on this?
    Thanks,
    Les

    The actual size of the cache is a bit more complex than just the CacheSize
    setting. The CacheSize is the number of hard references to maintain in the
    cache. So, the most-recently-used 10 elements will have hard refs to them,
    and the other 15 will be moved to a SoftValueCache. Soft references are not
    garbage-collected immediately, so you might see the cache size remain at
    25 until you run out of memory. (The JVM has a good deal of flexibility in
    how it implements soft references. The theory is that soft refs should stay
    around until absolutely necessary, but many JVMs treat them the same as
    weak refs.)
    Additionally, pinning objects into the cache has an impact on the cache
    size. Pinned objects do not count against the cache size. So, if you have
    15 pinned objects, the cache size could be 25 even if there are no soft
    references being maintained.
    -Patrick
    In article <aqrpqo$rl7$[email protected]>, Les Selecky wrote:
    Hi -
    I'm using Kodo 2.3.2.
    Can I set the size for the data cache when I'm using a subclass of the single-JVM version of the
    data cache? Or is this only a feature for the distributed version?
    Here are more details...
    I'm using a subclass of LocalCache so I can display the cache contents.
    The kodo.properties contains these lines:
    com.solarmetric.kodo.DataCacheClass=com.siemens.financial.jdoprototype.app.TntLocalCache
    com.solarmetric.kodo.DataCacheProperties=CacheSize=10
    When my test program starts, it displays getConfiguration().getDataCacheProperties() and the value
    is displayed as "CacheSize=10".
    But when I load 25 objects by OID and display the contents of the cache, I see that all the objects
    have been cached (not just 10). Can you shed light on this?
    Thanks,
    Les
    Patrick Linskey [email protected]
    SolarMetric Inc. http://www.solarmetric.com

  • In a single JVM the objects can pass-by-value ?

    what happen when a bean call to another bean which already deployed in the same container?
    how many JVMs in a container?

    "I thought parameters were all pasted by value because Java doesn't support pointers?"
    Incorrect assumption.
    Java doesn't let you fiddle with pointers, but effectively all object variable references are pointers (not exactly though). If you are working in a single JVM all params are passed by value, but when you think you are passing objects you are really passing object references, so it is they (the object references) that are passed by value.
    Within the scope of EJB, objects (not the references) are passed by value because we are talking about remote method calls. Since calls are assumed to be between separate JVMs the object state must be copied across the wire.
    In the case of an EJB calling another within the same JVM, the parameters passed must still be passed by value since the receiving code may rightfully assume there is no shared object state (the implementation could be pass-by-ref as long as the container could somehow support the above assumption, not very likely).

  • Multiple GR single credit in STO

    Dear ALL,
    Is is possible to have Multiple GR single credit in case of STO?
    That means i should not be able to take post excise invoice unless i received all the materials against STO or qty posted in Excise Invoice.
    If it is possible, then how to get it done?
    Reply awaited.............
    Edited by: akshay sonurkar on Nov 18, 2009 9:05 AM
    Edited by: akshay sonurkar on Nov 18, 2009 9:19 AM

    ok

  • Single JVM instance

    Is there any way to control number of JVM instances running on system. I would like some of my applikations to run in single JVM, or to have only one JVM on system which would run all of java applications?
    Milan

    I am currently trying out running programs within a single JVMs... There are many things you have to take care of�especially when using swing applications...
    Example: If you use static objects in some classes (or you use classes with static variables from the JDK) you have to use different classloaders for each program run within your JVM. This is nessessary as each program needs to have it's very own static object, but this makes the memory reduction worthless as the loaded classes are the main reason for memory consumption. (Some kind of Shareable interface, implemented by all classes not using static members would help in my opinion. But it is Sun's turn to introduce that in the JDK.)
    2nd Example: You have to be very careful to really stop a program within the JVM when it is shut down. This means to interrupt all threads (which are not part of one threadgroup, as f.e. swing and rmi use their own threadgroups), remove all Timer-Events from existing SwingTimers (or java.util.Timers), disposing all windows, and so on...
    So it is very hard to really produce a stable application when using only one JVM...

Maybe you are looking for

  • EHP7 Upgrade stuck in NTACT_ALTNT Phase

    Dear Experts, Am stuck in the upgrade NTACT_ALTNT phase of the EHP7 upgrade Source: SAP ECC6.0 Target: SAP ECC 6.0 EHP7 In the preprocessing phase got an error in the        MAIN_SHDIMP/SUBMOD_SHD2_RUN/NTACT_ALTNT     phase. Please find the logs belo

  • E51 menu hang

    i know this was discussed, but with search i didn't found anything about this problem. my problem is that today, after a month using without any problems, my E51 didn't entered the menu. from standby i pushed the menu button, but the menu didn't open

  • Best Location for iTunes Library Files

    Greetings: Ive moved all of my iTunes media to NAS.  Is it best to have the iTunes library files on the NAS or should I leave on PC.  What are the considerations?   thanks in advance.  John

  • Help please? I can't update Reader 9.2.

    When I try to implement the automatic updates, I get the message 'error 1402 - could not open the key'. I also tried to remove the software of Adobe Reader to re-install new stuff, but there I get the same message. Must I remove ALL of Adobe's progra

  • Asa high cpu

    I am seeing high cpu utilization on 5520. Any pointers on how to troubleshoot? fw# sh processes cpu-usage sorted non-zero PC         Thread       5Sec     1Min     5Min   Process 0x081e1e11   0x6ddc1528   70.6%   66.5%   66.0%   Dispatch Unit 0x08ed1