br.gov.frameworkdemoiselle.internal.producer
Class Persistences

java.lang.Object
  extended by br.gov.frameworkdemoiselle.internal.producer.Persistences

@Singleton
public class Persistences
extends Object


Field Summary
protected  ResourceBundle bundle
           
protected  org.slf4j.Logger logger
           
 
Constructor Summary
Persistences()
           
 
Method Summary
protected  String getFromProperties(EntityManagerConfig config)
          Tries to get persistence unit name from demoiselle.properties.
protected  String getFromXML()
          Uses persistence.xml to get informations about which persistence unit to use.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

logger

@Inject
protected org.slf4j.Logger logger

bundle

@Inject
protected ResourceBundle bundle
Constructor Detail

Persistences

public Persistences()
Method Detail

getFromProperties

protected String getFromProperties(EntityManagerConfig config)
Tries to get persistence unit name from demoiselle.properties.

Parameters:
config - Configuration containing persistence unit name.
Returns:
Persistence unit name.

getFromXML

protected String getFromXML()
Uses persistence.xml to get informations about which persistence unit to use. Throws DemoiselleException if more than one Persistence Unit is defined.

Returns:
Persistence Unit AmbiguousQualifier


Copyright © 2014 SERPRO - Serviço Federal de Processamento de Dados. All Rights Reserved.