2012 in review

The WordPress.com stats helper monkeys prepared a 2012 annual report for this blog.

Here’s an excerpt:

600 people reached the top of Mt. Everest in 2012. This blog got about 9,200 views in 2012. If every person who reached the top of Mt. Everest viewed this blog, it would have taken 15 years to get that many views.

Click here to see the complete report.

| Leave a comment

Concurrent HashMap vs synchronized HashMap..

In synchronized HashMap:
1) While reading, complete map is locked. Thus, if N threads are reading from it, at any given time, only one thread would be actually reading.
2) While writing, complete map is locked. Thus, if N threads are writing even to different keys, at any given time, only one write operation is performed.

In ConcurrentHashMap:
1) While reading, map is not locked. Thus, if N threads are reading from it, all of them can simultaneously read from map.
2) While writing, only the record (key) under consideration is locked. Thus, if N threads are writing values of different keys, all those operations can happen simultaneously. However, if 4 threads are writing to same key, those operations are thread-safe.

ConcurrentHashMap is recommended for large Maps or large number of read-write operations because of its good scalability.

| Tagged , , , | Leave a comment

2011 in review

A 2011 annual report for this blog.

Here’s an excerpt:

A New York City subway train holds 1,200 people. This blog was viewed about 3,700 times in 2011. If it were a NYC subway train, it would take about 3 trips to carry that many people.

Click here to see the complete report.

| Leave a comment

Adding JSF Capabilities(Richfaces 4) to Eclipse Web project:

First Install JBoss Tools plugin for Eclipse Helios below are the steps:
Prerequisite: Install the most recent JBoss AS tools.
• Go to Help > Install New Software.
• Set Work with to http://download.jboss.org/jbosstools/updates/stable/helios/
• In the results, select Web and Java EE development.
• Next, etc, Finish.

Eclipse Jboss PlugIn

Eclipse JBoss Tools plugIn for Richfaces

This will get you the JBoss-provided server plugins, including the one supporting 6.0, along with several easing JSF development plugins, such as EL autocompletion.
You only need to ensure that you’re using Eclipse Helios SR1 (at least, the most recent WTP version). The initial Helios version had some vague problems with JBoss AS Tools.

Next Step:
1. Create a new “Dynamic project”
2. After creating the project, right click on the project select “configure” > “Add JSF Capabilities” as shown in the below screen shot.

Select Configure > JSF Capabilities

Click “Next” in the below screen:

Add JSF Capabilities Dialog

Add JSF Capabilities Dialog

In the below screen If there is an error then unselect “target server is already selected”.
And click Finish. This should successfully Add JSF (Richfaces 4 Capabilities to your project).

Add JSF Capabilities2 Dialog

Add JSF Capabilities2 Dialog

Posted in JSF, Technology | Tagged , , , | 2 Comments