Rmiregistry as thread instead of separate process

It looks like LocateRegistry.createRegistry/registry.rebind() causes a new process/JVM to be created (at least on Windows). Is it possible to have this created as a new thread instead of a whole new process/JVM? I'm having problems with the spawned JVM holding a file open. I need to close/rename the file in the parent process.
thanks,
Mike

It looks like LocateRegistry.createRegistry/registry.rebind() causes a new process/JVM to be created (at least on Windows).No, it doesn't, on any platform.
Is it possible to have this created as a new thread instead of a whole new process/JVM?It does even less than that. It just exports the Registry as just another remote object in the current JVM. Doesn't even cost you a thread, unless it's the only remote object using that port.
I'm having problems with the spawned JVM holding a file open.As there is no spawned JVM, your problem must lie elsewhere.

Similar Messages

  • Could threads of a same process run on different CPU in the same time ?

    Hello,
    probably stupid question..., but I would like to understand if several threads inside a same process can run in the same time on separate CPU.
    If the response is positive, how can I bind a thread on differant CPU using C API ?
    Also what is the algorithm implemented by Solaris for the laod balancing ?
    Is there any white paper on this subject ?
    Thanks for any tips

    Threads in the same process can run at the same time on separate CPUs.
    You can bind a thread to a CPU using the processor_bind(2) API.
    That algorithm is not public. You will have to wait for OpenSolaris so that you can look at the implementation at that time.
    There is much public documentation on Solaris threading support on the web. Use google. The following document provides a good historical context of Solaris thread support.
    http://www.sun.com/software/whitepapers/solaris9/multithread.pdf
    Gary

  • JMX Remote and MBeans in separate Processes

    Hi,
    I found on Sun blogs - http://blogs.sun.com/jmxetc/entry/what_is_jmx
    following:
    "An EJB lives in an Application Server container. It usually implements business logic. An MBean lives in an MBeanServer, and usually implements management logic"
    That means, when an MBeanServer is killed, an MBeans dont't run anymore?
    I have several Java applications.
    I want use the JMX to manage (remote) this applications (start, stop, status watch) I created one MBean for every application and registered them on an MBeanServer. I can now start, stop application and observe the status.
    public interface AdapterMBean {
    String getStatus();
    void start();
    void stop();
    But when I kill the process of MBeanServer, my applications don't run anymore.
    Method start() starts application in new Thread.
    Can JMX fulfil this requirement, that an MBeanServer runs in its own process and MBeans run in separate processes (now on the same machine)?
    If yes, what shoul I do?
    thanx
    Peter

    Hi,
    I found on Sun blogs -
    http://blogs.sun.com/jmxetc/entry/what_is_jmx
    following:
    "An EJB lives in an Application Server container. It
    usually implements business logic. An MBean lives in
    an MBeanServer, and usually implements management
    logic"
    That means, when an MBeanServer is killed, an MBeans
    dont't run anymore?You don't kill an MBeanServer. What do you mean by 'kill an MBeanServer'?
    I have several Java applications.
    I want use the JMX to manage (remote) this
    applications (start, stop, status watch) I created
    one MBean for every application and registered them
    on an MBeanServer. I can now start, stop application
    and observe the status.
    public interface AdapterMBean {
    String getStatus();
    void start();
    void stop();
    But when I kill the process of MBeanServer, my
    applications don't run anymore.
    Method start() starts application in new Thread.
    Can JMX fulfil this requirement, that an MBeanServer
    runs in its own process and MBeans run in separate
    processes (now on the same machine)?
    If yes, what shoul I do?
    thanx
    PeterWhen you kill a process, you kill all its execution threads.
    A thread is not a process. It runs within a process.
    If you want your applications to remain alive when you kill
    the process that started them you need to start them in a
    new separate process. See System.exec().
    The question is: why do you kill the process that runs all your
    applications in the first place?
    Are you sure you are doing what you want to do?
    regards,
    -- daniel
    JMX, SNMP, Java, etc...
    http://blogs.sun.com/roller/page/jmxetc

  • Communication between thread in the same process using file interface.

    Hi,
    I am developing  driver and i need to communicate between two thread.
    >can anyone guide me on implementing communication between two thread in the same process using File Interface. First thread will be driver and second will be application.I need to send IOCTL like commands using File interface ie is WriteFile(),ReadFile()
    from Host process to driver through file-interface(which run's in driver context).Host process should not be blocked for the duration of the driver to process the command.
    >File-interface will run in driver context and it will be responsible to receive command from application and pass it to the driver.
    what are the complexity introduced?
    >Can anyone also give me the link/reference to get more information on this topic?
    >How to replace IOCTL command's for instance baud _rate change command with a file interface for example with IRP.

    Here  is the detailed query:
    Hardware Abstraction Layer will interact with Driver(Both will be running in complete different process) .there is a IOCTL for command and  File interface for read and write.
    My requirement is:
    Both should run in the same process so HAL will run as one thread and driver as another thread in the same process .I don't want HAL to wait for completion of request and also i don't want driver to be blocked .
    We are planning to use a File Interface for communication between Hardware abstraction layer and Driver
    HAL will send the command or read/write operation to a file interface and driver will get the command or read/write request from the File interface
    There is a flexibility to change Hardware Abstraction layer and also the Driver
    Is it possible to use IOCTL between two thread under same process? if not what other options do we have.
    Can we use File interface to  send command (like IOCTL) between two thread?

  • Separate Process order for utilities

    HI,
    My requirement is can we create separate process orders for utilities based on the actual consumption of Plant1 & plant2, so that there will not be any WIP change effect in the system. How to go about it & if do the changes any implications,  please comment on this highly appreciated.
    Srini

    Your requirement is not clear.
    Please explain properly.

  • My device does not appear in the iTunes window.  Instead a separate window opens so I cannot sync

    My device does not appear in the iTunes window.  Instead a separate window opens so I cannot sync my device.  I have tried with both my iPad, my iPod and my iPhone.  In each case a separate window opens showing that it is fully connected to the computer, but it does not open in iTunes. 
    I have followed previous instructions to stop then start the device manager.  I have even uninstalled then reinstalled iTunes, but no luck.  Can someone help??

    Hello Linda Lev,
    It sounds like Windows recognizes that your devices are conneted, but iTunes does not. I recommend the troubleshooting from the article named:
    iOS: Device not recognized in iTunes for Windows
    http://support.apple.com/kb/ts1538
    Thank you for using Apple Support Communities.
    Take care,
    Sterling

  • How can all the items bought online be listed in the same receipt instead of separate E-invoices?

    Hello, Mr/Ms
    I just bought an iPhone5 case and an iPod Touch in Apple Store online. But I found that they are separately listed in the E-invoices. Since I am going abroad and I want to refund the tax, it requires the total price of the items to be over $300 and those items MUST be printed in the same receipt. So can they be listed in the same receipt instead of separate E-invoices? Thank you!
    Regards,
    Baye

    Unfortunately, you are not addressing Apple here - these are user to user forums for technical problems and we can't help with purchase or invoice problems. You will need to contact the store for this. My guess would be that there might be different shipping dates (purchases are billed when shipped) or some other reasons for this.

  • BUG? 10.1.3 EA: Ant running in a separate process error.

    I'm trying to run Ant in a separate process and use different J2SE with it (JDK 1.4.1_03) and getting the error below. Seems to work ok with different JVM versions (tried 1.5 and 1.4.2). But we need to use JDK 1.4.1_03 to compile the project. Fails both for default Ant version and if I try to specify a different one. Is there any other way to make ANT to use specific JDK?
    Thanks,
    Noel.
    ===========================================================
    C:\jdk141_03\bin\javaw.exe -classpath C:\jdev10g13EA\jdev\lib\ojc.jar;C:\jdev10g13EA\j2ee\utilities\ant-oracle-classes.jar;C:\jdev10g13EA\webservices\lib\wsa.jar;C:\jdev10g13EA\jdev\lib\jdev.jar;C:\jdev10g13EA\apache-ant-1.6.5\lib\ant-antlr.jar;C:\jdev10g13EA\apache-ant-1.6.5\lib\ant-apache-bcel.jar;C:\jdev10g13EA\apache-ant-1.6.5\lib\ant-apache-bsf.jar;C:\jdev10g13EA\apache-ant-1.6.5\lib\ant-apache-log4j.jar;C:\jdev10g13EA\apache-ant-1.6.5\lib\ant-apache-oro.jar;C:\jdev10g13EA\apache-ant-1.6.5\lib\ant-apache-regexp.jar;C:\jdev10g13EA\apache-ant-1.6.5\lib\ant-apache-resolver.jar;C:\jdev10g13EA\apache-ant-1.6.5\lib\ant-commons-logging.jar;C:\jdev10g13EA\apache-ant-1.6.5\lib\ant-commons-net.jar;C:\jdev10g13EA\apache-ant-1.6.5\lib\ant-icontract.jar;C:\jdev10g13EA\apache-ant-1.6.5\lib\ant-jai.jar;C:\jdev10g13EA\apache-ant-1.6.5\lib\ant-javamail.jar;C:\jdev10g13EA\apache-ant-1.6.5\lib\ant-jdepend.jar;C:\jdev10g13EA\apache-ant-1.6.5\lib\ant-jmf.jar;C:\jdev10g13EA\apache-ant-1.6.5\lib\ant-jsch.jar;C:\jdev10g13EA\apache-ant-1.6.5\lib\ant-junit.jar;C:\jdev10g13EA\apache-ant-1.6.5\lib\ant-launcher.jar;C:\jdev10g13EA\apache-ant-1.6.5\lib\ant-netrexx.jar;C:\jdev10g13EA\apache-ant-1.6.5\lib\ant-nodeps.jar;C:\jdev10g13EA\apache-ant-1.6.5\lib\ant-starteam.jar;C:\jdev10g13EA\apache-ant-1.6.5\lib\ant-stylebook.jar;C:\jdev10g13EA\apache-ant-1.6.5\lib\ant-swing.jar;C:\jdev10g13EA\apache-ant-1.6.5\lib\ant-trax.jar;C:\jdev10g13EA\apache-ant-1.6.5\lib\ant-vaj.jar;C:\jdev10g13EA\apache-ant-1.6.5\lib\ant-weblogic.jar;C:\jdev10g13EA\apache-ant-1.6.5\lib\ant-xalan1.jar;C:\jdev10g13EA\apache-ant-1.6.5\lib\ant-xslp.jar;C:\jdev10g13EA\apache-ant-1.6.5\lib\ant.jar;C:\jdk141_03\lib\tools.jar -Djdev.ant.port=4358 -Dant.home=C:\jdev10g13EA\apache-ant-1.6.5 org.apache.tools.ant.Main -logger oracle.jdevimpl.ant.runner.OutOfProcessAntLogger -debug -inputhandler oracle.jdevimpl.ant.runner.OutOfProcessInputHandler -f C:\devbuild.xml clean
    Apache Ant version 1.6.5 compiled on June 2 2005
    Buildfile: C:\RCA_DEPOT\inovisworks\projects\iw-archive\core\hegemony\devbuild.xml
    java.lang.NullPointerException
         at java.net.Socket.<init>(Socket.java:283)
         at java.net.Socket.<init>(Socket.java:119)
         at oracle.jdevimpl.ant.runner.OutOfProcessIDEHook.connect(OutOfProcessIDEHook.java:43)
         at oracle.jdevimpl.ant.runner.OutOfProcessAntLogger.buildStarted(OutOfProcessAntLogger.java:45)
         at org.apache.tools.ant.Project.fireBuildStarted(Project.java:1831)
         at org.apache.tools.ant.Main.runBuild(Main.java:622)
         at org.apache.tools.ant.Main.startAnt(Main.java:187)
         at org.apache.tools.ant.Main.start(Main.java:150)
         at org.apache.tools.ant.Main.main(Main.java:240)

    I believe this is Sun bug 4712609. This was a bug in JDK 1.4.1, which was fixed in JDK 1.4.2 and later.
    The only workaround I can think of is to run JDeveloper itself in JDK 1.4.1_03. If you then run Ant in the same process as JDeveloper, it will be running in JDK 1.4.1_03.
    -Matt Hawkins
    Oracle JDeveloper

  • Can Java execute batch file outside of current JVM in separate process tree

    Hi,
    Does anyone know how to run programs from Java as separate processes that will not die when the spawning java program exits (JVM exits).
    The problem I have with using Runtime.exec is it spawns only child processes under the current running JVM, thus when the origonal program that called Runtime.exec ends so does all child processes.
    Basically I want to start a DOS batch file from my Java application, my Java application will then immediately exit (calling System.exit(0) ). The batch program will continue to run, its does some file clean up, create's some new files and deletes the old jar (containing the main app), it then rebuilds the main app jar and and executes the main class and then exits itself.
    I've also tried the apache.tomcat.jni.Proc :-
    long pool = Pool.create( new Long(0).longValue() );
    long pa = Procattr.create( pool );
    Procattr.dirSet( pa, "c:\\temp\\updater\\");
    Procattr.cmdtypeSet( pa, Proc.APR_SHELLCM );
    Procattr.detachSet( pa, 1 );
    long proc = Proc.alloc( pool );
    Proc.create( proc, "test.bat", new String[]{"test.bat"}, null, pa, pool );
    System.exit(0);
    The detach option doesn't work, if I take it off then the bat file runs and stops the JVM exiting, if I leave it in the batch file never gets called.
    Is this possible in Java. Can java start master process on Windows XP JDK1.5+?
    Cheers
    Chris.

    Well I found the answer elsewhere (java.net) thought I'd post it here for future visitors who might be experience the same problem.
    Basically Runtime can do this however it must be done the following way :-
    The java:-
    public class Main {
        public static void main(String[] args) throws Exception {
            Process p=Runtime.getRuntime().exec("cmd /c c:\\test.bat");
            System.out.println("done");
            System.out.println("quitting");
            System.exit(0);
    }The batch:-
    @echo off
    PING 1.1.1.1 -n 1 -w 5000 >nul
    java -cp "c:\ " MainThe important line that makes the whole thing work is :-
    @echo offIf this line is missing then the whole things locks up (must be the io streams getting used)
    Also this code can not be run from an IDE (well at least not from Intellj) as it also locks up.
    It must be run from a command prompt or jar.
    Also note that any commands in the batch file must have there output redirected to "nul" otherwise Windows kills the cmd as soon as it trys to output to a dead stream (dead because the Java has exited). for example :-
    @echo off
    PING 1.1.1.1 -n 1 -w 10000 >nul
    cd %1
    del /F /Q *.* >nul
    move /Y new\*.* >nul
    RD /Q /S new >nul
    PING 1.1.1.1 -n 1 -w 1000 >nul
    java -cp "c:\ " Main
    exit

  • Launching new window in separate process for separate JVM

    This topic has been posted before, with no successful resolution, but
    I'm still holding out hope.
    I would like for a user to be able to launch multiple versions of the
    same applet that know nothing about one another. I know that popping a
    new window, by default, opens a window that shares the same process/JVM.
    Is there ANY WAY to open the new window as a separate process, thereby
    giving it its own JVM?
    Thanks

    Hi,
    We'd horrific problems with shared static variables and multiple instances of Applets. We kept getting "white screens" where we'd corrupt Swing and have to restart the browser.
    Basically, we had to rid our application of singletons and static variables ( as much as possible ).
    It involved a lot of rewriting, to make the applet more structured.
    Ie. pass applet references down to classes and methods explicitely.
    rather than lazy singletons which call MyApplet.getInstance().
    You might try loading each Applet in it's own classloader, within the same VM. I think you might be able separate Applet instances then.
    Very messy though... they may all delegate to the parent classloader.
    And if they don't, then each Applet's classloader would probably have to load a duplicate set of class.
    regards,
    Owen

  • Send email to the Form Submitter instead of the process creator

    Hi,
    Can any one please show me how to make a process to send an email notification to the Form Submitter instead of the Process Creator.
    Here is my brief desc on my process: Form Filler (can be anyone) send the filled form for a list of employees to the one who request (the 1st employee name on the list of the form) then this he/she then submit the form (form submitter) to process to route it to the manager. Whether the mgr is approved or denied then the process is completed by sending to his/her for status of that request. I was able to have it to send the email to the process creator (creator_id) but not the Form Sumitter. Can any one please help.
    Thanks,
    Han Dao

    Hi Han
    I guess I should have double checked the version with you first!
    If I remember correctly, in 8.2.1 there are a few more steps involved.
    On the Assign Task service...Form Data Mapping tab, is a field called "Completed user id".
    This is:
    The location to store the GUID (Global Unique Identifier) representing the user who completed the task. The data type is string.
    You need to create a string variable to hold that value.
    You select that in the "Completed user id" field.
    Because this is a GUID, you will then have to do a User Lookup (under Foundation) to find your user.
    (http://livedocs.adobe.com/livecycle/8.2/wb_help/wwhelp/wwhimpl/js/html/wwhelp.htm)
    You can then use those results in the To field of the SendWithDocument.
    Hope this helps.
    Diana

  • How Can I open Report within the same window instead of separate Window

    Hi All,
    I want to open report in my MDI form instead of opening it into a separate Oracle Report Navigator(i.e. Window which shows the report). How to do that? When I click the Report from Menu it should open it within the MDI Form. Any suggestion or reply would be greatly appreciated.
    One more question is how can i open report with in a maximized state. Actaully, the report will be opened in the normal state. How to open in maximized state instead of normal state. Is there any property in reports to acheive this?
    Thanks in Advance.
    Regards
    Gopinath Kona

    hello,
    reports is a separate application that is called from forms and therefore is running outside the context of the forms MDI window.
    you can use the commandline parameter MAXIMIZE=YES to start the runtime in full-screen-mode.
    regards,
    the oracle reports team --pw                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       

  • Locked threads, instead of hiding "reply" link change word to "Locked"

    Based on this thread: http://social.microsoft.com/Forums/en-US/cc444c7a-a838-4a16-ac57-8f315475b602/how-does-one-reply-to-a-post-i-see-no-reply-button?forum=reportabug
    It seems that for locked threads, people can scroll past the the "Lock" icon too quickly to realize, and then not understand why they can't reply.  I
    Instead of hiding the reply link, I suggest changing the "reply" text to "Locked" for locked threads, and have it not be a hyperlink.
    Thanks,
    Mike
    MSDN and TechNet Subscriptions Support

    Your AGP bus uses more bandwith than the PCI bus, thus making the OC more dependend from the AGP bus. And if your AGP slot will drain more CPU power and fragile as AGP can be, it will not tolerate errors due higher clock speeds. Mhz += Stability -. Notice: PCI is 33 Mhz/ AGP is 66/133 Mhz... . As you see there is less margin for errors. While you overclock the CPU will make tolerable errors: NP with PCI... But AGP... will take it to the MAX. [I hope this reply is No nonsense]

  • Weird Thread problem - Not getting processing time from system?

    I have an applet that displays an animation, and tasks are divided up into separate threads. After the main display is created, I create a thread that repaints the display every 10 milliseconds and one that does the actual animation. The odd thing is, even though it is in an infinite for loop, the message (see below) only comes up once (saying "Refresh 0"), and the applet doesn't refresh unless I minimize and maximize the window. Below is a modified code snippet:
    ...imports...
    public class AnimationApplet extends Applet
    AnimationApplet a;
    public void init(){
    a = this;
    createDisplay() //gets the container and adds a Jpanel with main animation, a button and a textfield.
    new AnimateThread().start()//calls animate() method which uses a timer to daw a series of lines
    new RefreshThread().start();}
    private class RefreshThread extends Thread{
    public void run()
    int count = 0;
    for(;;){
    JOptionPane.showMessageDialog(null, "Refresh " + count);
    tp.repaint() //refresh main panel
    a.validate()
    count++;
    sleep(10);}
    }If you need to see more code, I can provide it. Thanks in advance for the help!

    Nothing I'm trying is working. Someone please help!

  • Thread safety for synchronization process

    We are invoking multiple instance of our
    application and attempt to issue synchronization calls simultaneously in order
    to perform some load testing.
    Is the Oracle lite synchronization process thread safe? Does anyone have
    recommendation on how to perform concurrent synchronization from the same
    computer?
    We recieve following exception:
    System.AccessViolationException {"Attempted to read or write protected memory.
    This is often an indication that other memory is corrupt."}
    StackTrace
    at Oracle.DataAccess.Lite.OracleSync.netSynchronize(IntPtr hWnd, Int32 nMsg)
    at Oracle.DataAccess.Lite.OracleSync.Synchronize()
    at Point2.CCIPDA.Core.Data.Database.SynchronizeThread() in
    X:\CCIPDA_2_0\src\Core\Data\Database.cs:line 325
    at System.Threading.ThreadHelper.ThreadStart_Context(Object state)
    at System.Threading.ExecutionContext.Run(ExecutionContext executionContext,
    ContextCallback callback, Object state)
    at System.Threading.ThreadHelper.ThreadStart()

    Did you have a windows form or a web based application? Did you use LoadRunner to invoke multiple concurrent synchronization calls to move data from the lite database to the back-end database? Also, was LoadRunner executing against one instance of your application or multiple instances? Were application instances running on one machine or multiple machines? We are just trying to get a better understanding of your application/load test setup and see if it was structurally similar to ours.
    We basically have a windows form based application designed for a single user. This application allows user to synchronize data from Olite to back-end Oracle database after user has completed their data entry.
    We wanted to test the performance of our synchronization process. That is how many user can concurrently synchronize their data at the same time.
    Given that our application is a single user application, we decided to invoke multiple instances of application on a single machine and then simultaneously try to synchronize (via a tool) each instance of the application. Hence the error.
    Thanks for your feedback.

Maybe you are looking for

  • How can i get music from someone apple id to my apple id?

    my grandma bought me a song from her apple id but i have a different apple id how can i transfer the song to my iPhone/apple id?

  • HT5097 How to restore from time machine?

    I've backup my Macbook Air Using time machine before reformat it to have window partition. However, after installing OS Lion 10.7.4, how do I restore back all my application and data on my last backup from time machine? Thks

  • Replacement path witth text

    hi, Here this is balaji.I have a need to work on reporting and reporting with replacement path with text.Anybody please explain me in details wt it does actually , how to use it and how to create it. If u found and have any documents regarding the sa

  • Metadata Integrator failing to run

    Hi, I am unable to make Metadata Integrator connect with CMS and after copying some libraries (just for testing purposes) I found that though the connectiong is being made still while running the Metadata Integrator job its failing reporting the erro

  • General Info on PeopleSoft 9.0?

    I'm applying for a job that requires knowledge of PeopleSoft 9.0, however, I know NOTHING about that application and have NEVER used any PeopleSoft product. Any suggestions on where I can obtain a brief, non-technical overview of it, perhaps just sev