Multiple DataSource configurations using Spring

While developing Java based applications we might frequently need to change the database properties based on the environment we are working like PRODUCTION, DEVELOPMENT OR UAT environments. In that situations the following approach will be useful and easy to configure database properties for each environment. If we want to change the environment we just need […]

Read More

Java Versions and Code Names

VERSION CODE NAME RELEASE DATE JDK 1.1.4 Sparkler Sept 12, 1997 JDK 1.1.5 Pumpkin Dec 3, 1997 JDK 1.1.6 Abigail April 24, 1998 JDK 1.1.7 Brutus Sept 28, 1998 JDK 1.1.8 Chelsea April 8, 1999 J2SE 1.2 Playground Dec 4, 1998 J2SE 1.2.1 (none) March 30, 1999 J2SE 1.2.2 Cricket July 8, 1999 J2SE 1.3 […]

Read More

JDBC DataSource Configuration in Tomcat

Put a file named context.xml in META-INF folder which contains: <?xml version=”1.0″ encoding=”UTF-8″?> <Context><Resource name=”MySQLDS” type=”javax.sql.DataSource” driverClassName=”com.mysql.jdbc.Driver” password=”root” maxIdle=”2″ maxWait=”5000″ username=”root” url=”jdbc:mysql://localhost:3306/test” maxActive=”10″/></Context> Getting the DataSource: Context context = new InitialContext();DataSource MYSQL_DATASOURCE = (DataSource) context.lookup(“java:comp/env/MySQLDS”);

Read More

How to kill a process running on a port

Hi All,Many of the Java developers frequently facing some problems with ports.Ex: If JBoss server has started and closed accedentally without properly shutdown process , several processes will remain running on some ports which will causes Port Already binded kind of exceptions.In that kind of situations, we can forcefully kill a process running on a […]

Read More

Struts1 Vs Struts2 Vs JSF Vs SpringMVC

Hi, Recently I have done some research on J2EE Web frameworks usability and features to decide the framework to be used for one of my new projects.I consider Struts 1, Struts2, JSF and Spring MVC. After spending some hours on going through each of the frameworks features and some more hours to do a simple […]

Read More