Skip to content

Instantly share code, notes, and snippets.

View MarianMacik's full-sized avatar

Marián Macik MarianMacik

View GitHub Profile
@MarianMacik
MarianMacik / CleanCode-HW.java
Last active January 18, 2018 07:31
Clean Code Homework
/**
* Wraps the given text string into lines each having up to
* {@link @MAX_CHARS_PER_LINE} characters per line.
*
* @param text the input text string to be wrapped
* @return the list of String values, each representing one line of the wrapped text
* Best 7 mins
* Nominal 10 minutes
* Worst 15 minutes
* Real 22 minutes
KieModule was added: ZipKieModule[releaseId=org.jbpm.perf:timers-testing:1.0.0-SNAPSHOT,file=/home/hudson/.m2/repository/org/jbpm/perf/timers-testing/1.0.0-SNAPSHOT/timers-testing-1.0.0-SNAPSHOT.jar]
04:17:54,825 WARN [org.eclipse.aether.internal.impl.DefaultUpdatePolicyAnalyzer] (EJB default - 1) Unknown repository update policy '', assuming 'never'
04:17:54,841 WARN [org.eclipse.aether.internal.impl.DefaultUpdatePolicyAnalyzer] (EJB default - 1) Unknown repository update policy '', assuming 'never'
04:17:54,951 INFO [org.wildfly.extension.undertow] (ServerService Thread Pool -- 64) WFLYUT0021: Registered web context: /kie-server
04:17:55,007 INFO [org.jboss.as.server] (ServerService Thread Pool -- 37) WFLYSRV0010: Deployed "ojdbc6.jar" (runtime-name : "ojdbc6.jar")
04:17:55,007 INFO [org.jboss.as.server] (ServerService Thread Pool -- 37) WFLYSRV0010: Deployed "kie-server.war" (runtime-name : "kie-server.war")
04:17:55,186 WARN [org.eclipse.aether.internal.impl.DefaultUpdatePolicyAnalyzer] (EJB default
03:34:28,002 ERROR [org.jboss.as.ejb3] (default task-2) WFLYEJB0018: Ignoring exception during setRollbackOnly: com.arjuna.ats.jta.exceptions.InactiveTransactionException: ARJUNA016102: The transaction is not active! Uid is 0:ffff0a105ac9:-55c9ade2:5a2112da:2f6
at com.arjuna.ats.internal.jta.transaction.arjunacore.TransactionImple.setRollbackOnly(TransactionImple.java:331)
at org.jboss.as.ejb3.timerservice.TimerServiceImpl.setRollbackOnly(TimerServiceImpl.java:1045)
at org.jboss.as.ejb3.timerservice.TimerServiceImpl.persistTimer(TimerServiceImpl.java:613)
at org.jboss.as.ejb3.timerservice.TimerServiceImpl.createTimer(TimerServiceImpl.java:481)
at org.jboss.as.ejb3.timerservice.TimerServiceImpl.createSingleActionTimer(TimerServiceImpl.java:307)
at org.jbpm.services.ejb.timer.EJBTimerScheduler.internalSchedule(EJBTimerScheduler.java:97)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.Delegatin
@MarianMacik
MarianMacik / Narayana.java
Last active November 13, 2017 15:40
Narayana in perf tests
public static BasicDataSource setupPoolingDataSource(Properties dsProps, String datasourceName) {
try {
// First, create XA DataSource
String xadsClassName = dsProps.getProperty("className");
XADataSource xads = (XADataSource) Class.forName(xadsClassName).newInstance();
Class<?> xadsClass = xads.getClass();
// Since we support many databases, there will be much longer IF
if (xadsClassName.startsWith("org.h2") ) {
log.info("setting URL");
UserTransaction ut = InitialContext.doLookup(USER_TRANSACTION_NAME);
ut.begin();
em1.joinTransaction();
Person p = new Person();
p.setName("Marian");
em1.persist(p);
//em1.flush();