This file contains hidden or 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
$ sudo firewall-cmd --zone=public --add-port=80/tcp --permanent | |
$ sudo firewall-cmd --reload | |
$ firewall-cmd --list-all |
This file contains hidden or 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
module add --name=com.mysql --resources=~/Downloads/mysql-XXX.jar --dependencies=javax.api,javax.transaction.api | |
batch | |
/subsystem=datasources/jdbc-driver=com.mysql:add(driver-name=com.mysql, driver-module-name=com.mysql, driver-xa-datasource-class-name=com.mysql.jdbc.jdbc2.optional.MysqlXADataSource) | |
/subsystem=datasources/data-source=mysql:add(driver-name=com.mysql, jndi-name="java:jboss/datasources/MySQLDS", enabled=true, connection-url="jdbc:mysql://localhost:3306/test") | |
run-batch |
This file contains hidden or 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
<?xml version="1.0" encoding="UTF-8"?> | |
<persistence xmlns="http://java.sun.com/xml/ns/persistence" | |
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | |
xsi:schemaLocation="http://java.sun.com/xml/ns/persistence | |
http://java.sun.com/xml/ns/persistence/persistence_1_0.xsd" | |
version="1.0"> | |
<!-- derby --> |
This file contains hidden or 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.pedroHos.model.repositories; | |
import java.lang.reflect.ParameterizedType; | |
import java.util.List; | |
import javax.ejb.Stateless; | |
import javax.persistence.EntityManager; | |
import javax.persistence.PersistenceContext; | |
import javax.persistence.criteria.CriteriaQuery; |
This file contains hidden or 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 javax.enterprise.inject.Produces; | |
import javax.enterprise.inject.spi.InjectionPoint; | |
import org.slf4j.Logger; | |
import org.slf4j.LoggerFactory; | |
public class LoggerProducer { | |
@Produces | |
public Logger produceLogger(InjectionPoint injectionPoint) { | |
return LoggerFactory.getLogger(injectionPoint.getMember() | |
.getDeclaringClass().getName()); |
This file contains hidden or 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
$("#selectBox").append('<option value="option6">option6</option>'); |
This file contains hidden or 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
{ | |
"estados": [ | |
{ | |
"sigla": "AC", | |
"nome": "Acre", | |
"cidades": [ | |
"Acrelândia", | |
"Assis Brasil", | |
"Brasiléia", | |
"Bujari", |
This file contains hidden or 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
/** | |
* @author Pedro Hos<br> | |
* | |
* Utilizando Exemplo de Eduardo Guerra! | |
* https://groups.google.com/forum | |
* /#!topic/projeto-oo-guiado-por-padroes/pOIiOD9cifs | |
* | |
* Este método retorna o tipo da Classe, dessa maneira não é | |
* necessário cada Service expor seu tipo!!!! | |
* |
This file contains hidden or 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
<plugin> | |
<artifactId>maven-failsafe-plugin</artifactId> | |
<version>2.17</version> | |
<executions> | |
<execution> | |
<goals> | |
<goal>integration-test</goal> | |
<goal>verify</goal> | |
</goals> | |
</execution> |
This file contains hidden or 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
<driver name="postgresql" module="org.postgresql"> | |
<xa-datasource-class>org.postgresql.xa.PGXADataSource</xa-datasource-class> | |
</driver> |