Main | Next page »
 20080821 Thursday August 21, 2008

Remote (IIOP) EJB 3 / JPA 1.0, No Think Time, 100 Virtual Users, 4-Way Machine, Glassfish v2u2 Clustered - ...and What is The Performance?

I just completed some load tests with Glassfish v2ur2 on Linux, Clustered, a 4 way, Intel based machine and JDK 1.5 (JDK 1.6 would be better, but was not available in this case). I used a simple CRUD application as load generator, without think-time, and almost empty database, just to stress the appserver as much as possible.

The two load-generators ran remotely (via IIOP, standard EJB 3 client), each with 50 virtual users. Glassfish passed all tests without any problems, the response times and transaction / seconds were very stable. We just increased the number of connnections in the JDBC-pool, and set the -Xmx to 512m: no further tuning was performed.

The performance was impressive: 250 - 500 Transactions / second (we weren't alone on the machine :-(). We performed the tests with another, commercial, application server as well. The results were similar.

I actually performed similar, but not comparable, test several years ago (around 2003) with EJB 2. / CMP 2.0. We had more load generators (250 - 300 virtual users) available and were able to execute 800 transactions / seconds.

Conclusion: The performance of even remote (IIOP!) EJB 3 rocks :-), and Glassfish performs well, even without any further tuning.

In real world, however, most of the performance gets lost in contention / locks and synchronization issues... But you should not blame your server / framework / platform for it :-).

Gesendet von admin [Java EE 5 Architectures And Idioms] ( August 21, 2008 11:50 AM ) Permalink | Kommentare [0]
[my website] [This entry is based on / extends my books: Enterprise Architekturen, Leitfaden fuer effiziente Software-Entwicklung and: Java EE 5 Architekturen, Patterns und Idiome]

 20080820 Wednesday August 20, 2008

Netbeans 6.5 beta - Useful Productivity Enhancements For Java EE, Missing Some Features As Well

 I spent some more time with Netbeans 6.5 Java EE functionality. First feedback:

  1. Field Level Access is generated now for Entities. However the Entities are still marked as Serializable - which is actually not necessary.
  2. Call Enterprise Bean, Use Database, Send JMS Message wizzards are available from the ctrl+enter "popup". This is really nice - it doesn't disturb the workflow. For strange reasons "Use Entity Manager" is not included into the pop-up and is only available via the usual menu.
  3. "Deploy On Change" feature works surprisingly well. On every save all your changed EJBs are incrementally deployed to the application server. I testet it with Glassfish v2ur2, it works really well so far. This feature can be activated or deactivated in "Properties" -> "Run" and checkbox "Deploy On Change".
  4. ...the splash screen is nice :-)

What I'm missing or what would be nice:

  1. There was already a "design query" functionality in the SQL-explorer. I never actually used it for design a query, but it was very useful to visualize the tables with it's relations. It should be reintroduced (I think it is no more available since 6.0). [a killer feature]
  2. The support for ejb-jar.xml deployment descriptors could be better. There is no code completion in XML for Java Code etc. so it is easy to misspell class names etc. [especially useful for e.g. tracing interceptors]
  3. There is no support for orm.xml. So it is not vey easy to transform existing annotations into XML-deployment descriptors  [nice to have]
  4. Drag And Drop of JavaBeans (e.g. JPA-entities) into JSF visual editor with default generation of a form should be possible (not that hard...) -  this would be a killer feature.
  5. Sometimes Netbeans 6.5 is not able to reopen an existing EJB in the editor. It works, however, in the EJB-view (obviously a beta bug - it worked perfectly before)
I'm using Netbeans 6.5beta in production - it works well so far, if not, I switch back to 6.1.
Gesendet von admin [Netbeans] ( August 20, 2008 08:45 AM ) Permalink | Kommentare [2]
[my website] [This entry is based on / extends my books: Enterprise Architekturen, Leitfaden fuer effiziente Software-Entwicklung and: Java EE 5 Architekturen, Patterns und Idiome]

 20080819 Tuesday August 19, 2008

EJB 3 - Dead Or Alive ...very alive, See Quickvote Results

JavaMagazin, one of the biggest, German Java related magazines, started an online survey (quickvote)  with the question EJB - Dead Or Alive. The result really surprised me:

Quickvote: [freely translated by me, here the origin]


EJB - Dead Or Alive?

I'm using EJB 2x. (8%)
 

 

I'm using EJB 3. (58%)

 

 

I don't use EJB and "pure" Web-Stack instead (Tomcat & Co.). (12%)

 

 

I don't use EJB and the alternative Stacks instead (Spring & Co.). (22%)

 

 

Participants: 1375 (at 19.08.2008)

What surprised me: the small percentage of EJB 2.X. In Germany there is still huge amount of EJB 2.0 projects. Most of them will be ported to Java EE 5 next time. The second surprise was the EJB 3 adoption. I'm using EJB 3 in several projects but the amount of 58% (in this context) is huge. I actually thought, the aggregated amount of the alternatives will be greater, than EJB 3 and 2 together, but the opposite is true.

Hopefully this survey was not sponsored by the "EJB-Mafia" :-). So if you would like to keep your job and learn more about EJB 3 start here :-).

Gesendet von admin [General] ( August 19, 2008 09:35 AM ) Permalink | Kommentare [2]
[my website] [This entry is based on / extends my books: Enterprise Architekturen, Leitfaden fuer effiziente Software-Entwicklung and: Java EE 5 Architekturen, Patterns und Idiome]

 20080818 Monday August 18, 2008

An award-winning heating hack - GreenFire Interview @Ericsson Mobilityworld

I was interviewed by ericsson about GreenFire the Java EE (Glassfish, Groovy, Shoal) heating regulator. Gesendet von admin [General] ( August 18, 2008 10:46 AM ) Permalink | Kommentare [0]
[my website] [This entry is based on / extends my books: Enterprise Architekturen, Leitfaden fuer effiziente Software-Entwicklung and: Java EE 5 Architekturen, Patterns und Idiome]

 20080817 Sunday August 17, 2008

Absolute Beginner EJB 3 / JPA Series - the Essential Bootstraps And Background Information

The EJB 3 / JPA series are really popular (several thousands views). I was asked to provide an overview, so here are the posts so far:

  1. EJB 3 plain intro 
  2. Dependency Injection intro
  3. JPA intro
  4. Interception / "AOP" intro

I answered some frequently asked questions during the the inception phase of my Java EE 5 projects in my blog as well:

  1. So if you have EJB 3, are "Plain Old Web Containers" still viable?
  2. What happens, in case EJB 3 turn out to be not powerful enough?
  3. Are POJOs lot faster, comparing them to EJB 3?
  4. What's about the memory consumption?
  5. Are EJB 3 threadsafe? Do they run well on multi-core, multi-CPU machines?
  6. Are EJB 3 actually lightweight or heavyweight?
  7. How fast is the deployment of several hundred JPA-Entities and Session Beans?
  8. Monolithic Or Modular?
  9. Integration Of "Legacy" POJOs - why not to inject a DefaultTableModel into an EJB?
...and why I like them Gesendet von admin [Java EE 5 Architectures And Idioms] ( August 17, 2008 02:57 PM ) Permalink | Kommentare [0]
[my website] [This entry is based on / extends my books: Enterprise Architekturen, Leitfaden fuer effiziente Software-Entwicklung and: Java EE 5 Architekturen, Patterns und Idiome]

 20080816 Saturday August 16, 2008

JShot - Useful Screen Capture Utility - Works With Java6u10, WebStart, Swing and Nimbus

JShot is a useful, WebStartable "screenshot" application. It can be installed either with installer, or with WebStart. There are several look and feels available, the default one looks similar to Mac OS X. I tried, however, to switch to Nimbus. It worked without any problems. The application is really responsive and comes with nice features (like FTP upload).
Gesendet von admin [General] ( August 16, 2008 11:45 AM ) Permalink | Kommentare [1]
[my website] [This entry is based on / extends my books: Enterprise Architekturen, Leitfaden fuer effiziente Software-Entwicklung and: Java EE 5 Architekturen, Patterns und Idiome]

 20080815 Friday August 15, 2008

TimeLines, KeyFrames, Tweening - Useful JavaFX Screencast For Beginners

Nandini Ramani presents the capabilities of JavaFX Preview together with Netbeans 6.1. It works way better, than during the JavaONE (they were problems with internet connectivity or something like that :-)). The screencast is hosted at netbeans.tv. Binding, Tweening, the usage of transitions (colors) with KeyFrames and TimeLines are coded. If you only interested in coding, skip the intro and start straight at 3:40.

Gesendet von admin [Netbeans] ( August 15, 2008 02:14 PM ) Permalink | Kommentare [0]
[my website] [This entry is based on / extends my books: Enterprise Architekturen, Leitfaden fuer effiziente Software-Entwicklung and: Java EE 5 Architekturen, Patterns und Idiome]

 20080814 Thursday August 14, 2008

Netbeans 6.5 Beta - And A Really Useful Feature

I just installed Netbeans 6.5beta - it reused all my configuration from M1 and 6.0 final without any problems. The built-in SQL editor was significantly improved. It looks not only more decent but comes with the following functionality:

  1. Pagination in the result set
  2. SQL history - somehow similar to "local history". It comes with execution date etc. It's useful
  3. Auto completion: This one is prevents you from misspelling column and table names. It seems, however, not to know the SQL-commands yet  - it operates only on the meta data...
So far it works without any problems. However I'm "just" working on some Java EE 5 projects right now.
Gesendet von admin [Netbeans] ( August 14, 2008 11:10 AM ) Permalink | Kommentare [1]
[my website] [This entry is based on / extends my books: Enterprise Architekturen, Leitfaden fuer effiziente Software-Entwicklung and: Java EE 5 Architekturen, Patterns und Idiome]

 20080813 Wednesday August 13, 2008

The Irony Of Separation Of Concerns, Best Practices and Anti Patterns in Java EE

Most J2EE architects were just obsessed about separation of concerns which led to (too) many fine grained layers and indirections. The applications were packaged as EARs which were containers for different deployment units. Especially the web tier was deployed separately from the business logic - an average application even consisted of several ejb-jars, which reflected some architectural concepts (layer, component etc.). The application servers, at the other hand, were rather monolithic. The exception was JBoss, with it microkernel architecture, all others were in general used "as is" - a huge blob :-).

Java EE 6 turned some J2EE anti patterns into best practices for certain contexts. So bundling EJB 3.1 components together with web components in a WAR, without the need for EAR and EJB-JAR creation is possible and makes absolutely sense for "just" web applications. Separation Of Concerns is actually violated - but the productivity could be increased at the same time. So the deployment of Java EE 6 applications could become more monolithic - and be still considered as "best practice".

On the other hand, application servers became modular. Glassfish v3, with its hk2 and OSGI architecture, is able to load and unload its modules on the fly. Even the admin console is loaded on demand. This dynamic behavior is "caused" by Java EE 6 profiles - a predefined, standardized set of APIs and capabilities.

So in Java EE 6 the web and business logic could fusion together and become "monolithic" - the application servers become modular. Something like "Inversion Of Best Practices" :-). Nonetheless - it's good stuff in both cases. Instead of layers, more and more architects, fall in love with modules and plugins right now. Let's wait for the next "Inversion Of Best Practice" :-).

Gesendet von admin [Java EE 5 Architectures And Idioms] ( August 13, 2008 05:08 PM ) Permalink | Kommentare [0]
[my website] [This entry is based on / extends my books: Enterprise Architekturen, Leitfaden fuer effiziente Software-Entwicklung and: Java EE 5 Architekturen, Patterns und Idiome]

 20080808 Friday August 08, 2008

How To Kill A SOA Project - It Started With A Post ...Looking Forward To The Talk At W-JAX

After some interesting experiences in my projects I wrote the post "How To Kill A SOA Project" which was really popular. I got many emails about that. A talk with nearly the same title "How To Kill And Save SOA Project" was accepted at the W-JAX conference - I will reuse the content of the post. The funny story here: it is the SOA track :-).

Furthermore I will talk about Java FX and Java 6 update 10 and probably about EJB 3.1 / JPA 2 as well. All talks in German... If you prefer the English language - come to Jax in San Jose (05.10 - 09.10) :-).

Gesendet von admin [Events] ( August 08, 2008 11:57 AM ) Permalink | Kommentare [0]
[my website] [This entry is based on / extends my books: Enterprise Architekturen, Leitfaden fuer effiziente Software-Entwicklung and: Java EE 5 Architekturen, Patterns und Idiome]




License
Creative Commons License
This work is licensed under a Creative Commons Attribution-NonCommercial-NoDerivs 2.0 License.