Instructor-led training
Fast Track to Enterprise JavaBeans 3.1 (EJB3) and the JavaPersistenceAPIV2 (JPA2) Training in Aliquippa, Pennsylvania
This course provides thorough coverage of the EJB3 technology - presented in a clear and effective manner.
What you'll learn
Private Training for Teams
This course is offered as private, instructor-led training for organizations, onsite in Aliquippa, Pennsylvania or live online. Dates, delivery format, and course content are arranged around your team's requirements.
This course is not currently scheduled as a public class for individual enrollment.
Request Group TrainingPrerequisites
Course Outline
Why EJB 3.1 and JPA 2 take effort to master
The Java syntax is the easy part. Most of the difficulty comes from the container. You write annotated classes, and the application server decides when to create them, inject their dependencies, wrap their calls in transactions, pool them, passivate them and destroy them. Many bugs show up only at deployment or at runtime, not at compile time.
The syllabus builds in layers, and each layer depends on the one before it:
- Session beans first. Stateless and stateful beans, local and remote business interfaces, packaging (ejb-jar, EAR, and EJB in a Java EE 6 WAR), JNDI and portable lookup names. Resource and EJB injection, lifecycle callbacks, interceptors, asynchronous methods, singletons and timers come after that.
- Messaging. JMS concepts (publish/subscribe versus point-to-point, ConnectionFactory, Destination) come before message-driven beans and
activationConfig. A common misconception is that an MDB is simply a bean called remotely. It is a message consumer with no client-visible interface. - Transactions, security and exceptions. Transaction attributes and scope, bean-managed transactions,
@RolesAllowedand@PermitAll, and the difference between application and system exceptions. Exception type decides whether a transaction rolls back, which surprises many developers. - JPA 2. Entities and the persistence context, the entity states (transient, persistent, detached, removed), JPQL, the Criteria API, optimistic locking, relationship mapping, lazy versus eager loading, cascading, fetch joins and the three inheritance strategies.
The hardest JPA ideas are that an entity's behavior depends on its state and that a lazy association may not be loadable once the entity is detached. Neither is visible in the source code. Because EJB transactions control the persistence context, the two halves of the course also reinforce each other.
Who it suits and what to take around it
The stated prerequisite is a working knowledge of Java. The course is introductory for EJB and JPA, not for Java itself. It suits developers who maintain or build server-side Java applications and training managers who need a team productive on session beans, messaging, transactions and persistence in one five-day block. The syllabus uses Java EE 6 packaging and EJB 3.1 features such as singletons, asynchronous methods and calendar-based timers. It is a natural fit for teams supporting systems at that level. Developers who need Java fundamentals first can start from the Java Programming courses and learning guide.
Organizations on a later Java EE level can compare the Fast Track to EJB 3.2 (JEE 7 level) and JPA2 course. Private training can also be tailored to the versions a team actually runs, and you can request a training proposal to discuss that.
Once the business layer works, the Developing RESTful Services Using Java course is a sensible next step for teams that need to expose it over HTTP.
Illustrative scenarios
The scenarios below are illustrations of how the course material can be applied. They are not descriptions of specific organizations or of the course's lab exercises.
- Order intake with reliable hand-off. A team might accept orders through a stateless session bean and publish a message to a queue. A message-driven bean would then handle fulfillment, so the two sides stay loosely coupled. Declarative transaction attributes decide whether the database write and the message send commit or roll back together.
- Scheduled maintenance work. For example, a nightly cleanup or report job could use a calendar-based timer. A singleton session bean could hold shared state, and an asynchronous method could keep a long step from blocking the caller.
- A domain model with concurrent editors. A team might map customers, accounts and a class hierarchy with one-to-many and many-to-many relationships, and choose single-table or joined inheritance. They could add a version attribute for optimistic locking so that two users editing the same detached entity do not silently overwrite each other. Fetch joins would keep a report query from issuing one query per row.
AI coding assistants with EJB and JPA
AI coding assistants are useful for boilerplate here: entity classes with @Entity and @Id, simple JPQL and Criteria queries, persistence.xml drafts, and first-pass session bean skeletons.
They tend to fail where behavior depends on the container or on runtime state:
- Transaction semantics. Generated code often ignores which transaction attribute applies, or lets an exception type decide rollback by accident.
- Lazy loading. Code that works inside a transaction can fail on a detached entity, or hide an N+1 query pattern that only shows up with real data volumes.
- Platform mismatch. Suggestions may mix annotations, package namespaces or configuration styles from a different Java EE generation or from Spring, so they must match the target server and Java version.
- MDB and security configuration. Activation properties and role mappings are server-specific, and assistants often invent plausible but wrong values.
To verify, deploy to a real container and read the logged SQL. Write tests that cross transaction boundaries and cover rollback, detachment and concurrent updates. Review every generated annotation against the behavior you intend, and have a person review security annotations such as @RolesAllowed.
Frequently asked questions
What level is this course?
It is introductory to EJB and JPA but runs five days and covers a broad range, from session beans and JNDI through message-driven beans, transactions, security and JPA 2 relationships, inheritance and locking. It assumes you already program in Java.
What do I need to know beforehand?
A working knowledge of Java. No prior EJB, JMS or persistence experience is assumed, since the syllabus starts with the goals of EJB and the basic session bean model.
What does the course cover?
Session beans (stateless, stateful, singleton), packaging and deployment, JNDI and client lookup, dependency injection, interceptors, timers, JMS and message-driven beans, transactions, security and exceptions. It then covers JPA 2: mapping, EntityManager, JPQL, the Criteria API, optimistic locking, relationships, inheritance mapping and best practices. Most topics have hands-on labs.
Can this be delivered privately for our team, onsite or online?
Yes. HSG delivers private training for organizations either onsite at the client's location or live online.
Can the content be customized?
Private training can be customized, including tailoring to the technology versions your organization uses. You can request a training proposal to discuss your environment and priorities.
Training locations
Fast Track to Enterprise JavaBeans 3.1 (EJB3) and the JavaPersistenceAPIV2 (JPA2) training across the U.S. and beyond.
We provide private Fast Track to Enterprise JavaBeans 3.1 (EJB3) and the JavaPersistenceAPIV2 (JPA2) training for organizations, onsite at your location or live online, throughout the United States and internationally.
View all Fast Track to Enterprise JavaBeans 3.1 (EJB3) and the JavaPersistenceAPIV2 (JPA2) training locations
Train your team with HSG
Private, instructor-led training customized for your organization.
- Onsite or live online delivery
- Customized curriculum
- For a single employee or an entire team
- Flexible scheduling
- Experienced instructors
Questions? Call us at 303.377.6176
or email info@hartmannsoftware.com
Ready to train your team?
Let's customize this training for your organization.
Tell us about your employees, your goals, and your preferred schedule. We'll prepare a training proposal covering scope, delivery format, and pricing.