Object Oriented Programming Language? | Connection Pool?

Studywow: Topics= 1.object oriented programming language. 2.Connection Pooling in java.
Read more topics of Java to (click here).

Q1. Java is not a pure object oriented programming language? Justify your answer.

Ans. Java is not a pure object oriented programming language, but so called a 'hybrid' language.
For any language to be pure object oriented it must follow these six points strictly:
(a) It must have full support for encapsulation and abstraction.
(b) It must support inheritance.
(c) It must support polymorphism.
(d) All predefined types must be objects.
(e) All user defined types must be objects.
(f) All operations performed on objects must be only through methods exposed at the objects.

Now, Java supports point number 1, 2, 3 and 5, but fails to support 4 and 6. In Java we have some predefined types as non-objects (primitive types). Although we have wrapper classes for the same but a pure OOL can't have anything other than objects strictly.These two points stops Java from being a pure object oriented language.

Q2. What do you mean by Connection Pooling in Java ?

Ans. Connection Pooling is a technique to allow multiple clients to make use of a cached set of shared and reusable connection objects providing access to a database. JDBC connection pooling is conceptually similar to any other form of object pooling.
It facilitates reuse of the same connection object to serve a number of client requests. Every time a client request is received, the pool is searched for an available connection object and it's highly likely that it gets a free connection object.
As soon as a request finishes using a connection object, the object is given back to the pool from where it's assigned to one of the queued requests.

In JDBC Connection Pooling :
(a) Connections are reused rather than created each time a connection is requested.
(b) It is performed in the background and does not affect how an application is coded.
(c) When the connection pool serves starts, it creates a pre-determined number of connection objects.
(d) A client application would then perform to retrieve a reference to a Data Source object that implements the Connection PoolDataSource interface.

Since most of the requests are served using existing connection objects only so the connection pooling approach brings down the average time required for the users to wait for establishing the connection to the database.

[ Topics= object oriented programming language and connection pooling in java.]
[ Topics= Object Oriented Programming Language and Connection Pooling in java.]

Join us on Facebook and Twitter  to get the latest study material. You can also ask us any questions.
Facebook = @ studywow
(click on it or search "studywow" on facebook)
Twitter = @ studywow
(click on it or search "studywow" on Twitter)
Email= studywow.com@gmail.com
Send us your query anytime!

External Website links:

1. Object Oriented Programming Language. (link)
2. Connection Pooling in java. (link)

[ Topics= Object Oriented Programming Language and Connection Pooling in java.]