Multiple programs in the same VM

I don't have lots on memory and whenever I run 2 java programs, it becomes very slow. Is it possible to have a JVM running a "launcher" aplication and starting programs all in the same VM?
I guess it would have security risks, but I think it would be great to keep the VM running and optimizing the code (the API code) for very long periods of time instead of loading a new copy every time.
Any ideas on how to implement it?, at least how to make a simple example running 2 programs in the same VM?
I guess they would have to run in their own threads and it won't be easy if some of the programs do System.exit();
If someone has any idea about this, message me or post a reply here.
Fede.
[email protected]

Take a look at http://www.onjava.com (in java optimization). Also Enhydra (I think it is http://www.enhydra.org) has implemented this kind of library that allows to run several applications in one JVM.
BTW. System.exit(0) from one of the threads problem can be easily mitigated by extending SecurityManager ( SecurityManager is always called before exit, so check what thread requested exit and either allow or disallow it).
HTH,
Leo

Similar Messages

  • ALSA - sound with multiple programs at the same time

    Well, I followed the wiki page about this, (http://wiki.archlinux.org/index.php/Allow_multiple_programs_to_play_sound_at_once#dmix_-_Alsa.27s_software_mixing_system.), and it worked. Well, for starters at least. But then it stopped working, just like that. I don't know why, and I don't know if it has something to do with an upgrade or something, since it could have stopped working anytime in the last 2-3 weeks or so, I don't know when.
    [arvid@arvid-arch ~]$ cat /etc/asound.conf
    #/etc/asound.conf start:
    pcm.!default {
    type plug
    slave.pcm "dmixer"
    pcm.dsp0 {
    type plug
    slave.pcm "dmixer"
    pcm.dmixer {
    type dmix
    ipc_key 1024
    slave {
    pcm "hw:0,0"
    period_time 0
    period_size 1024
    buffer_size 8192
    rate 44100 #many new cards are 48000 only
    bindings {
    0 0
    1 1
    ctl.dmixer {
    type hw
    card 0
    #end.
    [arvid@arvid-arch ~]$ cat /etc/libao.conf
    default_driver=alsa10

    If you don't use ALSA-only apps, try OSS v4. It has built-in kernel-level vmix to support multi-source sound.

  • "you can not use multiple instance of Program at the same time"

    Hello @ all,
    I have a Problem, after the installing from Acrobat Testversion and acrobat reader in version in "all Combination" 8 an 9.
    I get this misstake information "you can not use multiple instance of Program at the same time" if I want open more then 1 .pdf.
    If I have no pdf open, but acrobat/reader so i can´t open with the same Misstake.
    I have deinstalled and installed, Allways I bekame the same information. I tryed all things to clean and know i don`t know forward.
    Important: by Drag an Drop in the Acrobat Reader it is going, but by direct click on the pdf i get mistake.
    Maybe, you know what I can do!
    Thanks for help!

    Installation of both Acrobat and Reader in the same Windows machine is not advisable. If I were you, I would remove both completely and then reinstall the one you want to keep.

  • CRVS2010 - open multiple rpts at the same time, like sheets in a xls file ?

    Hi all,
    is that possible to open multiple reports at the same time, like sheets in a excell file ?
    Is that possible create tabs beside the MainReport tab ? or include reports in the Group Tree ? how can I do it ?
    The application is in asp.net with VS2010 and CR2010.
    The reports used to be in excell with three sheets and now we are migrating them to crystal reports, how can I create the report with those three sheets ?
    thanks !
    Subject modified as per the sticky post at the top of this forum; [Crystal Reports for Visual Studio 2010 Beta - read before posting|Crystal Reports for Visual Studio 2010 Beta - read before posting;
    Edited by: Ludek Uher on Aug 31, 2010 7:33 AM

    I'll make the suggestion to the Program Management group.
    You may want to do a post to the [Crystal Reports Design|SAP Crystal Reports; forum and ask them how they's fake that sort of a requirement. E.g.; there may be some way to make this report look the way you want, but it will be best to ask the experts. Don't mention CRVS2010 as they don't support it and most likely you will not get an answer.
    Ludek

  • How to support multiple users at the same time?

    Hi all,
    I have a Labview software which controls a analyzer via GPIB connector. When user A is using the software, user B has to wait until A is done. But actually, the analyzer is not very busy, when user A is using the software.
    I want user A, B, C and D can use the software at the same time. just like we can open Multiple websites at the same time.
    How can I program the software, so that the software can be open multiple times? Do you have any example?
    Thanks a lot.
    Steven
    Solved!
    Go to Solution.

    Are all the users going to be measuring the exact same thing from the same instrument?
    It would be possible to write a separate instrument server application that would handle all the direct interactions with the instrument. When one of the users needed to access the instrument, they would gain access to it through this server.
    The big, Big, BIG caveat is that each interaction with the instrument would need to be atomic. In other words each access would need to configure the instrument, initiate the reading, report the results, and then reset the instrument back to some known default value.
    As Dennis said, not a trivial process, but probably do-able...
    Mike...
    Certified Professional Instructor
    Certified LabVIEW Architect
    LabVIEW Champion
    "... after all, He's not a tame lion..."
    Be thinking ahead and mark your dance card for NI Week 2015 now: TS 6139 - Object Oriented First Steps

  • How can I remove multiple copies of the same song from the iTunes listing?

    How can I remove multiple copies of the same song from the iTunes listing. The program seems to be picking up the same songs from, for example, my user area and my public area in the C drive

    As above, Apple's official advice is here... HT2905 - How to find and remove duplicate items in your iTunes library, however it is a manual process and the article fails to explain some of the potential pitfalls.
    Use Shift > View > Show Exact Duplicate Items to display duplicates as this is normally a more useful selection. You need to manually select all but one of each group to remove. Sorting the list by Date Added may make it easier to select the appropriate tracks, however this works best when performed immediately after the dupes have been created.  If you have multiple entries in iTunes connected to the same file on the hard drive then don't send to the recycle bin.
    Use my DeDuper script if you're not sure, don't want to do it by hand, or want to preserve/merge ratings, play counts and playlist membership. See this thread for background and please take note of the warning to backup your library before deduping.
    (If you don't see the menu bar press ALT to show it temporarily or CTRL+B to keep it displayed)
    tt2

  • Multiple consumers of the same Queue

    In the past my use of JMS queues has been limited to a single message producer and a single consumer. I am now looking at having multiple copies of the same consumer running for load balancing and failover purposes, and this leads me to what I think is a basic question. BTW, we're running OpenMQ 4.4u1.
    I have messages being produced and saved in a single queue.
    I then have a consumer program whose logic is something like this:
    1. Create session with no transaction and CLIENT_ACKNOWLEDGE.
    2. Receive message from queue.
    3. Do some processing with message. Repeat processing attempts multiple times, if needed, until successful.
    4. Once processing is successful, acknowledge message.
    Assume that I am running multiple copies of the consumer in separate JVMs (or on separate servers, for that matter).
    Here are my related questions.
    1. If step 3 takes a long time (e.g., several minutes) can I be sure that only one instance of the consumer will receive the message?
    2. If a consumer is in step 3 and a catastrophic failure occurs (e.g., the JVM or server it is running on crashes) the message will never be acknowledged, but the session will not be shut down in an orderly fashion, either. Will the message that was received but never acknowledged eventually be delivered to another copy of the consumer?
    3. If step three takes a very long time (hours or days, rather than minutes), will the broker misinterpret this as a failure of the consumer and deliver the same message to another one of the consumers?
    Thank you for reading and/or responding to this question.
    Bill

    1. If step 3 takes a long time (e.g., several minutes) can I be sure that only one instance of the consumer will receive the message?A queue message will only be delivered and consumed by 1 consumer.
    2. If a consumer is in step 3 and a catastrophic failure occurs (e.g., the JVM or server it is running on crashes) the message will never be acknowledged, but the session will not be shut down in an orderly fashion, either. Will the message that was received but never acknowledged eventually be delivered to another copy of the consumer?Yes.
    3. If step three takes a very long time (hours or days, rather than minutes), will the broker misinterpret this as a failure of the consumer and deliver the same message to another one of the consumers?No, as long as the consumer's Session or Connection are intact

  • Stop opening multiple instances of the same application

    I am used to having graphic files on my desktop, when editing one I would simply right-click and pick "open with" > Photoshop (which is always open in its own desktop in my computer). Now out of the blue, if I do that, it loads another instance of Photoshop, which is certainly what I don't want. I can have 2, 3, 4 Photoshops running at the same time and editing the same image!
    Any idea how to solve this? I searched but all I could find is people wanting the opposite i.e. opening multiple instances of the same app.

    Your best bet to prevent this is to detach or unmount this drive; however, you can also try resetting your Mac's launch services, to have it re-scan only the Applications folders on your boot drive for programs to associate with documents and services you are using. Running the following command in the OS X Terminal will kill the current launch services database (its long, but copy and paste the entire line):
    /System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/LaunchServices.framework/Versions/A/Support/lsregister -kill
    Following this, run the following command to seed the database with the apps you currently have installed:
    /System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/LaunchServices.framework/Versions/A/Support/lsregister -seed
    Note that these changes will only apply when opening documents that have not been specifically assigned to a program. If you find a specific document continues to open the program on the external drive, then you can get info on it and change the associated program in the "Open With" section of the info window. After doing this, you might need to re-run these commands above, as opening the program will register it with OS X's launch services and have it now be available for automatically handling other documents.

  • Opening multiple instances of the same vi

    Hi,
    I am having trouble opening multiple instances of the same vi.
    This vi that I am trying to create can be used like a message display window to display numbers, strings etc (just like labVIEW's display message control except that this vi will update the displayed controls every scan). So for example, I will like to have a subvi, lets call it popup.vi, where I wire in three inputs from my main vi (2 strings and 1 number). Now in my main.vi I have 2 numeric controls Num1 and Num2 with their KeyFocus property nodes.
    The intention is that when I select Num1 or Num2 numeric control with my mouse the KeyFocus boolean becomes true and the popup.vi logic kicks in. Meaning that the popup.vi runs and opens its front pane
    l displaying the two strings and one numeric value from the main.vi.
    The problem arises when I want to open and run multiple instances of the popup.vi.
    So when I click on Num1 with my mouse I want the popup.vi to open its front panel with a set of strings and number displayed. At the same time I would want to click on Num2 control and open another instance of the popup.vi with another set of strings and numeric value.
    Also, I saved the popup.vi as popup.vit but for some reason vi server will not open the popup.vit. I get a message that popup.vit is already in memory - cannot load.
    I have attached a sample of the main.vi and popup.vi program.
    Please let me know if you need further clarifications.
    I appreciate your help in this matter.
    Thanks
    Nish
    Attachments:
    popupVI.zip ‏37 KB

    You have to clone the VI. You say you have tried to use the .vit way of cloning...but in the example there is no use of VIT and the VI is called statically. If you want to open multiple instances of the same VI and the VI has a user interface (or needs to be a unique instance of the VI every time even though it's called the same place in the diagram, not the case here though) you need to do it dynamically, i.e. with an invoke node.
    There is actually a problem doing just that, it causes a memory leak...but that won't be a problem unless the VI is called frequently / the software will be running over very long periods of time. You can see an example of it here (attached to my reply to the question):
    http://exchange.ni.com/servlet/ProcessRequest?RHIVEID=101&
    RPAGEID=135&HOID=506500000008000000A07D0000&UCATEGORY_0=_49_%24_6_&UCATEGORY_S=0&USEARCHCONTEXT_QUESTION_0=VI+cloning&USEARCHCONTEXT_QUESTION_S=0
    About the memory leak problem:
    http://exchange.ni.com/servlet/ProcessRequest?RHIVEID=101&RPAGEID=135&HOID=506500000008000000B7A40000&UCATEGORY_0=_49_%24_6_&UCATEGORY_S=0&USEARCHCONTEXT_QUESTION_0=VI+cloning&USEARCHCONTEXT_QUESTION_S=0
    MTO

  • Multiple copies of the same podcast?

    Why do I get multiple copies of the same podcast with different episodes in iTunes?  Is there a way of merging them into a single
    podcast?  On my iMac, I may delete some episodes and add others.  When syncing with my iPhone, a new podcast is created rather
    than updating the existing podcast.  At times, I've ended up with four different podcasts of the same program and finding a specific episode
    means searching thru all four. 

    I have been experiencing the same problem, and unfortunately sanfranciscotx's suggestion doesn't address or resolve the issue.
    iTunes is behaving inconsistently.  There are podcasts for which I have selected the "Download All" option and it only downloads new podcasts that have been released since the last time it was checked, regardless of how many podcasts were released in that time, without downloading old podcasts.
    In another case, the "Download All" option is selected, and it works as I would expect (the above scenario) for some time, but then one week it will start downloading a bunch of older podcasts as the original poster has mentioned.
    I am running iTunes 10.5.3, so I'm lead to believe the issue lies with the server where the podcasts are stored or the podcast feed and not with iTunes.

  • Can I create multiple links to the same file without duplicating file?

    does anyone know if it is possible to create multiple links to the same file using iWeb without the program automatically making multiple copies of that file in the published output? It seems that one file is created for each link.
    Thanks!

    Hi Franz,
    have a look at the second method on this page
    http://alyeska.altervista.org/en/iWeb_Downloads.html
    see if you understand how it works (if you don't, please ask me)
    Regards,
    Cédric

  • Multiple takes on the same track, fading from one take to another

    Isn't there a way to record multiple takes on the same track and fade the takes together?  In an old version of Garage Band, you used to be able to put two takes one on top of the other in the same track and fade them together.  Now, the track just cuts and there's no fading to the next one.  It's so cheesy this way; all live instruments need two tracks, one for mess-ups. I called up Apple Care but the guy couldn't find a solution.  If this is the way it is now, it's very cheap.  I mainly bought the Mac because of Garage Band, the Garage Band of old; has it been dumbed down now so that musicians are forced to spend even more money to upgrade to the next level program?  I wouldn't have bought the Mac but instead stuck with Mixcraft on PC, which has ease of use and cost only $80.  Please say there is a way to fade from one take to the next on the same track without cutting off one take abruptly.  Otherwise I have been duped by Apple. 

    alexafrompassaic wrote:
    I believe it was Garage Band '08 that I used with crossfade.
    Sorrry dude, didn't happen.
    I'm guessing you used Apple Soundtrack - sounds a lot like what you're describing.
    Garageband, incidentally, has only added features version to version.
    alexafrompassaic wrote:
    do you know if Apple would take back my computer? 
    If you explain to them that you expected software you once used on another computer to be included on this one, how could they not?

  • How do you add multiple effects to the same clip

    How do you had multiple effects to the same clip. I have tried for hours
    I would like to add sepia and aged movie to the same clip. I heard it can be done, but have not figured out how to do it.
    anyone please.

    Normally you can apply only one video effect at a time. But for Sepia, black and white, and others that can be done through the video Adjustments tab, you are in luck.
    Aged Movie should already have a bit of a sepia tone.
    If you want more of a sepia tone or you want to fine tune the sepia effect you can do it with the Clip Inspector/Video Adjustments tab.
    Note: Thanks to Jeff Carlson of MacWorld for this tip.
    If you're looking for a washed-out sepia appearance, first open iMovie's preferences and turn on the Show Advanced Tools option, which adds more controls to the Video Adjustments HUD and other areas of the program. Select the clip you want to alter and press the V key. Set Saturation to 0 percent, and then drag the Red Gain slider to 143 percent, the Green Gain slider to 90 percent, and the Blue Gain slider to 53 percent (feel free to tweak these settings to customize the results). Click on Done when you're finished. Note that the clip thumbnail still appears in color, as the video was shot, but the preview reflects your changes.--JC
    If you need to apply the same settings to all clips, first select the clip you have adjusted. Then Edit/Copy. Then Edit/Select All. Then Edit/Paste Adjustments.

  • Multiple instances of the same BSP app for the same user

    Hi,
    I currently have a BSP application which has a main page which consists of three frames.  Each of the frames within the page is linked to its own controller, with one other controller controlling the whole page.
    due to the nature of the program i need to access information from one controller in another.  To do this I create a reference to the controller whose data I want within the controller that needs access to it.  This works fine under normal processing, however when the application is executed / called up twice by the same user, the controllers for the initial instance of the application are de-referenced...
    Does anybody know why this may be occurring...and how to get around it?
    Thanks
    Mike Law.

    Whenever you open a browser anew, then there is no session data that the browser can send in any way whatsoever, therefor a new session on the server is started.
    If you open a new window from within the first session this might not be the case, you can run multiple windows in the same session.
    Either way, I would recommend to search the forum, there have been discussion about this (or a similar) topic, e.g. accessing the same model instance - it would be best if you look for them, read them, and if you have any questions left come back for more
    Cheers,
    Max

  • Is there any version of Indesign that allows to open multiple instance at the same time

    I am using Indesign CS3 to generate the bulk reports automatically(programmatically) using Adobe indesign library . One of the key limitation to this tool is it allows to open only one instance at a time unlike word where multiple instances can be opened at the same time. Is there any adobe indesign too version desktop/server which allows to open multiple instances at the same time. Any help on is appreciated. Thanks.

    @PeterG
    You said "You might want to examine the End User Licensing Agreement (EULA) for  any prohibition against using these two instances at the same time with  the same license; the license does permit two installs for the same user  that are not used simultaneously." I thought that meant you had read the EULA. It's pretty unambiguous on that point.
    For everyone's edification about multiple installations and server use with a standard license here's the relevant text:
    2. Software License.
    If you obtained the Software and any required serial number(s) from Adobe or one of its authorized
    licensees and as long as you comply with the terms of this agreement, Adobe grants you a non-exclusive
    license to install and use the Software in a manner consistent with its design and Documentation and as
    further set forth below. See Section 16 for specific provisions related to the use of certain products and
    components, for example font software, Acrobat, After Effects, Adobe Presenter, Contribute, Adobe
    Device Central, Flash Player, Flash Builder, and Adobe Runtimes.
    2.1 Limited Use. The Software, or portions of the Software, may allow installation and use without a serial
    number. If so, you may install but not use such non-serialized Software on any number of Computers as
    part of an organizational deployment plan. Further, you may install and use such non-serialized Software
    on any number of Computers for demonstration, evaluation and training purposes only and only if any
    Output Files or other materials produced through such use are used only for internal, non-commercial and
    non-production purposes. You may not use such non-serialized Software after any applicable time-out
    period has ended, unless you input a valid serial number under Section 2.2. ACCESS TO AND USE OF
    ANY OUTPUT FILES CREATED WITH SUCH NON-SERIALIZED SOFTWARE IS ENTIRELY AT
    YOUR OWN RISK.
    2.2 General Use. You may install and use one copy of the Software only on the Permitted Number of your
    compatible Computers into which you enter a valid serial number.
    2.3 Distribution from Server. You may copy an image of the Software onto Computer file server(s) within
    your Internal Network for the purpose of downloading and installing the Software onto Computers within
    the same Internal Network for use as permitted by Section 2.1 and 2.2.
    2.4 Server Use. You may install the Software on Computer file server(s) within your Internal Network only
    for use of the Software initiated by an individual from a Computer within the same Internal Network only
    as permitted by Section 2.2. The total number of users (not the concurrent number of users) able to use the
    Software on such Computer file server(s) may not exceed the Permitted Number.
    By way of example, the foregoing does not permit you to install or access (either directly or through
    commands, data or instructions) the Software: (a) from or to a Computer not part of your Internal Network,
    (b) for enabling Web hosted workgroups or services available to the public, (c) by any individual or entity
    to use, download, copy or otherwise benefit from the functionality of the Software unless licensed to do so
    by Adobe, (d) as a component of a system, workflow or service accessible by more than the Permitted
    Number of users, or (e) for operations not initiated by an individual user (e.g., automated server
    processing).
    2.5 Portable or Home Computer Use. Subject to the important restrictions set forth in Section 2.6, the
    primary user of the Computer on which the Software is installed under Section 2.2 (“Primary User”) may
    install a second copy of the Software for his or her exclusive use on either a portable Computer or a
    Computer located at his or her home, provided that the Software on the portable or home Computer is not
    used at the same time as the Software on the primary Computer.
    2.6 Restrictions on Secondary Use by Volume Licensees. If the Software was obtained under an Adobe
    volume license program (currently known as Adobe Open Options) by any licensee other than an
    educational volume licensee, the second copy of the Software made under Section 2.5 must be used solely
    for the benefit and business of that volume licensee. For more information about secondary use by volume
    licensees, please visit our Web Site at http://www.adobe.com/go/open_options.
    There is also language stating that if you have a dual boot or other system capable of running more than one OS you will need a separate license for each platform if you want to run the software on more than one.

Maybe you are looking for

  • Password for SYSTEM or SYS

    HI, I have installed Oracle 10g DB on XP. After installation of ORACLE DB, "DATABASE CONFIGURATION ASSISTANT" dialog box came, but i mistakenly click on OK button instead of clicking on PASSWORD MANAGEMENT to set the password for SYSTEM / SYS. Now wh

  • PLD - AR Invoice How to show another item price from a different price list

    Hi, I am trying to print a suggested price list price, which is different to the selling price being used on the item line i.e for Item ABC on line 1 of the invoice we would like to show the selling price (price list 1) as well as the suggested selli

  • SQL Server 2012 Failover Cluster Setup

    I have to set up a Lab Test environment for SQL Server 2012 with failover clustering. What are the most cost effective specifications for H\W & S\W.  AFAIK Apart of Enterprise edition, Standard edition can support failover clustering for upto 2 nodes

  • How do I stop printing of a log prior to each document?

    I have 2 HP printers installed on my pc. All in one 3150 and an All in one F4100.  Ever since I downloaded the drivers for the F4100 (didn't have the cd), almost every document I print is preceded by a log of sorts giving the Filename, Directory, Tem

  • How to Install the Downloaded NetBeans(*.nbm) Modules for Sun Java Studio

    Dear All, I have downloaded NetBeans Modules files with Extension *.nbm, and they are not getting installed, when I double click on them, or if I go through the Update Center and Select the Downloaded Modules even then also they are not getting insta