Skip to content

Instantly share code, notes, and snippets.

View mkuehle's full-sized avatar
🏠
Working from home

Markus Kühle mkuehle

🏠
Working from home
View GitHub Profile
@mkuehle
mkuehle / MediumSourceCodeExample.java
Created October 22, 2016 17:30
Medium Source Code Block Beispiel
package io.coodoo.medium;
/**
* @author Markus
*/
public class MediumSourceCodeExample {
private static int answer = 42;
/**
@mkuehle
mkuehle / chart.component.ts
Created January 6, 2017 15:30
Angular 2 with chart.js library example charts
/*
** ##### DOUGHNUT-CHART #####
*/
public doughnutChartLabels: string[] = ['New', 'Pending', 'Granted'];
public doughnutChartData: number[] = [250, 150, 100];
public doughnutChartType: string = 'doughnut';
public doughnutChartColors: Array<any> = [{
backgroundColor: ['rgba(81,175,49,0.8)', 'rgba(148, 148, 148,0.8)', 'rgba(0,0,153,0.8)'],
@mkuehle
mkuehle / Transaction Timeout Exception.log
Last active February 2, 2017 09:33
Java EE Wildfly Transaction Timeout Exception in Logfile
08:44:49,411 WARN [com.arjuna.ats.arjuna] (Transaction Reaper) [] [] ARJUNA012117: TransactionReaper::check timeout for TX 0:ffffc0a80235:17a6ec81:5892e222:12 in state RUN
08:44:49,413 WARN [com.arjuna.ats.arjuna] (Transaction Reaper Worker 0) [] [] ARJUNA012095: Abort of action id 0:ffffc0a80235:17a6ec81:5892e222:12 invoked while multiple threads active within it.
08:44:49,503 WARN [com.arjuna.ats.arjuna] (Transaction Reaper Worker 0) [] [] ARJUNA012381: Action id 0:ffffc0a80235:17a6ec81:5892e222:12 completed with multiple threads - thread default task-2 was in progress with java.net.SocketInputStream.socketRead0(SocketInputStream.java)
java.net.SocketInputStream.socketRead(SocketInputStream.java:116)
java.net.SocketInputStream.read(SocketInputStream.java:170)
java.net.SocketInputStream.read(SocketInputStream.java:141)
com.mysql.jdbc.util.ReadAheadInputStream.fill(ReadAheadInputStream.java:100)
com.mysql.jdbc.util.ReadAheadInputStream.readFromUnderlyingStreamIfNecessary(ReadAheadInputStream.java:143)
com
<!-- https://mvnrepository.com/artifact/org.jboss.ejb3/jboss-ejb3-ext-api -->
<!-- JBoss Transaction Timeout Annotation -->
<dependency>
<groupId>org.jboss.ejb3</groupId>
<artifactId>jboss-ejb3-ext-api</artifactId>
<version>2.2.0.Final</version>
<scope>provided</scope>
</dependency>
@mkuehle
mkuehle / RestResourceTransactionTimeout.java
Created February 2, 2017 09:49
REST Resource mit @TransactionTimeout Annotation
@Stateless
@Path("/my-rest-endpoint")
@Produces(MediaType.APPLICATION_JSON)
@Consumes(MediaType.APPLICATION_JSON)
public class MyResourceResource {
@Inject
MyImporter myImporter;
...
import javax.ejb.Singleton;
@Singleton
public class MyServiceSingleton {
public void doWork() {
// do the work..
}
}
@mkuehle
mkuehle / MyServiceSingleton.java
Last active April 4, 2017 07:54
EJB Singleton @lock und @timeout Annotationen
import javax.ejb.Singleton;
import javax.ejb.Lock;
import javax.ejb.LockType;
import javax.ejb.AccessTimeout;
/**
* Alle Methode erhalten per Default einen Timeout von 2 Minuten (60.000ms).
*/
@Singleton
@AccessTimeout(value=60000)
@mkuehle
mkuehle / standalone.xml
Last active February 15, 2019 13:11
WildFly Max Post Size Einstellung
<subsystem xmlns="urn:jboss:domain:undertow:1.0">
...
<server name="default-server">
<http-listener name="default" socket-binding="http" max-post-size="20971520"/>
<host name="default-host" alias="localhost">
<location name="/" handler="welcome-content"/>
</host>
</server>
...
</subsystem>
@mkuehle
mkuehle / setMaxPostSize.sh
Created April 26, 2017 11:05
WildFly CLI http-listener max-post-size
/subsystem=undertow/server=default-server/http-listener=default:write-attribute(name=max-post-size, value=20971520)
@mkuehle
mkuehle / JobExecutionParameter.java
Created May 11, 2017 21:09
Default Interface Methode
/**
* coodoo Job Engine
* Job Execution Parameter Interface
*/
public interface JobExcecutionParameter {
public default boolean isPriority() {
return false;
}
}