The Artima Developer Community
Sponsored Link

Java Answers Forum
To start multiple JVM's

6 replies on 1 page. Most recent reply: Nov 26, 2002 8:37 PM by Ankur

Welcome Guest
  Sign In

Go back to the topic listing  Back to Topic List Click to reply to this topic  Reply to this Topic Click to search messages in this forum  Search Forum Click for a threaded view of the topic  Threaded View   
Previous Topic   Next Topic
Flat View: This topic has 6 replies on 1 page
Ankur

Posts: 4
Nickname: akusag
Registered: Nov, 2002

To start multiple JVM's Posted: Nov 19, 2002 6:11 AM
Reply to this message Reply
Advertisement
I want to start multiple JVM's from with in a JAVA application. Can anyone help me here?


Matt Gerrans

Posts: 1153
Nickname: matt
Registered: Feb, 2002

Re: To start multiple JVM's Posted: Nov 19, 2002 10:05 AM
Reply to this message Reply
You can use Runtime.exec() to do this.

Ankur

Posts: 4
Nickname: akusag
Registered: Nov, 2002

Re: To start multiple JVM's Posted: Nov 20, 2002 10:16 PM
Reply to this message Reply
I understand this would start only a process with in this JVM and not another JVM?

Matt Gerrans

Posts: 1153
Nickname: matt
Registered: Feb, 2002

Re: To start multiple JVM's Posted: Nov 21, 2002 10:29 AM
Reply to this message Reply
It will start another projess and if that other process is, for example, "java SomeOtherProcess" then that other process will be running another instance of the JVM.

Ankur

Posts: 4
Nickname: akusag
Registered: Nov, 2002

Re: To start multiple JVM's Posted: Nov 25, 2002 7:01 AM
Reply to this message Reply
Hello,
In the JVM which I create using the Runtime.Exec method, I am not able to create a Connection to a database.
It throws a socket exception,
Failed Logon:com.jnetdirect.jsql.p: TCP/IP connection failed to host:java.net.SocketException: create (code=10106)

Any hints on this??

I am otherwise able to create a connection from the parent JVM i,e where I call Runtime.Exec.

Regards,
Ankur

Matt Gerrans

Posts: 1153
Nickname: matt
Registered: Feb, 2002

Re: To start multiple JVM's Posted: Nov 26, 2002 4:17 PM
Reply to this message Reply
Maybe the original is still connected?

Ankur

Posts: 4
Nickname: akusag
Registered: Nov, 2002

Re: To start multiple JVM's Posted: Nov 26, 2002 8:37 PM
Reply to this message Reply
But how does that matter??
I guess its not that only one client can connect at a particular port at on epoint in time !!
If that is the case then not more than one user would be able to connect to a database, but that does not happen.

I guess there is some other missing link here.

Flat View: This topic has 6 replies on 1 page
Topic: Controlling a Date Previous Topic   Next Topic Topic: Multiple event handler and how to select

Sponsored Links



Google
  Web Artima.com   

Copyright © 1996-2019 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use