In weniger als einer Minute können Sie mit dem Lesen von EJB 3.1 Cookbook auf Ihrem Kindle beginnen. Sie haben noch keinen Kindle? Hier kaufen oder mit einer unserer kostenlosen Kindle Lese-Apps sofort zu lesen anfangen.

An Ihren Kindle oder ein anderes Gerät senden

 
 
 

Kostenlos testen

Jetzt kostenlos reinlesen

An Ihren Kindle oder ein anderes Gerät senden

Der Artikel ist in folgender Variante leider nicht verfügbar
Keine Abbildung vorhanden für
Farbe:
Keine Abbildung vorhanden
 

EJB 3.1 Cookbook [Kindle Edition]

Richard M. Reese
5.0 von 5 Sternen  Alle Rezensionen anzeigen (1 Kundenrezension)

Kindle-Preis: EUR 21,65 Inkl. MwSt. und kostenloser drahtloser Lieferung über Amazon Whispernet

Kostenlose Kindle-Leseanwendung Jeder kann Kindle Bücher lesen  selbst ohne ein Kindle-Gerät  mit der KOSTENFREIEN Kindle App für Smartphones, Tablets und Computer.

Geben Sie Ihre E-Mail-Adresse oder Mobiltelefonnummer ein, um die kostenfreie App zu beziehen.

Weitere Ausgaben

Amazon-Preis Neu ab Gebraucht ab
Kindle Edition EUR 21,65  
Taschenbuch EUR 46,00  


Produktbeschreibungen

Kurzbeschreibung

Each recipe comprises step-by-step instructions followed by an analysis of what was done in each task and other useful information. The book is designed so that you can read it chapter by chapter, or look at the list of recipes and refer to them in no particular order. It is packed with useful screenshots to make your learning even easier. The book is aimed at Java EE and EJB developers and programmers. Readers should be familiar with the use of servlets in the construction of a web application. A working knowledge of XML is also desirable.

Produktinformation

  • Format: Kindle Edition
  • Dateigröße: 2759 KB
  • Seitenzahl der Print-Ausgabe: 436 Seiten
  • Verlag: Packt Publishing (8. Juni 2011)
  • Verkauf durch: Amazon Media EU S.à r.l.
  • Sprache: Englisch
  • ASIN: B005N8PSFG
  • Text-to-Speech (Vorlesemodus): Aktiviert
  • X-Ray:
  • Word Wise: Nicht aktiviert
  • Durchschnittliche Kundenbewertung: 5.0 von 5 Sternen  Alle Rezensionen anzeigen (1 Kundenrezension)
  • Amazon Bestseller-Rang: #240.973 Bezahlt in Kindle-Shop (Siehe Top 100 Bezahlt in Kindle-Shop)

  •  Ist der Verkauf dieses Produkts für Sie nicht akzeptabel?

Mehr über die Autoren

Entdecken Sie Bücher, lesen Sie über Autoren und mehr

Welche anderen Artikel kaufen Kunden, nachdem sie diesen Artikel angesehen haben?


Kundenrezensionen

4 Sterne
0
3 Sterne
0
2 Sterne
0
1 Sterne
0
5.0 von 5 Sternen
5.0 von 5 Sternen
Die hilfreichsten Kundenrezensionen
5.0 von 5 Sternen No EJB stone age - thank you 14. November 2011
Format:Taschenbuch|Verifizierter Kauf
Finally a book that does not spoil its explanation of EJB 3.1 by permanently referring to some arcane detail of some historic version of JEE.
No convoluted and distracting explanations why now all things are easy. Thank You!
War diese Rezension für Sie hilfreich?
Die hilfreichsten Kundenrezensionen auf Amazon.com (beta)
Amazon.com: 3.7 von 5 Sternen  11 Rezensionen
3 von 3 Kunden fanden die folgende Rezension hilfreich
2.0 von 5 Sternen Too basic, often repetitive and thus boring - 400 pages yet 100 would make it a better reading 19. Juli 2011
Von Jacek Laskowski - Veröffentlicht auf Amazon.com
Format:Taschenbuch
In short, "EJB 3.1 Cookbook" by Richard M. Reese did not live up to my expectations. Any, at all. I found some interesting bits (esp. "Using interceptors with timers" in Chapter 9 and "Creating your own interceptor" in Chapter 12), however they don't merit reading the entire book as the time it took was not worth it. My biggest gripe is that the book's often too basic, focusing on irrelevant things, and trying to follow a fixed structure of recipes often repeats itself, and thus boring. It's tempting to skim over the pages or get sidetracked. It's by no means engaging.

The book is a compilation of, what the author called, recipes. All the receipts meant to create a cookbook, and while they were "simple", they weren't "incredibly effective", quoting from the book's front cover.

I assume cookbooks are meant like this - they provide recipes, and while you may find out how to achieve a goal, you won't find out whether it's the most effective or appropriate in a given scenario. You find no answers on why it's done that way or why it was possible at all.

According to "Who this book is written for" (see the book's website or the closing cover) "the book is aimed at Java EE and EJB developers and programmers." I could hardly disagree with that general and vague description - it says nothing about their experience that I believe is crucial for this book to shape expectations before giving the book a go.

I don't think it aims at people who are just starting their journey into EJB 3.1 and/or Java EE 6 as there's too much loosely placed explanations of different approaches and one has to be very careful not to follow the recipes in their entirety.

On the other hand, I doubt that it aims at developers who have already spent some time with EJB 3.1 (where I belong to), either - it's too basic and clattered with servlets as the way to showcase the EJB 3.1. There's, however, no recipe with EJB beans bundled in a WAR. That would greatly have eased a few recipes and, moreover, ditch a couple of pages. I'd rather avoid using servlets for every sample, especially where there's more servlet/HTML code than EJB one. It's not uncommon.

I'm thus troubled to clearly point out who the book is really aimed at. Many pages cover basic Java programming material (it's clearly visible in chapter 12 "EJB Techniques" where java.util.Date/Calendar, java.util.logging and String manipulation are presented, or when @Override on page 10 is explained), whereas there are pages with more advanced EJB 3.1 concepts - timers, transaction, security or interceptors. Glancing at the table of contents it's easy to get deceived into thinking the book will cover a lot of advanced stuff, but it doesn't take long to realize that the table of contents looks promising, while the material covered is not as intensive as it may have been considered.

The book uses NetBeans 6.9.1 and GlassFish 3.0.1, but they're almost invisible as the topics don't touch too many container- or IDE-specific aspects. Just a few pages should not spoil the book for readers who use other tools (provided the other shortcomings did not already).

Unfortunately, it's easy to find a typo in the text or the code snippets. The editing process leaves much to complain about.

Sentences like "Mozilla Firefox or Google Chrome can be used to display the output of servlets" (page 3), "Message sent successfully", "Message sent successfully2" (page 21), or explanation of how the jar tool works (in chapter 11, pp. 345-351) are, say, how the book is written - there are 400 pages yet 100 would make it a better reading.
1 von 1 Kunden fanden die folgende Rezension hilfreich
2.0 von 5 Sternen EJB 3.1 Cookbook Review 16. August 2011
Von www.adrianwalker.org - Veröffentlicht auf Amazon.com
Format:Taschenbuch
EJB 3.1 Cookbook is at best an average book. The information in the book is very densely packed, but often repetitive and sometimes tangential to the current topic being addressed. The information in the book is presented in recipes - short how-to examples focusing on a specific JavaEE / EJB feature, put together to form a cookbook.

Each recipe is presented in a formulaic way, with information under the sub-headings: Getting ready, How to do it..., How it works... and There's more. Some of the code examples, especially at the start of the book, are trivial; and the explanations of how the code works are sometimes no more useful then reading the JavaEE 6 javadoc.

The book covers the full range of EJB beans and the Java Persistence API, with about equal time being spent on features new to EJB 3.1 and existing features from 3.0.

It's difficult to say who the books target audience is. It doesn't provide enough guidance to developers new to Java, but spends too much time covering some of the basics which more experienced EJB developers will already be familiar with. If you're already experienced with EJB 3.0 development and need a handy reference for existing annotations, and want to get a good understanding of the new annotations in 3.1 and how to use them, then this book might be useful.

This book was laborious to read from cover to cover, and I wouldn't suggest reading it that way. I would recommend consulting its relevant recipes before implementing new code.

NetBeans 6.9.1 and GlassFish v3.0.1 are stated as requirements for using this book. In practice, specific features of these products are barely used. There is no reason why you couldn't use Eclipse and JBoss AS, or any other code editors and application servers which support EJB 3.1.

Chapter 1 is an introduction to Enterprise JavaBeans, Dependency Injection and the Java Naming and Directory Interface. It covers creating a simple Stateless session bean and accessing its functionality from a variety of clients. Developers who are familiar with EJB development will find this chapter a waste of time. Developers new to EJB and JNDI will find it baffling and of no immediate practical use, I'd recommend skipping this chapter.

Chapter 2 covers session beans - Stateless, Stateful and the new Singleton bean. It provides examples of how to use the new @Startup and @DependsOn annotations to control order of singleton initialisation, concurrency and locking, controlling initialization and local and remote interfaces.

The last and most useful part of the chapter uses the @Asynchronous annotation to schedule background processes, and demonstrates the Future and AsyncResult classes.

Chapter 3 explains Message Driven Beans and introduces Queues and Topics. Good program design and possible performance enhancements of separating object production from consumption is illustrated. More interesting and useful recipes are presented towards the end of the chapter, but the first five which deal with different message types are almost identical.

Chapter 4 introduces Object-relational mapping and the Java Persistence API. Familiar JPA concepts and annotations are covered as well as new annotations for temporal validation @Past and @Future, regular expression validation using @Pattern and integer and boolean validation.

Chapter 5 builds on chapter 4 and introduces the Java Persistence Query Language and the new Criteria API. CRUD operations using JPQL are covered extensively, but the new Criteria API is only given one recipe. I would have liked as many pages covering the Criteria API as there were on JPQL, the increased performance and type safety of this new feature are things I would like to know more about.

Chapter 6 contains very useful information on transaction processing. The defaults of Container Managed Transactions have always been sufficient for me, so I was interested to learn more about transaction types and Bean Managed Transactions.

EJB Security is covered in chapter 7. The concepts of users, groups and realms are introduced and specific features of GlassFish are used for the first time to prepare a File Realm. Declarative role based security using annotations is covered, as well as controlling security programmatically when annotations are inadequate.

Chapter 8 introduces Aspect Oriented Programming and the @Interceptor annotation. I've never been impressed with AOP, it always seemed more trouble than it was worth, but this chapter shows how simple EJB 3.1 makes it. There is some good information in this chapter, it demonstrates well how AOP can simplify code by moving functionality not central to a business method outside of the method.

Chapter 9 - Timer Services demonstrates automatic/declarative timers, implemented using annotations and programmatic timers using the TimerService class.

Chapter 10 covers SOAP web services using JAX-WS, which will be familiar to EJB 3.0 developers, as well as creating RESTful services with JAX-RS.

The pros of using XML deployment descriptors in environments which require more dynamic configuration are highlighted in chapter 11. Also covered is the usage of the 'jar' command to examine JAR and WAR file contents, and a quick overview of the java classpath and class loading.

Chapter 12 ends the book with recipes which are applicable to Java programming in general, not just EJB development. The chapter contains general good practice tips like using a logging framework instead of printing to System.out, not leaving empty catch blocks, using BigDecimal to avoid rounding errors for currency, and avoiding string concatenation performance inefficiencies by using StringBuilder.

Overall, I think this book is OK. I'd recommend using it as a reference to consult rather than a book to pick up and work through end to end.

I think the book is suitable for developers looking to brush up on the newest EJB annotations, but because of this, much of the book will be old news to many readers. Even the information I felt was relevant and interesting to me can easily be found on the Oracle website in the form of The Java EE 6 Tutorial and javadocs.
1 von 1 Kunden fanden die folgende Rezension hilfreich
4.0 von 5 Sternen EJB 3.1 Cookbook 4. August 2011
Von D. SALTER - Veröffentlicht auf Amazon.com
Format:Taschenbuch
EJB 3.1 Cookbook is aimed at Java EE and EJB developers who need a reference guide that addresses the challenges provided by EJB3.1 in the form of "how-to" sections. At just over 400 pages, the book provides many recipes that will be of benefit to the majority of developers using EJB technologies.

The book is broken down into 12 chapters which form a natural progression starting with simpler recipes through to more advanced EJB techniques. Each chapter in the book starts off with an introduction detailing the subjects to be described in the rest of the chapter followed by the recipes themselves. Each recipe follows a standard "pattern", starting with a title (e.g. "Handling a map-based message") and a description of what the recipe is trying to achieve. Recipes are then broken down into sections:

* "Getting ready" provides an overview of how the recipe works.
* "How to do it..." provides a full description of how to achieve the recipe's objectives.
* "How it works..." explains how any code samples are pulled together and explains any code referenced in the previous section.
* "See also" identifies any other recipes that may include pertinent information to assist the reader in their understanding.

EJB 3.1 Cookbook is an excellent resource in an EJB developer's library. It's not the sort of book you pick up and read from cover to cover rather a useful resource that you pick up when you think "How do I do xxx in EJB?". With over 100 recipes this book is recommended to developers using EJB technologies.
3.0 von 5 Sternen Look for something broader and less verbose 24. Oktober 2013
Von Tomasz Nurkiewicz - Veröffentlicht auf Amazon.com
Format:Taschenbuch
EJB 3.1 Cookbook by Richard Reese aims to provide "a collection of simple but incredibly effective recipes" - quoting the subtitle. The book covers expected part of the EJB stack: session and message-driven beans, JPA, security, interceptors, timer service and web services. Contents are
organized around so called recipes - short (no more than three pages long) micro-chapters focused on one specific issue. This is the most advantageous feature of this publication: all recipes all self-contained most of the time, so one can jump between them and apply the most suitable in given scenario. This makes the book suitable for both the beginners, which should read it from cover to cover and slightly more experienced developers. However the latter ones will probably prefer more comprehensive sources and skip significant parts of the book.

Although I found the book structure very convenient, contents (both granularity and volume) are highly subjective and controversial. On the one hand the author devotes five recipes to describe separately each JMS message type (string, byte, stream, map and object) - each one is almost identical. Whilst he could only list different types, he fills half of the JMS chapter this way (sic!) On the other hand, there is only one recipe explaining new JPA 2.0 Criteria API - to make matters worse, only using weakly typed queries. Probably one of the most important new features in EJB 3.1 stack has been covered on two pages. And this API is not particularly easy to grasp. To depict you the scale - the art of adding Bean Validation annotations (@NotNull etc.) on fields required ten pages and eight recipes... Where a half-page bullet-list would suffice.

The last chapter - EJB Techniques - is very intriguing. Lots of valuable and accurate tips have been given, like the difference between Date and Calendar, logging and dealing with exceptions, effective String manipulations. Despite appearances, this is not the basic Java knowledge and many experienced programmers still don't know that SimpleDateFormat is not thread-safe and that Date class does not store time zone. I am really happy that this kind of knowledge found its way in the book. Unfortunately - in the wrong one. That being said, there are more appropriate books, not focused on EJB or even Java EE. Here it just looks like putting anything useful to reach dozen chapters in total.

There are however bright sides as well. I particularly enjoyed Transaction Processing and Interceptors chapters. In the former one the author briefly but succinctly explains different transaction propagation and error handling behaviours, very important topics. Table on page 210 captures the essence of transaction demarcation in few simple rules, brilliant in its simplicity. In the interceptors chapter the recipes are focused on typical cross-cutting concerns, forming handy starting point. Also pretty informative.

When in comes to code examples and use-cases, they were generally interesting and well thought. Nevertheless, I am still awfully confused after reading a recipe on @Singleton: "We will assume that our game will never have more than one player so a singleton is an appropriate choice " - says the author to justify the usage of singleton to store user attributes. Yes, I think we are all using Enterprise Java Beans and Application Servers to develop systems that would never have more than one user at a time... (Hint: statefull session bean) The same thing with the usage of Facade pattern throughout the book. First the author quotes the exact definition of this design pattern and then names a class wrapping EntityManager and providing convenient, strongly typed create(), remove(), findAll(), etc. - PatientFacade. No, this class is not hiding the complexity of Patient entity, and all programmers all over the world would call this abstraction a Repository or DAO. Not here.

By the way in the same recipe one-to-many relationship is introduced between a patient and medication, where clearly many-to-many is required. Curiously enough, in the next recipe DISTINCT SQL statement is used to filter out duplications that have appeared due to denormalization. Well, if the database was designed properly, there wouldn't be any duplicates on the first place... After all these misleading and sometimes harmful advices, typos and errors in source codes (ClassNoDefException? - never heard of it...) are not that irritating.

In conclusion, despite all the deficiencies and inconsistencies, I mostly enjoyed reading this book. Once again I will highlight the very elegant chapter-recipe structure and the fixed layout inside each recipe. I believe it is suitable for people that suddenly inherited an EJB application and need an immediate help and suggestions. However on the long run, they should invest in more comprehensive publication. Few years back I managed to pass SCBCD exam (EJB 3.0 by that time) after reading Enterprise JavaBeans 3.0. With the book in question it would be virtually impossible. If you need a quick and dirty, yet entertaining source of ready solutions, go ahead. Otherwise, definitely look for something broader and less verbose.
4.0 von 5 Sternen A Good Reference CookBook 26. Februar 2012
Von John Yeary - Veröffentlicht auf Amazon.com
Format:Taschenbuch
I had the great opportunity to review the EJB 3.1 Cookbook by Richard M. Reese from Packt Publishing. The book provides a number of simple "recipes" for getting specific tasks accomplished in a compact and simple way. I thoroughly enjoyed reading the book. Admittedly it much easier to read a cookbook than some other technical content.

The content is divided into 12 chapters with numerous recipes per chapter. The topics range from an introduction to EJBs to web services. Each section generally has six to eight recipes. Each recipe is easily digestible with a minimum amount of EJB knowledge to start with. Keep in mind, this book will be easy to use if you have a minimum level of experience. Some recipes are sufficiently simple enough for a beginner.

The book will guide a novice to become a practitioner though expertly done examples. Advanced topics are covered in a way to make them seem simple. The practitioner will begin to become an expert.

As a general rule, I would not recommend anyone to read a cookbook from cover to cover. This applies to a "real" cookbook as well. However, if you are trying to get a deeper understanding of the EJB as a tool, then reading the book will at least add these recipes to your toolbox to draw upon when needed.

There are a number of important facts that a developer should keep in mind. These kernels of truth are what makes the difference in a book, and a reference. This manuscript is filled with a number.

In Chapter 2, there is a very succinct explanation of write locks.

"A write lock does not permit concurrent access to a method. Once a client begins executing a method marked with a write lock, no other clients are permitted access to the method until the method invocation completes. Other clients are blocked. This is the default concurrent behavior of singletons.
This is a very important default behavior and should be kept in the developers mind when working with singletons. This default behavior means that you don't have to synchronize within singleton methods unless you change this default behavior. This is a great example of what you can find in this book."

Chapter 4 on EJB persistence includes a recipe on validating null and temporal fields. The @Null annotation is mentioned which validates that a field is null. I am not sure I am convinced of the usefulness of this particular annotation, as opposed to the @NotNull annotation which has more direct usefulness. The @Future and @Past annotations are really helpful. These simple annotations have removed a lot of boiler plate code, and made the check of a date much simpler to understand.

Chapter 6 on Transaction Processing is a really well thought out section, and explains the differences between Container Managed Transactions (CMT) (default), and Bean Managed Transactions (BMT). This is a must read for anyone doing anything beyond simple transactions. The explanation on the limitations of BMT are very important to consider. The chapter explains the transaction annotations to a level that I have not really seen in other books. The recipes (examples) are very clear, and make the concepts much easier to understand. For example:

"There are a few restrictions on the use of transaction attributes. First, the REQUIRED attribute can not be used for methods of web service endpoints. This is because the caller of the endpoint has not started a transaction and the since the REQUIRED attribute requires one, it will fail."

This is very well written and explains the concept, and gives reasons why this will not work.

The chapter on EJB security mentioned a feature in GlassFish which I think is very cool, and only requires checking a check box to enable. The feature is Default Principal to Role Mapping. This allows you to avoid having to generate a XML deployment configuration files to map the roles from the Web/EJB application to roles defined in a realm on the server.

The chapter on Interceptors provides a number of good use case examples where interceptors really shine. I really liked this chapter and the explanation of annotations for use with interceptors like @ExcludeClassInterceptors and the differentiation between class and method interceptors. The explanation on interceptor chaining is one of the easiest explanations I have seen.

If I had a single complaint about the book, it would be chapter ten on Web Services. It has a couple of recipes, but not nearly enough. Web services play a major role in EE today; especially JAX-RS. The lack of a number clear examples is a missed opportunity.

Overall I found the book to be really well done, and I would gladly keep it as a reference for myself, and team. I would give it (4/5) stars. It is well written and worth purchasing.
Waren diese Rezensionen hilfreich?   Wir wollen von Ihnen hören.
Kundenrezensionen suchen
Nur in den Rezensionen zu diesem Produkt suchen

Kunden diskutieren

Das Forum zu diesem Produkt
Diskussion Antworten Jüngster Beitrag
Noch keine Diskussionen

Fragen stellen, Meinungen austauschen, Einblicke gewinnen
Neue Diskussion starten
Thema:
Erster Beitrag:
Eingabe des Log-ins
 

Kundendiskussionen durchsuchen
Alle Amazon-Diskussionen durchsuchen
   


Ähnliche Artikel finden