Profile

Cover photo
john eipe
Works at Avnet Technology Solutions
Attended PSG College of Arts and Science
107 followers|5,459 views
AboutPostsPhotosVideos

Stream

john eipe

Shared publicly  - 
 
Java Enum(s) tutorial
Why use enums? Checkout this answer from stackoverflow . Start with a real time scenario of using enums: package test;

import test.GradeTest.Grade;

public class GradeTest {

public enum Grade { A, B, C, D, F, INCOMPLETE };

public static void main(Str...
Why use enums? Checkout this answer from stackoverflow. Start with a real time scenario of using enums: package test; import test.GradeTest.Grade; public class GradeTest { public enum Grade { A, B, C, D, F, INCOMPLETE }; publ...
1
john eipe's profile photoPraveen Kumar's profile photo
4 comments
 
just my blog.
Add a comment...

john eipe

Shared publicly  - 
 
JDBC connections using Datasource (container implementation)
Let's first try out stand-alone application. The below program will require [tomcat-installation]/bin/tomcat-juli.jar in your projects lib folder as a stand-alone java program do not have access to tomcat implementation. package com.prodapps;

import java.s...
Let's first try out stand-alone application. The below program will require [tomcat-installation]/bin/tomcat-juli.jar in your projects lib folder as a stand-alone java program do not have access to tomcat implementation. pack...
1
Add a comment...

john eipe

Shared publicly  - 
 
JDBC application - (linear) connections using DataSouce (driver implementation)
Let's try to create a stand-alone application using Datasource implementation that's available within the driver. package com.prodapps;

import java.sql.Connection;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.sql.Statement;

import ...
Let's try to create a stand-alone application using Datasource implementation that's available within the driver. package com.prodapps; import java.sql.Connection; import java.sql.ResultSet; import java.sql.SQLException; impo...
1
Add a comment...

john eipe

Shared publicly  - 
 
JDBC Connection pooling - container managed
Instead of relying on 3rd-party libraries/frameworks we could use the pooling mechanisms provided by the underlying container. Let's take tomcat, the container we are using for these examples. Tomcat comes with Tomcat-DBCP . Here is excerpt from tomcat docu...
Instead of relying on 3rd-party libraries/frameworks we could use the pooling mechanisms provided by the underlying container. Let's take tomcat, the container we are using for these examples. Tomcat comes with Tomcat-DBCP. H...
1
Add a comment...

john eipe

Shared publicly  - 
 
JDBC Connection pooling - traditional
Before frameworks and libraries, we used to write our own pooling mechanisms. Let's try first a standalone java application. Since we are using connection pooling, our application will ask the pool for new or free connections instead of DriverManager. The P...
Before frameworks and libraries, we used to write our own pooling mechanisms. Let's try first a standalone java application. Since we are using connection pooling, our application will ask the pool for new or free connections...
1
Add a comment...
In his circles
12 people
Have him in circles
107 people

john eipe

commented on a video on YouTube.
Shared publicly  - 
 
It's been almost 4 months... high time for Episode 2
4
Add a comment...

john eipe

Shared publicly  - 
 
JDBC application - connections using DataSouce (framework implementation)
We could use commons-dbcp as our library of choice. package com.prodapps;
import java.sql.Connection;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.sql.Statement;

import org.apache.commons.dbcp.BasicDataSource;

public class PoolingD...
We could use commons-dbcp as our library of choice. package com.prodapps; import java.sql.Connection; import java.sql.ResultSet; import java.sql.SQLException; import java.sql.Statement; import org.apache.commons.dbcp.BasicDat...
1
Add a comment...

john eipe

Shared publicly  - 
 
JDBC Connections using DataSource
Why DataSource and not DriverManager? Answer is simple. That's how the API evolved. Java 1.7 docs states that "The DataSource interface, new in the JDBC 2.0 API, provides another way to connect to a data source. An alternative to the DriverManager facility...
Why DataSource and not DriverManager? Answer is simple. That's how the API evolved. Java 1.7 docs states that "The DataSource interface, new in the JDBC 2.0 API, provides another way to connect to a data source. An alternativ...
1
Add a comment...

john eipe

Shared publicly  - 
 
JDBC Connection pooling - Framework
Let's use apache-commons-dbcp framework. DBCP stands for Database Connection Pooling. I went straight to commons-dbcp to try out the examples given there. But there seemed to be issues with package imports. So, after some tryouts, here are the libraries to ...
Let's use apache-commons-dbcp framework. DBCP stands for Database Connection Pooling. I went straight to commons-dbcp to try out the examples given there. But there seemed to be issues with package imports. So, after some try...
1
Add a comment...

john eipe

Shared publicly  - 
 
JDBC web application - (individual) connections using DriverManager
This doesn't involve many changes from our previous servlet. All we had to do is move the connection object declaration into doGet method and modify createConnection() method. @WebServlet(description = "This is primary product servlet", urlPatterns = { "/Pr...
This doesn't involve many changes from our previous servlet. All we had to do is move the connection object declaration into doGet method and modify createConnection() method. @WebServlet(description = "This is primary produc...
1
Add a comment...
People
In his circles
12 people
Have him in circles
107 people
Education
  • PSG College of Arts and Science
    BSc statistics
  • SSN College of Engineering
    MCA
Links
YouTube
Contributor to
Links
Work
Employment
  • Avnet Technology Solutions
    present
Basic Information
Gender
Male
Relationship
It's complicated