JPA persistence binding

Please review.
Included are libs for PostgreSQL, Apache Derby and MySQL.
Tested on PostgreSQL and Apache Derby. Working OK on my production system.

The reason for my doing was to also log the stack trace.
But I've changed to your suggestion.



> Am 05.11.2014 um 11:26 schrieb Thomas Eichstädt-Engelen <notifications@github.com>:
> 
> In bundles/persistence/org.openhab.persistence.jpa/java/org/openhab/persistence/jpa/internal/JpaPersistenceService.java:
> 
> > +		}
> > +		
> > +		if(!JpaConfiguration.isInitialized) {
> > +			logger.warn("Trying to create EntityManagerFactory but we don't have configuration yet!");
> > +			return;
> > +		}
> > +		
> > +		// determine item name to be stored
> > +		String name = (alias != null) ? alias : item.getName();
> > +		
> > +		JpaPersistentItem pItem = new JpaPersistentItem();
> > +		try {
> > +			pItem.setValue(StateHelper.toString(item.getState()));
> > +		} catch (Exception e1) {
> > +			logger.error("Error on converting state value to string!");
> > +			logger.error(e1.getMessage(), e1);
> 
> please merge into one log statement using the '{}' notation like logger.error("Error on converting state value to string: {}", e1.getMessage());
> 
> —
> Reply to this email directly or view it on GitHub.
>