
Introduce the course focus on ejb concepts and deploying ejb applications. Use eclipse to configure and deploy directly to a WebLogic server, with emphasis on database security and server setup.
Learn what EJB (enterprise JavaBeans) is and its purpose for building scalable, robust applications, and cover EJB 3.0 prerequisites.
Explore what EJB is, the role of the database, dependency injection, and the three bean types—session, entity, and message-driven beans—and how they enable a simple application.
Discover the advantages of using EJB for enterprise applications, where the container handles transactions, logging, load balancing, persistence, and exception handling, letting developers focus on business logic.
Download the Oracle WebLogic server, log in with an Oracle account, run the jar installer on any OS, extract to a software folder, verify Java 8, and create a domain.
Learn to create a new Oracle WebLogic domain using the common folder, configure admin credentials and development mode, and prepare the domain for deployment in Eclipse.
Create a new Java EE project with an archetype, build a session bean with remote and local interfaces, and configure a test mapping before server setup for the AGP application.
Configure an Oracle WebLogic server and domain, with WebLogic home and JDK 1.8, to prepare deployment for the EJB Maven project. Map the server in Eclipse and resolve issues.
Configure WebLogic server in Eclipse IDE, create a simple Ejb project with a method that prints a greeting, deploy via deployment services, and test in the WebLogic console.
Create a test client to execute the first EJB method. Retrieve the initial context, perform a naming lookup, and call the remote interface to print a greeting.
Understand the difference between stateless and stateful session beans: stateless beans hold no data and are scaled by the container, while stateful beans maintain data with the business logic.
Explore how a stateful session bean can hold inputs from the client, track how long it has been alive, and apply a timeout using a time unit such as minutes.
Explore how EJB persistence connects objects to a relational database through entities, entity manager, persistence units, and data sources, enabling configurable database access via data sources instead of hard-coded credentials.
Explore how a message driven bean processes asynchronous JMS messages, compare it with stateless and stateful beans, and learn to set up a queue, connection factory, and JMS module.
Create a JMS queue in WebLogic: set up a JMS module, sub deployment, a connection factory, and the queue, then monitor the queue and test delivery with a message-driven bean.
Post a message to a JMS queue using a Java EE test class, configure the JMS connection factory and initial context, and verify delivery by inspecting the queue.
Learn to implement a message-driven bean that consumes text messages from a queue, configure the destination and connection factory, implement onMessage, and verify processing through deployment and console monitoring.
Explore how to implement an EJB timer service by creating a timer with a timeout, injecting session context, and handling timeout events with a timed method.
Mastery in Java EJB presents dependency injection in EJBs, wiring dependencies with annotations like @EJB and @Resource. It demonstrates calling one EJB from another across deployments using injected references.
Learn how interceptors in EJB execute pre-logic before business methods using around invoke, and how to configure them at default, class, or method levels.
Examine container-managed and bean-managed transactions in EJB, detailing how the container handles transaction lifecycles automatically versus manual control via user transaction, with attributes like required, not supported, mandatory, and never.
Explore how entities in EJB map Java objects to database tables, modeling one-to-one, one-to-many, many-to-one, and many-to-many relationships, and learn automated entity creation for persistence.
Map relational tables from a MySQL database to Java entities using annotations, define primary keys, and build simple entity classes that reflect table structures like student, customers, and orders.
Learn to create a Java entity from a MySQL table by configuring a JDBC connection, generating an entity class, and annotating with table and column mappings for persistence.
Learn to build an EJB order management bean and use an entity manager and named queries to retrieve all students from the database.
Explore creating entities for additional tables in a Java EJB application, configure a persistence unit with resource-local transactions, and map entities to related tables such as student, customer, and employee.
Explore how to use EJB query language with entities to fetch data from relational tables, mastering named queries, create queries, and stored procedures via the entity manager.
Create and use named queries inside an entity, calling them with parameters to fetch students by name, and understand how the container translates the query into entities.
Learn to create and execute queries in a Java EJB app, fetch details from a table, deploy changes, and test results with a native code path and a test client.
Learn to use SQL native queries in EJB with the entity manager to fetch all students as a list of objects, then print their data with streams and lambda expressions.
Learn to create a join query across office and employee entities to list employees by city. Implement with EJB and JPQL, run, and view results.
Execute a complex entity query by joining employees, customers, and orders to retrieve all orders for a specific employee via shared keys such as employee number and customer number.
Demonstrates updating an employee's first and last name using the EJB entities query by employee number, then deploying, testing, and addressing container versus bean transaction issues.
Explore two approaches to updating employee records using an entity manager, emphasizing active transactions and proper begin, commit, and rollback.
Insert records into the database using an EJB entity by managing transactions and choosing between persist for inserts and merge for updates, while passing office details data.
Explore advanced ejb concepts, including AGP, Hibernate, and Egypt query language, and learn to manage containers, entities, annotations, exception handling, and timer services.
Invite feedback to guide updates and added materials, and share contact options via messenger, Udemy, social media, or YouTube for help with samples and issues.
EJB - Enterprise Java Bean
EJB (Enterprise Java Bean) is used to develop scalable, robust and secured enterprise applications in java.
The development of EJB 3 is faster than EJB 2 because of simplicity and annotations such as
@EJB
@Stateless
@Stateful
@TransactionManagement
@Resources
@SessionContext etc.
Topics of EJB Specification
What is EJB
What is enterprise java beans(EJB) and what are the advantages of EJB?
Session Bean
The session bean represents the business logic. It may be stateless, stateful or singleton.
Stateless Session Bean
What is stateless session bean, its lifecycle and example.
Stateful Session Bean
What is stateful session bean, its lifecycle and example.
JMS Tutorial
How to create robust and asynchronous message for distributed applications. What are messaging domains?
What is Java Messsage Service and what are the advantages of JMS.
What is JMS Queue? It is used for peer to peer messaging where a single message is delivered to only one receiver.
What is JMS Topic? It is also known as Publisher and Subscriber model where a single message is delivered to all the subscribers.
Message Driven Bean
A MDB is a JMS client that is invoked by passing message. It is deployed on the application server.
Entity Bean
In EJB 3.2, it is deprecated. Now it is replaced with JPA.
Thanks,
AJ