I have been told to make an EJB and plain Java program (client), and try to run both these in two different JVMs, and get them executed. What is meant by “two different JVMs”?
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Your requirement :
Run in different JVMs – it is as simple as it can get.
Normally EJBs are hosted in an Application server ( Such as Weblogic,Websphere, Jboss,Glassfish, etc etc) – when you deploy your EJB to one such server and start that server – server process is a “JVM”- meaning your server process that hosts your EJB is running in a JVM.
Now, you have written and compiled your Client application. For laughs, let us call it
MyBigClient.javawhen you run
java MyBigClienton command line or run it through the “Run” button of your favorite IDE, it is executed by a JVM – that is your second JVM instanceVoila – you have EJB and Client running in two different JVMs
Now if you use a different “java.exe”(Say, C:\JDK1.6\bin\java.exe) to run the client than the java.exe (Say, C:\JDK1.5\bin\java.exe) used by your application server, you are using “two different JVMs”
It is all how you want to define “two different” – I do not think there is any hard and fast rule around this.