Skip to content

Instantly share code, notes, and snippets.

View luizrobertofreitas's full-sized avatar

Luiz Roberto Freitas luizrobertofreitas

View GitHub Profile
@luizrobertofreitas
luizrobertofreitas / steps-mysql-ds-wildfly
Created July 27, 2015 19:24
Steps to add a MySQL Datasource on Wildfly 8.2
First: http://giordanomaestro.blogspot.com.br/2015/02/install-jdbc-driver-on-wildfly.html
Second: http://blog.squins.com/2014/12/adding-a-mysql-jndi-datasource-to-jboss-wildfly-via-cli/
@luizrobertofreitas
luizrobertofreitas / af_inputDate_hack
Created January 20, 2015 16:37
Change the default time picker in the af:inputDate popup
$(document).ready(function () {
var inputDateCurrentId = '';
$("a[id$='idEndDt\\:\\:glyph']").click(function(evt) {
inputDateCurrentId = 'idEndDt';
});
$("a[id$='idStartDt\\:\\:glyph']").click(function(evt) {
inputDateCurrentId = 'idStartDt';
@luizrobertofreitas
luizrobertofreitas / mysql-database-encoding
Created August 31, 2014 22:22
Alter mysql database collation and character
ALTER DATABASE app DEFAULT CHARACTER SET utf8 DEFAULT COLLATE utf8_general_ci;
<?xml version="1.0" encoding="UTF-8" ?>
<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_2_0.xsd"
version="2.0" xmlns="http://java.sun.com/xml/ns/persistence">
<persistence-unit name="order-old" transaction-type="RESOURCE_LOCAL">
<class>model.Order</class>
<class>model.OrderLine</class>
<class>model.Customer</class>
<properties>
<!-- Change this to access your own database. -->
@luizrobertofreitas
luizrobertofreitas / maven-weblogic-deployment
Last active August 29, 2015 14:03
Maven ant plugin for weblogic deployment
Using maven ant plugin for weblogic deployment. First, configure your pom.xml as below. Try the following maven command to execute the plugin goal:
mvn clean package antrun:run
Configuration:
<build>
<finalName>artifactName</finalName>
<plugins>
@luizrobertofreitas
luizrobertofreitas / create_oracle_dblink
Created May 26, 2014 12:38
Create oracle database link example
@luizrobertofreitas
luizrobertofreitas / mave-sonar-config
Created May 19, 2014 03:39
Maven + Sonar Configuration
<profile>
<id>sonar</id>
<activation>
<activeByDefault>true</activeByDefault>
</activation>
<properties>
<!-- Example for MySQL-->
<sonar.jdbc.url>
jdbc:mysql://localhost:3306/sonarqube?useUnicode=true&amp;characterEncoding=utf8
</sonar.jdbc.url>
@luizrobertofreitas
luizrobertofreitas / remove_things_from_mds
Created January 17, 2014 16:54
Excluir modelos canônicos do mds
executar /mid11117/Oracle_SOA1/common/bin/wlst.sh
sca_removeSharedData('http://192.168.57.49:8001', 'CustomerRelationship', 'weblogic', 'weblogic1')
sca_removeSharedData('http://192.168.57.49:8001', 'EBO', 'weblogic', 'weblogic1')
sca_removeSharedData('http://192.168.57.49:8001', 'Finance', 'weblogic', 'weblogic1')
sca_removeSharedData('http://192.168.57.49:8001', 'NaturaAPC', 'weblogic', 'weblogic1')
@luizrobertofreitas
luizrobertofreitas / gist:7878947
Last active December 30, 2015 20:09
Deployment Plan para o weblogic. Exemplo para aplicações que não foram desenvolvidas no jdeveloper e são empacotadas como .war. Depois de fazer o deploy da aplicação, clique em update e informe o deployment plan.
<?xml version = '1.0' encoding = 'US-ASCII'?>
<deployment-plan xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://xmlns.oracle.com/weblogic/deployment-plan http://xmlns.oracle.com/weblogic/deployment-plan/1.0/deployment-plan.xsd"
xmlns="http://xmlns.oracle.com/weblogic/deployment-plan">
<application-name>ApcCustom</application-name>
<variable-definition>
<variable>
<name>param</name>
<value>novo parametro</value>
</variable>
@luizrobertofreitas
luizrobertofreitas / primefaces-loading-dialog
Created December 3, 2013 11:10
Primefaces customized loading dialog
<p:ajaxStatus onstart="statusDialog.show();" onsuccess="statusDialog.hide();"/>
<p:dialog modal="true" widgetVar="statusDialog" showHeader="false" style="background: white;"
draggable="false" closable="false" resizable="false">
<div align="center">
<h:outputText value="#{mensagens['resultadoBuscaProdutoSES.carregando']}" /><br/><br/>
<p:graphicImage value="/resources/images/ajax-loader.gif" />
</div>
</p:dialog>