Several APIs demand that the user is implementing the .hashCode() method. The reason is that these APIs are using hash based containers (like HashMap) to have a fast means of managing lots of objects (always comparing objects using .equals() would need endless time). There are lots of standard implementations on the web, so the question is, what performance impact the implemenation of .hashCode...
on Jan 3, 2010
Java VM embodies
(not in production, in a hacking mode :),
This post shows how to write a non-blocking server with continuations.
Why using continuation with non blocking IO
There are two models when you deals with IO:
the thread model: read and write calls block until they at least read one caracter or write the whole buffer,
so one use thread to be able to...
on Nov 22, 2009
After configuring Hudson to run in a Glassfish with security manager enabled I started to have problems in other applications, specially web applications using reflection to access private fields in Java classes. Over the web I noticed a lot of people struggling with the same issue (Seam, GWT, Vaadin, etc). The problem is caused because most of the modern frameworks tries to access Java...
on Jan 2, 2010
Due to recent problems on java.net blogging platform you can find the article here:
on Dec 19, 2009
As I happily wrote about new features of JSF 2.0, my coauthor David Geary kept asking me how to run the examples in Tomcat 6. I kept putting it off—hunting down all those JAR files and web.xml fragments is just too much like eating soup with a fork. I finally got around to doing the research and thought that others might benefit from the (unhappy) results, if only to realize that this may...
on Dec 29, 2009
Hope you have read my last blog on using SailFin CAFE with web applications. Mohit has added an entry on how to enable Communication capabilities in JSPs. The approach is exactly same except that the CommunicationSession object is available as a session attribute.
Take a look!
on Nov 8, 2009
Overload protection feature has been part of earlier releases of SailFin, lets start by describing the what can be improved in the current implementation.
The algorithm (in the earlier releases) for detecting an overload was based on the fact that if a certain number of continuous samples remain above the configured threshold then the system is overloaded. This was a simple and...
on Oct 28, 2009
In November, Servlet 3.0
Specification Lead Rajiv Mordani, and I started providing technical
advice to the team at Sun developing the successor to the Sun
Certified Web Component (SCWD) certification exam. This new exam
covers Java EE 6, including JSF 2. All this week, the work will
continue in the form of an offsite workshop at the
To help ensure the highest quality exam possible (and...
on Dec 18, 2009
Over the past decade, OpenSource became a big hype. At the peak of the hype, big stakeholders like IBM, Oracle and Sun (and even Microsoft and SAP) turned a lot of their previously proprietary code into OpenSource. While they tell us that they do it because they are so noble and like to exploit the community's knowledge, typically the open sourced software is only for free in part or is still...
on Dec 10, 2009
I authored a new refcard covering GlassFish v3, This refcard is different from my previous one which covers GlassFish v2. This new refcard discuss the following items:
Introduction to GlassFish application server v3.
GlassFish v3 versions, installation and directory structure.
Glassfish v3 daily administration tasks.
Glassfish v3 Restful interface for monitoring and administration.
on Nov 22, 2009
The long awaited and the most looked upon version of GlassFish released today. GlassFish v3 fully implements Java EE 6 specification which means EJB 3.1, Servlet 3, JAX-RS, JPA 2, Contexts and Dependency Injection for Java EE, Bean validation, Java EE profiles and so on.
GlassFish is not only the most up to date application server but it also benefits from a very good architecture. GlassFish...
on Dec 17, 2009
NetBeans 6.8 released coordinated with GlassFish v3 today. NetBeans 6.8 can be considered a fine step ahead of NetBeans because Sun is officially supporting the NetBeans RCP platform as a product from now on.
NetBeans 6.8 features are as follow:
Java Enterprise Edition 6 support
Web Projects with JavaServer Faces 2.0 (Facelets)
JavaFX 1.2.1 support
Kenai.com: Connected Developer
on Dec 17, 2009
This is a very basic review of active and available open source Java EE Application servers and Servlet container (Web containers) to let the community know which active containers are available and what is the general status of each container. The article can simply act as a start point for anyone need to select one of them for later use in development or product. Detailed comparison of these...
on Nov 17, 2009
This blog has moved here
var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
var pageTracker = _gat._getTracker("UA-3111670-3");
on Dec 15, 2009
One of the many cool new features in Java EE 6, is support for the DataSourceDefinition annotation.
The DataSourceDefinition annotation provides a way to define a DataSource and register it with JNDI. The annotation provided annotation elements for the commonly used DataSource properties. Additional standard and vendor specific properties may also be specified.
So let us look at an example:
on Dec 10, 2009
While speaking at the Globalcode Developer's
conference in Rio de Janeiro, I met a dynamic and intelligent
student by the name of Thiago
Diogo. Thiaogo presented his group's work on student project to
provide a real, mission critical distributed application for his
university, Universidade Federal
Fulminense. They chose JSF 1.2 and Seam as a part of their stack.
One idea Thiaogo shared with me...
on Nov 23, 2009
CommunicationBean defined in SailFin CAFE act as the listener for any communication events. For example, in case of instant messaging between
two SIP clients, a CommunicationBean would intercept all the messages. These messages are available to the CommunicationBean implementation
as POJO. That also mean that, you can implement the business logic in the CommunicationBean.
on Nov 27, 2009
In a recent blog, commenters took me to task for a perceived IE 6 memory leak. It wasn't actually there (they were wrong), but in attempting to prove myself right, I found a couple of memory leaks under IE in JSF's Ajax support. Since I just spent a week learning how all this functioned, I thought I'd set it down so that others could learn from my efforts.
Now, none of the information that I'...
on Nov 13, 2009
So far I have described how create server applications that handle call, conference and IM using SailFin CAFE. In this edition lets take a look at how to add communication capabilities to web applications in a (very) simple way.
I like to start with the code. So, here is some code that implements making a phone call between two parties from the web application.
package my.test;import javax....
on Nov 4, 2009
This blog entry describes how WebSphere eXtreme Scale uses memory. This allows customers to better size how much memory they need when storing a large number of key value pairs in a grid.
The text is in my personal blog at this link.
on Oct 28, 2009