[jboss-cvs] JBossAS SVN: r106488 - in projects/jboss-jca/branches/performance: performance and 16 other directories.
jboss-cvs-commits at lists.jboss.org
jboss-cvs-commits at lists.jboss.org
Wed Jul 7 11:27:07 EDT 2010
Author: jeff.zhang
Date: 2010-07-07 11:27:06 -0400 (Wed, 07 Jul 2010)
New Revision: 106488
Added:
projects/jboss-jca/branches/performance/performance/
projects/jboss-jca/branches/performance/performance/.classpath
projects/jboss-jca/branches/performance/performance/.project
projects/jboss-jca/branches/performance/performance/build.xml
projects/jboss-jca/branches/performance/performance/ivy.settings.xml
projects/jboss-jca/branches/performance/performance/ivy.xml
projects/jboss-jca/branches/performance/performance/src/
projects/jboss-jca/branches/performance/performance/src/main/
projects/jboss-jca/branches/performance/performance/src/main/java/
projects/jboss-jca/branches/performance/performance/src/main/java/org/
projects/jboss-jca/branches/performance/performance/src/main/java/org/jboss/
projects/jboss-jca/branches/performance/performance/src/main/java/org/jboss/jca/
projects/jboss-jca/branches/performance/performance/src/main/java/org/jboss/jca/performance/
projects/jboss-jca/branches/performance/performance/src/main/java/org/jboss/jca/performance/rars/
projects/jboss-jca/branches/performance/performance/src/main/java/org/jboss/jca/performance/rars/workmanager/
projects/jboss-jca/branches/performance/performance/src/main/java/org/jboss/jca/performance/rars/workmanager/PerfConnection.java
projects/jboss-jca/branches/performance/performance/src/main/java/org/jboss/jca/performance/rars/workmanager/PerfConnectionFactory.java
projects/jboss-jca/branches/performance/performance/src/main/java/org/jboss/jca/performance/rars/workmanager/PerfConnectionFactoryImpl.java
projects/jboss-jca/branches/performance/performance/src/main/java/org/jboss/jca/performance/rars/workmanager/PerfConnectionImpl.java
projects/jboss-jca/branches/performance/performance/src/main/java/org/jboss/jca/performance/rars/workmanager/PerfConnectionManager.java
projects/jboss-jca/branches/performance/performance/src/main/java/org/jboss/jca/performance/rars/workmanager/PerfManagedConnection.java
projects/jboss-jca/branches/performance/performance/src/main/java/org/jboss/jca/performance/rars/workmanager/PerfManagedConnectionFactory.java
projects/jboss-jca/branches/performance/performance/src/main/java/org/jboss/jca/performance/rars/workmanager/PerfManagedConnectionMetaData.java
projects/jboss-jca/branches/performance/performance/src/main/java/org/jboss/jca/performance/rars/workmanager/PerfResourceAdapter.java
projects/jboss-jca/branches/performance/performance/src/main/java/org/jboss/jca/performance/rars/workmanager/WorkManagerTest.java
projects/jboss-jca/branches/performance/performance/src/main/java/org/jboss/jca/performance/rars/workmanager/WorkManagerUnit.java
projects/jboss-jca/branches/performance/performance/src/main/resources/
projects/jboss-jca/branches/performance/performance/src/main/resources/rar-manifest.mf
projects/jboss-jca/branches/performance/performance/src/main/resources/workmanager/
projects/jboss-jca/branches/performance/performance/src/main/resources/workmanager/notrans/
projects/jboss-jca/branches/performance/performance/src/main/resources/workmanager/notrans/META-INF/
projects/jboss-jca/branches/performance/performance/src/main/resources/workmanager/notrans/META-INF/ra.xml
projects/jboss-jca/branches/performance/performance/src/main/resources/workmanager/xatrans/
projects/jboss-jca/branches/performance/performance/src/main/resources/workmanager/xatrans/META-INF/
projects/jboss-jca/branches/performance/performance/src/main/resources/workmanager/xatrans/META-INF/ra.xml
projects/jboss-jca/branches/performance/performance/src/test/
projects/jboss-jca/branches/performance/performance/src/test/java/
projects/jboss-jca/branches/performance/performance/src/test/resources/
Log:
[JBJCA-372] performance test, initial work/commit
Added: projects/jboss-jca/branches/performance/performance/.classpath
===================================================================
--- projects/jboss-jca/branches/performance/performance/.classpath (rev 0)
+++ projects/jboss-jca/branches/performance/performance/.classpath 2010-07-07 15:27:06 UTC (rev 106488)
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+ <classpathentry kind="src" path="src/main/java"/>
+ <classpathentry excluding="**/*.java" kind="src" path="src/main/resources"/>
+ <classpathentry kind="src" output="eclipse-target/tests-classes" path="src/test/java"/>
+ <classpathentry excluding="**/*.java" kind="src" output="eclipse-target/tests-classes" path="src/test/resources"/>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
+ <classpathentry combineaccessrules="false" kind="src" path="/jboss-jca-api"/>
+ <classpathentry combineaccessrules="false" kind="src" path="/jboss-jca-common"/>
+ <classpathentry kind="output" path="eclipse-target/classes"/>
+</classpath>
Added: projects/jboss-jca/branches/performance/performance/.project
===================================================================
--- projects/jboss-jca/branches/performance/performance/.project (rev 0)
+++ projects/jboss-jca/branches/performance/performance/.project 2010-07-07 15:27:06 UTC (rev 106488)
@@ -0,0 +1,13 @@
+<projectDescription>
+ <name>jboss-jca-performance</name>
+ <comment>JBoss JCA Performance</comment>
+ <projects/>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.jdt.core.javabuilder</name>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.jdt.core.javanature</nature>
+ </natures>
+</projectDescription>
Added: projects/jboss-jca/branches/performance/performance/build.xml
===================================================================
--- projects/jboss-jca/branches/performance/performance/build.xml (rev 0)
+++ projects/jboss-jca/branches/performance/performance/build.xml 2010-07-07 15:27:06 UTC (rev 106488)
@@ -0,0 +1,270 @@
+<!--
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2008, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+-->
+<project name="jboss-jca-performance"
+ default="compile"
+ basedir="."
+ xmlns:ivy="antlib:org.apache.ivy.ant">
+
+ <available classname="java.lang.Enum" property="HAVE_JDK_1.5"/>
+ <available classname="java.lang.management.LockInfo" property="HAVE_JDK_1.6"/>
+
+ <!-- =================================
+ Ivy
+ ================================= -->
+ <property name="ivy.version" value="2.1.0"/>
+ <property name="ivy.dir" value="${user.home}/.ivy2/cache/org.apache.ivy/jars"/>
+ <property name="ivy.jar.name" value="ivy-${ivy.version}.jar"/>
+
+ <!-- =================================
+ Repositories
+ ================================= -->
+ <property name="central.repo" value="http://repo1.maven.org/maven2"/>
+ <property name="jboss.repo" value="http://repository.jboss.org/nexus/content/groups/public/"/>
+ <property name="snapshots.repo" value="http://repository.jboss.org/nexus/content/repositories/snapshots/"/>
+ <property name="fungal.repo" value="http://jesperpedersen.github.com/fungal/maven2"/>
+
+ <!-- =================================
+ Properties
+ ================================= -->
+ <property name="lib.dir" value="${basedir}/lib" />
+ <property name="build.dir" value="${basedir}/build" />
+ <property name="api.dir" value="${basedir}/api" />
+ <property name="doc.dir" value="${basedir}/doc" />
+ <property name="target.dir" value="${basedir}/target" />
+ <property name="tools.dir" value="${basedir}/tools" />
+ <property name="reports.dir" value="${basedir}/reports" />
+ <property name="test.dir" value="${reports.dir}" />
+
+ <property name="javac.debug" value="on" />
+ <property name="javac.deprecation" value="on" />
+ <property name="javac.optimize" value="off" />
+
+ <property name="junit.printsummary" value="yes" />
+ <property name="junit.haltonerror" value="no" />
+ <property name="junit.haltonfailure" value="no" />
+ <property name="junit.fork" value="yes" />
+ <property name="junit.timeout" value="60000" />
+ <property name="junit.jvm" value="" />
+ <property name="junit.jvm.options" value="-Xms128m -Xmx512m -XX:MaxPermSize=256m" />
+ <property name="junit.batchtest.haltonerror" value="no" />
+ <property name="junit.batchtest.haltonfailure" value="no" />
+ <property name="junit.batchtest.fork" value="yes" />
+
+ <!-- =================================
+ Versions
+ ================================= -->
+
+ <property name="version.apache-log4j" value="1.2.16"/>
+ <property name="version.apache-logging" value="1.1.0.jboss"/>
+ <property name="version.apiviz" value="1.3.1.GA"/>
+ <property name="version.arquillian" value="1.0.0.Alpha2"/>
+
+ <property name="version.jboss.jca.api" value="1.5.0.GA"/>
+ <property name="version.jboss.logging" value="2.2.0.CR1"/>
+ <property name="version.jboss.logging.metadata" value="1.0.0.CR4"/>
+ <property name="version.jboss.logmanager" value="1.1.1.GA"/>
+ <property name="version.jboss.logmanager.log4j" value="1.0.0.CR2"/>
+
+ <property name="version.jboss.shrinkwrap" value="1.0.0-alpha-10"/>
+ <property name="version.jboss.slf4j" value="1.0.2.GA"/>
+ <property name="version.jboss.slf4j.logmanager" value="1.0.0.CR2"/>
+
+ <property name="version.junit" value="4.8.1"/>
+ <property name="version.slf4j" value="1.5.6"/>
+
+ <property name="version.transaction.api" value="1.0.1.GA"/>
+
+ <!-- =================================
+ Paths
+ ================================= -->
+ <path id="standalone.lib.path.id">
+ <fileset dir="${lib.dir}/standalone">
+ <include name="**/*.jar"/>
+ </fileset>
+ <fileset dir="${target.dir}">
+ <include name="**/*.jar"/>
+ </fileset>
+ </path>
+
+ <!-- =================================
+ Bootstrap Ivy
+ ================================= -->
+ <mkdir dir="${ivy.dir}"/>
+ <get usetimestamp="true" src="http://repo1.maven.org/maven2/org/apache/ivy/ivy/${ivy.version}/${ivy.jar.name}"
+ skipexisting="true"
+ dest="${ivy.dir}/${ivy.jar.name}"/>
+ <taskdef resource="org/apache/ivy/ant/antlib.xml" uri="antlib:org.apache.ivy.ant" classpath="${ivy.dir}/${ivy.jar.name}"/>
+
+ <!-- =================================
+ Target: init
+ ================================= -->
+ <target name="init">
+ <fail message="JBoss JCA requires JDK6+" unless="HAVE_JDK_1.6"/>
+
+ <ivy:settings file="${basedir}/ivy.settings.xml"/>
+
+ <mkdir dir="${build.dir}" />
+ <mkdir dir="${target.dir}" />
+ </target>
+
+ <!-- =================================
+ Target: resolve
+ ================================= -->
+ <target name="resolve" depends="init">
+ <ivy:retrieve pattern="${lib.dir}/[conf]/[artifact].[ext]" sync="true"/>
+ </target>
+
+ <!-- =================================
+ Target: report
+ ================================= -->
+ <target name="report" depends="resolve">
+ <ivy:report todir="${target.dir}"/>
+ </target>
+
+ <!-- =================================
+ Properties
+ ================================= -->
+ <property name="build.performance.dir" value="${build.dir}/performance" />
+
+ <!-- =================================
+ Target: compile
+ ================================= -->
+ <target name="compile" depends="resolve">
+ <mkdir dir="${build.performance.dir}" />
+ <mkdir dir="${build.performance.dir}/impl" />
+
+ <javac srcdir="src/main"
+ destdir="${build.performance.dir}/impl"
+ classpathref="standalone.lib.path.id"
+ debug="${javac.debug}"
+ deprecation="${javac.deprecation}"
+ optimize="${javac.optimize}">
+ <compilerarg value="-Xlint"/>
+ </javac>
+ </target>
+
+ <!-- =================================
+ Target: jars
+ ================================= -->
+ <target name="jars" depends="compile">
+ <mkdir dir="${build.performance.dir}/jars" />
+
+ <!-- performance -->
+ <mkdir dir="${build.performance.dir}/jars/performance" />
+
+ <copy todir="${build.performance.dir}/jars/performance">
+ <fileset dir="${build.performance.dir}/impl"
+ includes="**"/>
+ </copy>
+
+ <copy todir="${build.performance.dir}/jars/performance">
+ <fileset dir="src/main/resources/"
+ includes="**/*"/>
+ </copy>
+
+ <jar destfile="${target.dir}/wmnotrans.rar"
+ manifest="src/main/resources/rar-manifest.mf">
+ <fileset dir="${build.performance.dir}/jars/performance"
+ includes="org/jboss/jca/performance/rars/workmanager/*.class"/>
+
+ <fileset dir="${build.performance.dir}/jars/performance/workmanager/notrans"
+ includes="**/**"/>
+
+ </jar>
+
+ <jar destfile="${target.dir}/wmxatrans.rar"
+ manifest="src/main/resources/rar-manifest.mf">
+ <fileset dir="${build.performance.dir}/jars/performance"
+ includes="org/jboss/jca/performance/rars/workmanager/*.class"/>
+
+ <fileset dir="${build.performance.dir}/jars/performance/workmanager/xatrans"
+ includes="**/**"/>
+
+ </jar>
+<!--
+ <jar destfile="${target.dir}/jboss-jca-performance-cli.jar"
+ manifest="src/main/resources/performance-cli-manifest.mf"
+ basedir="${build.performance.dir}/jars/performance"
+ includes="**/Main*.class"/>
+
+ <jar destfile="${target.dir}/jboss-jca-performance-ant.jar"
+ manifest="src/main/resources/performance-ant-manifest.mf"
+ basedir="${build.performance.dir}/jars/performance"
+ includes="**/ant/**"/>
+-->
+ </target>
+
+
+ <!-- =================================
+ Target: docs
+ ================================= -->
+ <target name="docs" depends="compile">
+ <mkdir dir="${target.dir}/docs/performance"/>
+ <javadoc packagenames="org.*"
+ sourcepath="src/main/java"
+ destdir="${target.dir}/docs/performance"
+ doclet="org.jboss.apiviz.APIviz"
+ docletpathref="standalone.lib.path.id"
+ author="true"
+ version="true"
+ windowtitle="JBoss JCA performance"
+ doctitle="JBoss JCA performance"
+ use="true"
+ additionalparam="-author -version"
+ classpath="${build.performance.dir}/impl"
+ classpathref="standalone.lib.path.id"
+ bottom="Copyright © 2008-2009 Red Hat Middleware LLC (http://www.jboss.com/)">
+ <link offline="true" href="http://java.sun.com/j2se/5/docs/api/" packagelistLoc="${java.home}/../docs/api"/>
+ </javadoc>
+ <copy todir="${target.dir}/docs/performance" overwrite="true">
+ <fileset dir="${tools.dir}/api"/>
+ </copy>
+ </target>
+
+
+ <!-- =================================
+ Target: clean
+ ================================= -->
+ <target name="clean">
+ <delete>
+ <fileset dir="${basedir}" defaultexcludes="no">
+ <include name="**/*~"/>
+ <include name="**/*.bak"/>
+ </fileset>
+ </delete>
+ <delete>
+ <fileset dir="${lib.dir}" includes="**/*.jar"/>
+ </delete>
+ <delete dir="${build.dir}"/>
+ <delete dir="${target.dir}"/>
+ <delete dir="${reports.dir}"/>
+ <delete file="${name}-${major}.${minor}.${patch}.${type}.zip" />
+ <delete file="${name}-${major}.${minor}.${patch}.${type}.tar.gz" />
+ </target>
+
+ <!-- =================================
+ Target: clean-cache
+ ================================= -->
+ <target name="clean-cache">
+ <ivy:cleancache />
+ </target>
+</project>
Added: projects/jboss-jca/branches/performance/performance/ivy.settings.xml
===================================================================
--- projects/jboss-jca/branches/performance/performance/ivy.settings.xml (rev 0)
+++ projects/jboss-jca/branches/performance/performance/ivy.settings.xml 2010-07-07 15:27:06 UTC (rev 106488)
@@ -0,0 +1,48 @@
+<!--
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2008, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+-->
+<ivysettings>
+ <settings defaultResolver="default"/>
+ <caches defaultCacheDir="${user.home}/.ivy2/cache"
+ artifactPattern="[organisation]/[module]/[type]s/[artifact]-[revision](-[classifier]).[ext]"
+ checkUpToDate="true"/>
+ <resolvers>
+ <filesystem name="local">
+ <ivy pattern="${ivy.cache.dir}/[module]/ivy-[revision].xml"/>
+ <artifact pattern="${ivy.cache.dir}/[module]/[artifact]-[revision](-[classifier]).[ext]"/>
+ </filesystem>
+ <ibiblio name="jboss" m2compatible="true" usepoms="false" root="${jboss.repo}"
+ pattern="[organisation]/[module]/[revision]/[artifact]-[revision](-[classifier]).[ext]"/>
+ <ibiblio name="snapshots" m2compatible="true" usepoms="false" root="${snapshots.repo}" useMavenMetadata="true"
+ pattern="[organisation]/[module]/[revision]/[artifact]-[revision](-[classifier]).[ext]"/>
+ <ibiblio name="central" m2compatible="true" usepoms="false" root="${central.repo}"
+ pattern="[organisation]/[module]/[revision]/[artifact]-[revision](-[classifier]).[ext]"/>
+ <ibiblio name="fungal" m2compatible="true" usepoms="false" root="${fungal.repo}"
+ pattern="[organisation]/[module]/[revision]/[artifact]-[revision](-[classifier]).[ext]"/>
+ <chain name="default" returnFirst="true">
+ <resolver ref="local"/>
+ <resolver ref="jboss"/>
+ <resolver ref="snapshots"/>
+ <resolver ref="central"/>
+ <resolver ref="fungal"/>
+ </chain>
+ </resolvers>
+</ivysettings>
Added: projects/jboss-jca/branches/performance/performance/ivy.xml
===================================================================
--- projects/jboss-jca/branches/performance/performance/ivy.xml (rev 0)
+++ projects/jboss-jca/branches/performance/performance/ivy.xml 2010-07-07 15:27:06 UTC (rev 106488)
@@ -0,0 +1,70 @@
+<!--
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2008, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+-->
+<ivy-module version="2.0"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:noNamespaceSchemaLocation="http://ant.apache.org/ivy/schemas/ivy.xsd">
+
+ <info organisation="org.jboss"
+ module="jboss-jca">
+ <license name="lgpl" url="http://repository.jboss.org/licenses/lgpl.txt"/>
+ <repository name="jboss" url="http://repository.jboss.org"/>
+ </info>
+
+ <configurations>
+ <conf name="standalone" transitive="false"/>
+ <conf name="test" extends="standalone" transitive="false"/>
+ </configurations>
+
+ <dependencies>
+ <dependency org="junit" name="junit" rev="${version.junit}" conf="test->default"/>
+ <dependency org="log4j" name="log4j" rev="${version.apache-log4j}" conf="standalone->default"/>
+
+ <dependency org="org.jboss.apiviz" name="apiviz" rev="${version.apiviz}" conf="standalone->default"/>
+ <dependency org="org.jboss.arquillian" name="arquillian-api" rev="${version.arquillian}" conf="standalone->default"/>
+ <dependency org="org.jboss.arquillian" name="arquillian-impl-base" rev="${version.arquillian}" conf="standalone->default"/>
+ <dependency org="org.jboss.arquillian" name="arquillian-junit" rev="${version.arquillian}" conf="standalone->default"/>
+ <dependency org="org.jboss.arquillian" name="arquillian-spi" rev="${version.arquillian}" conf="standalone->default"/>
+ <dependency org="org.jboss.arquillian.testenricher" name="arquillian-testenricher-resource" rev="${version.arquillian}" conf="standalone->default"/>
+ <dependency org="org.jboss.arquillian.protocol" name="arquillian-protocol-local" rev="${version.arquillian}" conf="standalone->default"/>
+
+ <dependency org="org.jboss.javaee" name="jboss-jca-api" rev="${version.jboss.jca.api}" conf="standalone->default"/>
+ <dependency org="org.jboss.javaee" name="jboss-transaction-api" rev="${version.transaction.api}" conf="standalone->default"/>
+
+ <dependency org="org.jboss.logging" name="jboss-logging-jdk" rev="${version.jboss.logging}" conf="standalone->default"/>
+ <dependency org="org.jboss.logging" name="jboss-logging-log4j" rev="${version.jboss.logging}" conf="standalone->default"/>
+ <dependency org="org.jboss.logging" name="jboss-logging-logmanager" rev="${version.jboss.logging}" conf="standalone->default"/>
+ <dependency org="org.jboss.logging" name="jboss-logging-spi" rev="${version.jboss.logging}" conf="standalone->default"/>
+ <dependency org="org.jboss.logging" name="logging-service-metadata" rev="${version.jboss.logging.metadata}" conf="standalone->default"/>
+ <dependency org="org.jboss.logmanager" name="jboss-logmanager" rev="${version.jboss.logmanager}" conf="standalone->default"/>
+ <dependency org="org.jboss.logmanager" name="jboss-logmanager-log4j" rev="${version.jboss.logmanager.log4j}" conf="standalone->default"/>
+
+ <dependency org="org.jboss.shrinkwrap" name="shrinkwrap-api" rev="${version.jboss.shrinkwrap}" conf="standalone->default"/>
+ <dependency org="org.jboss.shrinkwrap" name="shrinkwrap-impl-base" rev="${version.jboss.shrinkwrap}" conf="standalone->default"/>
+ <dependency org="org.jboss.shrinkwrap" name="shrinkwrap-spi" rev="${version.jboss.shrinkwrap}" conf="standalone->default"/>
+ <dependency org="org.jboss.slf4j" name="slf4j-jboss-logging" rev="${version.jboss.slf4j}" conf="standalone->default"/>
+ <dependency org="org.jboss.slf4j" name="slf4j-jboss-logmanager" rev="${version.jboss.slf4j.logmanager}" conf="standalone->default"/>
+ <dependency org="org.slf4j" name="jcl-over-slf4j" rev="${version.slf4j}" conf="standalone->default"/>
+ <dependency org="org.slf4j" name="slf4j-api" rev="${version.slf4j}" conf="standalone->default"/>
+
+ </dependencies>
+
+</ivy-module>
Added: projects/jboss-jca/branches/performance/performance/src/main/java/org/jboss/jca/performance/rars/workmanager/PerfConnection.java
===================================================================
--- projects/jboss-jca/branches/performance/performance/src/main/java/org/jboss/jca/performance/rars/workmanager/PerfConnection.java (rev 0)
+++ projects/jboss-jca/branches/performance/performance/src/main/java/org/jboss/jca/performance/rars/workmanager/PerfConnection.java 2010-07-07 15:27:06 UTC (rev 106488)
@@ -0,0 +1,35 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2010, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.jca.performance.rars.workmanager;
+
+/**
+ * PerfConnection
+ *
+ * @version $Revision: $
+ */
+public interface PerfConnection
+{
+ /**
+ * call me
+ */
+ public void callMe();
+}
Added: projects/jboss-jca/branches/performance/performance/src/main/java/org/jboss/jca/performance/rars/workmanager/PerfConnectionFactory.java
===================================================================
--- projects/jboss-jca/branches/performance/performance/src/main/java/org/jboss/jca/performance/rars/workmanager/PerfConnectionFactory.java (rev 0)
+++ projects/jboss-jca/branches/performance/performance/src/main/java/org/jboss/jca/performance/rars/workmanager/PerfConnectionFactory.java 2010-07-07 15:27:06 UTC (rev 106488)
@@ -0,0 +1,44 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2010, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.jca.performance.rars.workmanager;
+
+import java.io.Serializable;
+
+import javax.resource.Referenceable;
+import javax.resource.ResourceException;
+
+/**
+ * PerfConnectionFactory
+ *
+ * @version $Revision: $
+ */
+public interface PerfConnectionFactory extends Serializable, Referenceable
+{
+ /**
+ * get connection from factory
+ *
+ * @return PerfConnection instance
+ * @exception ResourceException Thrown if a connection can't be obtained
+ */
+ public PerfConnection getConnection() throws ResourceException;
+
+}
Added: projects/jboss-jca/branches/performance/performance/src/main/java/org/jboss/jca/performance/rars/workmanager/PerfConnectionFactoryImpl.java
===================================================================
--- projects/jboss-jca/branches/performance/performance/src/main/java/org/jboss/jca/performance/rars/workmanager/PerfConnectionFactoryImpl.java (rev 0)
+++ projects/jboss-jca/branches/performance/performance/src/main/java/org/jboss/jca/performance/rars/workmanager/PerfConnectionFactoryImpl.java 2010-07-07 15:27:06 UTC (rev 106488)
@@ -0,0 +1,95 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2010, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.jca.performance.rars.workmanager;
+
+import java.io.Serializable;
+
+import javax.naming.NamingException;
+import javax.naming.Reference;
+
+import javax.resource.Referenceable;
+import javax.resource.ResourceException;
+import javax.resource.spi.ConnectionManager;
+
+/**
+ * PerfConnectionFactoryImpl
+ *
+ * @version $Revision: $
+ */
+public class PerfConnectionFactoryImpl implements PerfConnectionFactory
+{
+ private Reference reference;
+
+ /**
+ * default constructor
+ */
+ public PerfConnectionFactoryImpl()
+ {
+
+ }
+
+ /**
+ * default constructor
+ * @param cxManager ConnectionManager
+ */
+ public PerfConnectionFactoryImpl(ConnectionManager cxManager)
+ {
+
+ }
+
+ /**
+ * get connection from factory
+ *
+ * @return PerfConnection instance
+ * @exception ResourceException Thrown if a connection can't be obtained
+ */
+ @Override
+ public PerfConnection getConnection() throws ResourceException
+ {
+ return new PerfConnectionImpl();
+ }
+
+ /**
+ * Get the Reference instance.
+ *
+ * @return Reference instance
+ * @exception NamingException Thrown if a reference can't be obtained
+ */
+ @Override
+ public Reference getReference() throws NamingException
+ {
+ return reference;
+ }
+
+ /**
+ * Set the Reference instance.
+ *
+ * @param reference A Reference instance
+ */
+ @Override
+ public void setReference(Reference reference)
+ {
+ this.reference = reference;
+ }
+
+
+}
Added: projects/jboss-jca/branches/performance/performance/src/main/java/org/jboss/jca/performance/rars/workmanager/PerfConnectionImpl.java
===================================================================
--- projects/jboss-jca/branches/performance/performance/src/main/java/org/jboss/jca/performance/rars/workmanager/PerfConnectionImpl.java (rev 0)
+++ projects/jboss-jca/branches/performance/performance/src/main/java/org/jboss/jca/performance/rars/workmanager/PerfConnectionImpl.java 2010-07-07 15:27:06 UTC (rev 106488)
@@ -0,0 +1,52 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2010, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.jca.performance.rars.workmanager;
+
+import org.jboss.logging.Logger;
+
+/**
+ * PerfConnectionImpl
+ *
+ * @version $Revision: $
+ */
+public class PerfConnectionImpl implements PerfConnection
+{
+ /** The logger */
+ private static Logger log = Logger.getLogger(PerfConnectionImpl.class);
+
+ /**
+ * default constructor
+ */
+ public PerfConnectionImpl()
+ {
+
+ }
+
+ /**
+ * call me
+ */
+ public void callMe()
+ {
+ log.debug("call callMe");
+ }
+
+}
Added: projects/jboss-jca/branches/performance/performance/src/main/java/org/jboss/jca/performance/rars/workmanager/PerfConnectionManager.java
===================================================================
--- projects/jboss-jca/branches/performance/performance/src/main/java/org/jboss/jca/performance/rars/workmanager/PerfConnectionManager.java (rev 0)
+++ projects/jboss-jca/branches/performance/performance/src/main/java/org/jboss/jca/performance/rars/workmanager/PerfConnectionManager.java 2010-07-07 15:27:06 UTC (rev 106488)
@@ -0,0 +1,59 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2010, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.jca.performance.rars.workmanager;
+
+import javax.resource.ResourceException;
+import javax.resource.spi.ConnectionManager;
+import javax.resource.spi.ConnectionRequestInfo;
+import javax.resource.spi.ManagedConnectionFactory;
+
+/**
+ * PerfConnectionManager
+ *
+ * @version $Revision: $
+ */
+public class PerfConnectionManager implements ConnectionManager
+{
+ /**
+ * default constructor
+ */
+ public PerfConnectionManager()
+ {
+
+ }
+
+ /**
+ * Allocate a connection
+ *
+ * @param mcf The managed connection factory
+ * @param cri The connection request information
+ * @return Object The connection
+ * @exception ResourceException Thrown if an error occurs
+ */
+ @Override
+ public Object allocateConnection(ManagedConnectionFactory mcf,ConnectionRequestInfo cri) throws ResourceException
+ {
+ return null;
+ }
+
+
+}
Added: projects/jboss-jca/branches/performance/performance/src/main/java/org/jboss/jca/performance/rars/workmanager/PerfManagedConnection.java
===================================================================
--- projects/jboss-jca/branches/performance/performance/src/main/java/org/jboss/jca/performance/rars/workmanager/PerfManagedConnection.java (rev 0)
+++ projects/jboss-jca/branches/performance/performance/src/main/java/org/jboss/jca/performance/rars/workmanager/PerfManagedConnection.java 2010-07-07 15:27:06 UTC (rev 106488)
@@ -0,0 +1,186 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2010, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.jca.performance.rars.workmanager;
+
+import java.io.PrintWriter;
+
+import javax.resource.ResourceException;
+import javax.resource.spi.ConnectionEventListener;
+import javax.resource.spi.ConnectionRequestInfo;
+import javax.resource.spi.LocalTransaction;
+import javax.resource.spi.ManagedConnection;
+import javax.resource.spi.ManagedConnectionMetaData;
+
+import javax.security.auth.Subject;
+import javax.transaction.xa.XAResource;
+
+import org.jboss.logging.Logger;
+
+/**
+ * PerfManagedConnection
+ *
+ * @version $Revision: $
+ */
+public class PerfManagedConnection implements ManagedConnection
+{
+
+ /** The logger */
+ private static Logger log = Logger.getLogger(PerfManagedConnection.class);
+
+ /**
+ * default constructor
+ */
+ public PerfManagedConnection()
+ {
+
+ }
+
+ /**
+ * Creates a new connection handle for the underlying physical connection
+ * represented by the ManagedConnection instance.
+ *
+ * @param subject security context as JAAS subject
+ * @param cxRequestInfo ConnectionRequestInfo instance
+ * @return generic Object instance representing the connection handle.
+ * @throws ResourceException generic exception if operation fails
+ */
+ public Object getConnection(Subject subject,
+ ConnectionRequestInfo cxRequestInfo) throws ResourceException
+ {
+ log.debug("call getConnection");
+ return null;
+ }
+
+ /**
+ * Used by the container to change the association of an
+ * application-level connection handle with a ManagedConneciton instance.
+ *
+ * @param connection Application-level connection handle
+ * @throws ResourceException generic exception if operation fails
+ */
+ public void associateConnection(Object connection) throws ResourceException
+ {
+ log.debug("call associateConnection");
+ }
+
+ /**
+ * Application server calls this method to force any cleanup on the ManagedConnection instance.
+ *
+ * @throws ResourceException generic exception if operation fails
+ */
+ public void cleanup() throws ResourceException
+
+ {
+ log.debug("call cleanup");
+ }
+
+ /**
+ * Destroys the physical connection to the underlying resource manager.
+ *
+ * @throws ResourceException generic exception if operation fails
+ */
+ public void destroy() throws ResourceException
+ {
+ log.debug("call destroy");
+ }
+
+ /**
+ * Adds a connection event listener to the ManagedConnection instance.
+ *
+ * @param listener a new ConnectionEventListener to be registered
+ */
+ public void addConnectionEventListener(ConnectionEventListener listener)
+ {
+ log.debug("call addConnectionEventListener");
+ }
+
+ /**
+ * Removes an already registered connection event listener from the ManagedConnection instance.
+ *
+ * @param listener already registered connection event listener to be removed
+ */
+ public void removeConnectionEventListener(ConnectionEventListener listener)
+ {
+ log.debug("call removeConnectionEventListener");
+ }
+
+ /**
+ * Gets the log writer for this ManagedConnection instance.
+ *
+ * @return Character ourput stream associated with this Managed-Connection instance
+ * @throws ResourceException generic exception if operation fails
+ */
+ public PrintWriter getLogWriter() throws ResourceException
+ {
+ log.debug("call getLogWriter");
+ return null;
+ }
+
+ /**
+ * Sets the log writer for this ManagedConnection instance.
+ *
+ * @param out Character Output stream to be associated
+ * @throws ResourceException generic exception if operation fails
+ */
+ public void setLogWriter(PrintWriter out) throws ResourceException
+ {
+ log.debug("call setLogWriter");
+ }
+
+ /**
+ * Returns an <code>javax.resource.spi.LocalTransaction</code> instance.
+ *
+ * @return LocalTransaction instance
+ * @throws ResourceException generic exception if operation fails
+ */
+ public LocalTransaction getLocalTransaction() throws ResourceException
+ {
+ log.debug("call getLocalTransaction");
+ return null;
+ }
+
+ /**
+ * Returns an <code>javax.transaction.xa.XAresource</code> instance.
+ *
+ * @return XAResource instance
+ * @throws ResourceException generic exception if operation fails
+ */
+ public XAResource getXAResource() throws ResourceException
+ {
+ log.debug("call getXAResource");
+ return null;
+ }
+
+ /**
+ * Gets the metadata information for this connection's underlying EIS resource manager instance.
+ *
+ * @return ManagedConnectionMetaData instance
+ * @throws ResourceException generic exception if operation fails
+ */
+ public ManagedConnectionMetaData getMetaData() throws ResourceException
+ {
+ log.debug("call getMetaData");
+ return new PerfManagedConnectionMetaData();
+ }
+
+
+}
Added: projects/jboss-jca/branches/performance/performance/src/main/java/org/jboss/jca/performance/rars/workmanager/PerfManagedConnectionFactory.java
===================================================================
--- projects/jboss-jca/branches/performance/performance/src/main/java/org/jboss/jca/performance/rars/workmanager/PerfManagedConnectionFactory.java (rev 0)
+++ projects/jboss-jca/branches/performance/performance/src/main/java/org/jboss/jca/performance/rars/workmanager/PerfManagedConnectionFactory.java 2010-07-07 15:27:06 UTC (rev 106488)
@@ -0,0 +1,204 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2010, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.jca.performance.rars.workmanager;
+
+import java.io.PrintWriter;
+import java.util.Set;
+
+import javax.resource.ResourceException;
+import javax.resource.spi.ConnectionManager;
+import javax.resource.spi.ConnectionRequestInfo;
+import javax.resource.spi.ManagedConnection;
+import javax.resource.spi.ManagedConnectionFactory;
+import javax.resource.spi.ResourceAdapter;
+import javax.resource.spi.ResourceAdapterAssociation;
+
+import javax.security.auth.Subject;
+
+import org.jboss.logging.Logger;
+
+/**
+ * PerfManagedConnectionFactory
+ *
+ * @version $Revision: $
+ */
+public class PerfManagedConnectionFactory implements ManagedConnectionFactory, ResourceAdapterAssociation
+{
+
+ /** The logger */
+ private static Logger log = Logger.getLogger(PerfManagedConnectionFactory.class);
+
+ /** The resource adapter */
+ private ResourceAdapter ra;
+
+ /** The logwriter */
+ private PrintWriter logwriter;
+
+ /**
+ * default constructor
+ */
+ public PerfManagedConnectionFactory()
+ {
+
+ }
+
+ /**
+ * Creates a Connection Factory instance.
+ *
+ * @param cxManager ConnectionManager to be associated with created EIS connection factory instance
+ * @return EIS-specific Connection Factory instance or javax.resource.cci.ConnectionFactory instance
+ * @throws ResourceException Generic exception
+ */
+ public Object createConnectionFactory(ConnectionManager cxManager) throws ResourceException
+ {
+ if (ra == null)
+ throw new IllegalStateException("RA is null");
+ log.debug("call createConnectionFactory");
+ return new PerfConnectionFactoryImpl(cxManager);
+ }
+
+ /**
+ * Creates a Connection Factory instance.
+ *
+ * @return EIS-specific Connection Factory instance or javax.resource.cci.ConnectionFactory instance
+ * @throws ResourceException Generic exception
+ */
+ public Object createConnectionFactory() throws ResourceException
+ {
+ if (ra == null)
+ throw new IllegalStateException("RA is null");
+ return new PerfConnectionFactoryImpl(new PerfConnectionManager());
+ }
+
+ /**
+ * Creates a new physical connection to the underlying EIS resource manager.
+ *
+ * @param subject Caller's security information
+ * @param cxRequestInfo Additional resource adapter specific connection request information
+ * @throws ResourceException generic exception
+ * @return ManagedConnection instance
+ */
+ public ManagedConnection createManagedConnection(Subject subject,
+ ConnectionRequestInfo cxRequestInfo) throws ResourceException
+ {
+ if (ra == null)
+ throw new IllegalStateException("RA is null");
+ log.debug("call createManagedConnection");
+ return null;
+ }
+
+ /**
+ * Returns a matched connection from the candidate set of connections.
+ *
+ * @param connectionSet candidate connection set
+ * @param subject Caller's security information
+ * @param cxRequestInfo Additional resource adapter specific connection request information
+ * @throws ResourceException generic exception
+ * @return ManagedConnection if resource adapter finds an acceptable match otherwise null
+ */
+ public ManagedConnection matchManagedConnections(Set connectionSet,
+ Subject subject, ConnectionRequestInfo cxRequestInfo) throws ResourceException
+ {
+ if (ra == null)
+ throw new IllegalStateException("RA is null");
+ log.debug("call matchManagedConnections");
+ return null;
+ }
+
+ /**
+ * Get the log writer for this ManagedConnectionFactory instance.
+ *
+ * @return PrintWriter
+ * @throws ResourceException generic exception
+ */
+ public PrintWriter getLogWriter() throws ResourceException
+ {
+ log.debug("call getLogWriter");
+ return logwriter;
+ }
+
+ /**
+ * Set the log writer for this ManagedConnectionFactory instance.
+ *
+ * @param out PrintWriter - an out stream for error logging and tracing
+ * @throws ResourceException generic exception
+ */
+ public void setLogWriter(PrintWriter out) throws ResourceException
+ {
+ log.debug("call setLogWriter");
+ logwriter = out;
+ }
+
+ /**
+ * Get the resource adapter
+ *
+ * @return The handle
+ */
+ public ResourceAdapter getResourceAdapter()
+ {
+ log.debug("call getResourceAdapter");
+ return ra;
+ }
+
+ /**
+ * Set the resource adapter
+ *
+ * @param ra The handle
+ */
+ public void setResourceAdapter(ResourceAdapter ra)
+ {
+ log.debug("call setResourceAdapter");
+ this.ra = ra;
+ }
+
+ /**
+ * Returns a hash code value for the object.
+ * @return a hash code value for this object.
+ */
+ @Override
+ public int hashCode()
+ {
+ int result = 17;
+ return result;
+ }
+
+ /**
+ * Indicates whether some other object is equal to this one.
+ * @param other the reference object with which to compare.
+ * @return true if this object is the same as the obj argument; false otherwise.
+ */
+ @Override
+ public boolean equals(Object other)
+ {
+ if (other == null)
+ return false;
+ if (other == this)
+ return true;
+ if (!(other instanceof PerfManagedConnectionFactory))
+ return false;
+ PerfManagedConnectionFactory obj = (PerfManagedConnectionFactory)other;
+ boolean result = true;
+ return result;
+ }
+
+
+}
Added: projects/jboss-jca/branches/performance/performance/src/main/java/org/jboss/jca/performance/rars/workmanager/PerfManagedConnectionMetaData.java
===================================================================
--- projects/jboss-jca/branches/performance/performance/src/main/java/org/jboss/jca/performance/rars/workmanager/PerfManagedConnectionMetaData.java (rev 0)
+++ projects/jboss-jca/branches/performance/performance/src/main/java/org/jboss/jca/performance/rars/workmanager/PerfManagedConnectionMetaData.java 2010-07-07 15:27:06 UTC (rev 106488)
@@ -0,0 +1,92 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2010, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.jca.performance.rars.workmanager;
+
+import javax.resource.ResourceException;
+
+import javax.resource.spi.ManagedConnectionMetaData;
+
+/**
+ * PerfManagedConnectionMetaData
+ *
+ * @version $Revision: $
+ */
+public class PerfManagedConnectionMetaData implements ManagedConnectionMetaData
+{
+ /**
+ * default constructor
+ */
+ public PerfManagedConnectionMetaData()
+ {
+
+ }
+
+ /**
+ * Returns Product name of the underlying EIS instance connected through the ManagedConnection.
+ *
+ * @return Product name of the EIS instance
+ * @throws ResourceException Thrown if an error occurs
+ */
+ @Override
+ public String getEISProductName() throws ResourceException
+ {
+ return null; //TODO
+ }
+
+ /**
+ * Returns Product version of the underlying EIS instance connected through the ManagedConnection.
+ *
+ * @return Product version of the EIS instance
+ * @throws ResourceException Thrown if an error occurs
+ */
+ @Override
+ public String getEISProductVersion() throws ResourceException
+ {
+ return null; //TODO
+ }
+
+ /**
+ * Returns maximum limit on number of active concurrent connections
+ *
+ * @return Maximum limit for number of active concurrent connections
+ * @throws ResourceException Thrown if an error occurs
+ */
+ @Override
+ public int getMaxConnections() throws ResourceException
+ {
+ return 0; //TODO
+ }
+
+ /**
+ * Returns name of the user associated with the ManagedConnection instance
+ *
+ * @return name of the user
+ * @throws ResourceException Thrown if an error occurs
+ */
+ @Override
+ public String getUserName() throws ResourceException
+ {
+ return null; //TODO
+ }
+
+
+}
Added: projects/jboss-jca/branches/performance/performance/src/main/java/org/jboss/jca/performance/rars/workmanager/PerfResourceAdapter.java
===================================================================
--- projects/jboss-jca/branches/performance/performance/src/main/java/org/jboss/jca/performance/rars/workmanager/PerfResourceAdapter.java (rev 0)
+++ projects/jboss-jca/branches/performance/performance/src/main/java/org/jboss/jca/performance/rars/workmanager/PerfResourceAdapter.java 2010-07-07 15:27:06 UTC (rev 106488)
@@ -0,0 +1,259 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2010, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.jca.performance.rars.workmanager;
+
+import javax.resource.ResourceException;
+import javax.resource.spi.ActivationSpec;
+import javax.resource.spi.BootstrapContext;
+import javax.resource.spi.ResourceAdapter;
+import javax.resource.spi.ResourceAdapterInternalException;
+import javax.resource.spi.endpoint.MessageEndpointFactory;
+import javax.resource.spi.work.WorkManager;
+
+import javax.transaction.xa.XAResource;
+
+import org.jboss.logging.Logger;
+
+/**
+ * PerfResourceAdapter
+ *
+ * @version $Revision: $
+ */
+public class PerfResourceAdapter implements ResourceAdapter
+{
+
+ /** The logger */
+ private static Logger log = Logger.getLogger(PerfResourceAdapter.class);
+
+ /**
+ * default constructor
+ */
+ public PerfResourceAdapter()
+ {
+
+ }
+
+ /** count */
+ private Integer count;
+
+ /** sleepTime */
+ private Long sleepTime;
+
+ /** testCase */
+ private String testCase;
+
+ /**
+ * set count
+ * @param count The value
+ */
+ public void setCount(Integer count)
+ {
+ this.count = count;
+ }
+
+ /**
+ * get count
+ * @return The value
+ */
+ public Integer getCount()
+ {
+ return count;
+ }
+
+ /**
+ * set sleepTime
+ * @param sleepTime The value
+ */
+ public void setSleepTime(Long sleepTime)
+ {
+ this.sleepTime = sleepTime;
+ }
+
+ /**
+ * get sleepTime
+ * @return The value
+ */
+ public Long getSleepTime()
+ {
+ return sleepTime;
+ }
+
+ /**
+ * set testCase
+ * @param testCase The value
+ */
+ public void setTestCase(String testCase)
+ {
+ this.testCase = testCase;
+ }
+
+ /**
+ * get testCase
+ * @return The value
+ */
+ public String getTestCase()
+ {
+ return testCase;
+ }
+
+ /**
+ * This is called during the activation of a message endpoint.
+ *
+ * @param endpointFactory a message endpoint factory instance.
+ * @param spec an activation spec JavaBean instance.
+ * @throws ResourceException generic exception
+ */
+ public void endpointActivation(MessageEndpointFactory endpointFactory,
+ ActivationSpec spec) throws ResourceException
+ {
+ log.debug("call endpointActivation");
+ }
+
+ /**
+ * This is called when a message endpoint is deactivated.
+ *
+ * @param endpointFactory a message endpoint factory instance.
+ * @param spec an activation spec JavaBean instance.
+ */
+ public void endpointDeactivation(MessageEndpointFactory endpointFactory,
+ ActivationSpec spec)
+ {
+ log.debug("call endpointDeactivation");
+ }
+
+ /**
+ * This is called when a resource adapter instance is bootstrapped.
+ *
+ * @param ctx a bootstrap context containing references
+ * @throws ResourceAdapterInternalException indicates bootstrap failure.
+ */
+ public void start(BootstrapContext ctx)
+ throws ResourceAdapterInternalException
+ {
+ log.debug("call start");
+
+ WorkManager workManager = ctx.getWorkManager();
+
+ long l1 = System.nanoTime();
+ try
+ {
+ workManager.doWork(new WorkManagerTest(workManager,
+ count.intValue(), sleepTime.longValue(), testCase));
+ }
+ catch (Exception e)
+ {
+ e.printStackTrace();
+ }
+ long l2 = System.nanoTime();
+ long time = (l2 - l1) / 1000000;
+
+ System.out.println("Stat: running " + count + " time " + time + " ms");
+ }
+
+ /**
+ * This is called when a resource adapter instance is undeployed or
+ * during application server shutdown.
+ */
+ public void stop()
+ {
+ log.debug("call stop");
+ }
+
+ /**
+ * This method is called by the application server during crash recovery.
+ *
+ * @param specs an array of ActivationSpec JavaBeans
+ * @throws ResourceException generic exception
+ * @return an array of XAResource objects
+ */
+ public XAResource[] getXAResources(ActivationSpec[] specs)
+ throws ResourceException
+ {
+ log.debug("call getXAResources");
+ return null;
+ }
+
+ /**
+ * Returns a hash code value for the object.
+ * @return a hash code value for this object.
+ */
+ @Override
+ public int hashCode()
+ {
+ int result = 17;
+ if (count != null)
+ result += 31 * result + 7 * count.hashCode();
+ else
+ result += 31 * result + 7;
+ if (sleepTime != null)
+ result += 31 * result + 7 * sleepTime.hashCode();
+ else
+ result += 31 * result + 7;
+ if (testCase != null)
+ result += 31 * result + 7 * testCase.hashCode();
+ else
+ result += 31 * result + 7;
+ return result;
+ }
+
+ /**
+ * Indicates whether some other object is equal to this one.
+ * @param other the reference object with which to compare.
+ * @return true if this object is the same as the obj argument; false otherwise.
+ */
+ @Override
+ public boolean equals(Object other)
+ {
+ if (other == null)
+ return false;
+ if (other == this)
+ return true;
+ if (!(other instanceof PerfResourceAdapter))
+ return false;
+ PerfResourceAdapter obj = (PerfResourceAdapter)other;
+ boolean result = true;
+ if (result)
+ {
+ if (count == null)
+ result = obj.getCount() == null;
+ else
+ result = count.equals(obj.getCount());
+ }
+ if (result)
+ {
+ if (sleepTime == null)
+ result = obj.getSleepTime() == null;
+ else
+ result = sleepTime.equals(obj.getSleepTime());
+ }
+ if (result)
+ {
+ if (testCase == null)
+ result = obj.getTestCase() == null;
+ else
+ result = testCase.equals(obj.getTestCase());
+ }
+ return result;
+ }
+
+
+}
Added: projects/jboss-jca/branches/performance/performance/src/main/java/org/jboss/jca/performance/rars/workmanager/WorkManagerTest.java
===================================================================
--- projects/jboss-jca/branches/performance/performance/src/main/java/org/jboss/jca/performance/rars/workmanager/WorkManagerTest.java (rev 0)
+++ projects/jboss-jca/branches/performance/performance/src/main/java/org/jboss/jca/performance/rars/workmanager/WorkManagerTest.java 2010-07-07 15:27:06 UTC (rev 106488)
@@ -0,0 +1,103 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2010, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.jca.performance.rars.workmanager;
+
+import java.util.concurrent.CountDownLatch;
+
+import javax.resource.spi.work.Work;
+import javax.resource.spi.work.WorkManager;
+
+/**
+ * A WorkManagerTest.
+ *
+ * @author Jeff Zhang
+ * @version $Revision: $
+ */
+public class WorkManagerTest implements Work
+{
+ /** workManager */
+ private WorkManager workManager;
+ /** numberOfJobs */
+ private int numberOfJobs;
+ /** sleepTime */
+ private long sleepTime;
+ /** workUnit class name */
+ private String workUnit;
+
+ /**
+ * constructor
+ * @param workManager workManager
+ * @param numberOfJobs number of jobs
+ * @param sleepTime sleep time
+ * @param workUnit workUnit class name
+ */
+ public WorkManagerTest(WorkManager workManager,
+ int numberOfJobs, long sleepTime, String workUnit)
+ {
+ this.workManager = workManager;
+ this.numberOfJobs = numberOfJobs;
+ this.sleepTime = sleepTime;
+ this.workUnit = workUnit;
+ }
+
+ /**
+ * The <code>WorkManager</code> might call this method to hint the
+ * active <code>Work</code> instance to complete execution as soon as
+ * possible. This would be called on a seperate thread other than the
+ * one currently executing the <code>Work</code> instance.
+ */
+ @Override
+ public void release()
+ {
+
+ }
+
+ /**
+ * When an object implementing interface <code>Runnable</code> is used
+ * to create a thread, starting the thread causes the object's
+ * <code>run</code> method to be called in that separately executing
+ * thread.
+ */
+ @Override
+ public void run()
+ {
+ if (workUnit == null || workUnit.equals(""))
+ return;
+ try
+ {
+ CountDownLatch cdl = new CountDownLatch(numberOfJobs);
+
+ for (int i = 0; i < numberOfJobs; i++)
+ {
+ Class<?> workUnitClazz = Class.forName(workUnit);
+ Object obj = workUnitClazz.getDeclaredConstructor(CountDownLatch.class, long.class)
+ .newInstance(cdl, sleepTime);
+ workManager.startWork((Work)obj);
+ }
+ cdl.await();
+ }
+ catch (Exception e)
+ {
+ e.printStackTrace();
+ }
+ }
+}
Added: projects/jboss-jca/branches/performance/performance/src/main/java/org/jboss/jca/performance/rars/workmanager/WorkManagerUnit.java
===================================================================
--- projects/jboss-jca/branches/performance/performance/src/main/java/org/jboss/jca/performance/rars/workmanager/WorkManagerUnit.java (rev 0)
+++ projects/jboss-jca/branches/performance/performance/src/main/java/org/jboss/jca/performance/rars/workmanager/WorkManagerUnit.java 2010-07-07 15:27:06 UTC (rev 106488)
@@ -0,0 +1,86 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2010, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.jca.performance.rars.workmanager;
+
+import java.util.concurrent.CountDownLatch;
+
+import javax.resource.spi.work.Work;
+
+/**
+ * A WorkManagerUnit.
+ *
+ * @author Jeff Zhang
+ * @version $Revision: $
+ */
+public class WorkManagerUnit implements Work
+{
+ /** CountDownLatch reference */
+ private CountDownLatch cdl;
+ /** sleepTime */
+ private long sleepTime;
+
+ /**
+ * constructor
+ * @param cdl CountDownLatch reference
+ * @param sleepTime sleep time
+ */
+ public WorkManagerUnit(CountDownLatch cdl, long sleepTime)
+ {
+ this.cdl = cdl;
+ this.sleepTime = sleepTime;
+ }
+
+ /**
+ * The <code>WorkManager</code> might call this method to hint the
+ * active <code>Work</code> instance to complete execution as soon as
+ * possible. This would be called on a seperate thread other than the
+ * one currently executing the <code>Work</code> instance.
+ */
+ @Override
+ public void release()
+ {
+ }
+
+ /**
+ * When an object implementing interface <code>Runnable</code> is used
+ * to create a thread, starting the thread causes the object's
+ * <code>run</code> method to be called in that separately executing
+ * thread.
+ */
+ @Override
+ public void run()
+ {
+ if (sleepTime > 0)
+ {
+ try
+ {
+ Thread.sleep(sleepTime);
+ }
+ catch (InterruptedException e)
+ {
+ e.printStackTrace();
+ }
+ }
+ cdl.countDown();
+ }
+
+}
Added: projects/jboss-jca/branches/performance/performance/src/main/resources/rar-manifest.mf
===================================================================
--- projects/jboss-jca/branches/performance/performance/src/main/resources/rar-manifest.mf (rev 0)
+++ projects/jboss-jca/branches/performance/performance/src/main/resources/rar-manifest.mf 2010-07-07 15:27:06 UTC (rev 106488)
@@ -0,0 +1,4 @@
+Implementation-Title: JBoss JCA Deployers RAR
+Implementation-Vendor: Red Hat Middleware LLC
+Implementation-Vendor-Id: org.jboss
+Implementation-Version: 0.1
Added: projects/jboss-jca/branches/performance/performance/src/main/resources/workmanager/notrans/META-INF/ra.xml
===================================================================
--- projects/jboss-jca/branches/performance/performance/src/main/resources/workmanager/notrans/META-INF/ra.xml (rev 0)
+++ projects/jboss-jca/branches/performance/performance/src/main/resources/workmanager/notrans/META-INF/ra.xml 2010-07-07 15:27:06 UTC (rev 106488)
@@ -0,0 +1,44 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<connector xmlns="http://java.sun.com/xml/ns/j2ee"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee
+ http://java.sun.com/xml/ns/j2ee/connector_1_5.xsd"
+ version="1.5">
+
+ <vendor-name>Red Hat Middleware LLC</vendor-name>
+ <eis-type>Test RA</eis-type>
+ <resourceadapter-version>0.1</resourceadapter-version>
+ <resourceadapter>
+ <resourceadapter-class>org.jboss.jca.performance.rars.workmanager.PerfResourceAdapter</resourceadapter-class>
+ <config-property>
+ <config-property-name>count</config-property-name>
+ <config-property-type>java.lang.Integer</config-property-type>
+ <config-property-value>1000</config-property-value>
+ </config-property>
+
+ <config-property>
+ <config-property-name>sleepTime</config-property-name>
+ <config-property-type>java.lang.Long</config-property-type>
+ <config-property-value>0</config-property-value>
+ </config-property>
+
+ <config-property>
+ <config-property-name>testCase</config-property-name>
+ <config-property-type>java.lang.String</config-property-type>
+ <config-property-value>org.jboss.jca.performance.rars.workmanager.WorkManagerUnit</config-property-value>
+ </config-property>
+
+ <outbound-resourceadapter>
+ <connection-definition>
+ <managedconnectionfactory-class>org.jboss.jca.performance.rars.workmanager.PerfManagedConnectionFactory</managedconnectionfactory-class>
+ <connectionfactory-interface>org.jboss.jca.performance.rars.workmanager.PerfConnectionFactory</connectionfactory-interface>
+ <connectionfactory-impl-class>org.jboss.jca.performance.rars.workmanager.PerfConnectionFactoryImpl</connectionfactory-impl-class>
+ <connection-interface>org.jboss.jca.performance.rars.workmanager.PerfConnection</connection-interface>
+ <connection-impl-class>org.jboss.jca.performance.rars.workmanager.PerfConnectionImpl</connection-impl-class>
+ </connection-definition>
+ <transaction-support>NoTransaction</transaction-support>
+ <reauthentication-support>false</reauthentication-support>
+ </outbound-resourceadapter>
+ </resourceadapter>
+</connector>
Added: projects/jboss-jca/branches/performance/performance/src/main/resources/workmanager/xatrans/META-INF/ra.xml
===================================================================
--- projects/jboss-jca/branches/performance/performance/src/main/resources/workmanager/xatrans/META-INF/ra.xml (rev 0)
+++ projects/jboss-jca/branches/performance/performance/src/main/resources/workmanager/xatrans/META-INF/ra.xml 2010-07-07 15:27:06 UTC (rev 106488)
@@ -0,0 +1,44 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<connector xmlns="http://java.sun.com/xml/ns/j2ee"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee
+ http://java.sun.com/xml/ns/j2ee/connector_1_5.xsd"
+ version="1.5">
+
+ <vendor-name>Red Hat Middleware LLC</vendor-name>
+ <eis-type>Test RA</eis-type>
+ <resourceadapter-version>0.1</resourceadapter-version>
+ <resourceadapter>
+ <resourceadapter-class>org.jboss.jca.performance.rars.workmanager.PerfResourceAdapter</resourceadapter-class>
+ <config-property>
+ <config-property-name>count</config-property-name>
+ <config-property-type>java.lang.Integer</config-property-type>
+ <config-property-value>1000</config-property-value>
+ </config-property>
+
+ <config-property>
+ <config-property-name>sleepTime</config-property-name>
+ <config-property-type>java.lang.Long</config-property-type>
+ <config-property-value>0</config-property-value>
+ </config-property>
+
+ <config-property>
+ <config-property-name>testCase</config-property-name>
+ <config-property-type>java.lang.String</config-property-type>
+ <config-property-value>org.jboss.jca.performance.rars.workmanager.WorkManagerUnit</config-property-value>
+ </config-property>
+
+ <outbound-resourceadapter>
+ <connection-definition>
+ <managedconnectionfactory-class>org.jboss.jca.performance.rars.workmanager.PerfManagedConnectionFactory</managedconnectionfactory-class>
+ <connectionfactory-interface>org.jboss.jca.performance.rars.workmanager.PerfConnectionFactory</connectionfactory-interface>
+ <connectionfactory-impl-class>org.jboss.jca.performance.rars.workmanager.PerfConnectionFactoryImpl</connectionfactory-impl-class>
+ <connection-interface>org.jboss.jca.performance.rars.workmanager.PerfConnection</connection-interface>
+ <connection-impl-class>org.jboss.jca.performance.rars.workmanager.PerfConnectionImpl</connection-impl-class>
+ </connection-definition>
+ <transaction-support>XATransaction</transaction-support>
+ <reauthentication-support>false</reauthentication-support>
+ </outbound-resourceadapter>
+ </resourceadapter>
+</connector>
More information about the jboss-cvs-commits
mailing list