SlideShare a Scribd company logo
1/50
JAVA BEANS
• JavaBeans is the one of major Reusable
software component developed by Sun
Microsystems for the Java. It is mainly used in
the builder tool.
• JavaBeans is a platform-independent,
component model written in JAVA language,
which can be changed and customized.
• Java Bean contains a public constructor with
no arguments, properties and
accessor/mutator methods for those
properties. 2/50
JAVA BEANS – Contd;
• A JavaBeans is just a java class with the
following requirements.
– It has a public no-args constructor
– It has 'set' and 'get' methods for its properties.
– It may have any general functions.
– If required it must be Serializable.
3/50
JAVA BEANS Example – Contd;
4/50
Public class sampleBean
{
private String name;
private int age;
public sampleBean() {
}
public String getName()
{
-------------
}
public void setName(String name){
this.name=name;
}
public String getAge(){
-------------
}
public void setAge(String age){
this.age=age;
} }
JAVA BEANS - Advantages
• Java Bean is the Re-usable component, simply
we can call “Write once and use everywhere”
concept
• It is very simple and flexible to use.
• Portable and platform independent.
5/50
Accessors & Mutators
• Accessor method is used to return the
variables. The method name should start with
“get” and followed by property name with the
first character as capital.
• Example
6/50
public String getName ()
{
return name;
}
Why use Accessors
• Providing single points of update. The single
points of update for each attribute, making it
easier to modify and to test.
• Controlling access to attributes.
• Enabling lazy initialization. Lazy initialization
means the value of an attribute is initialized
(set) when it is first accessed.
• Reducing coupling between a subclass and its
super classes.
• Encapsulating changes to attributes
7/50
Mutators
• A Mutator is a method used to add/update
the value for the property.
• It should start with “set” followed by property
name with the first character as capital. It
should not return anything.
• Example of the Mutator
8/50
public void setName(String name)
{
this.name=name;
}
Types of JavaBeans
• Java Beans are classified into three types,
– Session Beans,
– Entity Beans,
– Message Driven Beans or Message Beans.
9/50
Session Beans
• It is used to Performs a task for a client .
• Session Bean is created by a customer and its
duration is only for the signal client server
session.
• The functions has performed by this bean is
calculations or database access, for the client.
• Session bean can be transactional, because it
is not recoverable.
10/50
Session Beans – Contd;
• Session Beans further classified into two
types
11/50
Stateless Session: The stateless
Session Beans has no connection
with informal state is a
distributed object. It allows the
parallel accessing of Beans.
Stateful Session: The Stateful
Session bean has a connection
with informal state, but with
very limited access to the
customer for Beans.
Entity Beans
• The Entity is used to represent a business
entity object that exists in persistent storage.
• It is recognized by a main key, if the container
is hosted by entity bean crashes, the bean will
destroy the remote reference.
12/50
Message Bean
• Message bean is used to act as a listener for
JMS (Java Message Service).
• It is similar to Session bean except the
respond to JMS.
• It will process the messages asynchronously.
• It processes the messages from multiple
clients.
13/50
Creating Java Bean
• Always a bean should contain properties and accessor
& mutators for those properties.
• If there are no properties in bean, then there is no
need for accessors and mutators.
• For some cases the bean just used as a class for
encapsulation (i.e.) business logic. Such a bean may or
may not have a visual representation.
• The Tomcat server searches for any classes in
c:tomcatwebappsrootweb-infclasses folder.
• Create a subfolder under class’s folder and name it as
'java beans’.
14/50
Summary
• Batch processing is one of the advanced features in
JDBC. It is used to execute a batch of statements (like a
query or updates) in a single call by creating a group of
statements.
• The ResultSetMeta-Data is used to view the details in
the Result set.
• It is always not possible to know the number of
columns, data types of the columns and names of the
columns while retrieving data from the table.
ResultSetMetaData can be used to overcome this issue.
• A connection pool is used to overcome the effects of
the usage of database by many users without
disconnecting it. It creates a pool of Connection object
when the application server starts. 15/50
Summary
• A Transaction Management system reduces the
complexity of application development because it frees
the developer from the complex issues of failure
recovery and multi-user programming.
• JavaBeans is the one of major Reusable software
component developed by Sun Microsystems for the
Java. It is mainly used in the builder tool.
• Accessor method is used to return the variables. The
method name should start with “get” and followed by
property name with the first character as capital.
• A Mutator is a method used to add/update the value
for the property. Mutator methods should start with
“set” followed by property name with the first
character as capital. It should not return anything.
16

More Related Content

Similar to JAVA_BEAN.pptx

Apache Maven supports ALL Java (Javaland 2019)
Apache Maven supports ALL Java (Javaland 2019)Apache Maven supports ALL Java (Javaland 2019)
Apache Maven supports ALL Java (Javaland 2019)
Robert Scholte
 
The Latest in Enterprise JavaBeans Technology
The Latest in Enterprise JavaBeans TechnologyThe Latest in Enterprise JavaBeans Technology
The Latest in Enterprise JavaBeans Technology
Simon Ritter
 
Apache maven and its impact on java 9 (Java One 2017)
Apache maven and its impact on java 9 (Java One 2017)Apache maven and its impact on java 9 (Java One 2017)
Apache maven and its impact on java 9 (Java One 2017)
Robert Scholte
 
Module4_Annotations_JDBC.pdf
Module4_Annotations_JDBC.pdfModule4_Annotations_JDBC.pdf
Module4_Annotations_JDBC.pdf
RoopeshGT
 
Lecture 19 dynamic web - java - part 1
Lecture 19   dynamic web - java - part 1Lecture 19   dynamic web - java - part 1
Lecture 19 dynamic web - java - part 1Д. Ганаа
 
159747608 a-training-report-on
159747608 a-training-report-on159747608 a-training-report-on
159747608 a-training-report-on
homeworkping7
 
Apache Maven supports all Java (JokerConf 2018)
Apache Maven supports all Java (JokerConf 2018)Apache Maven supports all Java (JokerConf 2018)
Apache Maven supports all Java (JokerConf 2018)
Robert Scholte
 
Domino java
Domino javaDomino java
Domino java
Sumit Tambe
 
Java2 platform
Java2 platformJava2 platform
Java2 platform
Sajan Sahu
 
Jsf+ejb 50
Jsf+ejb 50Jsf+ejb 50
Jsf+ejb 50
lullabyte
 
Ejb course-in-mumbai
Ejb course-in-mumbaiEjb course-in-mumbai
Ejb course-in-mumbai
vibrantuser
 
Java component
Java componentJava component
Java component
Srilatha Kante
 
Build Java Web Application Using Apache Struts
Build Java Web Application Using Apache Struts Build Java Web Application Using Apache Struts
Build Java Web Application Using Apache Struts
weili_at_slideshare
 
Ecom lec3 16_ej_bs
Ecom lec3 16_ej_bsEcom lec3 16_ej_bs
Ecom lec3 16_ej_bs
Zainab Khallouf
 
Universal Java Beans with DB2 from 1999, early Internet work
Universal Java Beans with DB2 from 1999, early Internet workUniversal Java Beans with DB2 from 1999, early Internet work
Universal Java Beans with DB2 from 1999, early Internet work
Matthew Perrins
 
Spring framework in depth
Spring framework in depthSpring framework in depth
Spring framework in depth
Vinay Kumar
 
J2EE - Practical Overview
J2EE - Practical OverviewJ2EE - Practical Overview
J2EE - Practical OverviewSvetlin Nakov
 
Lo nuevo en Spring 3.0
Lo nuevo  en Spring 3.0Lo nuevo  en Spring 3.0
Lo nuevo en Spring 3.0
David Motta Baldarrago
 
Informatica Power Center - Workflow Manager
Informatica Power Center - Workflow ManagerInformatica Power Center - Workflow Manager
Informatica Power Center - Workflow Manager
ZaranTech LLC
 

Similar to JAVA_BEAN.pptx (20)

Apache Maven supports ALL Java (Javaland 2019)
Apache Maven supports ALL Java (Javaland 2019)Apache Maven supports ALL Java (Javaland 2019)
Apache Maven supports ALL Java (Javaland 2019)
 
The Latest in Enterprise JavaBeans Technology
The Latest in Enterprise JavaBeans TechnologyThe Latest in Enterprise JavaBeans Technology
The Latest in Enterprise JavaBeans Technology
 
Apache maven and its impact on java 9 (Java One 2017)
Apache maven and its impact on java 9 (Java One 2017)Apache maven and its impact on java 9 (Java One 2017)
Apache maven and its impact on java 9 (Java One 2017)
 
Module4_Annotations_JDBC.pdf
Module4_Annotations_JDBC.pdfModule4_Annotations_JDBC.pdf
Module4_Annotations_JDBC.pdf
 
Lecture 19 dynamic web - java - part 1
Lecture 19   dynamic web - java - part 1Lecture 19   dynamic web - java - part 1
Lecture 19 dynamic web - java - part 1
 
159747608 a-training-report-on
159747608 a-training-report-on159747608 a-training-report-on
159747608 a-training-report-on
 
Apache Maven supports all Java (JokerConf 2018)
Apache Maven supports all Java (JokerConf 2018)Apache Maven supports all Java (JokerConf 2018)
Apache Maven supports all Java (JokerConf 2018)
 
Domino java
Domino javaDomino java
Domino java
 
Java2 platform
Java2 platformJava2 platform
Java2 platform
 
Jsf+ejb 50
Jsf+ejb 50Jsf+ejb 50
Jsf+ejb 50
 
J2 Ee Overview
J2 Ee OverviewJ2 Ee Overview
J2 Ee Overview
 
Ejb course-in-mumbai
Ejb course-in-mumbaiEjb course-in-mumbai
Ejb course-in-mumbai
 
Java component
Java componentJava component
Java component
 
Build Java Web Application Using Apache Struts
Build Java Web Application Using Apache Struts Build Java Web Application Using Apache Struts
Build Java Web Application Using Apache Struts
 
Ecom lec3 16_ej_bs
Ecom lec3 16_ej_bsEcom lec3 16_ej_bs
Ecom lec3 16_ej_bs
 
Universal Java Beans with DB2 from 1999, early Internet work
Universal Java Beans with DB2 from 1999, early Internet workUniversal Java Beans with DB2 from 1999, early Internet work
Universal Java Beans with DB2 from 1999, early Internet work
 
Spring framework in depth
Spring framework in depthSpring framework in depth
Spring framework in depth
 
J2EE - Practical Overview
J2EE - Practical OverviewJ2EE - Practical Overview
J2EE - Practical Overview
 
Lo nuevo en Spring 3.0
Lo nuevo  en Spring 3.0Lo nuevo  en Spring 3.0
Lo nuevo en Spring 3.0
 
Informatica Power Center - Workflow Manager
Informatica Power Center - Workflow ManagerInformatica Power Center - Workflow Manager
Informatica Power Center - Workflow Manager
 

Recently uploaded

Securing your Kubernetes cluster_ a step-by-step guide to success !
Securing your Kubernetes cluster_ a step-by-step guide to success !Securing your Kubernetes cluster_ a step-by-step guide to success !
Securing your Kubernetes cluster_ a step-by-step guide to success !
KatiaHIMEUR1
 
By Design, not by Accident - Agile Venture Bolzano 2024
By Design, not by Accident - Agile Venture Bolzano 2024By Design, not by Accident - Agile Venture Bolzano 2024
By Design, not by Accident - Agile Venture Bolzano 2024
Pierluigi Pugliese
 
The Metaverse and AI: how can decision-makers harness the Metaverse for their...
The Metaverse and AI: how can decision-makers harness the Metaverse for their...The Metaverse and AI: how can decision-makers harness the Metaverse for their...
The Metaverse and AI: how can decision-makers harness the Metaverse for their...
Jen Stirrup
 
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
DanBrown980551
 
The Art of the Pitch: WordPress Relationships and Sales
The Art of the Pitch: WordPress Relationships and SalesThe Art of the Pitch: WordPress Relationships and Sales
The Art of the Pitch: WordPress Relationships and Sales
Laura Byrne
 
GraphRAG is All You need? LLM & Knowledge Graph
GraphRAG is All You need? LLM & Knowledge GraphGraphRAG is All You need? LLM & Knowledge Graph
GraphRAG is All You need? LLM & Knowledge Graph
Guy Korland
 
PCI PIN Basics Webinar from the Controlcase Team
PCI PIN Basics Webinar from the Controlcase TeamPCI PIN Basics Webinar from the Controlcase Team
PCI PIN Basics Webinar from the Controlcase Team
ControlCase
 
Free Complete Python - A step towards Data Science
Free Complete Python - A step towards Data ScienceFree Complete Python - A step towards Data Science
Free Complete Python - A step towards Data Science
RinaMondal9
 
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdfFIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
FIDO Alliance
 
Alt. GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using ...
Alt. GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using ...Alt. GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using ...
Alt. GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using ...
James Anderson
 
Secstrike : Reverse Engineering & Pwnable tools for CTF.pptx
Secstrike : Reverse Engineering & Pwnable tools for CTF.pptxSecstrike : Reverse Engineering & Pwnable tools for CTF.pptx
Secstrike : Reverse Engineering & Pwnable tools for CTF.pptx
nkrafacyberclub
 
DevOps and Testing slides at DASA Connect
DevOps and Testing slides at DASA ConnectDevOps and Testing slides at DASA Connect
DevOps and Testing slides at DASA Connect
Kari Kakkonen
 
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdfFIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance
 
Pushing the limits of ePRTC: 100ns holdover for 100 days
Pushing the limits of ePRTC: 100ns holdover for 100 daysPushing the limits of ePRTC: 100ns holdover for 100 days
Pushing the limits of ePRTC: 100ns holdover for 100 days
Adtran
 
Enhancing Performance with Globus and the Science DMZ
Enhancing Performance with Globus and the Science DMZEnhancing Performance with Globus and the Science DMZ
Enhancing Performance with Globus and the Science DMZ
Globus
 
State of ICS and IoT Cyber Threat Landscape Report 2024 preview
State of ICS and IoT Cyber Threat Landscape Report 2024 previewState of ICS and IoT Cyber Threat Landscape Report 2024 preview
State of ICS and IoT Cyber Threat Landscape Report 2024 preview
Prayukth K V
 
Introduction to CHERI technology - Cybersecurity
Introduction to CHERI technology - CybersecurityIntroduction to CHERI technology - Cybersecurity
Introduction to CHERI technology - Cybersecurity
mikeeftimakis1
 
zkStudyClub - Reef: Fast Succinct Non-Interactive Zero-Knowledge Regex Proofs
zkStudyClub - Reef: Fast Succinct Non-Interactive Zero-Knowledge Regex ProofszkStudyClub - Reef: Fast Succinct Non-Interactive Zero-Knowledge Regex Proofs
zkStudyClub - Reef: Fast Succinct Non-Interactive Zero-Knowledge Regex Proofs
Alex Pruden
 
Epistemic Interaction - tuning interfaces to provide information for AI support
Epistemic Interaction - tuning interfaces to provide information for AI supportEpistemic Interaction - tuning interfaces to provide information for AI support
Epistemic Interaction - tuning interfaces to provide information for AI support
Alan Dix
 
Assure Contact Center Experiences for Your Customers With ThousandEyes
Assure Contact Center Experiences for Your Customers With ThousandEyesAssure Contact Center Experiences for Your Customers With ThousandEyes
Assure Contact Center Experiences for Your Customers With ThousandEyes
ThousandEyes
 

Recently uploaded (20)

Securing your Kubernetes cluster_ a step-by-step guide to success !
Securing your Kubernetes cluster_ a step-by-step guide to success !Securing your Kubernetes cluster_ a step-by-step guide to success !
Securing your Kubernetes cluster_ a step-by-step guide to success !
 
By Design, not by Accident - Agile Venture Bolzano 2024
By Design, not by Accident - Agile Venture Bolzano 2024By Design, not by Accident - Agile Venture Bolzano 2024
By Design, not by Accident - Agile Venture Bolzano 2024
 
The Metaverse and AI: how can decision-makers harness the Metaverse for their...
The Metaverse and AI: how can decision-makers harness the Metaverse for their...The Metaverse and AI: how can decision-makers harness the Metaverse for their...
The Metaverse and AI: how can decision-makers harness the Metaverse for their...
 
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
 
The Art of the Pitch: WordPress Relationships and Sales
The Art of the Pitch: WordPress Relationships and SalesThe Art of the Pitch: WordPress Relationships and Sales
The Art of the Pitch: WordPress Relationships and Sales
 
GraphRAG is All You need? LLM & Knowledge Graph
GraphRAG is All You need? LLM & Knowledge GraphGraphRAG is All You need? LLM & Knowledge Graph
GraphRAG is All You need? LLM & Knowledge Graph
 
PCI PIN Basics Webinar from the Controlcase Team
PCI PIN Basics Webinar from the Controlcase TeamPCI PIN Basics Webinar from the Controlcase Team
PCI PIN Basics Webinar from the Controlcase Team
 
Free Complete Python - A step towards Data Science
Free Complete Python - A step towards Data ScienceFree Complete Python - A step towards Data Science
Free Complete Python - A step towards Data Science
 
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdfFIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
 
Alt. GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using ...
Alt. GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using ...Alt. GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using ...
Alt. GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using ...
 
Secstrike : Reverse Engineering & Pwnable tools for CTF.pptx
Secstrike : Reverse Engineering & Pwnable tools for CTF.pptxSecstrike : Reverse Engineering & Pwnable tools for CTF.pptx
Secstrike : Reverse Engineering & Pwnable tools for CTF.pptx
 
DevOps and Testing slides at DASA Connect
DevOps and Testing slides at DASA ConnectDevOps and Testing slides at DASA Connect
DevOps and Testing slides at DASA Connect
 
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdfFIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
 
Pushing the limits of ePRTC: 100ns holdover for 100 days
Pushing the limits of ePRTC: 100ns holdover for 100 daysPushing the limits of ePRTC: 100ns holdover for 100 days
Pushing the limits of ePRTC: 100ns holdover for 100 days
 
Enhancing Performance with Globus and the Science DMZ
Enhancing Performance with Globus and the Science DMZEnhancing Performance with Globus and the Science DMZ
Enhancing Performance with Globus and the Science DMZ
 
State of ICS and IoT Cyber Threat Landscape Report 2024 preview
State of ICS and IoT Cyber Threat Landscape Report 2024 previewState of ICS and IoT Cyber Threat Landscape Report 2024 preview
State of ICS and IoT Cyber Threat Landscape Report 2024 preview
 
Introduction to CHERI technology - Cybersecurity
Introduction to CHERI technology - CybersecurityIntroduction to CHERI technology - Cybersecurity
Introduction to CHERI technology - Cybersecurity
 
zkStudyClub - Reef: Fast Succinct Non-Interactive Zero-Knowledge Regex Proofs
zkStudyClub - Reef: Fast Succinct Non-Interactive Zero-Knowledge Regex ProofszkStudyClub - Reef: Fast Succinct Non-Interactive Zero-Knowledge Regex Proofs
zkStudyClub - Reef: Fast Succinct Non-Interactive Zero-Knowledge Regex Proofs
 
Epistemic Interaction - tuning interfaces to provide information for AI support
Epistemic Interaction - tuning interfaces to provide information for AI supportEpistemic Interaction - tuning interfaces to provide information for AI support
Epistemic Interaction - tuning interfaces to provide information for AI support
 
Assure Contact Center Experiences for Your Customers With ThousandEyes
Assure Contact Center Experiences for Your Customers With ThousandEyesAssure Contact Center Experiences for Your Customers With ThousandEyes
Assure Contact Center Experiences for Your Customers With ThousandEyes
 

JAVA_BEAN.pptx

  • 2. JAVA BEANS • JavaBeans is the one of major Reusable software component developed by Sun Microsystems for the Java. It is mainly used in the builder tool. • JavaBeans is a platform-independent, component model written in JAVA language, which can be changed and customized. • Java Bean contains a public constructor with no arguments, properties and accessor/mutator methods for those properties. 2/50
  • 3. JAVA BEANS – Contd; • A JavaBeans is just a java class with the following requirements. – It has a public no-args constructor – It has 'set' and 'get' methods for its properties. – It may have any general functions. – If required it must be Serializable. 3/50
  • 4. JAVA BEANS Example – Contd; 4/50 Public class sampleBean { private String name; private int age; public sampleBean() { } public String getName() { ------------- } public void setName(String name){ this.name=name; } public String getAge(){ ------------- } public void setAge(String age){ this.age=age; } }
  • 5. JAVA BEANS - Advantages • Java Bean is the Re-usable component, simply we can call “Write once and use everywhere” concept • It is very simple and flexible to use. • Portable and platform independent. 5/50
  • 6. Accessors & Mutators • Accessor method is used to return the variables. The method name should start with “get” and followed by property name with the first character as capital. • Example 6/50 public String getName () { return name; }
  • 7. Why use Accessors • Providing single points of update. The single points of update for each attribute, making it easier to modify and to test. • Controlling access to attributes. • Enabling lazy initialization. Lazy initialization means the value of an attribute is initialized (set) when it is first accessed. • Reducing coupling between a subclass and its super classes. • Encapsulating changes to attributes 7/50
  • 8. Mutators • A Mutator is a method used to add/update the value for the property. • It should start with “set” followed by property name with the first character as capital. It should not return anything. • Example of the Mutator 8/50 public void setName(String name) { this.name=name; }
  • 9. Types of JavaBeans • Java Beans are classified into three types, – Session Beans, – Entity Beans, – Message Driven Beans or Message Beans. 9/50
  • 10. Session Beans • It is used to Performs a task for a client . • Session Bean is created by a customer and its duration is only for the signal client server session. • The functions has performed by this bean is calculations or database access, for the client. • Session bean can be transactional, because it is not recoverable. 10/50
  • 11. Session Beans – Contd; • Session Beans further classified into two types 11/50 Stateless Session: The stateless Session Beans has no connection with informal state is a distributed object. It allows the parallel accessing of Beans. Stateful Session: The Stateful Session bean has a connection with informal state, but with very limited access to the customer for Beans.
  • 12. Entity Beans • The Entity is used to represent a business entity object that exists in persistent storage. • It is recognized by a main key, if the container is hosted by entity bean crashes, the bean will destroy the remote reference. 12/50
  • 13. Message Bean • Message bean is used to act as a listener for JMS (Java Message Service). • It is similar to Session bean except the respond to JMS. • It will process the messages asynchronously. • It processes the messages from multiple clients. 13/50
  • 14. Creating Java Bean • Always a bean should contain properties and accessor & mutators for those properties. • If there are no properties in bean, then there is no need for accessors and mutators. • For some cases the bean just used as a class for encapsulation (i.e.) business logic. Such a bean may or may not have a visual representation. • The Tomcat server searches for any classes in c:tomcatwebappsrootweb-infclasses folder. • Create a subfolder under class’s folder and name it as 'java beans’. 14/50
  • 15. Summary • Batch processing is one of the advanced features in JDBC. It is used to execute a batch of statements (like a query or updates) in a single call by creating a group of statements. • The ResultSetMeta-Data is used to view the details in the Result set. • It is always not possible to know the number of columns, data types of the columns and names of the columns while retrieving data from the table. ResultSetMetaData can be used to overcome this issue. • A connection pool is used to overcome the effects of the usage of database by many users without disconnecting it. It creates a pool of Connection object when the application server starts. 15/50
  • 16. Summary • A Transaction Management system reduces the complexity of application development because it frees the developer from the complex issues of failure recovery and multi-user programming. • JavaBeans is the one of major Reusable software component developed by Sun Microsystems for the Java. It is mainly used in the builder tool. • Accessor method is used to return the variables. The method name should start with “get” and followed by property name with the first character as capital. • A Mutator is a method used to add/update the value for the property. Mutator methods should start with “set” followed by property name with the first character as capital. It should not return anything. 16