Code example for Hashtable

Methods: size

0
		return list.toArray(new Customer[list.size()]);
	} 
	 
	private DataSource getDataSource() {
		DataSource dataSource = null;
		Hashtable<String, String> env = new Hashtable<String, String>();
		try { 
			InitialContext context = new InitialContext();
			if(env.size()>0){
				context = new InitialContext(env);
			} 
			dataSource = (DataSource) context.lookup("jdbc/customer_ds");			
		} catch (NamingException e) {
			e.printStackTrace();
		} 
		return dataSource;
	} 
}