Exam Objective 8.4 Describe at a high level the fundamental benefits and drawbacks of using J2EE server-side technologies, and describe and compare the basic characteristics of the web-tier, business-tier, and EIS tier.
Chapter 10:Understanding Java Related Platforms and Integration TechnologiesIt Academy
Exam Objective 6.1 Distinguish the basic characteristics of the three Java platforms: J2SE, J2ME, and J2EE, and given a high-level architectural goal, select the appropriate Java platform or platforms.
Chapter 10:Understanding Java Related Platforms and Integration TechnologiesIt Academy
Exam Objective 6.1 Distinguish the basic characteristics of the three Java platforms: J2SE, J2ME, and J2EE, and given a high-level architectural goal, select the appropriate Java platform or platforms.
Introduction to J2EE framework . Gives the primary knowledge about the framework involves in J2EE based web development . This is like Struts , Hibernate , spring ,JSF etc.
Java is a general-purpose computer-programming language that is concurrent, class-based, object-oriented, and specifically designed to have as few implementation dependencies as possible.
Framework adoption for java enterprise application developmentClarence Ho
Java enterprise framework description and comparison.
Experience sharing on a project done, include the architect design, challenges and lesson learn.
Some thoughts on choosing framework and how to cope with the rapid change of technology.
Deliver training resources across the world
Help to manage the unanticipated challenges
Performance driven and proven training professionals
High quality training is provided for corporate needs
Chapter 11:Understanding Client-Side TechnologiesIt Academy
Exam Objective 7.1 Describe at a high level the basic characteristics, benefits, and drawbacks of creating thin-clients using HTML and JavaScript and the related deployment issues and solutions.
Chapter 9:Representing Object-Oriented Concepts with UMLIt Academy
The SCJA exam requires minimum knowledge of the UML Infrastructure and Superstructure specifications. Of the 14 UML diagram types, the class diagram is the only diagram type on the exam.
There is value in understanding UML diagrams and features that are outside the scope of this exam.
So in your independent research on UML, don’t ignore the other diagram types since this knowledge will surely come in handy later for you at work.
Chapter 6:Working with Classes and Their RelationshipsIt Academy
Exam Objective 1.3 Describe, compare, and contrast class compositions, and associations (including multiplicity: one-to-one, one-to-many, and many-to-many), and association navigation.
Chapter 5:Understanding Variable Scope and Class ConstructionIt Academy
Exam Objective 4.2 Given an algorithm as pseudo-code, determine the correct scope for a variable used in the algorithm and develop code to declare variables in any of the following scopes: instance variable, method parameter, and local variable.
Chapter 4:Object-Oriented Basic ConceptsIt Academy
Exam Objective 1.1 Describe, compare, and contrast primitives (integer, floating point,boolean, and character), enumeration types, and objects.
Exam Objective 3.1 Develop code that uses primitives, enumeration types, and object references, and recognize literals of these types.
Chapter 3:Programming with Java Operators and StringsIt Academy
Exam Objective 4.5 Given an algorithm as pseudo-code, develop code that correctly applies the appropriate operators, including assignment operators (limited to: =, +=, -=), arithmetic operators (limited to: +, -, *, /, %, ++, --), relational operators (limited to: <,><=,>, >=, ==, !=), logical operators (limited to: !, &&, ||), to produce a desired result. Also, write code that determines the equality of two objects or two primitives.
Chapter 3 : Programming with Java Operators and StringsIt Academy
Exam Objective 4.5 Given an algorithm as pseudo-code, develop code that correctly applies the appropriate operators, including assignment operators (limited to: =, +=, -=), arithmetic operators (limited to: +, -, *, /, %, ++, --), relational operators (limited to: <,><=,>, >=, ==, !=), logical operators (limited to: !, &&, ||), to produce a desired result. Also, write code that determines the equality of two objects or two primitives.
Chapter 2 : Programming with Java StatementsIt Academy
Exam Objective 4.1 Describe, compare, and contrast these three fundamental types of statements: assignment, conditional, and iteration, and given a description of an algorithm, select the appropriate type of statement to design the algorithm
JAVA CERTIFICATION EXAM OBJECTIVES
COVERED IN THIS CHAPTER:
3.2 Given a scenario involving navigating file systems, reading
from files, or writing to files, develop the correct solution
using the following classes (sometimes in combination) from
java.io: BufferedReader,BufferedWriter, File, FileReader,
FileWriter and PrintWriter.
3.3 Develop code that serializes and/or de-serializes objects
using the following APIs from java.io: DataInputStream,
DataOutputStream, FileInputStream, FileOutputStream,
ObjectInputStream, ObjectOutputStream, and Serializable.
In addition, develop Serializable classes that correctly
declare and use transient variables and private readObject
and writeObject methods. Given a scenario and/or code
example, recognize when, if, and which constructors will be
called in an object's inheritance chain during deserialization.
chap 8 : The java.lang and java.util Packages (scjp/ocjp)It Academy
JAVA CERTIFICATION EXAM OBJECTIVES
COVERED IN THIS CHAPTER:
3.1 Develop code that uses the primitive wrapper classes
(such as Boolean, Character, Double, Integer, etc.) and/or
autoboxing and unboxing. Discuss the differences between
the String, StringBuilder, and StringBuffer classes.
3.4 Use standard J2SE APIs in the java.text package to
correctly format or parse dates, numbers, and currency
values for a specific locale, and, given a scenario, determine
the appropriate methods to use if you want to use the default
locale or a specific locale. Describe the purpose and use of the
java.util.Locale class.
3.5 Write code that uses standard J2SE APIs in the java.util
and java.util.regex packages to format or parse strings or
streams. For strings, write code that uses the Pattern and
Matcher classes and the String.split method. Recognize
and use regular expression patterns for matching (limited
to . (dot), * (star), + (plus), ?, \d, \s, \w, [], ()). The use of
*, +, and ? will be limited to greedy quantifiers, and the
parenthesis operator will be used only as a grouping
mechanism, not for capturing content during matching.
For streams, write code using the Formatter and Scanner
classes and the PrintWriter.format/printf methods. Recognize
and use formatting parameters (limited to %b, %c, %d, %f, %s)
in format strings.
6.1 Given a design scenario, determine which collection
classes and/or interfaces should be used to properly
implement that design, including the use of the
Comparable interface.
JAVA CERTIFICATION EXAM OBJECTIVES
COVERED IN THIS CHAPTER:
4.1 Write code to define, instantiate, and start new threads
using both java.lang.Thread and java.lang.Runnable.
4.2 Recognize the states in which a thread can exist, and
identify ways in which a thread can transition from one state
to another.
4.3 Given a scenario, write code that makes appropriate use
of object locking to protect static or instance variables from
concurrent access problems.
4.4 Given a scenario, write code that makes appropriate use of wait, notify, or notifyAll.
chap 6 : Objects and classes (scjp/ocjp)It Academy
.1 Develop code that declares classes (including abstract
and all forms of nested classes), interfaces, and enums,
and includes the appropriate use of package and import
statements (including static imports).
1.4 Develop code that declares both static and non-static
methods, and - if appropriate - use method names that
adhere to the JavaBeans naming standards. Also develop
code that declares and uses a variable-length argument list.
1.5 Given a code example, determine if a method is correctly
overriding or overloading another method, and identify
legal return values (including covariant returns), for the
method.
1.6 Given a set of classes and superclasses, develop
constructors for one or more of the classes. Given a
class declaration, determine if a default constructor will
be created, and if so, determine the behavior of that
constructor. Given a nested or non-nested class listing,
write code to instantiate the class.
5.1 Develop code that implements tight encapsulation,
loose coupling, and high cohesion in classes, and describe
the benefits.
5.2 Given a scenario, develop code that demonstrates the
use of polymorphism. Further, determine when casting will
be necessary and recognize compiler vs. runtime errors
related to object reference casting.
5.3 Explain the effect of modifiers on inheritance with
respect to constructors, instance or static variables, and
instance or static methods.
chap4 ; Flow Control, Assertions, and Exception Handling (scjp/ocjp)It Academy
2.1 Develop code that implements an if or switch statement;
and identify legal argument types for these statements.
2.2 Develop code that implements all forms of loops and
iterators, including the use of for, the enhanced for loop
(for-each), do, while, labels, break, and continue; and explain
the values taken by loop counter variables during and after
loop execution.
2.3 Develop code that makes use of assertions, and distinguish
appropriate from inappropriate uses of assertions.
2.4 Develop code that makes use of exceptions and exception
handling clauses (try, catch, finally), and declares methods and
overriding methods that throw exceptions.
2.5 Recognize the effect of an exception arising at a specified
point in a code fragment. Note that the exception may be a
runtime exception, a checked exception, or an error.
2.6 Recognize situations that will result in any of the following
being thrown: ArrayIndexOutOfBoundsException, ClassCast-
Exception, IllegalArgumentException, IllegalState-Exception,
NullPointerException, NumberFormatException, Assertion-
Error, ExceptionInInitializerError, StackOverflow-Error or
NoClassDefFoundError.ÊUnderstand which of these are
thrown by the virtual machine and recognize situations in
which others should be thrown programatically.
chap4 : Converting and Casting (scjp/ocjp)It Academy
5.2 Given a scenario, develop code that demonstrates the
use of polymorphism. Further, determine when casting will
be necessary and recognize compiler vs. runtime errors
related to object reference casting.
7.6 Write code that correctly applies the appropriate
operators including assignment operators (limited to: =,
+ =, -=), arithmetic operators (limited to: +, -, *, /, %, ++, --),
relational operators (limited to: <,>< =, >, > =, = =, !=), the
instanceof operator, logical operators (limited to: &, |, ^, !,
&&, ||), and the conditional operator ( ? : ), to produce a
desired result. Write code that determines the equality of
two objects or two primitives.
1.2 Develop code that declares an interface. Develop code
that implements or extends one or more interfaces. Develop
code that extends an abstract class.
1.4 Develop code that declares both static and non-static
methods, and - if appropriate - use method names that
adhere to the JavaBeans naming standards. Also develop
code that declares and uses a variable-length argument list.
5.3 Explain the effect of modifiers on inheritance with
respect to constructors, instance or static variables, and
instance or static methods.
7.1 Given a code example and a scenario, write code
that uses the appropriate access modifiers, package
declarations, and import statements to interact with
(through access or inheritance) the code in the example.
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdf91mobiles
91mobiles recently conducted a Smart TV Buyer Insights Survey in which we asked over 3,000 respondents about the TV they own, aspects they look at on a new TV, and their TV buying preferences.
Transcript: Selling digital books in 2024: Insights from industry leaders - T...BookNet Canada
The publishing industry has been selling digital audiobooks and ebooks for over a decade and has found its groove. What’s changed? What has stayed the same? Where do we go from here? Join a group of leading sales peers from across the industry for a conversation about the lessons learned since the popularization of digital books, best practices, digital book supply chain management, and more.
Link to video recording: https://bnctechforum.ca/sessions/selling-digital-books-in-2024-insights-from-industry-leaders/
Presented by BookNet Canada on May 28, 2024, with support from the Department of Canadian Heritage.
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...DanBrown980551
Do you want to learn how to model and simulate an electrical network from scratch in under an hour?
Then welcome to this PowSyBl workshop, hosted by Rte, the French Transmission System Operator (TSO)!
During the webinar, you will discover the PowSyBl ecosystem as well as handle and study an electrical network through an interactive Python notebook.
PowSyBl is an open source project hosted by LF Energy, which offers a comprehensive set of features for electrical grid modelling and simulation. Among other advanced features, PowSyBl provides:
- A fully editable and extendable library for grid component modelling;
- Visualization tools to display your network;
- Grid simulation tools, such as power flows, security analyses (with or without remedial actions) and sensitivity analyses;
The framework is mostly written in Java, with a Python binding so that Python developers can access PowSyBl functionalities as well.
What you will learn during the webinar:
- For beginners: discover PowSyBl's functionalities through a quick general presentation and the notebook, without needing any expert coding skills;
- For advanced developers: master the skills to efficiently apply PowSyBl functionalities to your real-world scenarios.
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...Ramesh Iyer
In today's fast-changing business world, Companies that adapt and embrace new ideas often need help to keep up with the competition. However, fostering a culture of innovation takes much work. It takes vision, leadership and willingness to take risks in the right proportion. Sachin Dev Duggal, co-founder of Builder.ai, has perfected the art of this balance, creating a company culture where creativity and growth are nurtured at each stage.
DevOps and Testing slides at DASA ConnectKari Kakkonen
My and Rik Marselis slides at 30.5.2024 DASA Connect conference. We discuss about what is testing, then what is agile testing and finally what is Testing in DevOps. Finally we had lovely workshop with the participants trying to find out different ways to think about quality and testing in different parts of the DevOps infinity loop.
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024Tobias Schneck
As AI technology is pushing into IT I was wondering myself, as an “infrastructure container kubernetes guy”, how get this fancy AI technology get managed from an infrastructure operational view? Is it possible to apply our lovely cloud native principals as well? What benefit’s both technologies could bring to each other?
Let me take this questions and provide you a short journey through existing deployment models and use cases for AI software. On practical examples, we discuss what cloud/on-premise strategy we may need for applying it to our own infrastructure to get it to work from an enterprise perspective. I want to give an overview about infrastructure requirements and technologies, what could be beneficial or limiting your AI use cases in an enterprise environment. An interactive Demo will give you some insides, what approaches I got already working for real.
State of ICS and IoT Cyber Threat Landscape Report 2024 previewPrayukth K V
The IoT and OT threat landscape report has been prepared by the Threat Research Team at Sectrio using data from Sectrio, cyber threat intelligence farming facilities spread across over 85 cities around the world. In addition, Sectrio also runs AI-based advanced threat and payload engagement facilities that serve as sinks to attract and engage sophisticated threat actors, and newer malware including new variants and latent threats that are at an earlier stage of development.
The latest edition of the OT/ICS and IoT security Threat Landscape Report 2024 also covers:
State of global ICS asset and network exposure
Sectoral targets and attacks as well as the cost of ransom
Global APT activity, AI usage, actor and tactic profiles, and implications
Rise in volumes of AI-powered cyberattacks
Major cyber events in 2024
Malware and malicious payload trends
Cyberattack types and targets
Vulnerability exploit attempts on CVEs
Attacks on counties – USA
Expansion of bot farms – how, where, and why
In-depth analysis of the cyber threat landscape across North America, South America, Europe, APAC, and the Middle East
Why are attacks on smart factories rising?
Cyber risk predictions
Axis of attacks – Europe
Systemic attacks in the Middle East
Download the full report from here:
https://sectrio.com/resources/ot-threat-landscape-reports/sectrio-releases-ot-ics-and-iot-security-threat-landscape-report-2024/
Securing your Kubernetes cluster_ a step-by-step guide to success !KatiaHIMEUR1
Today, after several years of existence, an extremely active community and an ultra-dynamic ecosystem, Kubernetes has established itself as the de facto standard in container orchestration. Thanks to a wide range of managed services, it has never been so easy to set up a ready-to-use Kubernetes cluster.
However, this ease of use means that the subject of security in Kubernetes is often left for later, or even neglected. This exposes companies to significant risks.
In this talk, I'll show you step-by-step how to secure your Kubernetes cluster for greater peace of mind and reliability.
JMeter webinar - integration with InfluxDB and GrafanaRTTS
Watch this recorded webinar about real-time monitoring of application performance. See how to integrate Apache JMeter, the open-source leader in performance testing, with InfluxDB, the open-source time-series database, and Grafana, the open-source analytics and visualization application.
In this webinar, we will review the benefits of leveraging InfluxDB and Grafana when executing load tests and demonstrate how these tools are used to visualize performance metrics.
Length: 30 minutes
Session Overview
-------------------------------------------
During this webinar, we will cover the following topics while demonstrating the integrations of JMeter, InfluxDB and Grafana:
- What out-of-the-box solutions are available for real-time monitoring JMeter tests?
- What are the benefits of integrating InfluxDB and Grafana into the load testing stack?
- Which features are provided by Grafana?
- Demonstration of InfluxDB and Grafana using a practice web application
To view the webinar recording, go to:
https://www.rttsweb.com/jmeter-integration-webinar
Connector Corner: Automate dynamic content and events by pushing a buttonDianaGray10
Here is something new! In our next Connector Corner webinar, we will demonstrate how you can use a single workflow to:
Create a campaign using Mailchimp with merge tags/fields
Send an interactive Slack channel message (using buttons)
Have the message received by managers and peers along with a test email for review
But there’s more:
In a second workflow supporting the same use case, you’ll see:
Your campaign sent to target colleagues for approval
If the “Approve” button is clicked, a Jira/Zendesk ticket is created for the marketing design team
But—if the “Reject” button is pushed, colleagues will be alerted via Slack message
Join us to learn more about this new, human-in-the-loop capability, brought to you by Integration Service connectors.
And...
Speakers:
Akshay Agnihotri, Product Manager
Charlie Greenberg, Host
2. Understanding Java EE–Related
Tiers and Technologies
• Exam Objective 8.4 Describe at a high level the
fundamental benefits and drawbacks of using J2EE
server-side technologies, and describe and compare the
basic characteristics of the web-tier, business-tier, and
EIS tier.
2
5. • The main disadvantage to the Java EE architecture is its
complexity. To be able.
• to program with the Java EE APIs as a software maintainer
you must know the fundamentals of Java very well.
• To be able to effectively develop code in the Java EE
environment, you should understand the more advanced
object-oriented features of the language, including the various
design patterns
5
7. Understanding the Web Tier
• The web tier is the tier within an enterprise system that
contains the presentation layer. Servlets and JavaServer
Pages are part of the web tier.
• These are web application technologies used for creating
dynamic web content.
• JavaServer Pages deliver web pages from the web tier.
Servlets handle HTTP web requests from the web tier.
• There are many web containers that implement the JSP
and servlets specifications such as Apache Tomcat, Jetty,
and the Sun Java System Web Server.
7
8. • The JavaServer Faces (JSF) API and JavaServer Pages
Standard Tag Library (JSTL) provide additional web contents
solutions.
• JSF is a user-interface component framework that lets you
easily build components, add validators and converters to the
values of those components, and provides page navigation
and state management support.
• JSTL is a tag library that is built off of the JSP framework.
8
9. Understanding the Business Tier
• The business tier is the tier within an enterprise system
that contains the business logic.
• Enterprise JavaBeans is one of the major components of
the business tier.
9
10. Understanding the EIS Tier
• The Enterprise Information System (EIS) tier is the tier within
an enterprise system that contains the data layer.
• Common activities are persistence support through
database management systems.
• The EIS tier includes databases, relational databases,
legacy applications, enterprise resource planning systems,
CRM systems, and legacy data stores. The EIS tier is
typically on its own machine.
• For example, an enterprisescale Oracle database can reside
on its own server and is interfaced with remotely.
10
12. Understanding Server-Side Solutions
• Exam Objective 8.1 Describe at a high level the basic
characteristics of: EJB, servlets, JSP, JMS, JNDI, SMTP, JAXRPC, Web Services (including SOAP, UDDI, WSDL, and XML),
and JavaMail.
12
13. Java Web Services
• Java web services are XML-based messaging protocols
that enable business-tobusiness communications. XML
helps achieve the underlying goal of web services, which
is to send and receive messages in a standardized
format.
• Java web services were introduced in J2EE 1.4 as part of
the Java Web Services Development Pack (JWSDP).
13
14. •
•
•
•
•
•
•
•
•
•
JAX-WS Version 2.0 EA (Java API for XML Web Services)
Fast Infoset Version 1.0.1
Sun Java Streaming XML Parser Version 1.0 EA
XML Digital Signature Version 1.0.1
XML and Web Services Security Version 2.0 EA2
JAXB Version 2.0 EA (Java Architecture for XML Binding)
JAXP Version 1.3.1_01 (Java API for XML Processing)
JAXR Version 1.0.8_01 EA (Java API for XML Registries)
JAX-RPC Version 1.1.3_01 EA (Java API for XML-based RPC)
SAAJ Version 1.3 EA (SOAP with Attachments API for Java)
14
15. • For the SCJA exam, the only related web services
technologies you will need to know are XML, JAXRPC
(covered in the next section), and the three foundational
standards of web services (SOAP, UDDI, and WSDL).
15
16. XML
• The Extensible Markup Language (XML) is a general-purpose
specification used for creating markup languages with the
design purposes of transporting and storing data.
• Web-based solutions make common use of XML files such as
configuration, deployment descriptor, and tag libraries files.
Again, XML was designed to structure, store, and/or carry
data, not to display data.
16
17. Simple Object Access Protocol
• The Simple Object Access Protocol (SOAP) is a simple
XML-based communication protocol used for information
exchange within a decentralized and distributed
environment.
• SOAP is used in various situations such as messaging
and remote procedure calls.
17
18. • SOAP is made up of three main parts: the envelope, the
encoding rules, and the RPC.
• The envelope is the root XML element that contains the
message recipient,message content, and processing
information of the message.
• The encoding rules specify how the data-type instances
will be exchanged.
• The RPCs defines the convention for representing the
remote calls and responses procedure calls.
18
20. WSDL
• The Web Service Definition Language (WSDL) is an XML
standard for businesses and individuals to access
available services that each provide.
• The WSDL XML documents include a set of definitions.
These definitions describe network services as a set of
endpoints operating on messages containing either
document or procedureoriented information.
• These elements are described and bound to network
protocols and message formats to define an endpoint.
• More specifically, an endpoint is a WSDL port that
represents the contact point of the service.
• This endpoint consists of the protocol and location
information.
20
21. UDDI
• The Universal Description, Discovery, and Integration
(UDDI) specification is an XML-based registry that is used
by businesses to make their services and general
business descriptions available through the Internet.
• UDDI can communicate via CORBA, SOAP, or the Java
RMI protocols. UDDI makes use of WSDL in describing
interfaces to web services.
• As such, the UDDI specification includes a set of WSDL
definitions for modifying and searching its registry, and
the registry itself includes the web service’s metadata and
a pointer to the WSDL service description.
21
22. SMTP and the JavaMail API
• The Simple Mail Transfer Protocol (SMTP) and the
JavaMail API are often used together to provide e-mailing
solutions.
• use the JavaMail API to send the e-mail to the desired
recipient by connecting and sending the e-mail from an
SMTP server.
22
26. Understanding Dynamic Web Content
Solutions
• Exam Objective 8.2 Describe at a high level the basic
characteristics of servlet and JSP support for HTML thin-clients.
26
30. What is Servlet?
• Java™ objects which are based on servlet framework and
APIs and extend the functionality of a HTTP server.
• Mapped to URLs and managed by container with a simple
architecture
• Available and running on all major web servers and app
servers
• Platform and server independent
30
31. First Servlet Code
Public class HelloServlet extends HttpServlet {
public void doGet(HttpServletRequest request,
HttpServletResponse response){
response.setContentType("text/html");
PrintWriter out = response.getWriter();
out.println("<title>Hello World!</title>");
}
...
}
31
32. What is JSP Technology?
• Enables separation of business logic from
presentation
> Presentation is in the form of HTML or
XML/XSLT
> – Business logic is implemented as Java
Beans or custom tags
> – Better maintainability, reusability
• Extensible via custom tags
• Builds on Servlet technology
32
33. What is JSP page?
• A text-based document capable of returning dynamic
content to a client browser
• Contains both static and dynamic content
> Static content: HTML, XML
> Dynamic content: programming code, and
JavaBeans, custom tags
33
36. JSP Benefits
• Content and display logic are separated
• Simplify development with JSP, JavaBeans and custom
tags
• Supports software reuse through the use of components
• Recompile automatically when changes are made to the
source file
• Easier to author web pages
• Platform-independent
36
37. Should I Use Servlet or JSP?
• In practice, servlet and JSP are used together
> via MVC (Model, View, Controller) architecture
> Servlet handles Controller
> JSP handles View
37
38. What Is an Enterprise Bean?
• Written in the Java programming language, an enterprise
bean is a server-side component that encapsulates the
business logic of an application.
38
39. Benefits of Enterprise Beans
• the EJB container provides system-level services to enterprise
beans,the bean developer can concentrate on solving business
problems.
• The client developer does not have to code the routines that
implement business rules or access databases. As a result, the
clients are thinner, a benefit that is particularly important for
clients that run on small devices.
• enterprise beans are portable components, the application
assembler can build new applications from existing beans.
These applications can run on any compliant Java EE server
provided that they use the standard APIs.
39
40. When to Use Enterprise Beans
• To accommodate a growing number of users, you may need to
distribute an application’s components across multiple
machines.Not only can the enterprise beans of an application
run on different machines, but also their location will remain
transparent to the clients.
• Enterprise beans support transactions, the mechanisms that
manage the concurrent access of shared objects.
• The application will have a variety of clients. With only a few
lines of code, remote clients can easily locate enterprise
beans. These clients can be thin, various, and numerous.
40
41. Types of Enterprise Beans
• Session Performs a task for a client;
optionally may implement a web service.
• Message-Driven Acts as a listener for a
particular messaging type, such as the
Java Message Service API.
41
42. What Is a Session Bean?
• As its name suggests, a session bean is similar to an
interactive session.
• A session bean is not shared; it can have only one client,
in the same way that an interactive session can have only
one user.
• Like an interactive session, a session bean is not
persistent.
• When the client terminates, its session bean appears to
terminate and is no longer associated with the client.
42
43. State Management Modes
Stateful Session Beans :conversational state
• In a stateful session bean,the instance variables represent
the state of a unique client-bean session.
• The state is retained for the duration of the client-bean
session.
• If the client removes the bean or terminates, the session
ends and the state disappears.
43
44. Stateless Session Beans
• When a client invokes the methods of a stateless bean, the
bean’s instance variables may contain a state specific to that
client, but only for the duration of the invocation.
• Except during method invocation, all instances of a stateless
bean are equivalent, allowing the EJB container to assign an
instance to any client.
• Typically, an application requires fewer stateless session
beans than stateful session beans to support the same number
of clients.
44
45. When to Use Session Beans
In general, you should use a session bean if the following
circumstances hold:
• At any given time, only one client has access to the bean
instance.
• The state of the bean is not persistent, existing only for a
short period (perhaps a few hours).
• The bean implements a web service.
45
46. Stateful session beans are appropriate if any of the following conditions are
true:
• The bean’s state represents the interaction between the bean and a
specific client.
• The bean needs to hold information about the client across method
invocations.
• The bean mediates between the client and the other components of the
application,presenting a simplified view to the client.
• Behind the scenes, the bean manages the work flow of several enterprise
beans
To improve performance, you might choose a stateless session bean if it has
any of these traits:
• The bean’s state has no data for a specific client.
• In a single method invocation, the bean performs a generic task for all
clients. For example,you might use a stateless session bean to send an
email that confirms an online order.
46
47. What Is a Message-Driven Bean?
• A message-driven bean is an enterprise bean that allows
Java EE applications to process messages
asynchronously.
• The messages can be sent by any Java EE component
(an application client, another enterprise bean, or a web
component) or by a JMS application.
• Message-driven beans can process JMS messages or
other kinds of messages.
47
48. What Makes Message-Driven Beans
Different from Session Beans?
• The most visible difference between message-driven beans and session
beans is that clients do not access message-driven beans through
interface.
In several respects, a message-driven bean resembles a stateless session
bean.
• A message-driven bean’s instances retain no data or conversational
state for a specific client.
• All instances of a message-driven bean are equivalent, allowing the EJB
container to assign a message to any message-driven bean instance.
The container can pool these instances to allow streams of messages to
be processed concurrently.
• A single message-driven bean can process messages from multiple
clients.
48
49. Message driven beans have the following
characteristics:
They execute upon receipt of a single client
message.
• They are invoked asynchronously.
• They are relatively short-lived.
• They do not represent directly shared data in
the database, but they can access and update
this data.
• They can be transaction-aware.
• They are stateless.
49
50. Defining Client Access with Interfaces
• A client can access a session bean only through the
methods defined in the bean’s business interface(client’s
view of a bean). method implementations and deployment
settings are hidden from the client.
• Well-designed interfaces simplify the development and
maintenance of Java EE applications.
• Not only do clean interfaces shield the clients from any
complexities in the EJB tier, but they also allow the beans
to change internally without affecting the clients.
• The type of client access allowed by the enterprise beans:
remote, local, or web service?
50
51. Remote Clients
A remote client of an enterprise bean has the following
traits:
• It can run on a different machine and a different Java
virtual machine (JVM) than the enterprise bean it
accesses. (It is not required to run on a different JVM.)
• It can be a web component, an application client, or
another enterprise bean.
• To a remote client, the location of the enterprise bean is
transparent.
51
53. Local Clients
A local client has these characteristics:
• It must run in the same JVM as the enterprise bean it
accesses.
• It can be a web component or another enterprise bean.
• To the local client, the location of the enterprise bean it
accesses is not transparent
the business interface is by default a local interface.
• @Local
• public interface InterfaceName { ... }
53
54. Deciding on Remote or Local Access
• Tight or loose coupling of related beans: For example, if a
session bean that processes sales orders calls a session bean
that emails a confirmation message to the customer, these
beans are tightly coupled.
> Same logical unit local increase performance
• Type of client and Component distribution : the type of
access depends on how you want to distribute your
components, application clients, web components, other
enterprise beans.
• Performance: remote calls may be slower than local calls.
In the future you can distribute your components to accommodate
the growing demands on your applicationRemote
54