Skip to content

Instantly share code, notes, and snippets.

View wombat's full-sized avatar
😃
Working

Daniel Sachse wombat

😃
Working
View GitHub Profile
@wombat
wombat / standalone.xml
Created April 17, 2013 15:14
DataSource in standalone.xml
<datasource jta="true" jndi-name="java:jboss/datasources/TweetCamp" pool-name="TweetCampDS" enabled="true" use-java-context="true" use-ccm="true">
<connection-url>jdbc:mysql://localhost:3306/TweetCamp</connection-url>
<driver>mysql</driver>
<pool>
<min-pool-size>10</min-pool-size>
<max-pool-size>100</max-pool-size>
<prefill>true</prefill>
<use-strict-min>false</use-strict-min>
<flush-strategy>FailingConnectionOnly</flush-strategy>
</pool>
@wombat
wombat / module.xml
Last active December 16, 2015 08:19
Mysql module.xml
<?xml version="1.0" encoding="UTF-8"?>
<module xmlns="urn:jboss:module:1.0" name="com.mysql">
<resources>
<resource-root path="mysql-connector-java-5.1.24-bin.jar"/>
</resources>
<dependencies>
<module name="javax.api"/>
</dependencies>
</module>
@wombat
wombat / gist:5405115
Created April 17, 2013 15:12
Mysql driver in standalone.xml
<driver name="mysql" module="com.mysql">
<xa-datasource-class>com.mysql.jdbc.jdbc2.optional.MysqlXADataSource</xa-datasource-class>
</driver>
@wombat
wombat / ScTable.java
Last active December 11, 2015 03:29
Dynamic product description translations
@XmlRootElement
@Entity
@Table(name = "sc_table")
@Inheritance(strategy = InheritanceType.JOINED)
@DiscriminatorColumn(name = "sc_table_type", discriminatorType = DiscriminatorType.STRING)
public class ScTable extends ScModel implements Serializable {
@Getter
@Setter
@Column(name = "code")
private String code;
@Entity
public class Product implements Serializable {
@Id
private Long id;
@Transient
private String translation;
public String getTranslation() {
return translation;
@wombat
wombat / gist:3911776
Created October 18, 2012 13:20
JPA Modelgen
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
<version>2.3.2</version>
<configuration>
<source>1.6</source>
<target>1.6</target>
<encoding>UTF-8</encoding>
<compilerArgument>-proc:none</compilerArgument>
</configuration>
</plugin>
#!/bin/bash
#title :wildfly-install.sh
#description :The script to install Wildfly 8.x
#more :http://sukharevd.net/wildfly-8-installation.html
#author :Dmitriy Sukharev
#date :20140312
#usage :/bin/bash wildfly-install.sh
WILDFLY_VERSION=8.1.0.CR2
WILDFLY_FILENAME=wildfly-$WILDFLY_VERSION