Via, an article on discusses Project Barcelona, Sun’s research effort to implement a Multi-Tasking Virtual Machine (MVM). If successful, Barcelona will enable multiple desktop programs or Web applications written in Java to share the same Virtual Machine (VM). To each program, it will seem like it has the VM all to itself.

Up to and including Java 2 Standard Editon (J2SE) version 1.4, each Java program launched would load a new copy of the Java runtime environment (the VM) and the core Java classes into memory. J2SE 5.0 improved this situation somewhat by sharing a single copy of the core Java classes between all loaded VMs, but the resources used by those separate VMs still add up.

Many developers hope to see Mustang (the code name for Java 6.0, currently under development) take this the rest of the way and share a single VM between all active Java applications, though it may be more realistic to expect this in Java 7.0. To make this happen without breaking a lot of existing Java apps, Sun will need to share the VM without letting the apps step on each other’s toes. That’s what Barcelona is all about.

Here’s what the article has to say about the benefit of a Multi-Tasking Virtual Machine to Java Web development with J2EE:

The Java 2 Platform, Enterprise Edition (J2EE) is similar to an operating system in that a J2EE server can host multiple applications. In practice, this is rarely done due to limitations on scalability, weak inter-application isolation, and inadequate resource management facilities in the underlying Java platform. This leads to a proliferation of server instances, each typically hosting a single application, with a consequent dramatic increase in the total memory footprint and more complex system administration. The MVM supported multiple instances of the J2EE 1.3.1 Reference Implementation through an efficient implementation of isolates, thus, substantially increasing scalability, reducing memory footprint, and server startup time when compared with the Java HotSpot Virtual Machine. This was achieved without changing server code and with no loss of performance.

Kevin began developing for the Web in 1995 and is a highly respected technical author. Kev is a world-renowned author, speaker and JavaScript expert. He has a passion for making web technology easy to understand by anyone. Yes, even you!

  • Dr Livingston

    So basically then Barcelona is a stop gap between now (Java 5) and Java 7 I suppose… Once we have Java 7 then no need for Barcelona yes?

    But then what about those applications that depend on Barcelona in the future? :eek2:

    Crazy… :(

Special Offer
Free course!

Git into it! Bonus course Introduction to Git is yours when you take up a free 14 day SitePoint Premium trial.