Miles to go …

November 2, 2010

TOTD #149: How to clean IntelliJ cache, preferences, etc on Mac OS X ?

Filed under: Uncategorized — arungupta @ 2:51 am

I’ve installed, un-installed, re-installed, re-un-installed, re-re-installed and so on IntelliJ IDEA multiple times on my MacBook. However the uninstall leaves a few remnants in different directories all over the system. These directories need to be manually removed in order for a clean install next time. This TOTD (Tip Of The Day) provide the list of directories which need to be removed explicitly:

~/Library/Caches/IntelliJIdea90
~/Library/Logs/IntelliJIdea90
~/Library/Preferences/IntelliJIdea90
~//Library/Application Support/IntelliJIdea90

And IntelliJ IDEA is installed in the directory "/Application/IntelliJIdea90" which gets deleted if the application is deleted. And you’ll need to get rid of this directory if the mystical plugin configuration is not configured right the first time.

Also read IDEA-43039 for more details on invalidating caches. Read more on stackoverflow.com on how to clear out global settings.

That’s it, just a short one this time!

Is there a better way to deal with this mess ?

Technorati: totd intellij idea cache osxtips

Share and Enjoy:
  • Print
  • Digg
  • Sphinn
  • del.icio.us
  • Facebook
  • Google Bookmarks
  • DZone
  • StumbleUpon
  • Technorati
  • Twitter
  • Slashdot

June 21, 2010

QA#1 – Java EE 6: Standards compliance, Vendor independence, Light-weight deployment – by Adam Bien

Filed under: Uncategorized — arungupta @ 11:43 am

The Java EE 6 platform was released over 6 months ago – Dec 10, 2009 to be specific. This blog has published multiple blog entries highlighting the agility, light-weight, ease-of-development, extensibility, and other aspects of the platform. This blog entry starts a new series sharing feedback gathered from the key Java EE 6 community members in form of Q&A. You can learn about how Java EE 6 is currently being used in production, development and deployment environments used within the community, and even feature requests for Java EE 7.

The first one comes from consultant and author Adam Bien (blog.adam-bien.com) who is an Expert Group member for the Java EE 6, EJB 3.1, and JPA 2.0 JSRs. He has worked with Java technology since JDK 1.0 and Servlets/EJB 1.0 in several large-scale projects and is now an architect and developer in Java SE/EE/FX projects. He has edited several books about Java (FX) and J2EE / Java EE and is the author of Real World J2EE Patterns (http://press.adam-bien.com). Adam is a Java Champion and JavaOne 2009 Rock Star.

Here is a short summary of Java EE 6 from him:

Standards compliance, vendor independence, milliseconds and kilobyte deployment

Read on for other fun stuff …

1. How are you using Java EE 6 today ? What limits your adoption ?

For server-side development Java EE 6 is the simplest thing you can get today. Because I’m lazy – Java EE 6 is the obvious choice. You can get everything you need with a single download. It works really well. Recently I let 20 students in a workshop install IDE, application server + database …in 15 minutes. After that we started hacking. The machines were really heterogenous (Windows, Mac, Linux)- and it worked.

I’m using Java SE and EE since their inception. I didn’t used EJB 1.0 (it was before J2EE), but started with 1.1. In several projects I had to use J2EE but omitted successfully the XML-hell with XDoclet.

This was fixed with Java EE 5 – since then (>4years) there are no more workarounds necessary and you can fully concentrate on the business logic. Java EE 6 became even better.

The adoption of Java EE is far better, than expected (by me). It turns out, that in economic slow down management is really interested in standards again. This is the only explanation I have. Java EE 6 seems to take off. I had to limit the number of registrations in last workshops to 20 and repeat a workshop at a JAX-conference (one of the biggest European conferences). The organizer ask me, whether I would like to repeat a workshop, because they were already 75 registrations. The workshop was repeated – …with about 160-180 attendees.

J2EE was said to be too complex for simple applications. The opposite is true in Java EE 6. It turns out to be any leaner, simpler and more maintainable comparing it with the alternatives. All attempts of wheel re-invention I saw so far resulted in far more complex and harder to understand code.

2. What Java EE 6 technologies are you using and why ?

I’m really enjoying the single-classloader model of WAR-deployment. In all new Java EE 6 projects we got rid off “modular” EARs and EJB-JARs and deployed everything into a WAR. It doesn’t seem to be hype-compatible, but it works very well. Especially if you don’t have any additional versioning or modularization requirements. The lack of dynamic reloading and module-hot-replacement in product is given for the majority of all enterprise projects. In real world the deployment units become even coarser.

I start the implementation of the business logic with EJB 3.1 and JPA 2.0. In case remoting is necessary – I use REST (JAR-RS) with JSON for the vast majority of all cases. CDI (JSR-299 + JSR-330) is even more powerful, but I don’t use the extended dependency injection capabilities (produces, alternatives, custom annotations, stereotypes, events) from the beginning, rather than applying them selectively to solve particular problems. CDI allows you to realize a factory, observer or strategy patterns without any overhead. In fact a plain Java SE solution would be even more bloated.

For the web part – I start with JSF 2.0. Also the adoption of JSF 2.0 is unique. There are many books, tutorials, frameworks and libraries available already. I attended a JSF conference this year with several hundred attendees.

Frameworks like Wicket or GWT are very interesting. I always start, however, with the evaluation of JSF 2. Is is already available on every Java EE 6 server – so why don’t use it. 

I would choose the alternative web frameworks, in case there is an evidence that the solution would be leaner, cheaper or easier to maintain. In the majority of all recent cases – JSF 2.0 was just good enough. Before JSF 2.0 I often used Wicket.

3. What is your development and deployment environment ?

I’m using mainly NetBeans 6.9 “Java Edition” with Glassfish v3 and Java DB / Derby (in early iterations). After the setup and stabilization phase I always use the production databases. These are mainly Oracle, sometimes DB 2 or MySQL.

In smaller teams I prefer the NetBeans build-system (Ant). In bigger teams and projects Maven. NetBeans supports both flavors really well, but Ant incremental deployment is orders of magnitudes faster than maven. You can redeploy an EJB/CDI or JPA entity with Ant in millisecods, with Maven it will take seconds. This is a huge productivity gain.

I also have an IntelliJ 9.0.2 Ultimate license and use this IDE as well. It excels NetBeans in some areas like e.g. JPA QL autocompletion. These features, however, are part of the commercial distribution and so hard to introduce into teams. In most cases I fallback to NetBeans.

4. What previous versions of Java EE / J2EE have you used ? How has the migration to Java EE 6 benefited ?

I used J2EE since 1999. The migrations were never fun. Except the migrations from J2EE into Java EE 5. Because Java EE 5/6 have still to support the old J2EE components, you can deploy your old application into a new server and start to delete code. The benefits are obvious: you can delete > 60% of the code without any impact on the functionality. With the code you can also get rid off strange patterns, extensive layering and other strange “legacy” practices. This leads to reduction of the maintenance costs.

5. Describe the benefits of Java EE 6 to you in 120 characters.

Standards compliance, vendor independence, milliseconds and kilobyte deployment.

6. Advice for anybody who is looking at Java EE 6 for their next project ?

Reduce to the max. Concentrate on the business logic and not the technology. Write plain Java SE domain objects first (Unit-Tests of course before that :-) ), introduce EJB 3.1 / CDI facades later. Don’t even try to use everything what is offered by Java EE 6. But before you start to implement you own solution, look at Java SE 6 first, then Java EE 6. You will be surprised how much functionality is already there.

7. What new features you’d like to see in Java EE 7 ?

Further simplification and unification of the APIs would be great. The synergies of JSF 2, EJB and CDI could be a lot more leveraged. A more natural use of java.util.concurrent in Java EE would be also interesting (e.g. injection of Executors). For all of my cases @Asynchronous worked perfectly, but Executors seem somehow to fascinate developers :-)

JPA 2.0 could be also extended with some useful features like support of resource injection (EntityManager is the most important) into JPA-entities. Its a controversial topic – but really important for projects. Also better support for stateful environments would be nice.

I would also expect a standardized JAX-RS client. Something like jersey, but with javax.ws.rs. prefix :-)

I’m really surprised, that actually no-one really complains over the really old JMS programming model (1997). This spec could be drastically simplified. A plain injection of a simplified queue or topic would be sufficient for > 80% of all cases.

Are you using, consulting, training, authoring books, etc in Java EE 6 ? Drop a comment on this blog and I’ll line you up for the Q&A session :-)

The Java EE 6 hub is your key resource to learn all about the technology.

And you can always try all Java EE 6 features in GlassFish.

Technorati: javaee6 community feedback adambien glassfish v3

Share and Enjoy:
  • Print
  • Digg
  • Sphinn
  • del.icio.us
  • Facebook
  • Google Bookmarks
  • DZone
  • StumbleUpon
  • Technorati
  • Twitter
  • Slashdot

March 19, 2010

Spark IT 2010 Trip Report

Filed under: Uncategorized — arungupta @ 10:50 am
Spark IT 2010 – the inaugural conference by CIOL and PCQuest (@pcquest) wrapped up earlier today.

With 1000+ attendees, 3 session tracks, and 1 hands-on lab running simultaneously, there was a lot for the attendees to consume.

Watch a brief video chat with Anil Chopra, Editor PCQuest on why/where/how of the conference:

Here are the three originally planned sessions (+ slides) I delivered over the past couple of days:

Java EE 6 & GlassFish v3: Paving the path for the future – Spark IT 2010

Improving Engineering Processes using Hudson – Spark IT 2010

Getting Started with Rails on GlassFish (Hands-on Lab) – Spark IT 2010

The fourth session was a slide-free session and showed Java EE 6 tooling using NetBeans (TOTD #122, screencast #29, TOTD #95, TOTD #94, TOTD #93) and Eclipse (TOTD #102 and TOTD #99). Future sessions will include IntellIJ as well as the support over there is still primitive and I need to spend more time trying to understand it ;-)  

One of the Day 2 keynote session speaker could not deliver the session and so I was called to talk about something that might be of interest to the broader set of attendees. After much thinking I delivered a presentation talking about the evolution of the Java platform and how it provides a rich and robust platform for creating next generation services. The session also included details on some features in the upcoming JDK 7 which was well appreciated. Anyway, the slides are available here:

Powering the Next Generation Services with Java Platform – Spark IT 2010

The Hudson session was also covered here and Day 2 keynote session got coverage here.

There were tons of interesting discussions with @tshanky, @venkat_s, @iamprabhu, @rbhardwaj1, @binodmaliel, @akkirajub, @simon, Dr B V Kumar, and several other speakers.

Many thanks to Cyber Media and all the volunteers who did a meticulous job in coordinating the conference!

Now a little bit about my personal stay at the hotel.

Selva Kumaran is the current Mr Bengaluru and was amongst top-10 in Mr India Body Building Championship last year. He provides free personal training sessions to the guests staying at Goldfinch Hotel. And I certainly availed couple of sessions there and totally enjoyed them. He is one of the reasons I’ll probably go back and stay at that hotel :-)

Another reason to go back to this hotel is Kabab Studio restaurant on their terrace. An open air dining, live ghazal singing, and well marinated barbecue together adds to the overall ambience. 

Here are some pictures from the conference:

And the complete evolving album at:

So for now, 1 conference, 4 planned + 1 unplanned sessions, and 1 hotel are covered. Many thanks to Cyber Media for inviting and hosting us. I certainly look forward to participating in SparkIT 2011.

There are 2 more conferences, 5 planned sessions, 2 hotels, and 1 more city still remaining.

The first Ruby Conf India starts tomorrow … yaay! And of course you’ll hear about how GlassFish seamlessly supports multiple Ruby frameworks on Mar 21 (Sunday) at 11am in Track1.

Technorati: conf bengaluru india glassfish netbeans eclipse javaee jruby rubyonrails sparkit

Share and Enjoy:
  • Print
  • Digg
  • Sphinn
  • del.icio.us
  • Facebook
  • Google Bookmarks
  • DZone
  • StumbleUpon
  • Technorati
  • Twitter
  • Slashdot

February 2, 2010

Screencast #29: Web service using NetBeans 6.8 and GlassFish v3 (Accessing database in business method)

Filed under: Uncategorized — arungupta @ 10:06 am

GlassFish v3 comes bundled with Metro – a secure, reliable, transactional, and .NET interoperable Web services stack. Metro is compliant with JAX-WS and provides additional quality of service attributes that can be easily enabled using NetBeans IDE.

This blog contains a screencast that shows how to create a simple Web service using NetBeans 6.8, implement the business logic by accessing a database table using Java Persistence API, and deploy on GlassFish v3.

Please post your questions to .

Several other screencasts on GlassFish v3and related topics are available here.

Technorati: netbeans jax-ws metro webservice glassfish jpa database

Share and Enjoy:
  • Print
  • Digg
  • Sphinn
  • del.icio.us
  • Facebook
  • Google Bookmarks
  • DZone
  • StumbleUpon
  • Technorati
  • Twitter
  • Slashdot

August 28, 2009

svn.dev.java.net is down!

Filed under: Uncategorized — arungupta @ 5:28 pm

svn.dev.java.net is down … what’s new!

Here is how it looks like …

Do "+1" every time and any time in the comments you see java.net is not behaving for you and let’s see how quickly the comments fill up!

UPDATE: Expanding this post to include failures in any java.net domain.

Technorati: java.net

Share and Enjoy:
  • Print
  • Digg
  • Sphinn
  • del.icio.us
  • Facebook
  • Google Bookmarks
  • DZone
  • StumbleUpon
  • Technorati
  • Twitter
  • Slashdot

The views expressed on this blog are my own and do not necessarily reflect the views of Oracle.
Powered by WordPress