Tuesday, November 10, 2015

Create new Scala Maven project for Eclipse

Scala with Maven tutorial
http://docs.scala-lang.org/tutorials/scala-with-maven.html

Download latest version of Scala http://www.scala-lang.org/download/2.11.7.html

Upgrade Scala version

[root@localhost Downloads]# dnf  upgrade  scala-2.11.7.rpm


Create Scala Maven project from archetype using

   mvn archetype:generate

Choose a number or apply filter (format: [groupId:]artifactId, case sensitive contains): 686: scala
Choose archetype:
1: remote -> co.cask.cdap:cdap-spark-scala-archetype (-)
2: remote -> com.github.igor-petruk.archetypes:maven-archetype-scala-executable (Creates executable Scala Project that is ready to run with 'java -jar')
3: remote -> de.schlichtherle:javafx-scala-demo (An archetype for a standalone JavaFX 2.0 application written in Scala.
The generated application is translated from the Colorful Circles demo from the
JavaFX 2.0 SDK.)
4: remote -> eu.stratosphere:quickstart-scala (-)
5: remote -> net.alchim31.maven:scala-archetype-simple (The maven-scala-plugin is used for compiling/testing/running/documenting scala code in maven.)
6: remote -> net.ladstatt:scala-javafx-archetype (The Scala JavaFX Archetype provides a simple template for a scala based 
    JavaFX project)
7: remote -> org.apache.camel.archetypes:camel-archetype-component-scala (Creates a new Camel component with Scala.)
8: remote -> org.apache.camel.archetypes:camel-archetype-scala (Creates a new Camel project using Scala DSL.)
9: remote -> org.apache.flink:flink-quickstart-scala (-)
10: remote -> org.fusesource.scalate.tooling:scalate-archetype-empty (An archetype which creates an empty Scalate web application)
11: remote -> org.fusesource.scalate.tooling:scalate-archetype-guice (An archetype which creates an empty Scalate Guice web application)
12: remote -> org.fusesource.scalate.tooling:scalate-archetype-guice_2.10 (An archetype which creates an empty Scalate Guice web application)
13: remote -> org.fusesource.scalate.tooling:scalate-archetype-guice_2.9 (An archetype which creates an empty Scalate Guice web application)
14: remote -> org.fusesource.scalate.tooling:scalate-archetype-jersey (An archetype which creates an empty Scalate web application)
15: remote -> org.fusesource.scalate.tooling:scalate-archetype-jersey_2.10 (An archetype which creates an empty Scalate web application)
16: remote -> org.fusesource.scalate.tooling:scalate-archetype-jersey_2.9 (An archetype which creates an empty Scalate web application)
17: remote -> org.fusesource.scalate.tooling:scalate-archetype-sitegen (An archetype which creates an empty Scalate static website generation project)
18: remote -> org.fusesource.scalate.tooling:scalate-archetype-sitegen_2.10 (An archetype which creates an empty Scalate static website generation project)
19: remote -> org.fusesource.scalate.tooling:scalate-archetype-sitegen_2.9 (An archetype which creates an empty Scalate static website generation project)
20: remote -> org.openjdk.jmh:jmh-scala-benchmark-archetype (Generates Scala benchmarking project, uses JMH bytecode processors)
21: remote -> org.scala-tools.archetypes:scala-archetype-simple (The maven-scala-plugin is used for compiling/testing/running/documenting scala code in maven.)
22: remote -> org.scalatra.scalate.tooling:scalate-archetype-guice_2.10 (An archetype which creates an empty Scalate Guice web application)
23: remote -> org.scalatra.scalate.tooling:scalate-archetype-guice_2.11 (An archetype which creates an empty Scalate Guice web application)
24: remote -> org.scalatra.scalate.tooling:scalate-archetype-jersey_2.10 (An archetype which creates an empty Scalate web application)
25: remote -> org.scalatra.scalate.tooling:scalate-archetype-jersey_2.11 (An archetype which creates an empty Scalate web application)
26: remote -> org.scalatra.scalate.tooling:scalate-archetype-sitegen_2.10 (An archetype which creates an empty Scalate static website generation project)
27: remote -> org.scalatra.scalate.tooling:scalate-archetype-sitegen_2.11 (An archetype which creates an empty Scalate static website generation project)
28: remote -> org.wicketstuff.scala:wicket-scala-archetype (Basic setup for a project that combines Scala and Wicket, 
        depending on the Wicket-Scala project. Includes an example Specs 
        test.)
29: remote -> org.wicketstuff.scala:wicketstuff-scala-archetype (Basic setup for a project that combines Scala and Wicket, 
        depending on the Wicket-Scala project. Includes an example Specs 
        test.)
30: remote -> pl.org.miki:scala-quickstart-archetype (Customizable cruft-free Scala archetype. Options:
-sourceFolders: [all-in-src-java, scala-only, both-split-src]. DEFAULT: all-in-src-java.
--all-in-src-java: Scala and Java code are both in src/main/java (same for test). Plays nicely with IDEs.
--scala-only: only src/main/scala set up, and set as source folder.
--both-split-src: both src/main/java and src/main/scala. Can play merry havock with IDEs, so not the default.
-testLibrary: [scalatest, specs2, scalacheck-only, junit-only]. DEFAULT: scalatest.
--scalatest: adds Scalatest AND Scalacheck AND JUnit for most of your testing needs.
--specs2: adds specs2 AND Scalacheck AND JUnit.
--scalacheck-junit: adds Scalacheck AND JUnit.
--junit-only: adds JUnit ONLY.
-scalaVersion: 2.10.x+. DEFAULT: 2.11.2.
*The Scala tool version is generated automatically.
*Some Scala versions may not be compatible with selected test library versions. Adjust as necessary.)
Choose a number or apply filter (format: [groupId:]artifactId, case sensitive contains): : 

Choose simple archetype ( number 5 or 30 )

https://github.com/mikolak-net/scala-quickstart-archetype 

Choose a number or apply filter (format: [groupId:]artifactId, case sensitive contains): : 5
Choose net.alchim31.maven:scala-archetype-simple version: 
1: 1.4
2: 1.5
3: 1.6
Choose a number: 3: 3
Downloading: http://maven.repository.redhat.com/earlyaccess/all/net/alchim31/maven/scala-archetype-simple/1.6/scala-archetype-simple-1.6.jar
Downloading: http://maven.repository.redhat.com/techpreview/all/net/alchim31/maven/scala-archetype-simple/1.6/scala-archetype-simple-1.6.jar
Downloading: https://repo.maven.apache.org/maven2/net/alchim31/maven/scala-archetype-simple/1.6/scala-archetype-simple-1.6.jar
Downloaded: https://repo.maven.apache.org/maven2/net/alchim31/maven/scala-archetype-simple/1.6/scala-archetype-simple-1.6.jar (5 KB at 16.5 KB/sec)
Downloading: http://maven.repository.redhat.com/earlyaccess/all/net/alchim31/maven/scala-archetype-simple/1.6/scala-archetype-simple-1.6.pom
Downloading: http://maven.repository.redhat.com/techpreview/all/net/alchim31/maven/scala-archetype-simple/1.6/scala-archetype-simple-1.6.pom
Downloading: https://repo.maven.apache.org/maven2/net/alchim31/maven/scala-archetype-simple/1.6/scala-archetype-simple-1.6.pom
Downloaded: https://repo.maven.apache.org/maven2/net/alchim31/maven/scala-archetype-simple/1.6/scala-archetype-simple-1.6.pom (4 KB at 33.7 KB/sec)
Define value for property 'groupId': : scala
Define value for property 'artifactId': : class-finder
Define value for property 'version':  1.0-SNAPSHOT: : 
Define value for property 'package':  scala: : dave
Confirm properties configuration:
groupId: scala
artifactId: class-finder
version: 1.0-SNAPSHOT
package: dave
 Y: : 


Created project
[dave@localhost scala]$ find 
.
./class-finder
./class-finder/pom.xml
./class-finder/.gitignore
./class-finder/src
./class-finder/src/main
./class-finder/src/main/scala
./class-finder/src/main/scala/dave
./class-finder/src/main/scala/dave/App.scala
./class-finder/src/test
./class-finder/src/test/scala
./class-finder/src/test/scala/samples
./class-finder/src/test/scala/samples/junit.scala
./class-finder/src/test/scala/samples/specs.scala
./class-finder/src/test/scala/samples/scalatest.scala



Add into pom.xml  the build-helper-maven-plugin to add new source folders as described here http://docs.scala-lang.org/tutorials/scala-with-maven.html

Import existing  Maven  project into Eclipse

Edit .project and .classpath files to include Scala

Optionally
  -- Run mvn eclipse:eclipse in project dir
  --- Configure Eclipse workspace

dave@localhost class-finder]$ mvn -Declipse.workspace="/home/dave/workspace/scala"  eclipse:configure-workspace

.project

[dave@localhost class-finder]$ more .project 
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
    <name>class-finder</name>
    <comment></comment>
    <projects>
    </projects>
    <buildSpec>
        <buildCommand>
            <name>org.eclipse.jdt.core.javabuilder</name>
            <arguments>
            </arguments>
        </buildCommand>
        <buildCommand>
            <name>org.scala-ide.sdt.core.scalabuilder</name>
            <arguments>
            </arguments>
        </buildCommand>
        <buildCommand>
            <name>org.eclipse.m2e.core.maven2Builder</name>
            <arguments>
            </arguments>
        </buildCommand>
    </buildSpec>
    <natures>
        <nature>org.scala-ide.sdt.core.scalanature</nature>
        <nature>org.eclipse.jdt.core.javanature</nature>
        <nature>org.eclipse.m2e.core.maven2Nature</nature>
    </natures>
</projectDescription>

.classpath

[dave@localhost class-finder]$ more .classpath 
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
    <classpathentry kind="src" output="target/classes" path="src/main/java">
        <attributes>
            <attribute name="optional" value="true"/>
            <attribute name="maven.pomderived" value="true"/>
        </attributes>
    </classpathentry>
    <classpathentry kind="src" output="target/test-classes" path="src/test/java">
        <attributes>
            <attribute name="optional" value="true"/>
            <attribute name="maven.pomderived" value="true"/>
        </attributes>
    </classpathentry>
    <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMTyp
e/JavaSE-1.8">
        <attributes>
            <attribute name="maven.pomderived" value="true"/>
        </attributes>
    </classpathentry>
    <classpathentry kind="con" path="org.eclipse.m2e.MAVEN2_CLASSPATH_CONTAINER">
        <attributes>
            <attribute name="maven.pomderived" value="true"/>
        </attributes>
    </classpathentry>
    <classpathentry kind="src" output="target/classes" path="src/main/scala">
        <attributes>
            <attribute name="optional" value="true"/>
            <attribute name="maven.pomderived" value="true"/>
        </attributes>
    </classpathentry>
    <classpathentry kind="src" output="target/test-classes" path="src/test/scala">
        <attributes>
            <attribute name="optional" value="true"/>
            <attribute name="maven.pomderived" value="true"/>
        </attributes>
    </classpathentry>
    <classpathentry kind="output" path="target/classes"/>
</classpath>


pom.xml

[dave@localhost class-finder]$ more pom.xml 
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven
.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
    <modelVersion>4.0.0</modelVersion>

    <groupId>scala</groupId>
    <artifactId>class-finder</artifactId>
    <version>1.0-SNAPSHOT</version>
    <packaging>jar</packaging>

    <properties>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
        <java.version>1.8</java.version>
        <scala.version>2.11.7</scala.version>
        <scala.version.tools>2.11</scala.version.tools>
    </properties>

    <build>
        <plugins>
            <plugin>
                <groupId>net.alchim31.maven</groupId>
                <artifactId>scala-maven-plugin</artifactId>
                <version>3.2.0</version>
                <executions>
                    <execution>
                        <!-- this is so we don't end with a compile error in maven-compiler-plugin -->        
                        <phase>process-sources</phase>                     
                        <goals>
                            <goal>compile</goal>
                            <goal>testCompile</goal>
                        </goals>
                        <configuration>
                            <mainSourceDir>${project.build.sourceDirectory}/../java</mainSourceDir>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-compiler-plugin</artifactId>
                <version>3.1</version>
                <configuration>
                    <source>${java.version}</source>
                    <target>${java.version}</target>
                </configuration>
            </plugin>
        <plugin>
    <groupId>org.codehaus.mojo</groupId>
    <artifactId>build-helper-maven-plugin</artifactId>
    <executions>
        <execution>
            <id>add-source</id>
            <phase>generate-sources</phase>
            <goals>
                <goal>add-source</goal>
            </goals>
            <configuration>
                <sources>
                    <source>src/main/scala</source>
                </sources>
            </configuration>
        </execution>
        <execution>
            <id>add-test-source</id>
            <phase>generate-sources</phase>
            <goals>
                <goal>add-test-source</goal>
            </goals>
            <configuration>
                <sources>
                    <source>src/test/scala</source>
                </sources>
            </configuration>
        </execution>
    </executions>
</plugin>
 <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-assembly-plugin</artifactId>
                <version>2.4</version>
                <configuration>
                    <descriptorRefs>
                        <descriptorRef>jar-with-dependencies</descriptorRef>
                    </descriptorRefs>
                    <archive>
                        <manifest>
                            <mainClass>dave.MainClass</mainClass>
                        </manifest>
                    </archive>
                </configuration>
                <executions>
                    <execution>
                        <phase>package</phase>
                        <goals>
                            <goal>single</goal>
                        </goals>
                    </execution>
                </executions>
        </plugin>


        </plugins>
    </build>
    <dependencies>
        <dependency>
            <groupId>org.scala-lang</groupId>
            <artifactId>scala-library</artifactId>
            <version>${scala.version}</version>
        </dependency>
        <dependency>
            <groupId>junit</groupId>
            <artifactId>junit</artifactId>
            <version>4.11</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.scalacheck</groupId>
            <artifactId>scalacheck_${scala.version.tools}</artifactId>
            <version>1.11.4</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.scalatest</groupId>
            <artifactId>scalatest_${scala.version.tools}</artifactId>
            <version>2.2.0</version>
            <scope>test</scope>
        </dependency>
    </dependencies>
</project>


Run mvn package 

Open project in Eclipse IDE



Add launcher for command line
<build>
        <plugins>
            <plugin>
                <groupId>net.alchim31.maven</groupId>
                <artifactId>scala-maven-plugin</artifactId>
                <version>3.2.0</version>
                <configuration>
      <launchers>
        <launcher>
          <id>foo</id>
          <mainClass>dave.App</mainClass>
          <!-- args are optional -->
          <args>
            <arg>arg1</arg>
          </args>
          <!-- jvmArgs are optional -->
          <jvmArgs>
            <jvmArg>-Xmx128m</jvmArg>
            <jvmArg>-Djava.library.path=...</jvmArg>
          </jvmArgs>
        </launcher>
        <!-- you could define other launcher -->
      </launchers>
    </configuration>


Run project  from command line


mvn scala:run

[INFO] launcher 'foo' selected => dave.App
Hello World!
concat arguments = arg1
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------


Known errors

http://scala-ide.org/docs/current-user-doc/faq/index.html#Know_Issue

Add m2e-scala http://alchim31.free.fr/m2e-scala/update-site/

If you see errors in using prototype modify the pom.xml

[INFO] /home/dave/git/scala/class-finder/src/main/scala:-1: info: compiling
[INFO] Compiling 1 source files to /home/dave/git/scala/class-finder/target/classes at 1447218248818
[ERROR] scalac error: bad option: '-make:transitive'


see here http://stackoverflow.com/questions/12812458/getting-started-with-scala-scalatest-and-maven

Try to change versions in pom.xml or  change options for scala-maven-plugin

https://github.com/davidB/scala-maven-plugin
  

https://github.com/scala/scala-module-dependency-sample/blob/master/maven-sample/pom.xml


Error related to versions of Scala artifacts - change the repository configuration
[ERROR] Failed to execute goal on project class-finder: Could not resolve dependencies for project scala:class-finder:jar:1.0-SNAPSHOT: Could not find artifact org.scalaz.stream:scalaz-stream_2.11:jar:0.7a in jboss-earlyaccess-repository (http://maven.repository.redhat.com/earlyaccess/all/) -> [Help 1]

Thursday, October 29, 2015

Draw graph using GraphML and yEd graph editor

Graph theory  http://algs4.cs.princeton.edu/41graph/

GraphML http://graphml.graphdrawing.org/
GraphML Primer http://graphml.graphdrawing.org/primer/graphml-primer.html

yEd graph editor
http://www.yworks.com/en/products/yfiles/yed/
http://docs.yworks.com/yfiles/doc/developers-guide/graphml.html


Graph stored in simple text format



user11 group1
user12 group1
user21 group2
user22 group2
user31 group3
user32 group3
user41 group4
user42 group4
group1 orgunit1
group2 orgunit1
group3 orgunit2
group4 orgunit2  

Java code to create GraphML file from graph stored in simple text format
( using algs4 libs - can beeasily rewritten to use  standard Java IO)
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

import edu.princeton.cs.algs4.In;
import edu.princeton.cs.algs4.Out;
import edu.princeton.cs.algs4.StdOut;

public class TestDrawGraph {

    public static void main(String[] args) {

        Map<String, Integer> principals = new HashMap<>();
        Map<Integer, String> revert_principals = new HashMap<>();
        Map<Integer, List<Integer>> graph = new HashMap<>();

        In in = new In(args[0]);

        int V = 0;

        while (in.hasNextLine()) {
            String v = in.readString();
            String w = in.readString();

            // StdOut.println("v=" + v + " w=" + w);

            if (!principals.containsKey(v)) {
                principals.put(v, V++);
                revert_principals.put(principals.get(v), v);
                graph.put(principals.get(v), new ArrayList<Integer>());
            }
            if (!principals.containsKey(w)) {
                principals.put(w, V++);
                revert_principals.put(principals.get(w), w);
                graph.put(principals.get(w), new ArrayList<Integer>());
            }

            graph.get(principals.get(v)).add(principals.get(w));

        }

        Out out = new Out(args[0] + ".graphml");

        out.print("<graphml xmlns=\"http://graphml.graphdrawing.org/xmlns\" "
                + " xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" "
                + " xmlns:y=\"http://www.yworks.com/xml/graphml\" "
                + " xmlns:yed=\"http://www.yworks.com/xml/yed/3\" "
                + " xsi:schemaLocation=\"http://graphml.graphdrawing.org/xmlns"
                + "http://www.yworks.com/xml/schema/graphml/1.1/ygraphml.xsd\"> ");

        out.print(
                " <key for=\"node\" id=\"d6\" yfiles.type=\"nodegraphics\"/> ");

        out.print("  <graph id=\"G\" edgedefault=\"undirected\">\n");

        for (String node : principals.keySet()) {
            out.printf(
                    " <node id=\"%s\">\n" + "<data key=\"%s\">\n"
                            + "<y:GenericNode configuration=\"com.yworks.entityRelationship.small_entity\">\n"
                            + "\t<y:Geometry height=\"40.0\" width=\"80.0\" x=\"383.0\" y=\"227.0\"/>\n"
                            + "\t<y:Fill color=\"#E8EEF7\" transparent=\"false\"/>\n"
                            + "\t<y:BorderStyle color=\"#000000\" type=\"line\" width=\"1.0\"/>\n"
                            + "\t<y:NodeLabel>%s</y:NodeLabel>\n"
                            + "</y:GenericNode>\n" + "</data>\n </node>\n",
                    node, "d6", node);
        }

        for (Map.Entry<Integer, List<Integer>> me : graph.entrySet()) {
            for (Integer w : me.getValue()) {
                out.printf(" <edge source=\"%s\" target=\"%s\"/>\n",
                        revert_principals.get(me.getKey()),
                        revert_principals.get(w));

            }
        }

        out.print("  </graph>\n" + "</graphml>\n");

        out.close();

        StdOut.print("Created" + args[0] + ".graphml");

    }

}

Generated graph displayed in yEd

 http://www.summa-tech.com/blog/2011/04/12/a-visual-maven-dependency-tree-view
 In yEd modify the layout of the graph using menu
  Select Layout > Hierarchical > Orientation > Left to Right > OK 

Graph using Bottom -> Top



Graph using Tree -> Ballon



GraphML file created
<graphml xmlns="http://graphml.graphdrawing.org/xmlns"  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"  xmlns:y="http://www.yworks.com/xml/graphml"  xmlns:yed="http://www.yworks.com/xml/yed/3"  xsi:schemaLocation="http://graphml.graphdrawing.org/xmlnshttp://www.yworks.com/xml/schema/graphml/1.1/ygraphml.xsd">  <key for="node" id="d6" yfiles.type="nodegraphics"/>   <graph id="G" edgedefault="undirected">
 <node id="user11">
<data key="d6">
<y:GenericNode configuration="com.yworks.entityRelationship.small_entity">
    <y:Geometry height="40.0" width="80.0" x="383.0" y="227.0"/>
    <y:Fill color="#E8EEF7" transparent="false"/>
    <y:BorderStyle color="#000000" type="line" width="1.0"/>
    <y:NodeLabel>user11</y:NodeLabel>
</y:GenericNode>
</data>
 </node>
 <node id="user22">
<data key="d6">
<y:GenericNode configuration="com.yworks.entityRelationship.small_entity">
    <y:Geometry height="40.0" width="80.0" x="383.0" y="227.0"/>
    <y:Fill color="#E8EEF7" transparent="false"/>
    <y:BorderStyle color="#000000" type="line" width="1.0"/>
    <y:NodeLabel>user22</y:NodeLabel>
</y:GenericNode>
</data>
 </node>
 <node id="user21">
<data key="d6">
<y:GenericNode configuration="com.yworks.entityRelationship.small_entity">
    <y:Geometry height="40.0" width="80.0" x="383.0" y="227.0"/>
    <y:Fill color="#E8EEF7" transparent="false"/>
    <y:BorderStyle color="#000000" type="line" width="1.0"/>
    <y:NodeLabel>user21</y:NodeLabel>
</y:GenericNode>
</data>
 </node>
 <node id="user32">
<data key="d6">
<y:GenericNode configuration="com.yworks.entityRelationship.small_entity">
    <y:Geometry height="40.0" width="80.0" x="383.0" y="227.0"/>
    <y:Fill color="#E8EEF7" transparent="false"/>
    <y:BorderStyle color="#000000" type="line" width="1.0"/>
    <y:NodeLabel>user32</y:NodeLabel>
</y:GenericNode>
</data>
 </node>
 <node id="user31">
<data key="d6">
<y:GenericNode configuration="com.yworks.entityRelationship.small_entity">
    <y:Geometry height="40.0" width="80.0" x="383.0" y="227.0"/>
    <y:Fill color="#E8EEF7" transparent="false"/>
    <y:BorderStyle color="#000000" type="line" width="1.0"/>
    <y:NodeLabel>user31</y:NodeLabel>
</y:GenericNode>
</data>
 </node>
 <node id="user42">
<data key="d6">
<y:GenericNode configuration="com.yworks.entityRelationship.small_entity">
    <y:Geometry height="40.0" width="80.0" x="383.0" y="227.0"/>
    <y:Fill color="#E8EEF7" transparent="false"/>
    <y:BorderStyle color="#000000" type="line" width="1.0"/>
    <y:NodeLabel>user42</y:NodeLabel>
</y:GenericNode>
</data>
 </node>
 <node id="user41">
<data key="d6">
<y:GenericNode configuration="com.yworks.entityRelationship.small_entity">
    <y:Geometry height="40.0" width="80.0" x="383.0" y="227.0"/>
    <y:Fill color="#E8EEF7" transparent="false"/>
    <y:BorderStyle color="#000000" type="line" width="1.0"/>
    <y:NodeLabel>user41</y:NodeLabel>
</y:GenericNode>
</data>
 </node>
 <node id="user12">
<data key="d6">
<y:GenericNode configuration="com.yworks.entityRelationship.small_entity">
    <y:Geometry height="40.0" width="80.0" x="383.0" y="227.0"/>
    <y:Fill color="#E8EEF7" transparent="false"/>
    <y:BorderStyle color="#000000" type="line" width="1.0"/>
    <y:NodeLabel>user12</y:NodeLabel>
</y:GenericNode>
</data>
 </node>
 <node id="group4">
<data key="d6">
<y:GenericNode configuration="com.yworks.entityRelationship.small_entity">
    <y:Geometry height="40.0" width="80.0" x="383.0" y="227.0"/>
    <y:Fill color="#E8EEF7" transparent="false"/>
    <y:BorderStyle color="#000000" type="line" width="1.0"/>
    <y:NodeLabel>group4</y:NodeLabel>
</y:GenericNode>
</data>
 </node>
 <node id="group3">
<data key="d6">
<y:GenericNode configuration="com.yworks.entityRelationship.small_entity">
    <y:Geometry height="40.0" width="80.0" x="383.0" y="227.0"/>
    <y:Fill color="#E8EEF7" transparent="false"/>
    <y:BorderStyle color="#000000" type="line" width="1.0"/>
    <y:NodeLabel>group3</y:NodeLabel>
</y:GenericNode>
</data>
 </node>
 <node id="group2">
<data key="d6">
<y:GenericNode configuration="com.yworks.entityRelationship.small_entity">
    <y:Geometry height="40.0" width="80.0" x="383.0" y="227.0"/>
    <y:Fill color="#E8EEF7" transparent="false"/>
    <y:BorderStyle color="#000000" type="line" width="1.0"/>
    <y:NodeLabel>group2</y:NodeLabel>
</y:GenericNode>
</data>
 </node>
 <node id="group1">
<data key="d6">
<y:GenericNode configuration="com.yworks.entityRelationship.small_entity">
    <y:Geometry height="40.0" width="80.0" x="383.0" y="227.0"/>
    <y:Fill color="#E8EEF7" transparent="false"/>
    <y:BorderStyle color="#000000" type="line" width="1.0"/>
    <y:NodeLabel>group1</y:NodeLabel>
</y:GenericNode>
</data>
 </node>
 <node id="orgunit1">
<data key="d6">
<y:GenericNode configuration="com.yworks.entityRelationship.small_entity">
    <y:Geometry height="40.0" width="80.0" x="383.0" y="227.0"/>
    <y:Fill color="#E8EEF7" transparent="false"/>
    <y:BorderStyle color="#000000" type="line" width="1.0"/>
    <y:NodeLabel>orgunit1</y:NodeLabel>
</y:GenericNode>
</data>
 </node>
 <node id="orgunit2">
<data key="d6">
<y:GenericNode configuration="com.yworks.entityRelationship.small_entity">
    <y:Geometry height="40.0" width="80.0" x="383.0" y="227.0"/>
    <y:Fill color="#E8EEF7" transparent="false"/>
    <y:BorderStyle color="#000000" type="line" width="1.0"/>
    <y:NodeLabel>orgunit2</y:NodeLabel>
</y:GenericNode>
</data>
 </node>
 <edge source="user11" target="group1"/>
 <edge source="group1" target="orgunit1"/>
 <edge source="user12" target="group1"/>
 <edge source="user21" target="group2"/>
 <edge source="group2" target="orgunit1"/>
 <edge source="user22" target="group2"/>
 <edge source="user31" target="group3"/>
 <edge source="group3" target="orgunit2"/>
 <edge source="user32" target="group3"/>
 <edge source="user41" target="group4"/>
 <edge source="group4" target="orgunit2"/>
 <edge source="user42" target="group4"/>
  </graph>
</graphml>

Thursday, October 22, 2015

Java EE compatibility - JBoss EAP , JBoss AS, JBoss WildFly

Java EE compatibility

 http://www.oracle.com/technetwork/java/javaee/overview/compatibility-jsp-136984.html

Java EE 7


JBoss EAP 7 - Enterprise version - no official date yet

JBoss WildFly  8/9/10 - Community version http://wildfly.org/

Weblogic 12.2.1 - https://docs.oracle.com/middleware/1221/wls/NOTES/whatsnew.htm#NOTES107
https://blogs.oracle.com/WebLogicServer/entry/announcing_oracle_weblogic_server_12 

Java EE6


JBoss EAP 6 - Enterprise version - http://www.jboss.org/products/eap/overview/

JBoss AS 7  - Community version - discontinued - project moved to WildFly  ( archived downloads are here http://jbossas.jboss.org/downloads.html )

Weblogic 12.1.3 -  http://www.oracle.com/technetwork/middleware/weblogic/downloads/wls-main-097127.html

Friday, September 18, 2015

JBoss EAP 6 profiling - running jconsole and jvisualvm

JVisualVM and JConsole are part of Oracle Java SE

 JConsole

JConsole can be started with script provided already with JBoss EAP 6 installation
http://jaitechwriteups.blogspot.cz/2014/12/remote-jmx-access-to-wildfly-or-jboss.html

[dave@localhost jboss-eap-6.4.0]$ find -name  jconsole.sh
./bin/jconsole.sh


Connect via JMX remote process  - use connection string  service:jmx:remoting-jmx://localhost:9999
[dave@localhost bin]$ ./jconsole.sh 
CLASSPATH /usr/java/jdk1.8.0_45/lib/jconsole.jar:/usr/java/jdk1.8.0_45/lib/tools.jar:/app/jboss-eap-6.4.0/bin/client/jboss-cli-client.jar

 

 

 JVisualVM

To use JVisualVM   download script from GitHub here https://github.com/johnaoahra80/jboss-as-tool-integration/blob/master/visualvm/visualvm.sh

Using JVisualVM with JBoss AS7   https://developer.jboss.org/thread/196428

Here is more detailed description for connection http://blog.akquinet.de/2012/11/01/connecting-visualvm-with-a-remote-jboss-as-7-eap6-jvm-process/

CLASSPATH in the script must be modified  due to changed modules path
Add
 JBOSS_MODULEPATH="$JBOSS_HOME/modules/system/layers/base"


[dave@localhost bin]$ ./jvisualvm.sh 
/app/jboss-eap-6.4.0/modules/system/layers/base/org/jboss/remoting3/remoting-jmx/main/
ls: cannot access *.jar: No such file or directory
/app/jboss-eap-6.4.0/modules/system/layers/base/org/jboss/remoting3/main/
/app/jboss-eap-6.4.0/modules/system/layers/base/org/jboss/logging/main/
/app/jboss-eap-6.4.0/modules/system/layers/base/org/jboss/xnio/main/
/app/jboss-eap-6.4.0/modules/system/layers/base/org/jboss/xnio/nio/main/
/app/jboss-eap-6.4.0/modules/system/layers/base/org/jboss/sasl/main/
/app/jboss-eap-6.4.0/modules/system/layers/base/org/jboss/marshalling/main/
/app/jboss-eap-6.4.0/modules/system/layers/base/org/jboss/marshalling/river/main/





Monday, September 14, 2015

JBoss Portal 6.2 - deploy sample portlet

JBoss Portal 6.2 release notes

https://access.redhat.com/documentation/en-US/Red_Hat_JBoss_Portal/6.2/pdf/6.2.0_Release_Notes/Red_Hat_JBoss_Portal-6.2-6.2.0_Release_Notes-en-US.pdf

JBoss Portal 6.2 supported configurations
ttps://access.redhat.com/articles/119833#Comp_6_2

JBoss Portal samples on GitHub
https://github.com/jboss-developer/jboss-portal-quickstarts

Install JBoss Portal - download installation and samples using  JBoss Developer account

Download zip installation and unzip
[dave@localhost ~]$ ls -1  ~/Downloads/jboss-portal-6.2.0*
/home/dave/Downloads/jboss-portal-6.2.0-quickstarts.zip
/home/dave/Downloads/jboss-portal-6.2.0.zip


Start JBoss Portal
[dave@localhost bin]$ ./standalone.sh 
=========================================================================

  JBoss Bootstrap Environment

  JBOSS_HOME: /app/jboss-portal-6.2

  JAVA: /usr/java/jdk1.8.0_45/bin/java

  JAVA_OPTS:  -server -XX:+UseCompressedOops -verbose:gc -Xloggc:"/app/jboss-portal-6.2/standalone/log/gc.log" -XX:+PrintGCDetails -XX:+PrintGCDateStamps -XX:+UseGCLogFileRotation -XX:NumberOfGCLogFiles=5 -XX:GCLogFileSize=3M -XX:-TraceClassUnloading -Xms1303m -Xmx1303m -XX:MaxPermSize=256m -Djava.net.preferIPv4Stack=true -Djboss.modules.system.pkgs=org.jboss.byteman -Djava.awt.headless=true -Djboss.modules.policy-permissions=true

=========================================================================

Java HotSpot(TM) 64-Bit Server VM warning: ignoring option MaxPermSize=256m; support was removed in 8.0
20:57:34,870 INFO  [org.jboss.modules] (main) JBoss Modules version 1.3.6.Final-redhat-1
20:57:36,835 INFO  [org.jboss.msc] (main) JBoss MSC version 1.1.5.Final-redhat-1
20:57:37,151 INFO  [org.jboss.as] (MSC service thread 1-7) JBAS015899: JBoss Portal 6.2.0.GA (AS 7.5.0.Final-redhat-21) starting
20:57:42,059 INFO  [org.gatein] (ServerService Thread Pool -- 24) Setting 'exo.conf.dir'
20:57:42,061 INFO  [org.gatein] (ServerService Thread Pool -- 24) Setting 'exo.conf.dir.name'
20:57:42,061 INFO  [org.gatein] (ServerService Thread Pool -- 24) Setting 'gatein.conf.dir'
20:57:44,362 INFO  [org.xnio] (MSC service thread 1-7) XNIO Version 3.0.13.GA-redhat-1
20:57:44,381 INFO  [org.jboss.as.server] (Controller Boot Thread) JBAS015888: Creating http management service using socket-binding (management-http)




Install portlet sample via Maven

[dave@localhost jboss-portal-6.2.0-quickstarts]$ cd simplest-hello-world-portlet
[dave@localhost simplest-hello-world-portlet]$ ls
pom.xml  README.html  README.md  src
[dave@localhost simplest-hello-world-portlet]$ pwd
[dave@localhost simplest-hello-world-portlet]$ mvn clean package jboss-as:deploy
[INFO] Scanning for projects...
Downloading: http://maven.repository.redhat.com/earlyaccess/all/org/jboss/bom/portal/jboss-portal-bom/6.2.0.GA/jboss-portal-bom-6.2.0.GA.pom
Downloading: http://maven.repository.redhat.com/techpreview/all/org/jboss/bom/portal/jboss-portal-bom/6.2.0.GA/jboss-portal-bom-6.2.0.GA.pom
Downloaded: http://maven.repository.redhat.com/techpreview/all/org/jboss/bom/portal/jboss-portal-bom/6.2.0.GA/jboss-portal-bom-6.2.0.GA.pom (6 KB at 5.0 KB/sec)
Downloading: http://maven.repository.redhat.com/earlyaccess/all/org/jboss/bom/eap/jboss-eap-bom-parent/6.4.0.GA/jboss-eap-bom-parent-6.4.0.GA.pom
Downloading: http://maven.repository.redhat.com/techpreview/all/org/jboss/bom/eap/jboss-eap-bom-parent/6.4.0.GA/jboss-eap-bom-parent-6.4.0.GA.pom
Downloaded: http://maven.repository.redhat.com/techpreview/all/org/jboss/bom/eap/jboss-eap-bom-parent/6.4.0.GA/jboss-eap-bom-parent-6.4.0.GA.pom (7 KB at 27.3 KB/sec)
Downloading: http://maven.repository.redhat.com/earlyaccess/all/org/jboss/spec/jboss-javaee-6.0/3.0.2.Final-redhat-15/jboss-javaee-6.0-3.0.2.Final-redhat-15.pom
Downloaded: http://maven.repository.redhat.com/earlyaccess/all/org/jboss/spec/jboss-javaee-6.0/3.0.2.Final-redhat-15/jboss-javaee-6.0-3.0.2.Final-redhat-15.pom (18 KB at 22.1 KB/sec)
Downloading: http://maven.repository.redhat.com/earlyaccess/all/org/jboss/jboss-parent/14.0.0.redhat-1/jboss-parent-14.0.0.redhat-1.pom
Downloaded: http://maven.repository.redhat.com/earlyaccess/all/org/jboss/jboss-parent/14.0.0.redhat-1/jboss-parent-14.0.0.redhat-1.pom (33 KB at 42.5 KB/sec)
Downloading: http://maven.repository.redhat.com/earlyaccess/all/org/richfaces/richfaces-bom/4.3.7.Final-redhat-1/richfaces-bom-4.3.7.Final-redhat-1.pom
Downloading: http://maven.repository.redhat.com/techpreview/all/org/richfaces/richfaces-bom/4.3.7.Final-redhat-1/richfaces-bom-4.3.7.Final-redhat-1.pom
Downloaded: http://maven.repository.redhat.com/techpreview/all/org/richfaces/richfaces-bom/4.3.7.Final-redhat-1/richfaces-bom-4.3.7.Final-redhat-1.pom (12 KB at 12.6 KB/sec)
[INFO]                                                                         
[INFO] ------------------------------------------------------------------------
[INFO] Building Simplest Hello World Portlet 6.2.0.GA
[INFO] ------------------------------------------------------------------------
Downloading: http://maven.repository.redhat.com/earlyaccess/all/org/apache/maven/plugins/maven-war-plugin/2.2/maven-war-plugin-2.2.pom
Downloading: http://maven.repository.redhat.com/techpreview/all/org/apache/maven/plugins/maven-war-plugin/2.2/maven-war-plugin-2.2.pom
Downloading: http://repo.maven.apache.org/maven2/org/apache/maven/plugins/maven-war-plugin/2.2/maven-war-plugin-2.2.pom
Downloaded: http://repo.maven.apache.org/maven2/org/apache/maven/plugins/maven-war-plugin/2.2/maven-war-plugin-2.2.pom (7 KB at 43.0 KB/sec)
Downloading: http://maven.repository.redhat.com/earlyaccess/all/org/apache/maven/plugins/maven-war-plugin/2.2/maven-war-plugin-2.2.jar
Downloading: http://maven.repository.redhat.com/techpreview/all/org/apache/maven/plugins/maven-war-plugin/2.2/maven-war-plugin-2.2.jar
Downloading: http://repo.maven.apache.org/maven2/org/apache/maven/plugins/maven-war-plugin/2.2/maven-war-plugin-2.2.jar
Downloaded: http://repo.maven.apache.org/maven2/org/apache/maven/plugins/maven-war-plugin/2.2/maven-war-plugin-2.2.jar (77 KB at 609.6 KB/sec)
Downloading: http://maven.repository.redhat.com/earlyaccess/all/javax/portlet/portlet-api/2.0/portlet-api-2.0.pom
Downloading: http://maven.repository.redhat.com/techpreview/all/javax/portlet/portlet-api/2.0/portlet-api-2.0.pom
Downloading: http://repo.maven.apache.org/maven2/javax/portlet/portlet-api/2.0/portlet-api-2.0.pom
Downloaded: http://repo.maven.apache.org/maven2/javax/portlet/portlet-api/2.0/portlet-api-2.0.pom (5 KB at 58.4 KB/sec)
Downloading: http://maven.repository.redhat.com/earlyaccess/all/javax/portlet/portlet-api/2.0/portlet-api-2.0.jar
Downloading: http://maven.repository.redhat.com/techpreview/all/javax/portlet/portlet-api/2.0/portlet-api-2.0.jar
Downloading: http://repo.maven.apache.org/maven2/javax/portlet/portlet-api/2.0/portlet-api-2.0.jar
Downloaded: http://repo.maven.apache.org/maven2/javax/portlet/portlet-api/2.0/portlet-api-2.0.jar (47 KB at 700.3 KB/sec)
[INFO] 
[INFO] --- maven-clean-plugin:2.5:clean (default-clean) @ simplest-hello-world-portlet ---
[INFO] 
[INFO] --- maven-resources-plugin:2.6:resources (default-resources) @ simplest-hello-world-portlet ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] skip non existing resourceDirectory /home/app/jboss-portal-6.2.0-quickstarts/simplest-hello-world-portlet/src/main/resources
[INFO] 
[INFO] --- maven-compiler-plugin:2.5.1:compile (default-compile) @ simplest-hello-world-portlet ---
[INFO] Compiling 1 source file to /home/app/jboss-portal-6.2.0-quickstarts/simplest-hello-world-portlet/target/classes
[INFO] 
[INFO] --- maven-resources-plugin:2.6:testResources (default-testResources) @ simplest-hello-world-portlet ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] skip non existing resourceDirectory /home/app/jboss-portal-6.2.0-quickstarts/simplest-hello-world-portlet/src/test/resources
[INFO] 
[INFO] --- maven-compiler-plugin:2.5.1:testCompile (default-testCompile) @ simplest-hello-world-portlet ---
[INFO] No sources to compile
[INFO] 
[INFO] --- maven-surefire-plugin:2.10:test (default-test) @ simplest-hello-world-portlet ---
[INFO] No tests to run.
[INFO] Surefire report directory: /home/app/jboss-portal-6.2.0-quickstarts/simplest-hello-world-portlet/target/surefire-reports

-------------------------------------------------------
 T E S T S
-------------------------------------------------------

Results :

Tests run: 0, Failures: 0, Errors: 0, Skipped: 0

[INFO] 
[INFO] --- maven-war-plugin:2.2:war (default-war) @ simplest-hello-world-portlet ---
[INFO] Packaging webapp
[INFO] Assembling webapp [simplest-hello-world-portlet] in [/home/app/jboss-portal-6.2.0-quickstarts/simplest-hello-world-portlet/target/simplest-hello-world-portlet]
[INFO] Processing war project
[INFO] Copying webapp resources [/home/app/jboss-portal-6.2.0-quickstarts/simplest-hello-world-portlet/src/main/webapp]
[INFO] Webapp assembled in [40 msecs]
[INFO] Building war: /home/app/jboss-portal-6.2.0-quickstarts/simplest-hello-world-portlet/target/simplest-hello-world-portlet.war
[INFO] WEB-INF/web.xml already added, skipping
[INFO] 
[INFO] >>> jboss-as-maven-plugin:7.4.Final:deploy (default-cli) > package @ simplest-hello-world-portlet >>>
[INFO] 
[INFO] --- maven-resources-plugin:2.6:resources (default-resources) @ simplest-hello-world-portlet ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] skip non existing resourceDirectory /home/app/jboss-portal-6.2.0-quickstarts/simplest-hello-world-portlet/src/main/resources
[INFO] 
[INFO] --- maven-compiler-plugin:2.5.1:compile (default-compile) @ simplest-hello-world-portlet ---
[INFO] Nothing to compile - all classes are up to date
[INFO] 
[INFO] --- maven-resources-plugin:2.6:testResources (default-testResources) @ simplest-hello-world-portlet ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] skip non existing resourceDirectory /home/app/jboss-portal-6.2.0-quickstarts/simplest-hello-world-portlet/src/test/resources
[INFO] 
[INFO] --- maven-compiler-plugin:2.5.1:testCompile (default-testCompile) @ simplest-hello-world-portlet ---
[INFO] No sources to compile
[INFO] 
[INFO] --- maven-surefire-plugin:2.10:test (default-test) @ simplest-hello-world-portlet ---
[INFO] No tests to run.
[INFO] Skipping execution of surefire because it has already been run for this configuration
[INFO] 
[INFO] --- maven-war-plugin:2.2:war (default-war) @ simplest-hello-world-portlet ---
[INFO] Packaging webapp
[INFO] Assembling webapp [simplest-hello-world-portlet] in [/home/app/jboss-portal-6.2.0-quickstarts/simplest-hello-world-portlet/target/simplest-hello-world-portlet]
[INFO] Processing war project
[INFO] Copying webapp resources [/home/app/jboss-portal-6.2.0-quickstarts/simplest-hello-world-portlet/src/main/webapp]
[INFO] Webapp assembled in [2 msecs]
[INFO] Building war: /home/app/jboss-portal-6.2.0-quickstarts/simplest-hello-world-portlet/target/simplest-hello-world-portlet.war
[INFO] WEB-INF/web.xml already added, skipping
[INFO] 
[INFO] <<< jboss-as-maven-plugin:7.4.Final:deploy (default-cli) < package @ simplest-hello-world-portlet <<<
[INFO] 
[INFO] --- jboss-as-maven-plugin:7.4.Final:deploy (default-cli) @ simplest-hello-world-portlet ---
Sep 14, 2015 9:10:12 PM org.xnio.Xnio <clinit>
INFO: XNIO Version 3.0.7.GA
Sep 14, 2015 9:10:12 PM org.xnio.nio.NioXnio <clinit>
INFO: XNIO NIO Implementation Version 3.0.7.GA
Sep 14, 2015 9:10:12 PM org.jboss.remoting3.EndpointImpl <clinit>
INFO: JBoss Remoting version 3.2.12.GA
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 15.949 s
[INFO] Finished at: 2015-09-14T21:10:13+02:00
[INFO] Final Memory: 21M/86M
[INFO] ------------------------------------------------------------------------
[dave@localhost simplest-hello-world-portlet]$ 

Tuesday, March 17, 2015

JBoss Wildfly 8.2 JMS configuration - JTA, HornetQ

Using JBoss Wildfly quickstart https://github.com/wildfly/quickstart/tree/master/jta-crash-rec

Start server in full mode
[dave@localhost bin]$ ./standalone.sh -c standalone-full.xml
=========================================================================

  JBoss Bootstrap Environment

  JBOSS_HOME: /app/wildfly-8.2.0.Final

  JAVA: /usr/java/jdk1.7.0_60/bin/java

  JAVA_OPTS:  -server -Xms64m -Xmx512m -XX:MaxPermSize=256m -Djava.net.preferIPv4Stack=true -Djboss.modules.system.pkgs=org.jboss.byteman -Djava.awt.headless=true


Deploy quickstart jta-crash-rec
[dave@localhost quickstart-master]$ cd jta-crash-rec/
[dave@localhost jta-crash-rec]$ pwd
/home/dave/workspace/quickstart-master/jta-crash-rec
[dave@localhost jta-crash-rec]$  mvn install wildfly:deploy

Configure debug logging on JTA Arjuna module

Access the quickstart
http://localhost:8080/wildfly-jta-crash-rec/XA?key=&value=&submit=Submit
Debug of MessageListener transaction
23:06:38,342 DEBUG [org.hornetq.core.server] (hornetq-expiry-reaper-thread) Cannot expire from jms.queue.ExpiryQueue into jms.queue.ExpiryQueue
23:06:40,820 DEBUG [org.hibernate.engine.transaction.internal.TransactionCoordinatorImpl] (default task-7) Skipping JTA sync registration due to auto join checking
23:06:40,821 DEBUG [org.hibernate.engine.transaction.internal.TransactionCoordinatorImpl] (default task-7) successfully registered Synchronization
23:06:40,821 DEBUG [org.hibernate.jpa.spi.AbstractEntityManagerImpl] (default task-7) Looking for a JTA transaction to join
23:06:40,821 DEBUG [org.jboss.as.jpa] (default task-7) default task-7:transaction scoped EntityManager [wildfly-jta-crash-rec.war#primary]: created entity manager session TransactionImple < ac, BasicAction: 0:ffff7f000001:-520944e9:55089cdc:103 status: ActionStatus.RUNNING >
23:06:40,821 DEBUG [org.hibernate.SQL] (default task-7) select kvpair0_.name as name1_0_, kvpair0_.value as value2_0_ from KVPair kvpair0_
23:06:40,822 INFO  [stdout] (default task-7) Hibernate: select kvpair0_.name as name1_0_, kvpair0_.value as value2_0_ from KVPair kvpair0_
23:06:40,822 DEBUG [org.hibernate.engine.jdbc.internal.LogicalConnectionImpl] (default task-7) Obtaining JDBC connection
23:06:40,822 DEBUG [org.hibernate.engine.jdbc.internal.LogicalConnectionImpl] (default task-7) Obtained JDBC connection
23:06:40,824 DEBUG [org.hibernate.loader.Loader] (default task-7) Result row: EntityKey[org.jboss.as.quickstarts.xa.KVPair#k15]
23:06:40,824 DEBUG [org.hibernate.engine.internal.TwoPhaseLoad] (default task-7) Resolving associations for [org.jboss.as.quickstarts.xa.KVPair#k15]
23:06:40,824 DEBUG [org.hibernate.engine.internal.TwoPhaseLoad] (default task-7) Done materializing entity [org.jboss.as.quickstarts.xa.KVPair#k15]
23:06:40,824 DEBUG [org.hibernate.engine.jdbc.internal.LogicalConnectionImpl] (default task-7) Releasing JDBC connection
23:06:40,825 DEBUG [org.hibernate.engine.jdbc.internal.LogicalConnectionImpl] (default task-7) Released JDBC connection
23:06:40,825 DEBUG [org.hibernate.event.internal.AbstractFlushingEventListener] (default task-7) Processing flush-time cascades
23:06:40,825 DEBUG [org.hibernate.event.internal.AbstractFlushingEventListener] (default task-7) Dirty checking collections
23:06:40,825 DEBUG [org.hibernate.event.internal.AbstractFlushingEventListener] (default task-7) Flushed: 0 insertions, 0 updates, 0 deletions to 1 objects
23:06:40,825 DEBUG [org.hibernate.event.internal.AbstractFlushingEventListener] (default task-7) Flushed: 0 (re)creations, 0 updates, 0 removals to 0 collections
23:06:40,825 DEBUG [org.hibernate.internal.util.EntityPrinter] (default task-7) Listing entities:
23:06:40,826 DEBUG [org.hibernate.internal.util.EntityPrinter] (default task-7) org.jboss.as.quickstarts.xa.KVPair{value=v15 updated via JMS, key=k15}
23:06:40,826 DEBUG [org.hibernate.engine.jdbc.internal.LogicalConnectionImpl] (default task-7) Releasing JDBC connection
23:06:40,826 DEBUG [org.jboss.as.jpa] (default task-7) default task-7:transaction scoped EntityManager [wildfly-jta-crash-rec.war#primary]: closing entity managersession
23:06:40,826 DEBUG [org.hibernate.engine.jdbc.internal.LogicalConnectionImpl] (default task-7) Aggressively releasing JDBC connection
23:06:53,782 DEBUG [org.hibernate.engine.transaction.internal.TransactionCoordinatorImpl] (default task-8) Skipping JTA sync registration due to auto join checking
23:06:53,782 DEBUG [org.hibernate.engine.transaction.internal.TransactionCoordinatorImpl] (default task-8) successfully registered Synchronization
23:06:53,782 DEBUG [org.hibernate.jpa.spi.AbstractEntityManagerImpl] (default task-8) Looking for a JTA transaction to join
23:06:53,783 DEBUG [org.jboss.as.jpa] (default task-8) default task-8:transaction scoped EntityManager [wildfly-jta-crash-rec.war#primary]: created entity manager session TransactionImple < ac, BasicAction: 0:ffff7f000001:-520944e9:55089cdc:10a status: ActionStatus.RUNNING >
23:06:53,783 DEBUG [org.jboss.as.jpa] (default task-8) default task-8:transaction scoped EntityManager [wildfly-jta-crash-rec.war#primary]: reuse entity manager session already in tx TransactionImple < ac, BasicAction: 0:ffff7f000001:-520944e9:55089cdc:10a status: ActionStatus.RUNNING >
23:06:53,783 DEBUG [org.hibernate.SQL] (default task-8) select kvpair0_.name as name1_0_0_, kvpair0_.value as value2_0_0_ from KVPair kvpair0_ where kvpair0_.name=?
23:06:53,783 INFO  [stdout] (default task-8) Hibernate: select kvpair0_.name as name1_0_0_, kvpair0_.value as value2_0_0_ from KVPair kvpair0_ where kvpair0_.name=?
23:06:53,783 DEBUG [org.hibernate.engine.jdbc.internal.LogicalConnectionImpl] (default task-8) Obtaining JDBC connection
23:06:53,785 DEBUG [org.hibernate.engine.jdbc.internal.LogicalConnectionImpl] (default task-8) Obtained JDBC connection
23:06:53,787 DEBUG [org.hibernate.engine.jdbc.internal.LogicalConnectionImpl] (default task-8) Releasing JDBC connection
23:06:53,787 DEBUG [org.hibernate.engine.jdbc.internal.LogicalConnectionImpl] (default task-8) Released JDBC connection
23:06:53,787 DEBUG [org.hibernate.loader.entity.plan.AbstractLoadPlanBasedEntityLoader] (default task-8) Done entity load : org.jboss.as.quickstarts.xa.KVPair#k16
23:06:53,788 DEBUG [org.jboss.as.jpa] (default task-8) default task-8:transaction scoped EntityManager [wildfly-jta-crash-rec.war#primary]: reuse entity manager session already in tx TransactionImple < ac, BasicAction: 0:ffff7f000001:-520944e9:55089cdc:10a status: ActionStatus.RUNNING >
23:06:53,788 DEBUG [org.hibernate.event.internal.AbstractSaveEventListener] (default task-8) Generated identifier: k16, using strategy: org.hibernate.id.Assigned
23:06:53,792 DEBUG [org.hibernate.event.internal.AbstractFlushingEventListener] (default task-8) Processing flush-time cascades
23:06:53,793 DEBUG [org.hibernate.event.internal.AbstractFlushingEventListener] (default task-8) Dirty checking collections
23:06:53,793 DEBUG [org.hibernate.event.internal.AbstractFlushingEventListener] (default task-8) Flushed: 1 insertions, 0 updates, 0 deletions to 1 objects
23:06:53,793 DEBUG [org.hibernate.event.internal.AbstractFlushingEventListener] (default task-8) Flushed: 0 (re)creations, 0 updates, 0 removals to 0 collections
23:06:53,794 DEBUG [org.hibernate.internal.util.EntityPrinter] (default task-8) Listing entities:
23:06:53,794 DEBUG [org.hibernate.internal.util.EntityPrinter] (default task-8) org.jboss.as.quickstarts.xa.KVPair{value=v16, key=k16}
23:06:53,794 DEBUG [org.hibernate.SQL] (default task-8) insert into KVPair (value, name) values (?, ?)
23:06:53,795 INFO  [stdout] (default task-8) Hibernate: insert into KVPair (value, name) values (?, ?)
23:06:53,795 DEBUG [org.hibernate.engine.jdbc.internal.LogicalConnectionImpl] (default task-8) Obtaining JDBC connection
23:06:53,796 DEBUG [org.hibernate.engine.jdbc.internal.LogicalConnectionImpl] (default task-8) Obtained JDBC connection
23:06:53,797 DEBUG [org.hibernate.engine.jdbc.internal.JdbcCoordinatorImpl] (default task-8) Skipping aggressive release due to manual disabling
23:06:53,797 DEBUG [org.hibernate.engine.jdbc.internal.LogicalConnectionImpl] (default task-8) Releasing JDBC connection
23:06:53,798 DEBUG [org.hibernate.engine.jdbc.internal.LogicalConnectionImpl] (default task-8) Released JDBC connection
23:06:53,886 DEBUG [org.hornetq.core.server] (Thread-12 (HornetQ-server-HornetQServerImpl::serverUUID=3f93832c-cce0-11e4-85a9-c34d99e66ea7-733564457)) QueueImpl[name=jms.queue.jta-crash-rec-quickstart, postOffice=PostOfficeImpl [server=HornetQServerImpl::serverUUID=3f93832c-cce0-11e4-85a9-c34d99e66ea7]]@57fd577 doing deliver. messageReferences=0
23:06:53,888 DEBUG [org.jboss.as.jpa] (default task-8) default task-8:transaction scoped EntityManager [wildfly-jta-crash-rec.war#primary]: closing entity managersession
23:06:53,888 DEBUG [org.hibernate.engine.jdbc.internal.JdbcCoordinatorImpl] (default task-8) HHH000420: Closing un-released batch
23:06:53,889 DEBUG [org.hibernate.engine.jdbc.internal.LogicalConnectionImpl] (default task-8) Aggressively releasing JDBC connection
23:06:53,891 DEBUG [org.hibernate.engine.transaction.internal.TransactionCoordinatorImpl] (default task-8) Skipping JTA sync registration due to auto join checking
23:06:53,890 DEBUG [org.hornetq.core.client] (Thread-22 (HornetQ-client-global-threads-141278138)) client ack messageID = 262
23:06:53,891 DEBUG [org.hibernate.engine.transaction.internal.TransactionCoordinatorImpl] (default task-8) successfully registered Synchronization
23:06:53,891 DEBUG [org.hibernate.jpa.spi.AbstractEntityManagerImpl] (default task-8) Looking for a JTA transaction to join
23:06:53,892 DEBUG [org.jboss.as.jpa] (default task-8) default task-8:transaction scoped EntityManager [wildfly-jta-crash-rec.war#primary]: created entity manager session TransactionImple < ac, BasicAction: 0:ffff7f000001:-520944e9:55089cdc:119 status: ActionStatus.RUNNING >
23:06:53,892 DEBUG [org.hibernate.SQL] (default task-8) select kvpair0_.name as name1_0_, kvpair0_.value as value2_0_ from KVPair kvpair0_
23:06:53,893 INFO  [stdout] (default task-8) Hibernate: select kvpair0_.name as name1_0_, kvpair0_.value as value2_0_ from KVPair kvpair0_
23:06:53,893 DEBUG [org.hibernate.engine.jdbc.internal.LogicalConnectionImpl] (default task-8) Obtaining JDBC connection
23:06:53,894 DEBUG [org.hibernate.engine.jdbc.internal.LogicalConnectionImpl] (default task-8) Obtained JDBC connection
23:06:53,896 INFO  [org.jboss.as.quickstarts.xa.DbUpdaterMDB] (Thread-22 (HornetQ-client-global-threads-141278138)) Received Message: HornetQMessage[ID:eb7c1627-ccf1-11e4-a9c4-0776b366296e]:PERSISTENT
23:06:53,896 DEBUG [org.hibernate.engine.transaction.internal.TransactionCoordinatorImpl] (Thread-22 (HornetQ-client-global-threads-141278138)) Skipping JTA sync registration due to auto join checking
23:06:53,896 DEBUG [org.hibernate.engine.transaction.internal.TransactionCoordinatorImpl] (Thread-22 (HornetQ-client-global-threads-141278138)) successfully registered Synchronization
23:06:53,896 DEBUG [org.hibernate.jpa.spi.AbstractEntityManagerImpl] (Thread-22 (HornetQ-client-global-threads-141278138)) Looking for a JTA transaction to join
23:06:53,897 DEBUG [org.jboss.as.jpa] (Thread-22 (HornetQ-client-global-threads-141278138)) Thread-22 (HornetQ-client-global-threads-141278138):transaction scoped EntityManager [wildfly-jta-crash-rec.war#primary]: created entity manager session TransactionImple < ac, BasicAction: 0:ffff7f000001:-520944e9:55089cdc:115 status: ActionStatus.RUNNING >
23:06:53,897 DEBUG [org.jboss.as.jpa] (Thread-22 (HornetQ-client-global-threads-141278138)) Thread-22 (HornetQ-client-global-threads-141278138):transaction scoped EntityManager [wildfly-jta-crash-rec.war#primary]: reuse entity manager session already in tx TransactionImple < ac, BasicAction: 0:ffff7f000001:-520944e9:55089cdc:115 status: ActionStatus.RUNNING >
23:06:53,897 DEBUG [org.hibernate.loader.Loader] (default task-8) Result row: EntityKey[org.jboss.as.quickstarts.xa.KVPair#k15]
23:06:53,897 DEBUG [org.hibernate.SQL] (Thread-22 (HornetQ-client-global-threads-141278138)) select kvpair0_.name as name1_0_0_, kvpair0_.value as value2_0_0_ from KVPair kvpair0_ where kvpair0_.name=?
23:06:53,898 INFO  [stdout] (Thread-22 (HornetQ-client-global-threads-141278138)) Hibernate: select kvpair0_.name as name1_0_0_, kvpair0_.value as value2_0_0_ from KVPair kvpair0_ where kvpair0_.name=?
23:06:53,898 DEBUG [org.hibernate.loader.Loader] (default task-8) Result row: EntityKey[org.jboss.as.quickstarts.xa.KVPair#k16]
23:06:53,898 DEBUG [org.hibernate.engine.jdbc.internal.LogicalConnectionImpl] (Thread-22 (HornetQ-client-global-threads-141278138)) Obtaining JDBC connection
23:06:53,899 DEBUG [org.hibernate.engine.jdbc.internal.LogicalConnectionImpl] (Thread-22 (HornetQ-client-global-threads-141278138)) Obtained JDBC connection
23:06:53,899 DEBUG [org.hibernate.engine.internal.TwoPhaseLoad] (default task-8) Resolving associations for [org.jboss.as.quickstarts.xa.KVPair#k15]
23:06:53,900 DEBUG [org.hibernate.engine.internal.TwoPhaseLoad] (default task-8) Done materializing entity [org.jboss.as.quickstarts.xa.KVPair#k15]
23:06:53,900 DEBUG [org.hibernate.engine.internal.TwoPhaseLoad] (default task-8) Resolving associations for [org.jboss.as.quickstarts.xa.KVPair#k16]
23:06:53,900 DEBUG [org.hibernate.engine.internal.TwoPhaseLoad] (default task-8) Done materializing entity [org.jboss.as.quickstarts.xa.KVPair#k16]
23:06:53,900 DEBUG [org.hibernate.engine.jdbc.internal.LogicalConnectionImpl] (default task-8) Releasing JDBC connection
23:06:53,901 DEBUG [org.hibernate.engine.jdbc.internal.LogicalConnectionImpl] (default task-8) Released JDBC connection
23:06:53,902 DEBUG [org.hibernate.event.internal.AbstractFlushingEventListener] (default task-8) Processing flush-time cascades
23:06:53,902 DEBUG [org.hibernate.event.internal.AbstractFlushingEventListener] (default task-8) Dirty checking collections
23:06:53,902 DEBUG [org.hibernate.event.internal.AbstractFlushingEventListener] (default task-8) Flushed: 0 insertions, 0 updates, 0 deletions to 2 objects
23:06:53,903 DEBUG [org.hibernate.event.internal.AbstractFlushingEventListener] (default task-8) Flushed: 0 (re)creations, 0 updates, 0 removals to 0 collections
23:06:53,903 DEBUG [org.hibernate.loader.plan.exec.process.internal.ResultSetProcessorImpl] (Thread-22 (HornetQ-client-global-threads-141278138)) Starting ResultSet row #0
23:06:53,903 DEBUG [org.hibernate.internal.util.EntityPrinter] (default task-8) Listing entities:
23:06:53,903 DEBUG [org.hibernate.loader.plan.exec.process.internal.EntityReferenceInitializerImpl] (Thread-22 (HornetQ-client-global-threads-141278138)) On call to EntityIdentifierReaderImpl#resolve, EntityKey was already known; should only happen on root returns with an optional identifier specified
23:06:53,903 DEBUG [org.hibernate.internal.util.EntityPrinter] (default task-8) org.jboss.as.quickstarts.xa.KVPair{value=v15 updated via JMS, key=k15}
23:06:53,903 DEBUG [org.hibernate.internal.util.EntityPrinter] (default task-8) org.jboss.as.quickstarts.xa.KVPair{value=v16, key=k16}
23:06:53,903 DEBUG [org.hibernate.engine.internal.TwoPhaseLoad] (Thread-22 (HornetQ-client-global-threads-141278138)) Resolving associations for [org.jboss.as.quickstarts.xa.KVPair#k16]
23:06:53,903 DEBUG [org.hibernate.engine.jdbc.internal.LogicalConnectionImpl] (default task-8) Releasing JDBC connection
23:06:53,904 DEBUG [org.hibernate.engine.internal.TwoPhaseLoad] (Thread-22 (HornetQ-client-global-threads-141278138)) Done materializing entity [org.jboss.as.quickstarts.xa.KVPair#k16]
23:06:53,904 DEBUG [org.jboss.as.jpa] (default task-8) default task-8:transaction scoped EntityManager [wildfly-jta-crash-rec.war#primary]: closing entity managersession
23:06:53,904 DEBUG [org.hibernate.engine.jdbc.internal.LogicalConnectionImpl] (Thread-22 (HornetQ-client-global-threads-141278138)) Releasing JDBC connection
23:06:53,904 DEBUG [org.hibernate.engine.jdbc.internal.LogicalConnectionImpl] (default task-8) Aggressively releasing JDBC connection
23:06:53,904 DEBUG [org.hibernate.engine.jdbc.internal.LogicalConnectionImpl] (Thread-22 (HornetQ-client-global-threads-141278138)) Released JDBC connection
23:06:53,905 DEBUG [org.hibernate.loader.entity.plan.AbstractLoadPlanBasedEntityLoader] (Thread-22 (HornetQ-client-global-threads-141278138)) Done entity load : org.jboss.as.quickstarts.xa.KVPair#k16
23:06:53,905 DEBUG [org.jboss.as.jpa] (Thread-22 (HornetQ-client-global-threads-141278138)) Thread-22 (HornetQ-client-global-threads-141278138):transaction scoped EntityManager [wildfly-jta-crash-rec.war#primary]: reuse entity manager session already in tx TransactionImple < ac, BasicAction: 0:ffff7f000001:-520944e9:55089cdc:115 status: ActionStatus.RUNNING >
23:06:53,905 INFO  [org.jboss.as.quickstarts.xa.DbUpdaterMDB] (Thread-22 (HornetQ-client-global-threads-141278138)) JTA Crash Record Quickstart: key value pair updated via JMS
23:06:53,906 DEBUG [org.hibernate.event.internal.AbstractFlushingEventListener] (Thread-22 (HornetQ-client-global-threads-141278138)) Processing flush-time cascades
23:06:53,907 DEBUG [org.hibernate.event.internal.AbstractFlushingEventListener] (Thread-22 (HornetQ-client-global-threads-141278138)) Dirty checking collections
23:06:53,907 DEBUG [org.hibernate.event.internal.AbstractFlushingEventListener] (Thread-22 (HornetQ-client-global-threads-141278138)) Flushed: 0 insertions, 1 updates, 0 deletions to 1 objects
23:06:53,908 DEBUG [org.hibernate.event.internal.AbstractFlushingEventListener] (Thread-22 (HornetQ-client-global-threads-141278138)) Flushed: 0 (re)creations, 0 updates, 0 removals to 0 collections
23:06:53,908 DEBUG [org.hibernate.internal.util.EntityPrinter] (Thread-22 (HornetQ-client-global-threads-141278138)) Listing entities:
23:06:53,908 DEBUG [org.hibernate.internal.util.EntityPrinter] (Thread-22 (HornetQ-client-global-threads-141278138)) org.jboss.as.quickstarts.xa.KVPair{value=v16 updated via JMS, key=k16}
23:06:53,909 DEBUG [org.hibernate.SQL] (Thread-22 (HornetQ-client-global-threads-141278138)) update KVPair set value=? where name=?
23:06:53,909 INFO  [stdout] (Thread-22 (HornetQ-client-global-threads-141278138)) Hibernate: update KVPair set value=? where name=?
23:06:53,909 DEBUG [org.hibernate.engine.jdbc.internal.LogicalConnectionImpl] (Thread-22 (HornetQ-client-global-threads-141278138)) Obtaining JDBC connection
23:06:53,910 DEBUG [org.hibernate.engine.jdbc.internal.LogicalConnectionImpl] (Thread-22 (HornetQ-client-global-threads-141278138)) Obtained JDBC connection
23:06:53,911 DEBUG [org.hibernate.engine.jdbc.internal.JdbcCoordinatorImpl] (Thread-22 (HornetQ-client-global-threads-141278138)) Skipping aggressive release due to manual disabling
23:06:53,911 DEBUG [org.hibernate.engine.jdbc.internal.LogicalConnectionImpl] (Thread-22 (HornetQ-client-global-threads-141278138)) Releasing JDBC connection
23:06:53,912 DEBUG [org.hibernate.engine.jdbc.internal.LogicalConnectionImpl] (Thread-22 (HornetQ-client-global-threads-141278138)) Released JDBC connection
23:06:53,977 DEBUG [org.jboss.as.jpa] (Thread-22 (HornetQ-client-global-threads-141278138)) Thread-22 (HornetQ-client-global-threads-141278138):transaction scoped EntityManager [wildfly-jta-crash-rec.war#primary]: closing entity managersession
23:06:53,977 DEBUG [org.hibernate.engine.jdbc.internal.JdbcCoordinatorImpl] (Thread-22 (HornetQ-client-global-threads-141278138)) HHH000420: Closing un-released batch
23:06:53,977 DEBUG [org.hibernate.engine.jdbc.internal.LogicalConnectionImpl] (Thread-22 (HornetQ-client-global-threads-141278138)) Aggressively releasing JDBC connection
23:06:54,656 DEBUG [com.arjuna.ats.arjuna] (Periodic Recovery) PeriodicRecovery: background thread Status <== SCANNING
23:06:54,656 DEBUG [com.arjuna.ats.arjuna] (Periodic Recovery) PeriodicRecovery: background thread scanning
23:06:54,657 DEBUG [com.arjuna.ats.arjuna] (Periodic Recovery) Periodic recovery first pass at Tue, 17 Mar 2015 23:06:54
23:06:54,657 DEBUG [com.arjuna.ats.arjuna] (Periodic Recovery) AtomicActionRecoveryModule first pass
23:06:54,657 DEBUG [com.arjuna.ats.arjuna] (Periodic Recovery) processing /StateManager/BasicAction/TwoPhaseCoordinator/AtomicAction transactions
23:06:54,657 DEBUG [com.arjuna.ats.arjuna] (Periodic Recovery)  
23:06:54,657 DEBUG [com.arjuna.ats.txoj] (Periodic Recovery) TORecoveryModule - first pass
23:06:54,659 DEBUG [com.arjuna.ats.arjuna] (Periodic Recovery)  
23:06:54,659 DEBUG [com.arjuna.ats.jta] (Periodic Recovery) Local XARecoveryModule - first pass
23:06:54,660 DEBUG [org.jboss.jca.core.tx.jbossts.XAResourceRecoveryImpl] (Periodic Recovery) Recovery user name=sa
23:06:54,660 DEBUG [org.jboss.jca.core.tx.jbossts.XAResourceRecoveryImpl] (Periodic Recovery) Recovery Subject=Subject:
    Principal: sa
    Private Credential: javax.resource.spi.security.PasswordCredential@35c11c

23:06:54,660 DEBUG [org.jboss.jca.core.tx.jbossts.XAResourceRecoveryImpl] (Periodic Recovery) Open managed connection (Subject:
    Principal: sa
    Private Credential: javax.resource.spi.security.PasswordCredential@35c11c
)
23:06:54,660 DEBUG [org.jboss.jca.core.tx.jbossts.XAResourceRecoveryImpl] (Periodic Recovery) Open connection (org.jboss.jca.adapters.jdbc.xa.XAManagedConnection@12baccec, Subject:
    Principal: sa
    Private Credential: javax.resource.spi.security.PasswordCredential@35c11c
)
23:06:54,661 DEBUG [org.jboss.jca.core.tx.jbossts.XAResourceRecoveryImpl] (Periodic Recovery) Closing connection for recovery check (org.jboss.jca.adapters.jdbc.jdk7.WrappedConnectionJDK7@6cb68463)
23:06:54,661 DEBUG [org.jboss.jca.core.tx.jbossts.XAResourceRecoveryImpl] (Periodic Recovery) Force close=false
23:06:54,661 DEBUG [org.jboss.jca.core.tx.jbossts.XAResourceRecoveryImpl] (Periodic Recovery) Recovery XAResource=XAResourceWrapperImpl@42adb757[xaResource=org.jboss.jca.adapters.jdbc.xa.XAManagedConnection@12baccec pad=false overrideRmValue=false productName=H2 productVersion=1.3.173 (2013-07-28) jndiName=java:jboss/datasources/JTACrashRecQuickstartDS] for java:jboss/datasources/JTACrashRecQuickstartDS
23:06:54,662 DEBUG [org.hornetq.jms.server] (Periodic Recovery) 
=======================================================================================
23:06:54,662 DEBUG [org.hornetq.jms.server] (Periodic Recovery) Returning the following list on getXAREsources:
23:06:54,662 DEBUG [org.hornetq.jms.server] (Periodic Recovery) server-id=3f93832c-cce0-11e4-85a9-c34d99e66ea7, value=HornetQXAResourceWrapper [serverLocator=ServerLocatorImpl [initialConnectors=[TransportConfiguration(name=c9103c7d-ccec-11e4-a9c4-0776b366296e, factory=org-hornetq-core-remoting-impl-invm-InVMConnectorFactory) ?server-id=0], discoveryGroupConfiguration=null], csf=ClientSessionFactoryImpl [serverLocator=ServerLocatorImpl [initialConnectors=[TransportConfiguration(name=c9103c7d-ccec-11e4-a9c4-0776b366296e, factory=org-hornetq-core-remoting-impl-invm-InVMConnectorFactory) ?server-id=0], discoveryGroupConfiguration=null], connectorConfig=TransportConfiguration(name=c9103c7d-ccec-11e4-a9c4-0776b366296e, factory=org-hornetq-core-remoting-impl-invm-InVMConnectorFactory) ?server-id=0, backupConfig=null], delegate=DelegatingSession [session=ClientSessionImpl [name=14033f14-cced-11e4-a9c4-0776b366296e, username=null, closed=false, factory = ClientSessionFactoryImpl [serverLocator=ServerLocatorImpl [initialConnectors=[TransportConfiguration(name=c9103c7d-ccec-11e4-a9c4-0776b366296e, factory=org-hornetq-core-remoting-impl-invm-InVMConnectorFactory) ?server-id=0], discoveryGroupConfiguration=null], connectorConfig=TransportConfiguration(name=c9103c7d-ccec-11e4-a9c4-0776b366296e, factory=org-hornetq-core-remoting-impl-invm-InVMConnectorFactory) ?server-id=0, backupConfig=null], metaData=()]@25a3d1], xaRecoveryConfigs=[XARecoveryConfig [transportConfiguration = [TransportConfiguration(name=c9103c7d-ccec-11e4-a9c4-0776b366296e, factory=org-hornetq-core-remoting-impl-invm-InVMConnectorFactory) ?server-id=0], discoveryConfiguration = null, username=null, password=****]], instance=442315688]
23:06:54,662 DEBUG [org.hornetq.jms.server] (Periodic Recovery) =======================================================================================

23:06:54,663 DEBUG [com.arjuna.ats.jta] (Periodic Recovery) xarecovery of RecoveryOnlyEJBXAResource{receiverContext=EJBReceiverContext{clientContext=org.jboss.ejb.client.EJBClientContext@1a5c141b, receiver=org.jboss.as.ejb3.remote.LocalEjbReceiver@2f46ac03}, transactionOriginNodeIdentifier='1'}
23:06:54,663 DEBUG [org.jboss.ejb.client.txn] (Periodic Recovery) Send recover request for transaction origin node identifier 1 to EJB receiver with node name localhost
23:06:54,663 DEBUG [com.arjuna.ats.jta] (Periodic Recovery) Found 0 xids in doubt
23:06:54,663 DEBUG [com.arjuna.ats.jta] (Periodic Recovery) xarecovery of XAResourceWrapperImpl@42adb757[xaResource=org.jboss.jca.adapters.jdbc.xa.XAManagedConnection@12baccec pad=false overrideRmValue=false productName=H2 productVersion=1.3.173 (2013-07-28) jndiName=java:jboss/datasources/JTACrashRecQuickstartDS]
23:06:54,664 DEBUG [com.arjuna.ats.jta] (Periodic Recovery) Found 0 xids in doubt
23:06:54,664 DEBUG [com.arjuna.ats.jta] (Periodic Recovery) xarecovery of HornetQXAResourceWrapper [serverLocator=ServerLocatorImpl [initialConnectors=[TransportConfiguration(name=c9103c7d-ccec-11e4-a9c4-0776b366296e, factory=org-hornetq-core-remoting-impl-invm-InVMConnectorFactory) ?server-id=0], discoveryGroupConfiguration=null], csf=ClientSessionFactoryImpl [serverLocator=ServerLocatorImpl [initialConnectors=[TransportConfiguration(name=c9103c7d-ccec-11e4-a9c4-0776b366296e, factory=org-hornetq-core-remoting-impl-invm-InVMConnectorFactory) ?server-id=0], discoveryGroupConfiguration=null], connectorConfig=TransportConfiguration(name=c9103c7d-ccec-11e4-a9c4-0776b366296e, factory=org-hornetq-core-remoting-impl-invm-InVMConnectorFactory) ?server-id=0, backupConfig=null], delegate=DelegatingSession [session=ClientSessionImpl [name=14033f14-cced-11e4-a9c4-0776b366296e, username=null, closed=false, factory = ClientSessionFactoryImpl [serverLocator=ServerLocatorImpl [initialConnectors=[TransportConfiguration(name=c9103c7d-ccec-11e4-a9c4-0776b366296e, factory=org-hornetq-core-remoting-impl-invm-InVMConnectorFactory) ?server-id=0], discoveryGroupConfiguration=null], connectorConfig=TransportConfiguration(name=c9103c7d-ccec-11e4-a9c4-0776b366296e, factory=org-hornetq-core-remoting-impl-invm-InVMConnectorFactory) ?server-id=0, backupConfig=null], metaData=()]@25a3d1], xaRecoveryConfigs=[XARecoveryConfig [transportConfiguration = [TransportConfiguration(name=c9103c7d-ccec-11e4-a9c4-0776b366296e, factory=org-hornetq-core-remoting-impl-invm-InVMConnectorFactory) ?server-id=0], discoveryConfiguration = null, username=null, password=****]], instance=442315688]
23:06:54,664 DEBUG [org.hornetq.jms.server] (Periodic Recovery) looking for recover at DelegatingSession [session=ClientSessionImpl [name=14033f14-cced-11e4-a9c4-0776b366296e, username=null, closed=false, factory = ClientSessionFactoryImpl [serverLocator=ServerLocatorImpl [initialConnectors=[TransportConfiguration(name=c9103c7d-ccec-11e4-a9c4-0776b366296e, factory=org-hornetq-core-remoting-impl-invm-InVMConnectorFactory) ?server-id=0], discoveryGroupConfiguration=null], connectorConfig=TransportConfiguration(name=c9103c7d-ccec-11e4-a9c4-0776b366296e, factory=org-hornetq-core-remoting-impl-invm-InVMConnectorFactory) ?server-id=0, backupConfig=null], metaData=()]@25a3d1] configuration [XARecoveryConfig [transportConfiguration = [TransportConfiguration(name=c9103c7d-ccec-11e4-a9c4-0776b366296e, factory=org-hornetq-core-remoting-impl-invm-InVMConnectorFactory) ?server-id=0], discoveryConfiguration = null, username=null, password=****]]
23:06:54,665 DEBUG [com.arjuna.ats.jta] (Periodic Recovery) Found 0 xids in doubt
23:06:54,665 DEBUG [com.arjuna.ats.arjuna] (Periodic Recovery)  

Debug at TRACE level Start of transaction
2015-03-17 22:48:00,132 TRACE [org.xnio.listener] (default I/O-2) Invoking listener io.undertow.server.protocol.http.HttpOpenListener@7c41cb4e on channel org.xnio.nio.NioSocketStreamConnection@3512c7d3
2015-03-17 22:48:00,132 TRACE [io.undertow.request] (default I/O-2) Opened connection with /127.0.0.1:47595
2015-03-17 22:48:00,133 TRACE [org.xnio.nio.selector] (default I/O-2) Beginning select on sun.nio.ch.EPollSelectorImpl@6e222594
2015-03-17 22:48:00,133 TRACE [org.jboss.weld.Servlet] (default task-6) WELD-000708: Initializing request io.undertow.servlet.spec.HttpServletRequestImpl@3b1c643e
2015-03-17 22:48:00,134 TRACE [org.jboss.weld.Context] (default task-6) WELD-000222: Loading bean store org.jboss.weld.context.beanstore.http.LazySessionBeanStore@44f940c3 map from session null
2015-03-17 22:48:00,134 TRACE [org.jboss.weld.Bean] (default task-6) WELD-001545: MethodHandler processing call to public abstract void javax.transaction.UserTransaction.begin() throws javax.transaction.NotSupportedException,javax.transaction.SystemException for class org.jboss.weldx.transaction.UserTransaction$942642665$Proxy$_$$_Weld$Proxy$
2015-03-17 22:48:00,134 TRACE [com.arjuna.ats.jta] (default task-6) BaseTransaction.begin
2015-03-17 22:48:00,135 TRACE [com.arjuna.ats.arjuna] (default task-6) StateManager::StateManager( 2, 0 )
2015-03-17 22:48:00,135 TRACE [com.arjuna.ats.arjuna] (default task-6) BasicAction::BasicAction()
2015-03-17 22:48:00,135 TRACE [com.arjuna.ats.arjuna] (default task-6) BasicAction::Begin() for action-id 0:ffff7f000001:-520944e9:55089cdc:a6
2015-03-17 22:48:00,135 TRACE [com.arjuna.ats.arjuna] (default task-6) BasicAction::actionInitialise() for action-id 0:ffff7f000001:-520944e9:55089cdc:a6
2015-03-17 22:48:00,135 TRACE [com.arjuna.ats.arjuna] (default task-6) ActionHierarchy::ActionHierarchy(1)
2015-03-17 22:48:00,135 TRACE [com.arjuna.ats.arjuna] (default task-6) ActionHierarchy::add(0:ffff7f000001:-520944e9:55089cdc:a6, 1)
2015-03-17 22:48:00,135 TRACE [com.arjuna.ats.arjuna] (default task-6) BasicAction::addChildThread () action 0:ffff7f000001:-520944e9:55089cdc:a6 adding Thread[default task-6,5,main]
2015-03-17 22:48:00,135 TRACE [com.arjuna.ats.arjuna] (default task-6) BasicAction::addChildThread () action 0:ffff7f000001:-520944e9:55089cdc:a6 adding Thread[default task-6,5,main] result = true

Start of Hibernate transaction
2015-03-17 22:48:00,137 TRACE [com.arjuna.ats.jta] (default task-6) TransactionImple.getStatus: javax.transaction.Status.STATUS_ACTIVE
2015-03-17 22:48:00,137 TRACE [com.arjuna.ats.jta] (default task-6) TransactionSynchronizationRegistryImple.registerInterposedSynchronization
2015-03-17 22:48:00,137 TRACE [com.arjuna.ats.jta] (default task-6) TransactionImple.getStatus: javax.transaction.Status.STATUS_ACTIVE
2015-03-17 22:48:00,137 DEBUG [org.hibernate.engine.transaction.internal.TransactionCoordinatorImpl] (default task-6) successfully registered Synchronization
2015-03-17 22:48:00,137 DEBUG [org.hibernate.jpa.spi.AbstractEntityManagerImpl] (default task-6) Looking for a JTA transaction to join
2015-03-17 22:48:00,137 TRACE [com.arjuna.ats.jta] (default task-6) TransactionImple.getStatus: javax.transaction.Status.STATUS_ACTIVE
2015-03-17 22:48:00,137 TRACE [com.arjuna.ats.jta] (default task-6) TransactionImple.getStatus: javax.transaction.Status.STATUS_ACTIVE
2015-03-17 22:48:00,137 TRACE [org.hibernate.internal.SessionImpl] (default task-6) Setting flush mode to: AUTO
2015-03-17 22:48:00,138 TRACE [org.hibernate.internal.SessionImpl] (default task-6) Setting cache mode to: NORMAL
2015-03-17 22:48:00,138 DEBUG [org.jboss.as.jpa] (default task-6) default task-6:transaction scoped EntityManager [wildfly-jta-crash-rec.war#primary]: created entity manager session TransactionImple < ac, BasicAction: 0:ffff7f000001:-520944e9:55089cdc:a6 status: ActionStatus.RUNNING >
2015-03-17 22:48:00,138 TRACE [com.arjuna.ats.jta] (default task-6) TransactionSynchronizationRegistryImple.registerInterposedSynchronization
2015-03-17 22:48:00,138 TRACE [com.arjuna.ats.jta] (default task-6) TransactionImple.getStatus: javax.transaction.Status.STATUS_ACTIVE
2015-03-17 22:48:00,138 TRACE [com.arjuna.ats.jta] (default task-6) TransactionSynchronizationRegistryImple.putResource
2015-03-17 22:48:00,138 TRACE [com.arjuna.ats.jta] (default task-6) TransactionImple.getStatus: javax.transaction.Status.STATUS_ACTIVE
2015-03-17 22:48:00,138 TRACE [com.arjuna.ats.jta] (default task-6) TransactionImple.getStatus: javax.transaction.Status.STATUS_ACTIVE
2015-03-17 22:48:00,138 TRACE [com.arjuna.ats.jta] (default task-6) TransactionSynchronizationRegistryImple.getResource
2015-03-17 22:48:00,138 TRACE [com.arjuna.ats.jta] (default task-6) TransactionImple.getStatus: javax.transaction.Status.STATUS_ACTIVE
2015-03-17 22:48:00,138 DEBUG [org.jboss.as.jpa] (default task-6) default task-6:transaction scoped EntityManager [wildfly-jta-crash-rec.war#primary]: reuse entity manager session already in tx TransactionImple < ac, BasicAction: 0:ffff7f000001:-520944e9:55089cdc:a6 status: ActionStatus.RUNNING >
2015-03-17 22:48:00,139 TRACE [org.hibernate.internal.SessionImpl] (default task-6) Setting cache mode to: NORMAL
2015-03-17 22:48:00,139 TRACE [org.hibernate.event.internal.DefaultLoadEventListener] (default task-6) Loading entity: [org.jboss.as.quickstarts.xa.KVPair#k15]

Register resources into transaction
2015-03-17 22:48:00,142 TRACE [com.arjuna.ats.jta] (default task-6) TransactionImple.getStatus: javax.transaction.Status.STATUS_ACTIVE
2015-03-17 22:48:00,143 TRACE [com.arjuna.ats.jta] (default task-6) TransactionImple.enlistResource ( XAResourceWrapperImpl@2da65345[xaResource=org.jboss.jca.adapters.jdbc.xa.XAManagedConnection@2a4ee6d pad=false overrideRmValue=false productName=H2 productVersion=1.3.173 (2013-07-28) jndiName=java:jboss/datasources/JTACrashRecQuickstartDS] )
2015-03-17 22:48:00,143 TRACE [com.arjuna.ats.jta] (default task-6) TransactionImple.getStatus: javax.transaction.Status.STATUS_ACTIVE
2015-03-17 22:48:00,143 TRACE [com.arjuna.ats.arjuna] (default task-6) StateManager::StateManager( 1, 0 )
2015-03-17 22:48:00,143 TRACE [com.arjuna.ats.arjuna] (default task-6) AbstractRecord::AbstractRecord (0:ffff7f000001:-520944e9:55089cdc:ab, 1)
2015-03-17 22:48:00,143 TRACE [com.arjuna.ats.jta] (default task-6) XAResourceRecord.XAResourceRecord ( < formatId=131077, gtrid_length=29, bqual_length=36, tx_uid=0:ffff7f000001:-520944e9:55089cdc:a6, node_name=1, branch_uid=0:ffff7f000001:-520944e9:55089cdc:aa, subordinatenodename=null, eis_name=java:jboss/datasources/JTACrashRecQuickstartDS >, XAResourceWrapperImpl@2da65345[xaResource=org.jboss.jca.adapters.jdbc.xa.XAManagedConnection@2a4ee6d pad=false overrideRmValue=false productName=H2 productVersion=1.3.173 (2013-07-28) jndiName=java:jboss/datasources/JTACrashRecQuickstartDS] ), record id=0:ffff7f000001:-520944e9:55089cdc:ab
2015-03-17 22:48:00,143 TRACE [com.arjuna.ats.arjuna] (default task-6) RecordList::insert(RecordList: empty) : appending /StateManager/AbstractRecord/XAResourceRecord for 0:ffff7f000001:-520944e9:55089cdc:ab
2015-03-17 22:48:00,143 DEBUG [org.hibernate.engine.jdbc.internal.LogicalConnectionImpl] (default task-6) Obtained JDBC connection
2015-03-17 22:48:00,144 TRACE [com.arjuna.ats.jta] (default task-6) TransactionImple.getStatus: javax.transaction.Status.STATUS_ACTIVE
2015-03-17 22:48:00,144 TRACE [org.hibernate.engine.jdbc.internal.JdbcCoordinatorImpl] (default task-6) Registering statement [org.jboss.jca.adapters.jdbc.jdk7.WrappedPreparedStatementJDK7@176f445a]
2015-03-17 22:48:00,144 TRACE [org.hibernate.engine.jdbc.internal.JdbcCoordinatorImpl] (default task-6) Registering last query statement [org.jboss.jca.adapters.jdbc.jdk7.WrappedPreparedStatementJDK7@176f445a]
2015-03-17 22:48:00,144 TRACE [org.hibernate.type.descriptor.sql.BasicBinder] (default task-6) binding parameter [1] as [VARCHAR] - [k15]
2015-03-17 22:48:00,144 TRACE [org.hibernate.loader.plan.exec.internal.AbstractLoadPlanBasedLoader] (default task-6) Bound [2] parameters total
2015-03-17 22:48:00,169 TRACE [com.arjuna.ats.jta] (default task-6) TransactionImple.getStatus: javax.transaction.Status.STATUS_ACTIVE
2015-03-17 22:48:00,169 TRACE [org.hibernate.engine.jdbc.internal.JdbcCoordinatorImpl] (default task-6) Registering result set [rs43: org.h2.result.LocalResult@4d487c46 columns: 2 rows: 0 pos: -1]
2015-03-17 22:48:00,169 TRACE [org.hibernate.loader.plan.exec.process.internal.ResultSetProcessorImpl] (default task-6) Processing result set

Transaction commit
2015-03-17 22:48:00,269 TRACE [com.arjuna.ats.arjuna] (default task-6) BasicAction::phase2Commit() for action-id 0:ffff7f000001:-520944e9:55089cdc:a6
2015-03-17 22:48:00,270 TRACE [com.arjuna.ats.arjuna] (default task-6) BasicAction::doCommit (XAResourceRecord < resource:XAResourceWrapperImpl@2da65345[xaResource=org.jboss.jca.adapters.jdbc.xa.XAManagedConnection@2a4ee6d pad=false overrideRmValue=false productName=H2 productVersion=1.3.173 (2013-07-28) jndiName=java:jboss/datasources/JTACrashRecQuickstartDS], txid:< formatId=131077, gtrid_length=29, bqual_length=36, tx_uid=0:ffff7f000001:-520944e9:55089cdc:a6, node_name=1, branch_uid=0:ffff7f000001:-520944e9:55089cdc:aa, subordinatenodename=null, eis_name=java:jboss/datasources/JTACrashRecQuickstartDS >, heuristic: TwoPhaseOutcome.FINISH_OK, product: H2/1.3.173 (2013-07-28), jndiName: java:jboss/datasources/JTACrashRecQuickstartDS com.arjuna.ats.internal.jta.resources.arjunacore.XAResourceRecord@c3e0df8 >)
2015-03-17 22:48:00,270 TRACE [com.arjuna.ats.jta] (default task-6) XAResourceRecord.topLevelCommit for XAResourceRecord < resource:XAResourceWrapperImpl@2da65345[xaResource=org.jboss.jca.adapters.jdbc.xa.XAManagedConnection@2a4ee6d pad=false overrideRmValue=false productName=H2 productVersion=1.3.173 (2013-07-28) jndiName=java:jboss/datasources/JTACrashRecQuickstartDS], txid:< formatId=131077, gtrid_length=29, bqual_length=36, tx_uid=0:ffff7f000001:-520944e9:55089cdc:a6, node_name=1, branch_uid=0:ffff7f000001:-520944e9:55089cdc:aa, subordinatenodename=null, eis_name=java:jboss/datasources/JTACrashRecQuickstartDS >, heuristic: TwoPhaseOutcome.FINISH_OK, product: H2/1.3.173 (2013-07-28), jndiName: java:jboss/datasources/JTACrashRecQuickstartDS com.arjuna.ats.internal.jta.resources.arjunacore.XAResourceRecord@c3e0df8 >, record id=0:ffff7f000001:-520944e9:55089cdc:ab
2015-03-17 22:48:00,270 TRACE [com.arjuna.ats.arjuna] (default task-6) BasicAction::doCommit() result for action-id (0:ffff7f000001:-520944e9:55089cdc:a6) on record id: (0:ffff7f000001:-520944e9:55089cdc:ab) is (TwoPhaseOutcome.FINISH_OK) node id: (1)
2015-03-17 22:48:00,271 TRACE [com.arjuna.ats.arjuna] (default task-6) BasicAction::doCommit (XAResourceRecord < resource:XAResourceWrapperImpl@36398b1e[xaResource=org.hornetq.ra.HornetQRAXAResource@403647b1 pad=false overrideRmValue=null productName=HornetQ productVersion=2.0 jndiName=java:/JmsXA], txid:< formatId=131077, gtrid_length=29, bqual_length=36, tx_uid=0:ffff7f000001:-520944e9:55089cdc:a6, node_name=1, branch_uid=0:ffff7f000001:-520944e9:55089cdc:ad, subordinatenodename=null, eis_name=java:/JmsXA >, heuristic: TwoPhaseOutcome.FINISH_OK, product: HornetQ/2.0, jndiName: java:/JmsXA com.arjuna.ats.internal.jta.resources.arjunacore.XAResourceRecord@3e071b0f >)
2015-03-17 22:48:00,271 TRACE [com.arjuna.ats.jta] (default task-6) XAResourceRecord.topLevelCommit for XAResourceRecord < resource:XAResourceWrapperImpl@36398b1e[xaResource=org.hornetq.ra.HornetQRAXAResource@403647b1 pad=false overrideRmValue=null productName=HornetQ productVersion=2.0 jndiName=java:/JmsXA], txid:< formatId=131077, gtrid_length=29, bqual_length=36, tx_uid=0:ffff7f000001:-520944e9:55089cdc:a6, node_name=1, branch_uid=0:ffff7f000001:-520944e9:55089cdc:ad, subordinatenodename=null, eis_name=java:/JmsXA >, heuristic: TwoPhaseOutcome.FINISH_OK, product: HornetQ/2.0, jndiName: java:/JmsXA com.arjuna.ats.internal.jta.resources.arjunacore.XAResourceRecord@3e071b0f >, record id=0:ffff7f000001:-520944e9:55089cdc:ae
2015-03-17 22:48:00,271 TRACE [org.hornetq.ra] (default task-6) commit(< formatId=131077, gtrid_length=29, bqual_length=36, tx_uid=0:ffff7f000001:-520944e9:55089cdc:a6, node_name=1, branch_uid=0:ffff7f000001:-520944e9:55089cdc:ad, subordinatenodename=null, eis_name=java:/JmsXA >, false)