Blog Archives

OS X for Java Developers

Welcome to OS X I recently purchased a Mac (a Macbook Pro Retina), I had previously worked on Windows (XP/7) and Linux (Ubuntu). Making the switch took some getting used to, these are some of my tips for new developers. dmg

Posted in Java, Mac, OS X

Java Plugin architecture

Today I was interested in learning how to implement a Java plugin architecture. Plugins allow extra functionality to be added to an application (usually by other developers) without having to recompile. Eclipse IDE & Firefox are two notable applications that

Posted in Java

Tomcat Virtual Hosts

I added http://www.ramkitech.com to my bookmarks, its a website by Rama Krishnnan that contains lots of useful information for configuring Tomcat. Some of my favorites articles include:  Understanding Virtual Host Concept in Tomcat. Deploy multiple domains into a single tomcat (1

Tagged with: , ,
Posted in Java, Tomcat, Web

Jenkins

Settings: JENKINS_HOME – set to ~/.jenkins by default Jenkins Workspace – set to /var/lib/jenkins/workspace Distributed Builds: master – Jenkins installation that serves HTTP requests, build projects, and distributes load to slaves slaves – nodes that build projects for the master,

Tagged with:
Posted in Java

Emebedded Databases

We have the following choices: H2 Written in Java 1.5 MB jar http://www.h2database.com Handy cheat sheet driver –> org.h2.Driver jdbc url –> jdbc:h2:~/test hibernate.dialect –> org.hibernate.dialect.H2Dialect HSQLDB (HyperSQL) Written in Java 700 KB jar Apache Derby DB (JavaDB) Written in

Tagged with: , ,
Posted in Database, Hibernate, Java

Hibernate In Action

Notes from ‘Hibernate in Action’: Chapter 1: The Paradigm Mismatch Granularity – SQL databases only support two levels of granularity : tables & columns Subtypes – SQL databases have no notion of inheritance, a foreign key constraint refers to exactly

Tagged with: , ,
Posted in Hibernate, Java

Hibernate Configuration

The following uses Spring + Hibernate:     <bean id=”dataSource”         class=”…”         p:driverClassName=”com.mysql.jdbc.Driver” p:url=”jdbc:mysql://localhost:3306/products”         p:username=”…” p:password=”…” /> The datasource class will depend on desired features: 1) org.springframework.jdbc.datasource.DriverManagerDataSource 2) com.mchange.v2.c3p0.ComboPooledDataSource 3) org.apache.commons.dbcp.BasicDataSource 4) org.springframework.jdbc.datasource.SingleConnectionDataSource Next we define

Posted in Hibernate, Java