Friday, June 07, 2013

Java EE 7 Books: Java EE 7 Recipes & Introducing Java EE 7

I have been working hard for over a year now on my most recent publication entitled 'Java EE 7 Recipes: A Problem-Solution Approach', published by Apress (May 2013).  This book covers the Java EE stack from the ground-up, and it includes coverage of EE 7 specific features, such as JSF view actions, WebSocket API, and Concurrency Utilities for Java EE.  Therefore, I feel that the book will be a good read for beginner, intermediate, and advanced Java Enterprise developers.

The first chapter begins by walking readers through recipes regarding the setup of a Java Enterprise environment, including specifics on how to install and configure Glassfish v4, a fully Java EE 7 compliant application server.  It then quickly delves into the development of Java Servlets, including coverage of newer concepts such as registering servlets without WEB-XML, and non-blocking I/O.  

Chapter 2 covers JSP from the ground-up.  Although JSP is no longer the preferred option for enterprise application development, it is still a very viable and widely used technology.  Therefore, this chapter will be handy especially for beginner and intermediate level developers so that they can have a better understanding of how JSP technology works, and where it may be the most useful.

Next, the book delves into JavaServer Faces technology, with in-depth coverage that spans four chapters (Chapter 3 - Chapter 6).  Keeping with the theme of the book, readers will learn how to develop applications with JSF, including useful tips and techniques, as well as integration with third-party libraries such as PrimeFaces.  The JSF 2.2 release (which is new with the release of EE 7), includes useful features such as the ability to invoke managed bean actions on life-cycle phase events (viewActions), and better integration with HTML5.  This book will show seasoned JSF developers how to use these new features so that they can begin integrating them into new and existing applications.

No enterprise application would be complete without database access, and Chapters 7 and 8 provide coverage for JDBC and Object-Relational Mapping via the Java Persistence API (JPA).  Chapter 7 provides coverage for utilization of JDBC technology for database access.  The chapter covers everything from obtaining a connection, to handing errors, simplifying connection management, performing CRUD operations, and execution of database stored procedures.  For those developers more interested in utilizing server-side database connection pools, etc., Chapter 8 covers the Java Persistence API.  The chapter contains vital information for working with underlying data stores via JPA including data mapping and entity creation.  It also hits upon EE 7 specific updates, including schema generation support.

Chapter 9 covers EJB technology, along with its new features via the release of EJB 3.2.  Readers will learn how to utilize EntityManagers, differences between Stateless and Stateful Session beans, how to utilize EJB via JSF, and more.  The new features covered include asynchronous message-driven beans (MDB), explicit designation of remote and local interfaces, and opting out of stateful session bean passivation.  In Chapter 10, readers will learn how to query entities using the most up-to-date features in JPQL.   

If you want to work with Java EE 7, you will most likely utilize GlassFish 4 application server since it is the first EE 7 compliant server.  Chapter 11 includes content on how to get up-and running with GlassFish v4, utilizing the administration console for application and datasource management, and setting up authentication.

One of the most popular features of Java EE beginning with the release of EE 6 has been Contexts and Dependency Injection.  Chapter 12 covers CDI in full detail, including recipes on injection, using CDI beans via JSF views, and more.  It also covers new features such as the injection of bean metadata and the new @Veto annotation for marking classes as ignored by CDI.

Have you heard about the simplification of Java Message Service (JMS) in the new 2.0 release?  Readers will learn all about the new simplified JMS API in Chapter 13, along with other JMS basics such as creation of resources, creating/sending messages, and the new message delivery delay.

Chapter 14 is a bit of an extension on Chapter 11, as it covers authentication and security for Java Enterprise applications, specifically those deployed within a GlassFish container.  Almost every enterprise application requires a login form, and this chapter covers how to create one, and also how to utilize LDAP authentication for producing single-sign on solutions.

SOAP and RESTful web services have become significant technologies for the Java EE stack.  Chapter 15 covers web services, both SOAP and REST-based services using JAX-WS and JAX-RS.  Readers will learn how to create each type of web service, and utilize the new features of JAX-RS 2.0 such as the new client API.

Java is not the only language on the block any longer (or JVM, that is).  It is not uncommon to see different languages being utilized to create entire enterprise applications for the JVM, or even for integration with existing Java EE applications.  Chapter 16 includes a few short recipes showing how one may integrate Groovy or Jython into an EE application.

Since HTML5 and the new era of web applications is upon us, the new WebSockets and JSON-P APIs for EE 7 have become of major importance.  Chapter 17 covers these new APIs, demonstrating how to create and utilize WebSockets for full-duplex communication.  The chapter includes an example calling out to a WebSocket from JavaScript.  It also demonstrates how to utilize the new JSON-P API for creating and parsing JSON.

Chapter 18 covers the use of JavaFX for creation of enterprise applications.  It demonstrates how to develop JavaFX front-end applications, and bind them to EJBs for use with data.  There is also a recipe covering the use of JavaFX with RESTful web services.

Finally, both the Concurrency Utilities for Java EE and Batch Applications APIs have been added to EE 7.  These APIs provide a standard for developing concurrent and batch applications for the enterprise. Coverage includes the creation of server-side resources (ManagedExecutorService, etc.) for concurrent application development, and creation of item-oriented batch processes.

Overall, the Java EE 7 Recipes book is perfect for those that are interested in getting up-to-speed with Java EE, including the latest features.  For those who are already experts with Java EE and are only interested in the new features, stay tuned for the release of my upcoming book entitled 'Introducing Java EE 7', to be published by Apress within the next few weeks.


Saturday, November 03, 2012

Java EE 7 by JSR

The following is a listing of JSRs that are contained in the Java EE 7 Specification.

Java EE Platform Specification - http://java.net/projects/javaee-spec/pages/Home 

JSR 107 - JCache https://github.com/jsr107/jsr107spec http://jcp.org/en/jsr/detail?id=107
JSR 236 - Community Utilities for EE http://jcp.org/en/jsr/detail?id=236
JSR 338 - JPA 2.1 http://jcp.org/en/jsr/detail?id=338
JSR 339 - JAX-RS 2.0 http://jcp.org/en/jsr/detail?id=339
JSR 340 - Servlet 3.1 http://jcp.org//en/jsr/detail?id=340
JSR 341 - EL http://jcp.org/en/jsr/detail?id=341
JSR 342 - EE 7 http://jcp.org/en/jsr/detail?id=342
JSR 343 - JMS http://jcp.org/en/jsr/detail?id=343
JSR 344 - JSF 2.2 http://www.jcp.org/en/jsr/detail?id=344
JSR 345 - EJB 3.2 http://jcp.org/en/jsr/detail?id=345
JSR 346 - CDI 1.1 http://jcp.org/aboutJava/communityprocess/pr/jsr346/index.html
JSR 349 - Bean Validation http://jcp.org/en/jsr/detail?id=349
JSR 352 - Batch Applications for the Java Platform http://jcp.org/en/jsr/detail?id=352
JSR 353 - Java API for JSON Processing http://jcp.org/en/jsr/detail?id=353
JSR 365 - WebSockets

Thursday, December 29, 2011

Java 7 Recipes: A Problem-Solution Approach

This is a quick post to mention a new book that will be published soon entitled Java 7 Recipes. I had the pleasure of leading a team of excellent authors: Carl Dea, Mark Beaty, Freddy Guime, and John O' Conner in the authoring of this book. It features a problem-solution approach demonstrating how to get up and running quickly with the Java language. The book features some of the most common questions for newbies starting to develop with Java, and provides answers in an easy-to-learn and reuse manner. It also features some of the most common intermediate and advanced problems and solutions, as well as material that is new to the Java 7 release.

Carl Dea wrote several chapters on JavaFX 2.0, and the material covers enough information to get started with JavaFX 2.0 and then delves into some advanced examples as well. If you are looking to learn the latest in Java desktop and rich internet client development, you will want to check out the chapters on JavaFX 2.0.

Mark Beaty wrote a chapter covering data structures and iteration. He is an expert in object oriented Java concepts, and this chapter covers some of the most fundamental parts of the Java language. Mark also was a technical reviewer for the book, and he did an excellent job of working through the material and solidifying it. I would also like to give a shout out to David Coffin who also performed technical review on several of the chapters...great work!

Freddy Guime is a Java expert who wrote chapters on input/output, exceptions, concurrency, unit testing, and more. Freddy has presented at JavaOne several times and his material exploits his knowledge of the Java language.

John O' Conner has been an avid Java developer for years, and is seasoned in the language. He began his career with Sun Microsystems and helped to develop the internationalization and Unicode support libraries of the core Java SE platform. He authored chapters on those topics for the book, and more.

I authored chapters varying from Strings, object orientation, numbers and dates, database development, and more. We even threw in a chapter on Android so that interested Java developers could take a look at how to develop applications for the Android platform.

Check this book out soon, or pre-order now on Amazon the Apress site. This is a must-have for any Java developer!

I am currently working on my latest Apress book entitled Java EE 7 Recipes...it should be published late next year...stay tuned for more updates on that book!

Friday, March 04, 2011

Django-Jython 1.3.0 Final Available

The Django-Jython project is proud to announce the release of Django-Jython 1.3.0 Final!

This release adds Django 1.3.x compatibility for the Oracle, MySQL, MS SQL, and PostgreSQL backends. Please test with your Django-Jython apps and provide feedback.

Project Home: http://code.google.com/p/django-jython/
Documentation: http://packages.python.org/django-jython/

Thanks to all of those who helped out with this release, your time and effort is truly appreciated!

Support for Django 1.4 is coming soon...

Thursday, March 03, 2011

Jython 2.5.2 Final Released

The Jython development team is proud to announce the release of Jython 2.5.2 final! With this release comes new features, better performance, bug fixes, etc.

For the latest release info, please visit: http://jython.org/latest.html

Thanks to all of the developers for the hard work they put into this release. Looking forward to moving onto 2.6!

Tuesday, December 21, 2010

Oracle PL/SQL Recipes

Since the beginning of my career, I have worked with Oracle databases. I began as a database administrator, monitoring performance and creating database objects. From there, I became a more advanced DBA as I began writing PL/SQL code and creating triggers, functions, packages, and procedures in the database. After a while, I became interested in web application development because I was always receiving requests for creating database reports. Why write a SQL statement and re-run it every time someone wanted to see the output, when you could write a web query that accepted parameters as input and the user could run it on their own? That is the point when I discovered how to do web application development with PL/SQL and the Oracle PL/SQL web toolkit. My good friend and colleague, Matt Arena, showed me the ropes about developing PL/SQL web applications, and it was great! Now I was able to develop web-based queries whenever I had received a request for a report.

After a while, I began to write Java stored procedures because I was developing some sophisticated PL/SQL web applications by that time and I wanted to use some features that the Java language had to offer. Of course, this all worked very well...but I soon gained interest in developing Java Server Pages (JSP) based web Java web applications because they seemed a bit more versatile then PL/SQL web applications. I learned that I could more clearly separate business logic from display code using Java technologies, and began to learn more about it. Before long, I was a full-fledged Java application developer. I was developing Java enterprise applications for Oracle database, and using PL/SQL objects to help facilitate my applications where it made sense.

That brings me to where I am today. I still develop web applications for Oracle database using Java technologies and PL/SQL. I have broadened my horizons by using great languages such as Jython. Life couldn't be much better. This past year, I decided to author a book about PL/SQL that focuses on the basics...but also goes into advanced topics such as working with PL/SQL and Java to develop advanced solutions. I brought my highly respected coworker, Matt Arena, into the book as my co-author. Matt is the most advanced PL/SQL developer that I know, and he wrote the chapters that focus on PL/SQL web application development, collections, PL/SQL jobs, and performance. He taught me, and now he is sharing his great knowledge by teaching others. I authored many chapters that focus on the PL/SQL language fundamentals, and also some advanced chapters working with PL/SQL and Java application development.

Our book is entitled, Oracle PL/SQL Recipes - A Problem-Solution Approach. I recommend you picking it up if you are an Oracle applications developer. Learning PL/SQL is a great asset to any Oracle developer's toolbox. Even if you only work with Java applications, PL/SQL can help you to develop better-performing, and highly robust Oracle solutions. A big thanks goes to Apress and the entire editorial team, including my good friend Jonathan Gennick, who has done an excellent job editing this book. I look forward to working with him again on future projects. I also thank my colleague and great friend Matt Arena for showing me the ropes with PL/SQL web application development...leading my to where I am today in my career.

Oracle PL/SQL Recipes - A Problem-Solution Approach...publishing late December 2010.

Tuesday, October 12, 2010

JavaOne and Oracle Develop 2010 - A New Experience

I took my first trip to JavaOne this year. There were many deciding factors that made me choose to make the trip this year, but perhaps the biggest reason that I attended was due to the Oracle acquisition of Sun Microsystems that took place earlier this year. I wanted to see what Oracle's viewpoint was on the Java ecosystem, and what they planned to do with it over the next several years. I must say that I was pleasantly surprised with the message that I received at the conference, I think Java is alive and very well.

I attended several sessions each day, and the conference made for a very hectic week. I had never visited San Francisco before and I must say that I found it very similar to Chicago. Being a Chicago area person myself, I found nothing overly different about San Francisco as compared to Chicago, but then again, I did not take any opportunities to go sight seeing as I was completely focused on the conference itself.

Having never been to a JavaOne conference before, i think that it was fairly well organized. Now, JavaOne was spread across a few different hotels and one large tent...and in the past I believe that it was centered in the Moscone convention center. I thought that the hotel system worked, but it did make for some rather busy shuffles from session to session. I did like the fact that I had the opportunity to go outside in between sessions though, and since the Mason St. tent was in the center of it all, I could swing by the tent on the way to another session and pick up a coffee or chat with some interesting folk. This really enhanced the experience for me.

The sessions were well thought out and worthwhile. Of course, being a Jython fan I went to as many sessions that were centered on dynamic languages on the JVM as possible. Jim Baker and myself had put in for a Jython-specific talk at this year's JavaOne and unfortunately it was turned down. Our talk was going to focus on the overall picture of bringing dynamic languages to the JVM...and Jython was going to be the example-case. I wasn't too surprised when our session was turned down as there are thousands of submissions, but when I attended the conference it was clear to see why it was turned down...there were several excellent sessions regarding dynamic languages on the JVM already. To be quite truthful, the dynamic language sessions at JavaOne covered several different languages...and I feel that the most used languages on the JVM today were nicely represented. It would have been very nice to have a session devoted to Jython specifically, but the fact is that there are so many dynamic languages on the JVM nowadays, that there was just not enough room for a session on each.

To that end, I attended an excellent JRuby session as my first JavaOne session...it really started my experience off in a great way. The presentation was given by Charles Nutter and Thomas Enebo...a couple of JRuby architects. This was a solid session that really made me want to go and download JRuby afterwards and try it out. Having not tried JRuby prior to the session, I was really focusing more on seeing another dynamic language on the JVM and getting some ideas of how they implemented it. After the presentation, it was clear to see that the JRuby team has a focused effort and is doing very well in porting the Ruby language to the JVM...excellent session.

My second session also focused on languages on the JVM...it was entitled "Multiple Languages, One Virtual Machine". This talk was given by Brian Goetz and John Rose. They did an excellent job of discussing invoke dynamic and what the future holds for dynamic languages on the JVM. It was clear to see that Oracle is putting resource behind offering many different languages on the JVM...not just Java. They are behind the invoke dynamic effort, and it will be included in JDK 7...which is due out sometime in 2011.

I attended many sessions on Java EE 6, EJB, JSF, and other enterprise technologies as I am currently using EJB3 and JSF on many of my projects at work. After attending so many sessions on the EJB 3.1 Lite and JSF 2.0 features, it is clear to see that I need to update my code to take advantage of many of the new features that are available today. It is too easy to get a formula that works and just continue to develop applications using that formula. I fell into that trap over the last couple of years, mainly due to a shortage of time for learning the new stuff. Between my authoring of the Jython book and Oracle PL/SQL Recipes, I haven't enough time to devote an hour a day to learning EJB 3.1, JSF 2.0 or CDI. However, I am making a goal for myself to learn how to migrate my EJB 3.0 code bases to take advantage of the new technologies as I can see from the JavaOne sessions that the newest implementations of the APIs are clearly more productive and easier to manage.

And then there was JavaFX. This technology has always been in the back of my mind as something that I want to learn and begin to use in my projects. I had purchased and read the JavaFX Script book by Jim Weaver a while back...excellent book. As everyone knows by now, it was announced at JavaOne that JavaFX Script will be going away and that the JavaFX API will be changing so that it can be used directly with Java code. This is HUGE news for me as a Java and Jython developer. I attended a great session by Jonathan Giles and Stephen Chin regarding the development of JavaFX applications using alternate languages. They covered JRuby, Closure, Scala, and Groovy in the session. It really looks like the new JavaFX API is going to be great and I am looking forward to writing a JavaFX application using Jython. As a matter of fact, I spoke with Stephen Chin in the Mason St. tent later on, and he was also interested in developing a Jython demo. I hope to see something soon, and plan to develop Jython and JavaFX applications when the new JavaFX API is available.

My parting session was an introduction to Scala. I am glad that I attended this session as well as I have been in the dark about this language until now. I had been hearing lots of good things about Scala, but hadn't found the time to take a look. Attending this session gave me a great overview of the language and really gave me the bug that I needed to put it on my priority list as a language to learn in the coming weeks. Now I need to learn both JRuby and Scala...my time is really going to be growing thin!

Other activities that I took part in included:

Oracle Publisher's Seminar - Since I am writing the PL/SQL Recipes book, I was able to attend this great seminar. It gave me a good opportunity to learn about some Oracle strategies from the team leads themselves, and also meet other Oracle authors.

Jython BoF - Oti Humbel and myself gave a Jython BoF on Wednesday of the conference in the Parc 55 hotel. The BoF was not very well attended, but the appreciation event was also that evening and I suspect that had something to do with it. Overall, Oti and I were able to muddle through the list of open bugs that need to be repaired prior to a Jython 2.5.2 final release. I had a great time meeting with Oti and look forward to working with him on Jython for future releases. We also met with Frank Wierzbicki, the Jython project lead and one of my co-authors for the Jython book. It was great to talk Jython for a while with a couple of the core devs, and to strategize about future Jython developments.

Keynotes - The JavaOne keynotes were okay...lots of hype around the future of Java and JavaFX. Glad I attended them for the experience, but nothing too earth shattering. My favorite keynote was the Oracle Develop keynote by Tom Kyte. I have been a big fan of Tom Kyte for several years as he is a lead in Oracle database technologies and PL/SQL. Excellent keynote with some great insight on Oracle 11gR2 and some of it's new features (some that I have not used yet!).

JavaPosse - Perhaps the highlight of the conference for me was the JavaPosse BoF and rooftop party at the Passion Cafe. I listen to the JavaPosse religiously, and finally having a chance to see the crew in person and have drinks with them after the BoF was a great experience. They are truly great people who do an excellent job with the podcast. Thanks JavaPosse crew, excellent show at JavaOne.

So JavaOne 2010 was a new experience for me. I think that it was a great experience and I would be happy to attend another JavaOne at some point in the future. I think that given the atmosphere and the dynamics of the conference, it was a new experience for even those who had attended in previous years. It is nice to see that Java is in good hands with Oracle, and I am looking forward to a bright future.