Possible to create a pool of JVM's from another JVM's ?

Hi all,
currently I'm researching on a small task where a native "black box" C++ library needs to be integrated into Java, developing some kind of JNI-based wrapper. I've done this already with SWIG two times before, worked quote well, but this time it's different: The wrapper will be used from a multiuser application (i.e. various parallel working calls) but the native library is not only not threadsafe, but it also utilises static variables at central places.
My idea is the follwing
1) The standard solution part: create a wrapper application in it's own JVM which exposes the native interfaces as Java interfaces
2) Instantiate multiple of these wrappers as separate processes (i.e.: separate JVMs, the "inside JVM") from another JVM ("outside JVM").
3) The outside JVM uses the multiple instances in a kind of "round-robin" or "next free" pattern to assign new calls to a set of "worker JVM".
The interesting part of this question is in 2): How can I instantiate a [set of] new JVM from inside another JVM so the inside JVM are really their own processes? Only by having the multiple instances as separate processes I can overcome the problem of the single-threaded native lib becoming "quasi-multithreading"?
The easiest approach would be likely to start new JVMs using the "Process" object and to start new JVMs with the usual shell scripts. But I'd like to have some more elegant ,-)) Is there any way to have this done in a better way?
Thanks a lot,
Soeren Gerlach

Presumbly locking wouldn't work?Not really: Locking would mean that only one client/person could use the library using the Java wrapper. That in fact is the shortcoming I'd like to overcome by instantiate multiple processes.
Thanks,
Soeren

Similar Messages

  • Is it possible to create a playlist and share it with another itunes user?

    Is it possible to create a playlist and share it with another itunes user?

    try this out
    Select distinct   
    v_R_System.Netbios_Name0 AS [Computer Name],  
    v_GS_COMPUTER_SYSTEM.UserName0 AS [User Name]
     from v_R_System
    left join v_GS_COMPUTER_SYSTEM on (v_GS_COMPUTER_SYSTEM.ResourceID = v_R_System.ResourceID) 
    inner join v_fullcollectionmembership as b on (b.ResourceID = v_R_System.ResourceID) 
    left join v_GS_SYSTEM_CONSOLE_USAGE_MAXGROUP ON v_GS_SYSTEM_CONSOLE_USAGE_MAXGROUP.ResourceID = v_R_System.ResourceID
            inner join v_GS_SYSTEM e on e.resourceid = b.resourceid
     Where
    b.CollectionID = @collectionid
    Blog: http://theinfraguys.com
    Follow me at Facebook
    The Infra Guys Facebook Page
    Please remember to click Mark as Answer on the answer if it helps you in anyway

  • Is it possible to create a Column with Conditional Mandatory with another Column?

    Is it possible to create a Column with Conditional Mandatory with another Column?
    For example
    In a Table we have column A, B, C.
    A is Primary Column.
    B is Optional
    C is Conditional Mandatory.
    A B
    C
    12345 ABC
    OK
    12346 NULL
    NULL
    12347 ABC
    OK
    Only if the B Column has the value then only C column should be mandatory

    I guess you can't create a condtional mandatory column directly. However, you can use check constraint to on the column
    create table YourTable
      A int primary key,
      B char(3),
      C int,
      constraint ch_con check(
                                B
    is not null
    or C is null

  • Getting all the threads running in one JVM from another JVM ...

    I want to get all the threads running in one JVM from another JVM.
    Is it possible ?
    namanc

    I am going to write a java application that prints all the java application running at the background. And this application has a control over all the threads. means killing the threads, restart the thread etc
    namanc

  • Create image which is filled in from another image*

    Create image which is filled in from another image?   How do I blend two images - using the outline of one and the coloring or background of the other? 

    Everything you want to do and more is available through the use of Photoshop Layers.
    It's kind of beyond the scope of the forum to teach basic Photoshop layer usage, but you can find many tutorials online, and Photoshop itself comes with decent documentation (Help).
    You can, for example, open one image, paste or place another over it as a second layer, then you can blend the two through many different Blending options, as well as 0 to 100% blending percentage.  You can even use transparency or masking to make parts of a layer transparent, opaque, or anything in between.
    Using selection and refinement tools, you can even put subjects on different backgrounds...
    -Noel

  • Hi. how to create Subroutine Pool and call it from sapscript

    HI,
    Can anyone tell is there any standard subroutine pool available which could fetch the customer number. 
    how to create an subroutine pool and call it from the sapscript..
    please help me
    Advance Thanks..
    Guhapriyan.

    Hi Guhapriyan,
    1. Create a FORM in your program.
    2. call it from sapscript using
    /:   PERFORM GET_COMPANY_INFO IN PROGRAM YHRR_OFFER_CONTRACT_FORM      
    /:   USING &P0001-BUKRS&                                               
    /:   CHANGING &COMP_NAME&                                              
    /:   ENDPERFORM                                                        
    3. The form in your program should be of the following  parameters only.
    form GET_COMPANY_INFO tables IN_PAR  structure ITCSY
                            OUT_PAR structure ITCSY.
    (important is IN_PAR, OUT_PAR -
    where in your read the values passed,
    and pass back the values
    thru internal table using varname, varvalue)
    regards,
    amit m.

  • How to create a variant to a report from another program at run time

    Hi experts,
                   when i am using FM  :  /OSP/REPORT_CREATE_VARIANT to create a report variant from a program then i am getting  an error 'For object /OSP/ERPNR , number range interval 01 does not exist ', how should i avoid it or can any one help me out to create a report variant from another program at run time with the results of the program.so that i can execute the report from here with this variant

    If i understand you,
    - You can use a FM like [RS_CREATE_VARIANT|https://www.sdn.sap.com/irj/sdn/advancedsearch?cat=sdn_all&query=rs_create_variant+&adv=false&sortby=cm_rnd_rankvalue] to create a variant and then use it in the [SUBMIT|http://help.sap.com/erp2005_ehp_03/helpdata/EN/fa/096d67543b11d1898e0000e8322d00/frameset.htm] statement USING SELECTION-SET.
    - But you may also use SUBMIT with WITH parameters which doesnt require variant creation and with much less programming efforts.
    - You can mix the two solutions also.
    So what is you actual requirement, also look at some documentation like [ Scheduling a Job: Full-Control Method|http://help.sap.com/erp2005_ehp_03/helpdata/EN/fa/096ce5543b11d1898e0000e8322d00/frameset.htm]
    Regards

  • Regarding code to call & control a  JVM from another JVM

    hi,
    I need to communicate from one JVM to another JVM. I know it can be done using RMI. But, i don't to write in code.If any one had tried it, please reply me with the code.
    Satchi

    Hi Satchi,
    In my opinion, RMI is complex enough that I don't think you can learn it through a forum. So please allow me to direct you to some Internet resources that I used in order to learn RMI, and I hope will help you to as well.
    [Note: Not in any particular order.]
    http://java.sun.com/docs/books/tutorial/rmi/index.html
    http://developer.java.sun.com/developer/onlineTraining/rmi/
    http://java.sun.com/products/jdk/rmi/
    http://www.dickbaldwin.com/tocadv.htm
    http://mindprod.com/jglossrmi.html#RMI
    http://jinx.swiki.net/263
    Hope this helps.
    Good Luck,
    Avi.

  • Create a table which has columns from another table in other schema

    Hi All
    I need to create a table which is table driven i.e., the columns of that table need to be inserted from another table in a different schema...Can any one help me with this??

    create table newtab (--column spec here--) as
    Select --columns here-- from otherschema.tablename;max

  • Possible to create .app of .jar which links to another project's .jar?

    Hi,
    I have 2 Projects. One uses simple java and the other one uses java fx 2.2.3.The executable .jar of the simple java project needs to be linked with the data files and .jar of the java fx project.
    I have created a .app of the java fx project,but then the .app links with its jar.What I want is,the .app of the simple java project should refer to the jar of java fx.Is it Possible?
    Thanks

    Presumbly locking wouldn't work?Not really: Locking would mean that only one client/person could use the library using the Java wrapper. That in fact is the shortcoming I'd like to overcome by instantiate multiple processes.
    Thanks,
    Soeren

  • Is it possible to create a super-set materialized view from master site?

    In the replication documents, materialized view is a sub-set of master site. But my scenario is when I delete some records in the master site. I don't want these records(which's been replicated to the materialized view table before) be purged in the materialized view. Is it possible for oracle replication ?

    If your goal is to replicate inserts and updates but to ignore deletes, you would probably be better off setting up Streams and simply not subscribing to deletes.
    Justin

  • Is it possible to create a cc'd email address from a text field that connects to a submit button?

    I was told I should submit this question to the scripting forum... I am wondering if this is at all possible in Acrobat, because so far I have not been able to do it, but a client would like us to:
    I have a "Submit Request" button that includes the email addresses of desired recipients of a PDF form. But the client also wants the person who is filling out the form to be cc'd in the email that is sent to other recipients. So in the field where the person enters their email address on the form, is it possible to somehow have that email address show up in the cc'd section of the email that is sent when the person hits the "Submit Request" at the bottom of the form?
    As far as I can see, the only way to get the form emailed to anyone is to list pre-chosen email addresses in the actions section of the submit button. This is why I haven't been able to figure out how to get a randomly entered email address in a text field to also be cc'd.
    Hope this makes sense and any help is much appreciated.
    Thank you!

    Nevermind, I just did a little research and found the answer:
    in Acrobat Pro v9 go to the menu and select Advanced > Extend Features in Adobe Reader...
    In Acrobat Standard v9 go to the menu and select Advanced > Extend Forms Fill-in & Save in Adobe Reader...
    You can now save the form with your data.
    Thanks again for your help with the script, our form is now working exactly the way we wanted it to!

  • Is it possible to have one java GUI program run  from another Java program

    If it is possible let me know and if you could write some code that would be greatly appreciated.
    Frank

    hm ... what will happen, if one of these applications
    invoke System.exit(...)?- The JVM starts its shut down
    sequence and both applications will shut down this
    way.You're right. If you don't want that - or you can't rely on the behaviour of the second app - you have to start another VM in a separate process calling Runtime.exec().
    If you only want to "use" the second app from the first one (and you have the sources) you can write a method like main() which do not call System.exit() at the end.
    Alex

  • Problem creating a form on a table from another custom schema

    Hi,
    I have a table in a custom schema that i have granted SELECT, UPDATE, INSERT and DELETE to our apex schema. I have created a synonym for this table under the apex schema but I can't build a form for it. If i try adding the form when creating the application, it gives me an error about not having a primary key on the table, which i do. If i create the application with a blank page and then try to add the form, it gives me an error that the table must contain at least one column, which it contains 12. If i view the table in the SQL Workshop, it gives an accurate count of rows in the table but doesn't provide any information about the table and doesn't display the data.
    If I login to TOAD under our apex schema and view the synonym object, i can see all of the information about the table - the columns, the primary key, etc. But I can't see it inside the Application Express app.
    Can anyone tell me why this is and what i can do to build a form on this shared table?
    Thanks,
    Troy

    Troy,
    I suggest you get rid of the synonym and then don't use the Create Application wizard for this purpose. Instead, create the application, then use a create page or create form wizard. It should first ask you for the name of the schema that contains the table. If you get that far, you should be on your way.
    Scott

  • Create a processor and a player from another processor

    Hello guys,
    I would like to create a processor that start once, and from it i get de datasource to set to a player and to other processor.
    I have a source code that create a processor but when i get the datasource to set to the player, i had some problems.
    Thanks again.

    You could try cloning the datasources...
    [http://java.sun.com/javase/technologies/desktop/media/jmf/2.1.1/solutions/Clone.html]
    Or you could use RTP to transmit to yourself, and then you can just receive as many copies of the feed as you need to do stuff with. First processor transmits the RTP feed, and then you attach a player to a receiver and then a Processor / Data Sink to another receiver...

Maybe you are looking for

  • PhotoShop Automation PlugIn: How do I get the coordinates of a polygonal selection?

    Hi. I try to get the coordinates out of a selection, but I can't find out how to do that. I tried to convert the selection into a path and get the coordinates from the path. That doesn't work either. Can somebody give me a list of parameters inside t

  • X Server won't start with R9 280 without backtrace

    I got a mini ITX based PC with Intel chipset and CPU. I am using an AMD R9 280 GPU with the xf86-video-ati driver. When I try to startx I get the following log (in ~/.local/share/xorg/): [  1592.664] X.Org X Server 1.16.2 Release Date: 2014-11-10 [ 

  • Mail Not Appearing

    When I click on the "Mail Icon" in my dock, mail opens and it says "Mail" in the top bar, however, no window opens. I cannot view any emails at all. If I right click on the "mail" icon, I can open a new message, but it does not send. Do you know how

  • Group Account No

    hi I have mentioned in this mail,  what i understood ......tell me whether correct or not by mail itself The following examples has be create in account group : Expenses, Income, Asset , Liability The following examples has be create in GL : Expenses

  • Producing a string of 3 random letters for a hash table

    I'm pretty new to all this and i was wondering if anyone would be able to help me produce a random string of 3 letters to be inputted into a hash table. I already have the code for integers to be placed into the table but am having difficulty with le