Friday, November 20, 2009

HOW-TO: OEPE - FastSwap with Maven2 and M2Eclipse Plugin

At the moment there is not enough information if you want to jump start with OEPE (and of course using FastSwap) and Maven2 (using M2Eclipse plugin). This HOW-TO shows you how to achieve this. You need to have Eclipse (3.4 or 3.5), WLS (10.3 or 11) OEPE, Maven2 and M2Eclipse installed correctly before you can follow the steps below:

1. Create a web application with the webapp wizard (dynamic web project). Choose a webapp based on WLS (10.3 in my case). Please change following settings afterwards to be Maven complianced:
  • Source for web: src/main/webapp
  • Source for Java: src/main/java
2. Turn on Maven project on the project above ("mavenized the project") with M2Eclipse.

3. After you mavenized the project you can delete the directory build/classes since Maven uses target/classes directory. Everything should be customized to Maven directory structure automatically.

4. You can add
  • src/test/java - if you need it
  • src/test/resources - and also
  • src/main/resources
And don't forget to give a correct output direcory for each source directory (target/classes or target/test-classes). After that you will have following directory structure in your project:

5. Now you should be able to run maven "package" within your M2Eclipse plugin correctly. And also you should be able to deploy the web app in WLS just by doing "run on server".

6. You can skip this step because you are using OEPE which turned on FastSwap automatically. To make it sure that FastSwap works correctly, you can turn on FastSwap in the weblogic.xml file (please click on the image to make it larger).

Be careful: I get following problem if I turn on FastSwap in my weblogic.xml:
  • After turning on FastSwap in weblogic.xml file, the FastSwap mechanism does not work correctly! A change in a private field does not get updated in my webapp. If I turn this off again and redeploy my webapp, FastSwap is working correctly again. A change in a private field will be updated immediately. Do you get the same problem with your OEPE and WLS 10.3 here?
7. You have to add the "Maven Dependencies" container into your Java EE Module Dependencies for OEPE to be able to use all the jar files inside the Maven dependencies (please click on the image below to make it larger).

8. You made it. Now you can change your classes without having to redeploy the application and at the same time you still have all the advantages of using Maven2 in your project. Have fun!


Wednesday, November 11, 2009

OAuth with Java

This is the third part of my article series about OpenID and OAuth in

Enjoy reading!

Thursday, October 08, 2009

Tuesday, September 22, 2009

XMind: A Cool MindMap Tool

I found this cool Open Source and Eclipse RCP-based MindMap tool XMind!


Monday, September 21, 2009

One Day in your Life... with UML2, oAW, Weblogic FastSwap, Oracle Enterprise Pack for Eclipse, Maven2 and SpringFramework...

In my new project - as usual in a software project - we have a very tight schedule. Using our old JEE application architecture (Oracle 10g, EJB 2.x, JFormular, Ant with Maven2 dependencies, full deployment EAR, WAR and EJB JAR on Weblogic 10.3 with Java6) would mean that we will have a long turn-around time (code, compile, deploy and test) for our development. Our build process with Ant does not support "naked" deployment", so it takes ages before the artefacts are built, jarred and can be deployed in Weblogic. In case that you only change one small thing in your web layer (JSP file, Java class) you will need to go through all those build steps. In combination that at that time I had an old development hardware (3 years old) you can imagine how horrible the situation was...

So I was searching for a better solution. We need a fast turn around time, especially in our web layer because I'm not an expert in JFormular and I definitely need to "try and error". At that moment I already know how easy to develop with GWT in hosted mode. You are just doing "ctrl-s" in Eclipse and make a reload on your browser. That's it, you will see all the changes directly. So your turn around process is just code, compile and test. No deployment anymore. You are very productive in this style. Amazing!

Luckily I found Oracle Enterprise Pack for Eclipse (OEPE) in combination with Weblogic FastSwap technology. With these stuffs you can do the GWT development style for JSP and any other web frameworks within your Eclipse as well. Not for all the things but it works very well. So after I found this I was thinking of making a new application architecture for our new project and here is the result:

1. Modeling strategies and technologies: UML2 (MagicDraw 16) with oAW generators. Actually I'm a fan of AndroMDA (yeah AndroMDA is a great Open Source project!), but because of certain circumstances we move to oAW (it was not my decision). From the application developer point of view I just need to generate the codes from the UML2 models. Nothing special here. In the mean time MagicDraw is becoming a very solid UML product. One thing which still needs some improvements is the file format (XMI) management. Since MagicDraw does not save the UML file in the native Eclipse UML file format you always need to export the file before it can get processed by oAW or AndroMDA. The export can take time if you have a big UML file.

I have to admit that my vision of "the next step in software development is reusing model components" is still not there. Four years after I wrote my MDA book I still don't see any movement that we are beginning to reuse models. But still it would be very cool if I need to have a user management component I can just import an UML2 user management module in my UML2 application module, afterwards I can customize the model und regenerate everything. At the end I can get a running application with a complete user management which is customized
for my application. Very cool but not a reality yet.

2. Implementation technologies: Oracle10g database, Weblogic 10.3, Hibernate 3.x.x, SpringFramework 2.x.x, JFormular (our own development for web framework):

I'm using OracleXE for development which is very good. Only for the integration test we use Oracle10g.

Weblogic 10.3 is a very solid software. There are some new things which I like in comparison with the older 8.1. Here are some points:
  • Support for FastSwap: This is great. In combination with OEPE (see below) you just make ctrl-s and reload on your browser and you will see the changes directly. Amazing, especially for development of web user interfaces. You also won't lose your session in the web application. So if you have an application in which you have to log in, you don't need to log in everytime you change something in your web application because your session is still there. There are some contrains in FastSwap but all in all you can life very good with FastSwap.
  • User interface of Weblogic 10.3 is a lot more better than the older version. Still you have a bug if you are using Chrome.
  • You can start Weblogic in a very slim version (without EJB, etc.), thanks to OSGi architecture of Weblogic. This is great if you just want to make a simple development with servlet.
3. Project structure and build process: Maven2. Actually I'm not fond of Maven2 because I always thought "I need my freedom and flexibility". I don't want to be dictated by a common structure and standard phases like in Maven. My project has always something specials so I need my own Ant task to get the flexiblity I need. I'm wrong, very wrong. After doing some stuffs in Maven2 I began to really like it. A very great build tool. I will never ever do my project without it again! Following points are the reason why I like Maven2:
  • The documentations of all those plugins are great. You can always find solutions to your problem in internet (I already forget how to do programming without internet ;-))
  • You have two great free Maven books which are very nice in case that you will need to understand something principally in Maven2 (Maven: The Definitive Guide and Better Builds with Maven). Something like Assembly or Profile for example.
And why is Maven2 should be your choice (instead of pure Ant)? Here are some reasons:
  • You can still use Ant in Maven2, so you actually don't lose your flexibility!
  • I already see some hand-written Ant tasks. OK you can surely standardized them all but almost all of them are just re-written of Maven goals (compile, test, package, install, deploy). So mostly they are quite useless. Especially in a small team of developers this is not applicable since one person needs to take care and always extend the build files. Did you ever try to extend Ant tasks which are not written by yourself? Have fun! Another thing is that in a lot of cases you will have to use the dependency management of Maven in Ant, so you are beginning using Ant task for Maven anyway. In this case just throw your Ant tasks away and start using Maven2. You can still integrate some of your Ant tasks directly in Maven2.
One thing I still don't like is the Maven2 Eclipse plugin. Yes this plugin is still buggy. After a long time of its existence it's a pitty that there is still no good Maven2 plugin for Eclipse. For more info - or problem - on Maven2 Eclipse plugin please continue reading.

Here is a list of topics which I found very useful during my first contact with Maven2:

4. IDE: Eclipse 3.4.x with OEPE and Maven2 plugins: OEPE offers you a lot of good functionalities (starting, stopping server, some editors for Weblogic stuffs, etc.). One I really like is the FastSwap technology. At the moment some developers are using a remote installation of Weblogic 10.3. It's a pitty that FastSwap only supported for a local installation of Weblogic. I don't know if FastSwap is working for a remote installation with a Samba access. Maybe worth to try.

In conjunction with Maven2 Eclipse plugin there are some bugs still available. If you are seperating your presentation layer (web war) and your business layer (jar) in two different Eclipse projects you can't have the FastSwap technique in your business layer. You also cannot use the Maven2 plugin functionality "Resolve Dependencies within Eclipse IDE" which is actually pretty cool. So you always need to "install" the business jar file into your local Maven repository. Your web application needs to link this jar file directly. See this discussion for this type
of bug: M2Plugin and OEPE. I hope to see bug fixes for all these problems, so that we can use FastSwap also in our business layer like with SpringFramework, etc.

I also found that this Eclipse plugin is a good one (not a perfect one) to see changes of your Weblogic or your application log files: Log Watcher.

All in all, with all its bugs, OEPE and Weblogic FastSwap are great technologies and if you are using Weblogic you have to try these stuffs. You will never ever want to comeback to your old development process and steps. One thing to remember: Using FastSwap does not mean that you don't need to write unit tests anymore! FastSwap is a beautiful technology to quickly prototype applications and unit tests are there for you to be able to deliver high quality applications. So the combination of both is just what you need!

One thing I want to replace in our application is JFormular web framework. Maybe it was a good framework in the past but today I won't develop a new application with that framework anymore. GWT would be a better choice for web user interface.


Have fun and be productive!

Thursday, July 02, 2009

Bye bye SMTP - Welcome Wave Protocol

It's very interesting to see that Google has developed a new protocol for e-mail, yes SMTP is just too old and boring, Wave protocol will come soon - at least we already have one provider who will implement this new protocol, I call it as a "reference provider", yes, it's Google Wave :-)

Okay before I begin with this story, one thing we need to know:

"Wave is just a protocol (, a specification, just like SMTP, HTTP, HTML, TCP/IP, OpenID, OAuth, OpenSocial, etc. This means that everyone can implement this protocol to build some new products based on it".

"Google Wave ( is an implementation of the Wave protocol". A Google product which supports Wave protocol. I also call Google Wave as a reference implementation and reference provider of the Wave protocol.

If you want to understand the terminology in Wave protocol, please check out this article: Google Wave: A Complete Guide.

OK, with those information in the background we can start our discussion...

The big question for me is whether other e-mail providers like YAHOO!, GMX,, Lycos, etc. will also support this new Wave protocol. IMO this depends on the acceptance of the reference provider within the consumers. If Google Wave can attract a lot of people, all other e-mail providers will slow but surely become less important and their customers will leave them. Who cares to use that old e-mail, boring stuffs? The advantages of Wave protocol against SMTP are quite clear. And this is the point where they will also have to implement and add the new Wave protocol in their products.

What kind of impacts do we have from Wave protocol alltogether?

1. Technically we don't need to have client applications like e-mail SMTP client applications (Outlook, Thunderbird, etc.) since Wave is being designed for web applications. Maybe there will be some Wave client applications (WaveEagle at Mozilla?) but this is not a must. Yeah, Microsoft Outlook will have to do some diets ;-) Throw all those e-mail stuffs away. Just embed Internet Explorer.

2. We will see some new providers playing and fighting for market share. Yes, the "pie" will be open for everyone, come and join Wave protocol and develop your own Wave product. Yes, we can start from the beginning!, GMX, YAHOO! will still play a role but it can happen that...
  • Google Wave will get the most customers because their implementation is the first at the market. Marketing people know this as "first mover effect".
  • A newcomer "Swiss Inc." from Switzerland will get a lot of customers because their Wave protocol implementation is the most secure one. Yes, nobody can get access to their servers, also not their own goverment since they have their "Wave secret".
  • "WaveSign" (from V...Sign) offers you a real identity. It means that they will check you offline first, whether you are "the really" Lofi Dewanto before you can get a new Wave account. So everyone gets a Wave from this provider can be sure that the person really exists and the identity is checked.
  • It is possible to have "HotWave" (from M..., you know what I mean) rules the Wave world, because it is directly integrated within their operating system. All those Wavelets are directly integrated in the background screen and their widgets, not bad...
So, to all providers, let's get rumble...

3. How about spammer? Spammer will still find their way to "wave-spam". Please check out You can get a wave account easily there, no identity check, nothing and of course you can use it to wave-spam everyone.

4. How are the business model(s) of those OpenWave providers? These won't change a lot. Just take a look those SMTP providers today. How can you earn money with consumer web applications today? Nothing. OK, I give up, ... advertisements, ads, and ads, ... :-)

I personally like the new Wave protocol and it's the time to throw away SMTP, so folks let's get started!

Just my 2 cents, happy Wavy!

BTW. here are some links on Wave protocol and Google Wave in German language:
Transaction Management and Hibernate Sessions

This is a very good description of Hibernate Sessions from Atlassian: Transaction Management and Hibernate Sessions Guidelines.


Friday, June 19, 2009

Bug in Chrome 2.0.x.x: Weblogic Console 10.3.x.x

If you are working with Oracle Weblogic console 10.3.x.x and you are using Chrome 2.0.x.x you won't be able to see the "advanced tabs" on the bottom of every pages of the console.

In some pages of the Weblogic console you can see at the bottom an "advanced tab" which can be opened by clicking on it. The tab will open smoothly in Firefox. Only in Chrome you won't see this tab, as if it were not existing at all. Just take a look at the two screenshots below (comparison between Firefox and Chrome 2.0.x.x for the same page).

Chrome 2.0.x.x - no "Advanced" tab:

Firefox 3 - with "Advanced" tab:

So be careful and use Firefox for Oracle Weblogic 10.3.x.x console...


Sunday, June 14, 2009

Nice Blogs about Java vs. RoR and GWT/GAE

Here are some interesting blogs:
Have fun!

Sunday, June 07, 2009

OpenID for Java (openid4java)

This is the second part of my article series about OpenID:
Enjoy reading!
Google Wave and Open Wave Protocol

It's very interesting to see that Google tries to build a new email system: Open Wave Protocol. They could be successful since email protocol is just too old. Just take a look for example how people in Germany try to extend email to become secure: Bürgerportale. They try to stick to the old protocol and extend it with many extensions. Oh my dear...

Tuesday, April 21, 2009

Internet Identity Management 2.0 (OpenID, OAuth and co.)

I began to write an article series in german language about Internet Identity Management 2.0. In this series I will cover OpenID, OAuth and co. Also - as usual - I will take a look at some Java libraries which are made to implement the specifications of those technologies.

This is the part one at Developer Channel:

Internet-Identität und Datenaustausch heute - Nutzung und Möglichkeiten von OpenID und OAuth

Enjoy reading!

Wednesday, February 25, 2009

Product Line Software Engineering and Open Source Article in OBJEKTspektrum Magazine March/April 2009

At the end Frank and I managed to publish an article in OBJEKTspektrum magazine (March/April 2009) about PLSE in German language. In this article you can read the development of our software product line: ProMI...

Produktlinien-Softwaretechnik mit Open-Source-Produkten

"Mit der wachsenden Größe und Komplexität von IT-Systemen gewinnt die Wiederverwendung von Software immer mehr an Bedeutung. Hier versucht die Produktlinien-Softwaretechnik einen Beitrag zur Verbesserung der Wiederverwendung zu leiten. Anhand von praktischen Beispielen verdeutlicht dieser Artikel, wie Software-Produktlinien entstehen und mit Hilfe von Open-Source-Produkten einfach realisiert werden können. Zudem werden sieben "Best Practices" vorgestellt, die sinnvolle Unterstützung beim Einsatz der Produktlinien-Softwaretechnik geben."

Have fun!