Tuesday Apr 08, 2014
Friday Mar 21, 2014
By reza_rahman on Mar 21, 2014
At Code PaLOUsa I delivered a talk on aligning Java EE with NoSQL as well as a talk on the Cargo Tracker Java EE/Domain-Driven Design Blue Prints project (this talk was recorded by InfoQ). More details, including slide decks and code, posted on my personal blog.
Sunday Feb 16, 2014
By reza_rahman on Feb 16, 2014
One of the principal goals of CDI is to make the Java EE programming model far more extensible - from adding basic functionality to full-scale integration with third-party software. Piotr Nowicki demonstrates this well by doing something pretty simple but common and useful - injecting a value from a Java .properties file into any managed bean using CDI @Produces and InjectionPoint. Note that the Core module of the Apache DeltaSpike project also includes similar functionality. In case you are unaware of Apache DeltaSpike, it is the de-facto collection of CDI portable extensions (it is the successor to both Seam 3 and Apache CODI).
Both Piotr's code and Apache DeltaSpike inject values from property files only. One useful addition could be to also support Java environment variables. Perhaps this inspires you enough to create your own CDI portable extension for injecting properties or contribute to DeltaSpike :-)? Interestingly, there is a similar discussion on JAVAEE_SPEC-19. Perhaps this is an area for the emergent Java EE Configuration JSR to look into?
Wednesday Feb 05, 2014
By David Delabassee-Oracle on Feb 05, 2014
“Man cannot discover new oceans unless he has the courage to lose sight of the shore.”
Monday Dec 16, 2013
By reza_rahman on Dec 16, 2013
Pune JUG organized a meetup at the Symbiosis Institute of Computer Studies and Research (SICRSR) college campus on December 14th. Led by Harshad Oak (Java Champion and organizer of the IndicThreads conference), Pune JUG is the oldest JUG in India and boasts a vibrant developer community. This month's meetup was focused on the Java EE 7 platform and the ecosystem that is building up around it. The meeting was led by Oracle India's own Vijay Nair. Vijay is a good friend and a lead developer with Oracle's FLEXCUBE development group in India. Among many other things like evangelizing Java EE at local Java user groups and conferences, Vijay contributes heavily to the Cargo Tracker Java EE Blue Prints project in his spare time.
The event saw an attendance of close to around 100 people with a lot of demos/code and high quality interactions with the audience. Vijay presented no less than three sessions at the meetup:
- JavaEE.Next(): Java EE 7, 8, and Beyond - This is basically our flagship talk at the moment. The talk briefly covers the evolution of the platform, details the changes in Java EE 7 and invites developers to help shape Java EE 8. The materials for the talk is posted here.
- Android and iOS Development with Java EE 7 - This was a fairly popular technical session at JavaOne San Francisco 2013 led by me, Ryan Cuprak and Bala Muthuvarathan. The session demonstrates how Java EE 7 acts as an excellent platform for building "headless" back-ends for native mobile applications with REST and WebSocket as the client communication protocols. The materials for the talk is posted here. The code is posted on GitHub.
- Using NoSQL with JPA, EclipseLink and Java EE - This session explores the current state of the NoSQL landscape and how Java EE can be utilized to access NoSQL solutions such as Oracle NoSQL, MongoDB, Cassandra, etc utilizing JPA style facades or plain CDI. The materials for the talk is posted here. The code is posted on GitHub.
Overall, this was a very positive experience with developers giving two thumbs way up to the Java EE 7 platform!
Thursday Sep 19, 2013
By reza_rahman on Sep 19, 2013
Although it's a point release Bean Validation 1.1 brings a number of important features to Java EE 7. While the most significant of these features is clearly method validation, another very important feature is further alignment with CDI. In Java EE 6 there were a few corner cases left were Bean Validation did not work well with CDI. The most prominent of these gaps was the inability to do injection into custom constraint validators. Projects like Apache CODI and Seam 3 stepped in to fill these gaps. In Java EE 7/Bean Validation 1.1 this issue was properly addressed by making all bean validation artifacts injection officially capable. Romain Manni-Bucau of the Apache TomEE community explains the feature well in a code driven post. There's also the 15-minute Bean Validation 1.1 presentation by specification lead Emmanuel Bernard on the GlassFish videos YouTube channel:
Monday Sep 09, 2013
By reza_rahman on Sep 09, 2013
While figuring out what CDI scope to use for a particular bean, it is sometimes helpful to have a brief one pager like the one put together by Goncalo Marques. The page lists out various CDI scopes, very briefly explains each as well as making mention of proxies and serialization. Although the page is mostly geared towards Java EE 6 and does not yet mention the changes in Java EE 7 such as CDI compatible @ViewScoped, @FlowScoped and @TransactionScoped, the page is still worth bookmarking.
More generally speaking for CDI, there are a number of very good references available such as the very well written Weld reference guide, the CDI portion of the official Java EE Tutorial as well as the spec itself (perhaps one of the most readable Java EE specs around).
Friday Jun 07, 2013
By reza_rahman on Jun 07, 2013
Introduced in Java EE 6, CDI is clearly a key API to standardize dependency injection in enterprise Java. A lot of the work related to CDI in Java EE now involves treating CDI as an effective mechanism for unifying the Java EE component model and aligning others specs around it to make for a more cohesive platform. Examples of this on-going effort in Java EE 7 includes aligning the JSF component model/scoping to CDI, decoupling declarative transactions from the EJB component model through the JTA 1.2 @Transactional CDI interceptor, modernizing the JMS 2 API utilizing CDI, better support for CDI in Bean Validation 1.1 and many others.
CDI 1.1 itself is a point release that has a relatively long list of smaller but nonetheless important fixes and enhancements. In a recent blog post, CDI 1.1 specification lead Pete Muir does a good job of listing out the changes. The post is especially valuable for the referenced links that you can dig into to see if any of the changes are immediately useful to you if you have adopted CDI already.
Friday May 31, 2013
By reza_rahman on May 31, 2013
I delivered two very well attended talks - my talk on Java EE 7 (our flagship talk) and a talk on using NoSQL databases in Java EE. More details on the sessions and JeeConf, including the slide decks and code, posted on my personal blog.
Monday May 06, 2013
By Bruno.Borges-Oracle on May 06, 2013
One of the first things you will want to know about Java EE 7, is how you can integrate some of the new APIs like WebSockets, with existing ones like JMS. That's why I decided to write this article "Integrating WebSockets and JMS with CDI Events in Java EE 7". What I try to demonstrate here, is how two distinct APIs can be used together to deliver something that is not explicitely defined in the specifications, but with some cool integration using CDI Events, an async server-side data push can be implemented with no more than the standards at your hand.
The article will show you how to code your first WebSocket server endpoint, then how by using a Stateless SessionBean you can send messages to a JMS Queue, and finally, how to receive them again by using a MessageDriven Bean that fires CDI events with the payload back to the WebSocket. Simple, straightforward and small code, that takes you through several specifications and releases available starting from now, the Productivity++ Java EE 7.
Thursday Mar 07, 2013
By reza_rahman on Mar 07, 2013
DevNexus 2013 was held in Atlanta on February 18-19. For those unaware, Organized by the Atlanta JUG, DevNexus is the most significant Java conference in the South Eastern US. As usual, DevNexus attracted a bevy of world class speakers including Ben Evans, Neal Ford, David Geary and Venkat Subramaniam.
I delivered two full-house Java EE sessions - one on Java EE 7 (our flagship talk) as well as a session on using NoSQL in Java EE via JPA and CDI. More details on the sessions and DevNexus, including slide decks and code examples, posted on my blog.
Wednesday Jan 23, 2013
By reza_rahman on Jan 23, 2013
With the advent of CDI into Java EE 6 and subsequent greater alignment of Java EE and EJB with CDI in Java EE 7, an interesting set of questions keep coming up every now and then: when do I use CDI? When do I use EJB? Do you need EJBs any more? Are EJBs more heavyweight than CDI?
David Blevins (the powerhouse developer behind OpenEJB and TomEE) provided his insightful and eloquent thoughts on these questions. David really knows what he is talking about since in addition to OpenEJB, he is also a core committer on the Apache CDI implementation, OpenWebBeans. We would even go so far as to say it is required reading for anyone interested in Java EE, EJB or CDI. Enjoy!
Monday Nov 26, 2012
By reza_rahman on Nov 26, 2012
The 109th episode of the Java Spotlight podcast features an interview with CDI 1.1 spec lead Pete Muir of JBoss/Red Hat. Pete talks with Roger Brinkley about the backdrop to CDI, his work at JBoss, the features in CDI 1.1 and what to expect in the future.
What's going on behind the scenes and the possible contents for CDI 1.1+ are particularly insightful. You can listen to the full interview here.
Monday Nov 19, 2012
By reza_rahman on Nov 19, 2012
CDI 1.1 is humming along nicely and recently released it's public review draft. Although it's just a point release, CDI 1.1 actually has a lot in it. Some the changes include:
- The CDI class, which provides programmatic access to CDI facilities from outside a managed bean
- Ability to veto beans declaratively using @Vetoed
- Conversations in Servlet requests
- Application lifecycle events in Java EE
- Injection of Bean metadata into bean instances
- Programmatic access to a container provided Producer, InjectionTarget, AnnotatedType
- Ability to override attributes of a Bean via BeanAttributes
- Ability to process modules via ProcessModule
- Ability to wrap the InjectionPoint
- Honor WEB-INF/classes/META-INF/beans.xml to activate WEB-INF/classes in a bean archive
- Global ordering and enablement of interceptors and decorators
- Global selection of alternatives
- @New deprecated
- Clarify interceptors and decorators must be implemented using proxying
- Allow multiple annotated types per Java class
- Allow Extensions to specify the annotations that they are interested in
The CDI 1.1 expert group has a number of open issues that they would like immediate feedback on. These include critical issues like bean visibility, startup events and restricting CDI scans. Read the details here and let your voice be heard!
Saturday Jun 02, 2012
By arungupta on Jun 02, 2012
Recent Tips and News on Java, Java EE 6, GlassFish & more :
• Tutorial - Introduction to CDI - Contexts and Dependency Injection for Java EE (JSR 299) (Mark Struberg, Peter Muir)
Podcasts & Videos
- Java EE @ Devoxx France
- Free JPA 2.1 Cheat Sheet by Thorben Janssen
- JavaOne CFP is Open - Your Invitation to Submit to the Java EE Track
- New book: "Web Development with Java and JSF"
- Forge Powered Java EE Rapid Application Development Comes to NetBeans!
- JMS 2.0 Revision A
- Java EE 8/Adopt-a-JSR Updates: Morocco JUG!
- Java EE Management API 2.0 (JSR 373) Spins Up
- Java EE Container Lifecycle
- Migrating a JSF Application from Spring to Java EE 7/CDI