Planet Java Champions

May 23, 2013

Juergen Hoeller

Spring Framework 4.0 M1: WebSocket Support

As you may have seen, the first milestone of Spring Framework 4.0 was already announced and with it we've released early WebSocket support. Why WebSocket matters? It enables efficient, two-way communication over the web that is essential in applications where messages need to be exchanged between client (typically browser) and server at high frequency and Read more...

by Rossen Stoyanchev at May 23, 2013 02:58 AM

May 22, 2013

Juergen Hoeller

Reactor – a foundation for asynchronous applications on the JVM

We’re pleased to announce that, after a long period of internal incubation, we’re releasing a foundational framework for asynchronous applications on the JVM which we’re calling Reactor. It provides abstractions for Java, Groovy and other JVM languages to make building event and data-driven applications easier. It’s also really fast. On modest hardware, it's possible to Read more...

by jbrisbin at May 22, 2013 06:37 PM

Dr. Heinz Kabutz

Calling Methods from a Constructor

In this newsletter we investigate what can go wrong when we call methods from constructors, showing examples from the JDK, Glassfish, Spring Framework and some other well known frameworks..

May 22, 2013 12:00 AM

May 21, 2013

Juergen Hoeller

Spring Framework 4.0 M1 & 3.2.3 available

Dear Spring community, It's my pleasure to announce the first milestone towards Spring Framework 4.0, delivering a first cut of our work on several key themes: the first wave of Java SE 8 / OpenJDK 8 support (some details following below) initial support for JMS 2.0, JPA 2.1, Bean Validation 1.1, and JSR-236 concurrency (from Read more...

by Juergen Hoeller at May 21, 2013 11:37 PM

May 19, 2013

Bruce Eckel

Use Uncertainty As a Driver

Uncertainty is normally seen as something you must either suppress or avoid. Of this many people appear, well, certain. That you should embrace it and use it to help determine schedule and design is not immediately obvious.

May 19, 2013 10:49 AM

Simplicity Before Generality, Use Before Reuse

Generality and reusability sound like such good qualities to have in code that is easy to forget not only how hard they are to achieve, but also that without the more modest qualities of simplicity and utility how little value they may hold.

May 19, 2013 10:49 AM

May 18, 2013

Fabrizio Gianneschi

Goodbye JRoller

With this post, I'm abandoning JRoller, after years of frustration. This platform has become old and lacks too many features I need today.

Please check my new blog at:

http://championingjava.wordpress.com/

Old posts will stay here as an archive.

by Fabrizio Gianneschi at May 18, 2013 11:25 PM

May 16, 2013

Christian Ullenboom

In eigener Sache: Die RetroBude ist auf Wachstumskurs

Um das größte Museum für Heimcomputer und Spielkonsolen aufzubauen, sucht die RetroBude (http://retrobu.de/) historische Heimcomputer, Spielkonsolen, Spiele/Software, Literatur, Werbung und weitere Artefakte aus der Vergangenheit. Hilf mit deinem Beitrag (als Spende oder gegen Bezahlung) die Geräte einem interessierten Publikum zugänglich zu machen.

The post In eigener Sache: Die RetroBude ist auf Wachstumskurs appeared first on Java Blog | Javainsel-Blog.

by Christian Ullenboom at May 16, 2013 09:34 PM

May 15, 2013

Christian Ullenboom

Adam Bien

AJAX, SOAP, NoSQL, EJB--All Wrong Acronyms

Most of the popular acronyms are wrong:

  1. SOAP (Simple Object Access Protocol): is neither simple nor object oriented. "SOAP originally stood for 'Simple Object Access Protocol' but this acronym was dropped with Version 1.2 of the standard.[2] Version 1.2 became a W3C recommendation on June 24, 2003. The acronym is sometimes confused with SOA, which stands for Service-oriented architecture, but the acronyms are unrelated…" http://en.wikipedia.org/wiki/SOAP
  2. AJAX (Asynchronous JavaScript and XML): Most of AJAX applications are using JSON, not XML. AJAX' core component is the XMLHttpRequest JavaScript object / browser API. Without XMLHttpRequest would be hard to implement an AJAX application...
  3. NoSQL: "… Some authors refer to them as "Not only SQL" to emphasize that some NoSQL systems do allow SQL-like query language to be used…" https://en.wikipedia.org/wiki/NoSQL. …and often the offered NoSQL query language is structured and very similar to SQL :-)
  4. EJB (Enterprise Java Beans): Well designed JavaBeans are actually not well designed EJBs.
  5. YAGNI there should be no acronym for that. Thinking about that may cause endless loops :-)

See you at Java EE Workshops at MUC Airport!


Real World Java EE Workshops [Airport Munich]>

by admin at May 15, 2013 09:48 AM

May 14, 2013

Christian Ullenboom

Thema der Woche: Paketierung mit <fx:deploy>

Seit Neustem kann man mit Java auch ausführbare Dateien bzw. Installer bauen. Ließ dazu http://docs.oracle.com/javafx/2/deployment/self-contained-packaging.htm bzw. suche nach weiterer Dokumentation im Netz.

  • Teste das an einer eigenen kleinen Hello-World-Anwendung.
  • Wie groß ist das Ergebnis mit JRE?
  • Welche Zielformate sind möglich und kann man alle etwa auf einem Linux-Build-Server bauen?
  • Nutze log4j und nimm die Jar mit in das Zielformat mit auf. Lassen sich auch native Dateien einbinden?
  • Gilt diese Möglichkeit nur für JavaFX oder auch für für AWT/Swing oder SWT?

The post Thema der Woche: Paketierung mit <fx:deploy> appeared first on Java Blog | Javainsel-Blog.

by Christian Ullenboom at May 14, 2013 10:58 AM

May 13, 2013

Juergen Hoeller

Content Negotiation using Spring MVC

There are two ways to generate output using Spring MVC: You can use the RESTful @ResponseBody approach and HTTP message converters, typically to return data-formats like JSON or XML. Programmatic clients, mobile apps and AJAX enabled browsers are the usual clients. Alternatively you may use view resolution. Although views are perfectly capable of generating JSON Read more...

by Paul Chapman at May 13, 2013 10:31 AM

Adam Bien

Maven: Lifecycle Hooks Lead To Infrequent Integrations

You could build, test and deploy the entire Java EE Application and even create a working application server from scratch with a single mvm clean install command. The only problem is: it will take forever and you will have to repeat the whole process over and over again, even if you were only interested in particular build steps.

If mvm clean install would just execute the unit tests, your feedback will be significantly faster. Instead of waiting hours, you get the first results in seconds.

A series of composable jobs, each executing a goal or maven plugin, could be realized with http://jenkins-ci.org, or a simple shell / batch script on the developer's machine.

Instead of executing all plugins at once by hooking them to the lifecycle, you could implement a series of chained together jobs. E.g.

  1. Job: mvm clean install
  2. Job: mvn failsafe:integration-test
  3. Job: server setup
  4. Job: deployment
  5. Job: system test execution
  6. Job: quality assurance
  7. Job: promotion
  8. Job: tagging / release
  9. ...

The faster the feedback, the more valuable it gets. A monolithic mvn clean install leads to too long builds, less feedback and becomes less valuable for Continuous Integration. CI degrades to nightly builds…

Just start with an essential setup essential and not with a super-pom.

[See also an in-depth discussion in the "Real World Java EE Night Hacks--Dissecting the Business Tier" book, page 136 in, chapter "Continuous Integration and QA"]

See you at Java EE Workshops at MUC Airport (Effective JavaEE)!


Real World Java EE Workshops [Airport Munich]>

by admin at May 13, 2013 07:23 AM

May 11, 2013

Brian Goetz

Solar -- one month in

About one month ago we installed a solar array at the house, with 24 325W panels, for a peak generation capacity of 7800W.  So far, we're  happy with it.  A sunny day in May seems to generate about 50-55 kWh.

We chose to lease rather than buy.  A number of companies now offer leases on solar power systems, usually for a 20 year period, where they own and maintain the system, act as general contractor for procurement and installation, and handle the tax/permit/utility paperwork.  Leasing was cost-competitive with buying -- and far less hassle and paperwork.  The leasing company offered a choice of a monthly fee or a one-time payment.  The one-time payment is a far better deal; the monthly payment  basically represents financing at 7%.  The install was completely hassle-free.  The system uploads data to a monitoring site, so you can get graphs and reports of your production.

In Vermont, there are three sources of subsidy for solar: a 30% federal tax credit, a state tax credit based on generating capacity (which came out to about another 10%), and utilities buy your generated power at a premium.  (Some utilities will only give you a credit; ours (Green Mountain Power) will cut a check for any credit balance at year end.)  With a lease, the leasing company gets the tax rebates (which reduces the cost of the system) and the homeowner keeps any payments for the power generated, and the leasing company handled all the tax paperwork and associated risk.

I was apprehensive about whether to believe the projected generation capacity; with a month of data, I am gaining some confidence that they were reasonable.  Based on these projections (and assuming that power rates stay the same), the system should offer a ten-year payback and a 8% return on investment.  In hindsight, I would have gone with a slightly bigger system (there's still plenty of room on the roof); the standard approach seems to be to size the system to net out your power bill to zero, but this seems more of a psychological than financial target.

The key risk items are:

  • Generation.  The system may generate less than projected, though the first month looks promising.  (To meet their targets, I need to average generating 26 kWh/day through the year.  In May, we averaged 38 kWh/day; I would expect to generate even more in July/Aug and much less in Jan/Feb, but it is believable that we will hit this average.)  Even if the projections are accurate, we are of course still dependent on weather.
  • Changes in utility policy.  Green Mountain Power offers an effective 7c/kWh subsidy on top of the regular tariff for any power we generate.  However, the company could change this policy, and probably will sometime in the next twenty years.  
  • Change in power rates.  If power rates go up, the return is better; if power rates go down, the return is worse.  I have to assume over 20 years electric rates will go up.  
Below is a chart of daily production in the 30 days since install.  

Overall, while there's some risk, it seems that the system cost (with the current level of subsidy) has come down to the point where it offers a positive financial payback for homeowners in addition to the ecological benefits.  Plus, its fun to watch the meter spin backwards! 

by Brian (noreply@blogger.com) at May 11, 2013 07:35 PM

May 10, 2013

Bill Burke

Comment on Resteasy 3.0-beta-5 Released by raulgd

Do you think that the RESTEasy 3.0 final version will support Comet for resteasy-netty? I read on the JBoss page that it works for servlet containers version, but what about Netty?

by raulgd at May 10, 2013 11:54 PM