Skip to main content

Relative Ways

Posted by editor on March 6, 2009 at 8:05 AM PST


Many applets, one VM?

With the new plug-in letting some developers take a second look at applets, Gabriele Carcassi has an interesting idea: why don't we have a way to let multiple applets collaborate? In Java plug-in wish list: JVM scope, he writes:

One thing in particular, though, I think is needed: JVM applet scope. That is: the ability to run a set of applets in the same JVM, controlling which ones go together. The two real cases that I would need are "page" (all applets in the page scope on the same page instance share the same JVM) and "application" (all applets in different pages that declare to be in the same application share the same JVM).

The first is really to have different applets that can interact with each other, and it would actually go together with the ability to drag applets out. You can imagine two applets, one that is essentially a display of some data, and the other with the parameters for the display. You set your display the way you want, and when you are done you drag the display out and close the page.

The second would be used to share data cache. I have multiple pages that work on the same big dataset, and I would like different pages to simply use the same cache.

The idea of a "page" scope that lets a VM live on from page to page offers a lot of potential for holding on to session data and client state on the client side without using cookies. It does make me wonder if the original idea was that any application that would need paging would just do that within one applet, and as things have turned out, people still want to use browser navigation (which, let's face it, is a challenge for webapps too).

So what do you think? Is it a useful idea, or are there problems that Gabriele hasn't identified yet?


Also in today's Weblogs, John O'Conner looks at Discovering ResourceBundles at runtime. "Have you ever wanted your application to discover new resource bundle localizations at startup time? You can do that, and here's how."

Arun Gupta continues his tips series in
TOTD # 71: JRuby and GlassFish Integration Test #2: JRuby 1.2.0 RC1 + Rails 2.2.x + GlassFish v3 Prelude. "TOTD #70 shows the first integration integration tests that I typically run to ensure that the latest JRuby and GlassFish versions work nicely with each other. The second test (explained in this blog) ensures that the same application can be deployed using GlassFish v3 Prelude."


In Java Today, the SigTest open source project (based on Sun's SigTest tools product), a collection of tools for comparing APIs and measuring the test coverage of an API, has just released SigTest 2.1 Milestone Release. "With SigTest 2.1, we are expanding the SigTest project to include other tools based on the same signature testing technology as the SigTest tool itself. SigTest now includes API Coverage tool functionality, a static analysis tool used to analyze code coverage of a program or API. SigTest 2.1 also includes a new analysis mode for migration compatibility."

In a new blog, Ryan Lubke writes that changes in JSF 2.0 will eliminate the need for faces-config.xml for many developers. "Using [the annotations] ManagedBean, FacesConverter, FacesValidator, and FacesRenderer allows the developer to skip editing the face-config.xml. The other common complaint with the faces-config.xml has been with navigation rules. To ease the pain there, we've added implict navigation."

Running JRuby on the JVM is an increasingly popular option, and in a new SDN article, Rick Palkovic walks you through Writing Your First Ruby-on-Rails Web Application. "Writing a Ruby-on-Rails web application is easy using the NetBeans IDE with its integrated JRuby interpreter and its support for the GlassFish application server and the MySQL relational database management system (RDBMS). This article shows you how to create a simple Ruby-on-Rails program in the OpenSolaris operating environment without typing a single line of code."


The latest java.net Poll asks "What Java EE 6 feature most interests you?" Cast your vote on the front page, then visit the results page for current tallies and discussion.


In today's Forums, acuster relates some Issues understanding applying WSIT to an exisitng web service. "We are trying to understand how to apply WSIT to a series of web services which we have up and running. Unfortunately the Metro Guide, while covering a lot of ground, does not really answer our questions directly so I am having to read between the lines. I have gone about as far as I can without getting some further pointers."

Shreedhar Ganapathy explains how a load balancer coordinates a cluster in the followup
Re: Glassfish in-memory cluster not working. "When instances are across machines, you need to front it with a load balancer to not only balance/distribute load but also provide consistent session identification from the LB to the browser For your immediate experimentation, you can stop the cluster, create an additional instance on your mac or pc, restart node agent and cluster, and use the browser to move from one instance on one machine to another instance on the same machine after creating a session. In this case, you can see session information without LB."

Finally, p04279200 asks about
Implementing unsupported fonts in swing components.
"Please correct me if I have misunderstood or am down right wrong about any of the following. I haven't had a chance to go in depth into the font rendering code. It recently came to my attention that components such as labels, buttons, textfields etc can only support truetype, opentype and type 1. As the project I am working on currently has custom rendering of these and other font types I would like to have standard components displaying some other font types using our existing code."


Current and upcoming Java
Events
:

Registered users can submit event listings for the href="http://www.java.net/events">java.net Events Page using our href="http://today.java.net/cs/user/create/e">events submission form.
All submissions go through an editorial review before being posted to the
site.


Archives and Subscriptions: This blog is delivered weekdays as
the Java
Today RSS feed
. Also, once this page is no longer featured as the
front page of java.net it will be
archived along with other past issues in the href="http://today.java.net/today/archive/">java.net Archive.

Many applets, one VM?