SlideShare a Scribd company logo
JAVA-J2EE
Contact info:
Call : (404) 900-9988, (404) 990-3007
Mail Us: info@quontrasolutions.com
Contents
 J2EE
 XML
 JSTL
 EJB
 Session Beans
 Entity Beans
 BMP
 Message Driven Beans
 Transactions
 Java mail
J2EE
J2EE Container
Containers are the interface between a component and the low-
level platform-specific functionality that supports the component. Before
a Web, enterprise bean, or application client component can be executed,
it must be assembled into a J2EE application and deployed into its
container.
Container Types
XML
XML Example Document
<?xml version="1.0" encoding="UTF-8"?>
<note>
<to> Tove</to>
<from>Jani</from>
<heading>Reminder</heading>
<body>Don't forget me this weekend!</body>
</note>
J2EE server
 The runtime portion of a J2EE product. A J2EE server provides EJB and
Web containers.
Enterprise JavaBeans (EJB) container
 Manages the execution of enterprise beans for J2EE applications.
Enterprise beans and their container run on the J2EE server.
Web container
 Manages the execution of JSP page and servlet components for J2EE
applications. Web components and their container run on the J2EE server.
Application client container
 Manages the execution of application client components. Application
clients and their container run on the client.
Applet container
 Manages the execution of applets. Consists of a Web browser and Java
Plug-in running on the client together.
JSTL
 The JavaServer Pages Standard Tag Library (JSTL) is a collection of useful
JSP tags which encapsulates core functionality common to many JSP
applications.
 JSTL has support for common, structural tasks such as iteration and
conditionals, tags for manipulating XML documents, internationalization
tags, and SQL tags. It also provides a framework for integrating existing
custom tags with JSTL tags.
 The JSTL tags can be classified, according to their functions, into following
JSTL tag library groups that can be used when creating a JSP page:
 Core Tags
 Formatting tags
 SQL tags
 XML tags
 JSTL Functions
EJB
• Enterprise Java Beans (EJB) is a development architecture for
building highly scalable and robust enterprise level applications to
be deployed on J2EE compliant Application Server such as JBOSS,
Web Logic etc.
• EJB 3.0 is being a great shift from EJB 2.0 and makes development
of EJB based applications quite easy.
• This tutorial will give you great understanding on EJB concepts
needed to create and deploy an enterprise level application up and
running.
EJBComponent (EJB Module)
Example: LibrarySessionBeanRemote.java
package com.tutorialspoint.stateless;
import java.util.List;
import javax.ejb.Remote;
@Remote
public interface LibrarySessionBeanRemote {
void addBook(String bookName);
List getBooks();
}
LibrarySessionBean.java
package com.tutorialspoint.stateless;
import java.util.ArrayList;
import java.util.List;
import javax.ejb.Stateless;
public class LibrarySessionBean implements
LibrarySessionBeanRemote {
List<String> bookShelf;
public LibrarySessionBean(){
bookShelf = new ArrayList<String>();
}
public void addBook(String bookName) {
bookShelf.add(bookName);
}
public List<String> getBooks() {
return bookShelf;
} }
Session Beans
• A session bean represents a single client inside the
Application Server. To access an application that is deployed
on the server, the client invokes the session bean’s methods.
The session bean performs work for its client, shielding the
client from complexity by executing business tasks inside the
server.
• 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. (That is, its data is not saved
to a database.) When the client terminates, its session bean
appears to terminate and is no longer associated with the
client.
Entity Beans
Definition of an Entity Bean
• An entity bean is a remote object that manages persistent
data, performs complex business logic, potentially uses
several dependent Java objects, and can be uniquely
identified by a primary key. Entity beans are normally
coarse-grained persistent objects, in that they utilize
persistent data stored within several fine-grained
persistent Java objects.
Message Driven Beans
What Is a Message-Driven Bean?
• A message-driven bean is an enterprise bean that
allows Java EE applications to process messages
asynchronously. This type of bean normally acts as a
JMS message listener, which is similar to an event
listener but receives JMS messages instead of
events. 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
or system that does not use Java EE technology.
Message-driven beans can process JMS messages
or other kinds of messages.
When to Use Message-Driven Beans ?
• Session beans allow you to send JMS messages and to
receive them synchronously but not asynchronously. To avoid
tying up server resources, do not to use blocking synchronous
receives in a server-side component; in general, JMS
messages should not be sent or received synchronously. To
receive messages asynchronously, use a message-driven
bean
Java Mail
• The JavaMail API provides a platform-independent and
protocol-independent framework to build mail and
messaging applications. The JavaMail API provides a set of
abstract classes defining objects that comprise a mail
system. It is an optional package (standard extension) for
reading, composing, and sending electronic messages.

More Related Content

What's hot (20)

PPT
Virtual classroom
Krishna Chaithanya
 
DOCX
Unit 1st and 3rd notes of java
Niraj Bharambe
 
PPSX
JDBC: java DataBase connectivity
Tanmoy Barman
 
PPT
Jdbc
leminhvuong
 
PPTX
Introduction to ejb and struts framework
s4al_com
 
PPT
Spring 2.1 Exposed
wiradikusuma
 
PPTX
Basics of mule for beginners
Sindhu VL
 
PPT
Jdbc
Smit Patel
 
PPT
Jdbc drivers
Prabhat gangwar
 
PPSX
Intorduction to struts
Anup72
 
PPTX
Jdbc_ravi_2016
Ravinder Singh Karki
 
PPTX
Advanced java+JDBC+Servlet
Anuj Singh Rajput
 
DOCX
Java unit 4_cs_notes
Niraj Bharambe
 
PDF
JDBC in Servlets
Eleonora Ciceri
 
PPTX
Java- JDBC- Mazenet Solution
Mazenetsolution
 
DOCX
Jdbc driver types
Arvind Kumar
 
PPTX
Java.sql package
myrajendra
 
PPT
JDBC Architecture and Drivers
SimoniShah6
 
Virtual classroom
Krishna Chaithanya
 
Unit 1st and 3rd notes of java
Niraj Bharambe
 
JDBC: java DataBase connectivity
Tanmoy Barman
 
Introduction to ejb and struts framework
s4al_com
 
Spring 2.1 Exposed
wiradikusuma
 
Basics of mule for beginners
Sindhu VL
 
Jdbc drivers
Prabhat gangwar
 
Intorduction to struts
Anup72
 
Jdbc_ravi_2016
Ravinder Singh Karki
 
Advanced java+JDBC+Servlet
Anuj Singh Rajput
 
Java unit 4_cs_notes
Niraj Bharambe
 
JDBC in Servlets
Eleonora Ciceri
 
Java- JDBC- Mazenet Solution
Mazenetsolution
 
Jdbc driver types
Arvind Kumar
 
Java.sql package
myrajendra
 
JDBC Architecture and Drivers
SimoniShah6
 

Similar to Java j2eeTutorial (20)

PPT
EJBDetailsFeb25.ppt
KalsoomTahir2
 
PPT
Unite5-EJB-2019.ppt
Krishna900061
 
PPT
Ch4 ejb
Raghavendra Goud
 
PPTX
J2ee web services(overview)
Prafull Jain
 
PPTX
J2 ee container & components
Keshab Nath
 
DOC
Java Interview Questions
anil_kumar132001
 
PDF
Java Platform and IDE Netbeans 6.7 for Developing Enterprise and Web Applicat...
SSA KPI
 
PPTX
The Latest in Enterprise JavaBeans Technology
Simon Ritter
 
PPT
J2EE.ppt
ShuvraKantiMandal
 
PPTX
Java bean
Jafar Nesargi
 
PDF
EJB 3.0 - Yet Another Introduction
Kelum Senanayake
 
PDF
web component_development
bachector
 
PDF
Ejb intro
vantinhkhuc
 
PDF
Ejb intro
MANOJ KUMAR
 
PDF
Enterprise Java Beans - EJB
Peter R. Egli
 
PPTX
Web programming and development - Introduction
Joel Briza
 
PDF
Ejb notes
Mumbai Academisc
 
PPT
ADVANCED JAVA MODULE I & II.ppt
rani marri
 
PDF
EJ NOV-18 (Sol) (E-next.in).pdf
SPAMVEDANT
 
EJBDetailsFeb25.ppt
KalsoomTahir2
 
Unite5-EJB-2019.ppt
Krishna900061
 
J2ee web services(overview)
Prafull Jain
 
J2 ee container & components
Keshab Nath
 
Java Interview Questions
anil_kumar132001
 
Java Platform and IDE Netbeans 6.7 for Developing Enterprise and Web Applicat...
SSA KPI
 
The Latest in Enterprise JavaBeans Technology
Simon Ritter
 
Java bean
Jafar Nesargi
 
EJB 3.0 - Yet Another Introduction
Kelum Senanayake
 
web component_development
bachector
 
Ejb intro
vantinhkhuc
 
Ejb intro
MANOJ KUMAR
 
Enterprise Java Beans - EJB
Peter R. Egli
 
Web programming and development - Introduction
Joel Briza
 
Ejb notes
Mumbai Academisc
 
ADVANCED JAVA MODULE I & II.ppt
rani marri
 
EJ NOV-18 (Sol) (E-next.in).pdf
SPAMVEDANT
 
Ad

More from QUONTRASOLUTIONS (20)

PPTX
Big data introduction by quontra solutions
QUONTRASOLUTIONS
 
PPTX
Java constructors
QUONTRASOLUTIONS
 
PPTX
Cognos Online Training with placement Assistance - QuontraSolutions
QUONTRASOLUTIONS
 
PDF
Business analyst overview by quontra solutions
QUONTRASOLUTIONS
 
PDF
Business analyst overview by quontra solutions
QUONTRASOLUTIONS
 
PPTX
Cognos Overview
QUONTRASOLUTIONS
 
PPTX
Hibernate online training
QUONTRASOLUTIONS
 
PPTX
Software Quality Assurance training by QuontraSolutions
QUONTRASOLUTIONS
 
PPT
Introduction to software quality assurance by QuontraSolutions
QUONTRASOLUTIONS
 
PPT
.Net introduction by Quontra Solutions
QUONTRASOLUTIONS
 
PPT
Introduction to j2 ee patterns online training class
QUONTRASOLUTIONS
 
PPTX
Saas overview by quontra solutions
QUONTRASOLUTIONS
 
PPTX
Sharepoint taxonomy introduction us
QUONTRASOLUTIONS
 
PPTX
Introduction to the sharepoint 2013 userprofile service By Quontra
QUONTRASOLUTIONS
 
PPTX
Introduction to SharePoint 2013 REST API
QUONTRASOLUTIONS
 
PPTX
Performance Testing and OBIEE by QuontraSolutions
QUONTRASOLUTIONS
 
PPTX
Obiee introduction building reports by QuontraSolutions
QUONTRASOLUTIONS
 
PPTX
Sharepoint designer workflow by quontra us
QUONTRASOLUTIONS
 
PPT
Qa by quontra us
QUONTRASOLUTIONS
 
PPT
MSBI and Data WareHouse techniques by Quontra
QUONTRASOLUTIONS
 
Big data introduction by quontra solutions
QUONTRASOLUTIONS
 
Java constructors
QUONTRASOLUTIONS
 
Cognos Online Training with placement Assistance - QuontraSolutions
QUONTRASOLUTIONS
 
Business analyst overview by quontra solutions
QUONTRASOLUTIONS
 
Business analyst overview by quontra solutions
QUONTRASOLUTIONS
 
Cognos Overview
QUONTRASOLUTIONS
 
Hibernate online training
QUONTRASOLUTIONS
 
Software Quality Assurance training by QuontraSolutions
QUONTRASOLUTIONS
 
Introduction to software quality assurance by QuontraSolutions
QUONTRASOLUTIONS
 
.Net introduction by Quontra Solutions
QUONTRASOLUTIONS
 
Introduction to j2 ee patterns online training class
QUONTRASOLUTIONS
 
Saas overview by quontra solutions
QUONTRASOLUTIONS
 
Sharepoint taxonomy introduction us
QUONTRASOLUTIONS
 
Introduction to the sharepoint 2013 userprofile service By Quontra
QUONTRASOLUTIONS
 
Introduction to SharePoint 2013 REST API
QUONTRASOLUTIONS
 
Performance Testing and OBIEE by QuontraSolutions
QUONTRASOLUTIONS
 
Obiee introduction building reports by QuontraSolutions
QUONTRASOLUTIONS
 
Sharepoint designer workflow by quontra us
QUONTRASOLUTIONS
 
Qa by quontra us
QUONTRASOLUTIONS
 
MSBI and Data WareHouse techniques by Quontra
QUONTRASOLUTIONS
 
Ad

Recently uploaded (20)

PDF
Building Real-Time Digital Twins with IBM Maximo & ArcGIS Indoors
Safe Software
 
PPTX
Webinar: Introduction to LF Energy EVerest
DanBrown980551
 
PDF
Reverse Engineering of Security Products: Developing an Advanced Microsoft De...
nwbxhhcyjv
 
PDF
Automating Feature Enrichment and Station Creation in Natural Gas Utility Net...
Safe Software
 
PDF
Mastering Financial Management in Direct Selling
Epixel MLM Software
 
PPTX
AUTOMATION AND ROBOTICS IN PHARMA INDUSTRY.pptx
sameeraaabegumm
 
PPTX
Mastering ODC + Okta Configuration - Chennai OSUG
HathiMaryA
 
PDF
Bitcoin for Millennials podcast with Bram, Power Laws of Bitcoin
Stephen Perrenod
 
DOCX
Cryptography Quiz: test your knowledge of this important security concept.
Rajni Bhardwaj Grover
 
PDF
Transforming Utility Networks: Large-scale Data Migrations with FME
Safe Software
 
PDF
New from BookNet Canada for 2025: BNC BiblioShare - Tech Forum 2025
BookNet Canada
 
PDF
LOOPS in C Programming Language - Technology
RishabhDwivedi43
 
PDF
POV_ Why Enterprises Need to Find Value in ZERO.pdf
darshakparmar
 
PDF
"Beyond English: Navigating the Challenges of Building a Ukrainian-language R...
Fwdays
 
PDF
Smart Trailers 2025 Update with History and Overview
Paul Menig
 
PDF
Newgen Beyond Frankenstein_Build vs Buy_Digital_version.pdf
darshakparmar
 
PPTX
OpenID AuthZEN - Analyst Briefing July 2025
David Brossard
 
PDF
Book industry state of the nation 2025 - Tech Forum 2025
BookNet Canada
 
PDF
[Newgen] NewgenONE Marvin Brochure 1.pdf
darshakparmar
 
PDF
"AI Transformation: Directions and Challenges", Pavlo Shaternik
Fwdays
 
Building Real-Time Digital Twins with IBM Maximo & ArcGIS Indoors
Safe Software
 
Webinar: Introduction to LF Energy EVerest
DanBrown980551
 
Reverse Engineering of Security Products: Developing an Advanced Microsoft De...
nwbxhhcyjv
 
Automating Feature Enrichment and Station Creation in Natural Gas Utility Net...
Safe Software
 
Mastering Financial Management in Direct Selling
Epixel MLM Software
 
AUTOMATION AND ROBOTICS IN PHARMA INDUSTRY.pptx
sameeraaabegumm
 
Mastering ODC + Okta Configuration - Chennai OSUG
HathiMaryA
 
Bitcoin for Millennials podcast with Bram, Power Laws of Bitcoin
Stephen Perrenod
 
Cryptography Quiz: test your knowledge of this important security concept.
Rajni Bhardwaj Grover
 
Transforming Utility Networks: Large-scale Data Migrations with FME
Safe Software
 
New from BookNet Canada for 2025: BNC BiblioShare - Tech Forum 2025
BookNet Canada
 
LOOPS in C Programming Language - Technology
RishabhDwivedi43
 
POV_ Why Enterprises Need to Find Value in ZERO.pdf
darshakparmar
 
"Beyond English: Navigating the Challenges of Building a Ukrainian-language R...
Fwdays
 
Smart Trailers 2025 Update with History and Overview
Paul Menig
 
Newgen Beyond Frankenstein_Build vs Buy_Digital_version.pdf
darshakparmar
 
OpenID AuthZEN - Analyst Briefing July 2025
David Brossard
 
Book industry state of the nation 2025 - Tech Forum 2025
BookNet Canada
 
[Newgen] NewgenONE Marvin Brochure 1.pdf
darshakparmar
 
"AI Transformation: Directions and Challenges", Pavlo Shaternik
Fwdays
 

Java j2eeTutorial

  • 1. JAVA-J2EE Contact info: Call : (404) 900-9988, (404) 990-3007 Mail Us: [email protected]
  • 2. Contents  J2EE  XML  JSTL  EJB  Session Beans  Entity Beans  BMP  Message Driven Beans  Transactions  Java mail
  • 3. J2EE J2EE Container Containers are the interface between a component and the low- level platform-specific functionality that supports the component. Before a Web, enterprise bean, or application client component can be executed, it must be assembled into a J2EE application and deployed into its container.
  • 5. XML XML Example Document <?xml version="1.0" encoding="UTF-8"?> <note> <to> Tove</to> <from>Jani</from> <heading>Reminder</heading> <body>Don't forget me this weekend!</body> </note>
  • 6. J2EE server  The runtime portion of a J2EE product. A J2EE server provides EJB and Web containers. Enterprise JavaBeans (EJB) container  Manages the execution of enterprise beans for J2EE applications. Enterprise beans and their container run on the J2EE server. Web container  Manages the execution of JSP page and servlet components for J2EE applications. Web components and their container run on the J2EE server. Application client container  Manages the execution of application client components. Application clients and their container run on the client. Applet container  Manages the execution of applets. Consists of a Web browser and Java Plug-in running on the client together.
  • 7. JSTL  The JavaServer Pages Standard Tag Library (JSTL) is a collection of useful JSP tags which encapsulates core functionality common to many JSP applications.  JSTL has support for common, structural tasks such as iteration and conditionals, tags for manipulating XML documents, internationalization tags, and SQL tags. It also provides a framework for integrating existing custom tags with JSTL tags.  The JSTL tags can be classified, according to their functions, into following JSTL tag library groups that can be used when creating a JSP page:  Core Tags  Formatting tags  SQL tags  XML tags  JSTL Functions
  • 8. EJB • Enterprise Java Beans (EJB) is a development architecture for building highly scalable and robust enterprise level applications to be deployed on J2EE compliant Application Server such as JBOSS, Web Logic etc. • EJB 3.0 is being a great shift from EJB 2.0 and makes development of EJB based applications quite easy. • This tutorial will give you great understanding on EJB concepts needed to create and deploy an enterprise level application up and running.
  • 9. EJBComponent (EJB Module) Example: LibrarySessionBeanRemote.java package com.tutorialspoint.stateless; import java.util.List; import javax.ejb.Remote; @Remote public interface LibrarySessionBeanRemote { void addBook(String bookName); List getBooks(); }
  • 10. LibrarySessionBean.java package com.tutorialspoint.stateless; import java.util.ArrayList; import java.util.List; import javax.ejb.Stateless; public class LibrarySessionBean implements LibrarySessionBeanRemote { List<String> bookShelf; public LibrarySessionBean(){ bookShelf = new ArrayList<String>(); } public void addBook(String bookName) { bookShelf.add(bookName); } public List<String> getBooks() { return bookShelf; } }
  • 11. Session Beans • A session bean represents a single client inside the Application Server. To access an application that is deployed on the server, the client invokes the session bean’s methods. The session bean performs work for its client, shielding the client from complexity by executing business tasks inside the server. • 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. (That is, its data is not saved to a database.) When the client terminates, its session bean appears to terminate and is no longer associated with the client.
  • 12. Entity Beans Definition of an Entity Bean • An entity bean is a remote object that manages persistent data, performs complex business logic, potentially uses several dependent Java objects, and can be uniquely identified by a primary key. Entity beans are normally coarse-grained persistent objects, in that they utilize persistent data stored within several fine-grained persistent Java objects.
  • 13. Message Driven Beans What Is a Message-Driven Bean? • A message-driven bean is an enterprise bean that allows Java EE applications to process messages asynchronously. This type of bean normally acts as a JMS message listener, which is similar to an event listener but receives JMS messages instead of events. 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 or system that does not use Java EE technology. Message-driven beans can process JMS messages or other kinds of messages.
  • 14. When to Use Message-Driven Beans ? • Session beans allow you to send JMS messages and to receive them synchronously but not asynchronously. To avoid tying up server resources, do not to use blocking synchronous receives in a server-side component; in general, JMS messages should not be sent or received synchronously. To receive messages asynchronously, use a message-driven bean
  • 15. Java Mail • The JavaMail API provides a platform-independent and protocol-independent framework to build mail and messaging applications. The JavaMail API provides a set of abstract classes defining objects that comprise a mail system. It is an optional package (standard extension) for reading, composing, and sending electronic messages.