code: public Object getObjectInstance(Object object, Name name, Context context, Hashtable<?, ?> table) throws Exception {
  
  		Reference ref = (Reference) object;
  		Enumeration<RefAddr> addrs = ref.getAll();
  		Properties props = new Properties();
  		while (addrs.hasMoreElements()) {
  			RefAddr addr = addrs.nextElement();
  			if (addr.getType().equals("driverClassName")){
  				Class.forName((String) addr.getContent());
  			} else {
  				props.put(addr.getType(), addr.getContent());
  			}
  		}		
  		BoneCPConfig config = new BoneCPConfig(props);
  
  		return new BoneCPDataSource(config);
  	}
docs: /* (non-Javadoc)
  @see javax.naming.spi.ObjectFactory#getObjectInstance(java.lang.Object, javax.naming.Name, javax.naming.Context, java.util.Hashtable)