Saturday, October 31, 2009

What about my PhD?

My PhD is something that was not planned but it is happening. The full story about how I got into it is too long and too complicated, but to summarise, it was a consequence of some good results I got at work, which gave a good confidence to my adviser to put me in. I couldn't say "no" because the opportunity to do a PhD in a prestigious university like UCL was really good.

For a guy who had a long experience in the corporate world, the decision to do a PhD was really tough. I don't have the practice and the personality of a researcher, but as an entrepreneur, I like to take risks and face challenges and a PhD is definitively a challenge. Surprisingly, it is working well. I didn't expect that because the way the research environment works is pretty different and I had to get used to it.

A week ago I did my PhD confirmation, which is a kind of acceptance of the work performed so far. I had to present my research to an internal committee composed of local full professors. Besides the feeling of uncertainty, everything went well and they approved my research. In some sense, I was expecting such approval, but I didn't expected that it would come without any serious remarks. I'm almost sure that it was a consequence of the publications I've been doing. Since other scientific committees had a look on the work before, then nothing very disparate would come out from the confirmation committee at that moment.

Of course, a positive feedback is a great motivation to continue my research, but nothing is compared to a bunch of opportunities brought by the PhD student status. Some of these opportunities were actually a dream for many computer science students (mainly those who don't live in the US, of course). Last summer, I presented my research in a PhD Consortium hosted by the Carnegie Mellon University (CMU). Definitively a dream for me because the Java programming language was created and evolved by people who graduated in that university. The prestigious Software Engineering Institute (SEI) is located there and it was responsible for one of the biggest revolution on the software engineering field with the creation of the CMMI (Capability Maturity Model Integration), a process improvement approach used by several companies worldwide to prove they are ready to perform complex software projects under restricted constraints of cost, resources and time. Not least, the CMU School of Computer Science was also the lab of Randy Pausch, a computer graphics researcher who passed away because of a pancreatic cancer, but before that, he left a vast contribution on his field and also created a project called Alice to teach programming to children. His testimony is published on the book The Last Lecture (a must read).



Fortunately, CMU was not the last big dream to come true during my PhD. Tomorrow, I'm going to Boston to present my work in a conference at MIT (Massachusetts Institute of Technology). Wow! Yeah! Difficult to believe, but it is real. I can't wait to blog about this experience here. ;-)

Tuesday, October 6, 2009

Preparing Glassfish V2 for JSF 2.0

I'm planning to migrate the web client of a JEE application from Apache Struts to JSF in order to reduce the complexity of the implementation and the number of required libraries. These libraries make the distribution package (ear) a giant file of 10MB, too much for a web application. :P However, since I don't like JSF version 1.2 because of several design issues, I decided to wait a bit more for a stable release of JSF 2.0. I think I'm waiting too much :(. The first time I saw a presentation about JSF 2.0 was in December 2008, during the last edition of JavaPolis (now Devoxx), and since that time I haven't seen any application server in its production release already available for this last JSF version.

Then I decided to make a little search on Google and I could find that JSF 2.0 RC can be configured to run on Glassfish V2/.1 without any complex step. Following the instructions of this page, I performed the following steps:
  1. download the Mojarra 2.0.0 RC binary bundle from this webpage;
  2. backup your existing jsf-impl.jar found in GF_HOME/lib;
  3. copy the new jsf-api.jar and jsf-impl.jar to GF_HOME/lib;
  4. edit your GF_HOME/domains/[domain-name]/config/domain.xml and add (or update the existing classpath-prefix) 'classpath-prefix="${com.sun.aas.installRoot}/lib/jsf-api.jar" to the tag;
  5. restart your server.
On your domain configuration file, domain.xml, set the classpath-prefix parameter as the example below:

<java-config
classpath-prefix="${com.sun.aas.installRoot}/lib/jsf-api.jar"
classpath-suffix="" ... >
...
...
</java-config>

Probably, you won't find the classpath-prefix parameter there, so there is no problem if you add it. ;) To check whether it is running correctly, open the Glassfish Admin Console (http://localhost:4848/), which is a JSF application, and see if it is running normally. The following line will be printed on the application server log file (server.log) when starting the JSF application:

Initializing Mojarra 2.0.0 (RC b16) for context ''

That's all! I'm not sure if it is enough. I'm going to start the migration in the next days. If I find issues during the process, I will come here to report them in details. I just hope that, when I finish this implementation, the market will finally offer an application server supporting JSF 2.0 by default.