This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<property name="hibernate.cache.region.factory_class" value="org.jboss.as.jpa.hibernate4.infinispan.InfinispanRegionFactory" /> | |
<property name="hibernate.cache.use_second_level_cache" value="true" /> | |
<property name="hibernate.cache.use_query_cache" value="true" /> | |
<property name="hibernate.cache.use_minimal_puts" value="true" /> | |
<property name="hibernate.cache.infinispan.statistics" value="false" /> | |
<property name="hibernate.cache.infinispan.entity.eviction.strategy" value="LRU" /> | |
<property name="hibernate.cache.infinispan.entity.eviction.wake_up_interval" value="2000" /> | |
<property name="hibernate.cache.infinispan.entity.eviction.max_entries" value="5000" /> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package br.com.app.util; | |
import java.io.IOException; | |
import javax.servlet.*; | |
/** | |
* JPA FIlter, Responsavel por filtrar as conexão. | |
* | |
* @author Dilnei Cunha. | |
*/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package br.com.app.util; | |
import javax.persistence.EntityManager; | |
import javax.persistence.EntityManagerFactory; | |
import javax.persistence.Persistence; | |
public class JPAUtil { | |
private static final String PERSISTENCE_UNIT = "appUnitPU"; | |
private static ThreadLocal<EntityManager> threadLocal; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.io.Serializable; | |
import java.util.List; | |
import javax.persistence.EntityManager; | |
import javax.persistence.criteria.CriteriaQuery; | |
/** | |
* DAO genérico. | |
* | |
* @author Dilnei Cunha | |
*/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package br.com.weblog.service.factory; | |
import br.com.weblog.service.dao.DAO; | |
import java.lang.reflect.ParameterizedType; | |
import javax.enterprise.inject.Produces; | |
import javax.enterprise.inject.spi.InjectionPoint; | |
import javax.inject.Inject; | |
import javax.persistence.EntityManager; | |
/** |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package br.com.weblog.interceptor; | |
import java.lang.annotation.ElementType; | |
import java.lang.annotation.Retention; | |
import java.lang.annotation.RetentionPolicy; | |
import java.lang.annotation.Target; | |
import javax.interceptor.InterceptorBinding; | |
/** | |
* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package br.com.weblog.interceptor; | |
import javax.inject.Inject; | |
import javax.interceptor.AroundInvoke; | |
import javax.interceptor.Interceptor; | |
import javax.interceptor.InvocationContext; | |
import javax.persistence.EntityManager; | |
import org.apache.log4j.Logger; | |
/** |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package br.com.weblog.usefull; | |
import java.util.Map; | |
import javax.faces.context.ExternalContext; | |
import javax.faces.context.FacesContext; | |
import org.apache.log4j.Logger; | |
/** | |
* Classe com métodos utilitarios para o faces. | |
* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package br.com.risingforce.funcoes; | |
/** | |
* Classe que contém métodos utilitários para detecção de character e number. | |
* | |
* @author Dilnei Cunha. | |
*/ | |
public class ValidaCharacters { | |
/** |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package br.com.risingforce.funcoes; | |
import java.awt.image.BufferedImage; | |
import java.io.File; | |
import java.io.FileOutputStream; | |
import java.io.IOException; | |
import java.io.InputStream; | |
import java.util.logging.Level; | |
import java.util.logging.Logger; | |
import javax.imageio.ImageIO; |
OlderNewer