[jboss-cvs] JBossAS SVN: r112319 - in projects/jboss-jca/trunk: doc/samples and 23 other directories.

jboss-cvs-commits at lists.jboss.org jboss-cvs-commits at lists.jboss.org
Wed Oct 12 14:11:27 EDT 2011


Author: jesper.pedersen
Date: 2011-10-12 14:11:27 -0400 (Wed, 12 Oct 2011)
New Revision: 112319

Added:
   projects/jboss-jca/trunk/doc/samples/helloworld-native/
   projects/jboss-jca/trunk/doc/samples/helloworld-native/CMakeLists.txt
   projects/jboss-jca/trunk/doc/samples/helloworld-native/README.txt
   projects/jboss-jca/trunk/doc/samples/helloworld-native/build.xml
   projects/jboss-jca/trunk/doc/samples/helloworld-native/helloworld.c
   projects/jboss-jca/trunk/doc/samples/helloworld-native/lib/
   projects/jboss-jca/trunk/doc/samples/helloworld-native/src/
   projects/jboss-jca/trunk/doc/samples/helloworld-native/src/main/
   projects/jboss-jca/trunk/doc/samples/helloworld-native/src/main/java/
   projects/jboss-jca/trunk/doc/samples/helloworld-native/src/main/java/org/
   projects/jboss-jca/trunk/doc/samples/helloworld-native/src/main/java/org/jboss/
   projects/jboss-jca/trunk/doc/samples/helloworld-native/src/main/java/org/jboss/jca/
   projects/jboss-jca/trunk/doc/samples/helloworld-native/src/main/java/org/jboss/jca/samples/
   projects/jboss-jca/trunk/doc/samples/helloworld-native/src/main/java/org/jboss/jca/samples/helloworld/
   projects/jboss-jca/trunk/doc/samples/helloworld-native/src/main/java/org/jboss/jca/samples/helloworld/HelloWorldConnection.java
   projects/jboss-jca/trunk/doc/samples/helloworld-native/src/main/java/org/jboss/jca/samples/helloworld/HelloWorldConnectionFactory.java
   projects/jboss-jca/trunk/doc/samples/helloworld-native/src/main/java/org/jboss/jca/samples/helloworld/HelloWorldConnectionFactoryImpl.java
   projects/jboss-jca/trunk/doc/samples/helloworld-native/src/main/java/org/jboss/jca/samples/helloworld/HelloWorldConnectionImpl.java
   projects/jboss-jca/trunk/doc/samples/helloworld-native/src/main/java/org/jboss/jca/samples/helloworld/HelloWorldManagedConnection.java
   projects/jboss-jca/trunk/doc/samples/helloworld-native/src/main/java/org/jboss/jca/samples/helloworld/HelloWorldManagedConnectionFactory.java
   projects/jboss-jca/trunk/doc/samples/helloworld-native/src/main/java/org/jboss/jca/samples/helloworld/HelloWorldManagedConnectionMetaData.java
   projects/jboss-jca/trunk/doc/samples/helloworld-native/src/main/java/org/jboss/jca/samples/helloworld/HelloWorldResourceAdapter.java
   projects/jboss-jca/trunk/doc/samples/helloworld-native/src/main/java/org/jboss/jca/samples/helloworld/package.html
   projects/jboss-jca/trunk/doc/samples/helloworld-native/src/main/resources/
   projects/jboss-jca/trunk/doc/samples/helloworld-native/src/main/resources/META-INF/
   projects/jboss-jca/trunk/doc/samples/helloworld-native/src/main/resources/META-INF/ironjacamar.xml
   projects/jboss-jca/trunk/doc/samples/helloworld-native/src/test/
   projects/jboss-jca/trunk/doc/samples/helloworld-native/src/test/java/
   projects/jboss-jca/trunk/doc/samples/helloworld-native/src/test/java/org/
   projects/jboss-jca/trunk/doc/samples/helloworld-native/src/test/java/org/jboss/
   projects/jboss-jca/trunk/doc/samples/helloworld-native/src/test/java/org/jboss/jca/
   projects/jboss-jca/trunk/doc/samples/helloworld-native/src/test/java/org/jboss/jca/samples/
   projects/jboss-jca/trunk/doc/samples/helloworld-native/src/test/java/org/jboss/jca/samples/helloworld/
   projects/jboss-jca/trunk/doc/samples/helloworld-native/src/test/java/org/jboss/jca/samples/helloworld/ConnectorTestCase.java
   projects/jboss-jca/trunk/doc/samples/helloworld-native/src/test/java/org/jboss/jca/samples/helloworld/package.html
   projects/jboss-jca/trunk/doc/samples/helloworld-native/src/test/resources/
   projects/jboss-jca/trunk/doc/samples/helloworld-native/src/test/resources/jndi.properties
   projects/jboss-jca/trunk/doc/samples/helloworld-native/src/test/resources/logging.properties
Modified:
   projects/jboss-jca/trunk/deployers/src/main/java/org/jboss/jca/deployers/common/AbstractResourceAdapterDeployer.java
   projects/jboss-jca/trunk/doc/samples/helloworld/build.xml
   projects/jboss-jca/trunk/doc/samples/helloworld/src/test/java/org/jboss/jca/samples/helloworld/ConnectorTestCase.java
   projects/jboss-jca/trunk/doc/samples/helloworld/src/test/resources/logging.properties
   projects/jboss-jca/trunk/doc/userguide/en-US/modules/sample.xml
Log:
[JBJCA-681] Resource adapters with native libraries fails

Modified: projects/jboss-jca/trunk/deployers/src/main/java/org/jboss/jca/deployers/common/AbstractResourceAdapterDeployer.java
===================================================================
--- projects/jboss-jca/trunk/deployers/src/main/java/org/jboss/jca/deployers/common/AbstractResourceAdapterDeployer.java	2011-10-12 13:14:15 UTC (rev 112318)
+++ projects/jboss-jca/trunk/deployers/src/main/java/org/jboss/jca/deployers/common/AbstractResourceAdapterDeployer.java	2011-10-12 18:11:27 UTC (rev 112319)
@@ -85,11 +85,15 @@
 import java.util.ArrayList;
 import java.util.Arrays;
 import java.util.Collection;
+import java.util.Enumeration;
 import java.util.HashSet;
 import java.util.Iterator;
 import java.util.List;
+import java.util.Locale;
 import java.util.Map;
 import java.util.Set;
+import java.util.jar.JarEntry;
+import java.util.jar.JarFile;
 
 import javax.resource.Referenceable;
 import javax.resource.ResourceException;
@@ -908,6 +912,89 @@
    }
 
    /**
+    * Load native libraries
+    * @param root The deployment root
+    */
+   private void loadNativeLibraries(File root)
+   {
+      if (root != null && root.exists())
+      {
+         List<String> libs = null;
+
+         if (root.isDirectory())
+         {
+            for (File f : root.listFiles())
+            {
+               String fileName = f.getName().toLowerCase(Locale.US);
+               if (fileName.endsWith(".a") || fileName.endsWith(".so") || fileName.endsWith(".dll"))
+               {
+                  if (libs == null)
+                     libs = new ArrayList<String>();
+
+                  libs.add(f.getAbsolutePath());
+               }
+            }
+         }
+         else
+         {
+            JarFile jarFile = null;
+            try
+            {
+               jarFile = new JarFile(root);
+               Enumeration<JarEntry> entries = jarFile.entries();
+
+               while (entries.hasMoreElements())
+               {
+                  JarEntry jarEntry = entries.nextElement();
+                  String entryName = jarEntry.getName().toLowerCase(Locale.US);
+                  if (entryName.endsWith(".a") || entryName.endsWith(".so") || entryName.endsWith(".dll"))
+                  {
+                     if (libs == null)
+                        libs = new ArrayList<String>();
+
+                     libs.add(jarEntry.getName());
+                  }
+               }
+            }
+            catch (Throwable t)
+            {
+               log.debugf("Unable to load native libraries from: %s", root.getAbsolutePath());
+            }
+            finally
+            {
+               if (jarFile != null)
+               {
+                  try
+                  {
+                     jarFile.close();
+                  }
+                  catch (IOException ioe)
+                  {
+                     // Ignore
+                  }
+               }
+            }
+         }
+
+         if (libs != null)
+         {
+            for (String lib : libs)
+            {
+               try
+               {
+                  System.load(lib);
+                  log.debugf("Loaded library: %s", lib);
+               }
+               catch (Throwable t)
+               {
+                  log.debugf("Unable to load library: %s", lib);
+               }
+            }
+         }
+      }
+   }
+
+   /**
    *
    * create objects and inject value for this depployment. it is a general method returning a {@link CommonDeployment}
    * to be used to exchange objects needed to real injection in the container
@@ -995,6 +1082,10 @@
             log.tracef("ActivateDeployment=%s", activateDeployment);
          }
 
+         // Load native libraries
+         if (activateDeployment)
+            loadNativeLibraries(root);
+
          // Create objects and inject values
          if (cmd != null)
          {

Modified: projects/jboss-jca/trunk/doc/samples/helloworld/build.xml
===================================================================
--- projects/jboss-jca/trunk/doc/samples/helloworld/build.xml	2011-10-12 13:14:15 UTC (rev 112318)
+++ projects/jboss-jca/trunk/doc/samples/helloworld/build.xml	2011-10-12 18:11:27 UTC (rev 112319)
@@ -135,6 +135,7 @@
       
       <jvmarg line="${junit.jvm.options}"/>
       <sysproperty key="archives.dir" value="${target.dir}"/>
+      <sysproperty key="reports.dir" value="${basedir}/reports"/>
       <sysproperty key="java.util.logging.manager" value="org.jboss.logmanager.LogManager"/>
       <sysproperty key="log4j.defaultInitOverride" value="true"/>
       <sysproperty key="org.jboss.logging.Logger.pluginClass" 

Modified: projects/jboss-jca/trunk/doc/samples/helloworld/src/test/java/org/jboss/jca/samples/helloworld/ConnectorTestCase.java
===================================================================
--- projects/jboss-jca/trunk/doc/samples/helloworld/src/test/java/org/jboss/jca/samples/helloworld/ConnectorTestCase.java	2011-10-12 13:14:15 UTC (rev 112318)
+++ projects/jboss-jca/trunk/doc/samples/helloworld/src/test/java/org/jboss/jca/samples/helloworld/ConnectorTestCase.java	2011-10-12 18:11:27 UTC (rev 112319)
@@ -26,7 +26,7 @@
 
 import javax.annotation.Resource;
 
-import org.jboss.arquillian.api.Deployment;
+import org.jboss.arquillian.container.test.api.Deployment;
 import org.jboss.arquillian.junit.Arquillian;
 
 import org.jboss.shrinkwrap.api.ShrinkWrap;
@@ -71,12 +71,13 @@
          HelloWorldConnection.class, 
          HelloWorldConnectionImpl.class);
       raa.addAsLibrary(ja);
+      raa.addAsManifestResource("META-INF/ironjacamar.xml", "ironjacamar.xml");
 
       return raa;
    }
 
    /** resource */
-   @Resource(mappedName = "java:/eis/ConnectorTestCase")
+   @Resource(mappedName = "java:/eis/HelloWorld")
    private HelloWorldConnectionFactory connectionFactory;
 
    /**

Modified: projects/jboss-jca/trunk/doc/samples/helloworld/src/test/resources/logging.properties
===================================================================
--- projects/jboss-jca/trunk/doc/samples/helloworld/src/test/resources/logging.properties	2011-10-12 13:14:15 UTC (rev 112318)
+++ projects/jboss-jca/trunk/doc/samples/helloworld/src/test/resources/logging.properties	2011-10-12 18:11:27 UTC (rev 112319)
@@ -30,7 +30,7 @@
 handler.FILE.level=${iron.jacamar.log.file.level:DEBUG}
 handler.FILE.properties=autoFlush,fileName
 handler.FILE.autoFlush=true
-handler.FILE.fileName=${test.dir}/deployers/test.log
+handler.FILE.fileName=${reports.dir}/test.log
 handler.FILE.formatter=PATTERN
 
 # Formatter pattern configuration

Added: projects/jboss-jca/trunk/doc/samples/helloworld-native/CMakeLists.txt
===================================================================
--- projects/jboss-jca/trunk/doc/samples/helloworld-native/CMakeLists.txt	                        (rev 0)
+++ projects/jboss-jca/trunk/doc/samples/helloworld-native/CMakeLists.txt	2011-10-12 18:11:27 UTC (rev 112319)
@@ -0,0 +1,13 @@
+PROJECT(helloworld-native)
+
+CMAKE_MINIMUM_REQUIRED (VERSION 2.8)
+SET(CMAKE_VERBOSE_MAKEFILE 1)
+
+SET(LIBRARY_OUTPUT_PATH build)
+SET(BUILD_SHARED_LIBS ON)
+SET(CMAKE_INCLUDE_CURRENT_DIR ON)
+
+FIND_PACKAGE(Java COMPONENTS Development)
+FIND_PACKAGE(JNI)
+
+ADD_LIBRARY(HelloWorld helloworld.c)

Added: projects/jboss-jca/trunk/doc/samples/helloworld-native/README.txt
===================================================================
--- projects/jboss-jca/trunk/doc/samples/helloworld-native/README.txt	                        (rev 0)
+++ projects/jboss-jca/trunk/doc/samples/helloworld-native/README.txt	2011-10-12 18:11:27 UTC (rev 112319)
@@ -0,0 +1,36 @@
+The HelloWorld/Native resource adapter
+======================================
+
+Introduction
+------------
+The HelloWorld/Native resource adapter sample shows a simple example of how to use and
+implement the interfaces in the Java EE Connector Architecture specification which calls a
+native library.
+
+The HelloWorld/Native sample exposes the HelloWorldConnection interface where developers
+can invoke the exposed methods.
+
+The sample shows how to build and test a resource adapter.
+
+How to build and test
+---------------------
+1. Install Ant 1.8 (http://ant.apache.org)
+
+2. Copy all libs from sjc/lib directory
+
+    cd doc/samples/helloworld-native
+    cp -R ../../../lib .
+    cp ../../../bin/ironjacamar-sjc.jar lib/
+
+   Note that the above refers to the standalone distribution of IronJacamar.
+
+3. Build
+
+    ant native
+    cmake .
+    make
+    ant rar
+
+4. Test
+
+    ant test

Added: projects/jboss-jca/trunk/doc/samples/helloworld-native/build.xml
===================================================================
--- projects/jboss-jca/trunk/doc/samples/helloworld-native/build.xml	                        (rev 0)
+++ projects/jboss-jca/trunk/doc/samples/helloworld-native/build.xml	2011-10-12 18:11:27 UTC (rev 112319)
@@ -0,0 +1,226 @@
+<!--
+/*
+ * 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.
+ */
+-->
+
+<project name="helloworld-native" basedir="." default="rar">
+
+  <!-- ================================= 
+       Properties              
+       ================================= -->
+  <property name="build.dir" value="${basedir}/build" />
+  <property name="target.dir" value="${basedir}/target" />
+  <property name="lib.dir" value="${basedir}/lib" />
+
+  <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" />
+  
+  <path id="lib.path.id">
+    <fileset dir="${lib.dir}">
+      <include name="**/*.jar"/>
+    </fileset>
+  </path>
+    
+  <path id="test.lib.path.id">
+    <fileset dir="${lib.dir}">
+      <include name="**/*.jar"/>
+    </fileset>
+    <fileset dir="${build.dir}">
+      <include name="**/*.jar"/>
+    </fileset>
+  </path>
+  
+  <!-- ================================= 
+       Target: init
+       ================================= -->
+  <target name="init">
+    <mkdir dir="${build.dir}" />
+    <mkdir dir="${build.dir}/c" />
+    <mkdir dir="${lib.dir}" />
+  </target>
+
+  <!-- ================================= 
+       Target: compile
+       ================================= -->
+  <target name="compile" depends="init">
+    <javac srcdir="${basedir}/src/main/java"
+           destdir="${build.dir}"
+           classpathref="lib.path.id"
+           debug="${javac.debug}"
+           deprecation="${javac.deprecation}"
+           optimize="${javac.optimize}">
+    </javac> 
+  </target>
+  
+  <!-- ================================= 
+       Target: native
+       ================================= -->
+  <target name="native" depends="compile">
+    <javah class="org.jboss.jca.samples.helloworld.HelloWorldManagedConnection"
+           outputFile="${build.dir}/c/HelloWorld.h"
+           force="true"
+           classpath="${build.dir}">
+    </javah>
+  </target>
+
+  <!-- ================================= 
+       Target: rar
+       ================================= -->
+  <target name="rar">
+    <mkdir dir="${target.dir}" />
+    <mkdir dir="${basedir}/src/main/resources" />
+    <jar destfile="${build.dir}/helloworld.jar"
+         basedir="${build.dir}"
+         includes="**/*.class"/>
+    <jar destfile="${target.dir}/helloworld.rar">
+      <fileset dir="${basedir}/src/main/resources" includes="META-INF/*"/>
+      <fileset dir="${build.dir}" includes="*.jar"/>
+      <fileset dir="${build.dir}" includes="*.so"/>
+      <fileset dir="${build.dir}" includes="*.a"/>
+      <fileset dir="${build.dir}" includes="*.dll"/>
+    </jar>
+  </target>
+  
+  <!-- ================================= 
+       Target: prepare-test
+       ================================= -->
+  <target name="prepare-test" depends="init">
+    <mkdir dir="${build.dir}/test" />
+
+    <javac srcdir="src/test"
+           destdir="${build.dir}/test"
+           classpathref="test.lib.path.id"
+           debug="${javac.debug}"
+           deprecation="${javac.deprecation}"
+           optimize="${javac.optimize}">
+      <compilerarg value="-Xlint"/>
+    </javac> 
+
+    <copy todir="${build.dir}/test">
+      <fileset dir="src/main/resources"/>
+      <fileset dir="src/test/resources"/>
+    </copy>
+  </target>
+
+  <!-- ================================= 
+       Target: test
+       ================================= -->
+  <target name="test" depends="rar, prepare-test">
+    <mkdir dir="${basedir}/reports"/>
+
+    <junit dir="src/test"
+           printsummary="${junit.printsummary}"
+           haltonerror="${junit.haltonerror}"
+           haltonfailure="${junit.haltonfailure}"
+           fork="${junit.fork}"
+           timeout="${junit.timeout}">
+      
+      <jvmarg line="${junit.jvm.options}"/>
+      <sysproperty key="archives.dir" value="${target.dir}"/>
+      <sysproperty key="reports.dir" value="${basedir}/reports"/>
+      <sysproperty key="java.util.logging.manager" value="org.jboss.logmanager.LogManager"/>
+      <sysproperty key="log4j.defaultInitOverride" value="true"/>
+      <sysproperty key="org.jboss.logging.Logger.pluginClass" 
+      	           value="org.jboss.logging.logmanager.LoggerPluginImpl"/>
+      <sysproperty key="test.dir" value="${build.dir}/test"/>
+      <sysproperty key="xb.builder.useUnorderedSequence" value="true"/>
+      <sysproperty key="javax.xml.stream.XMLInputFactory" 
+      	           value="com.sun.xml.internal.stream.XMLInputFactoryImpl"/>
+      
+      <classpath>
+        <fileset dir="${lib.dir}" includes="**/*.jar" />
+        <fileset dir="${build.dir}" includes="*.jar" />
+        <pathelement location="${build.dir}/test"/>
+      </classpath>
+      
+      <formatter type="plain"/>
+      <formatter type="xml"/>
+      
+      <batchtest todir="${basedir}/reports"
+                 haltonerror="${junit.batchtest.haltonerror}"
+                 haltonfailure="${junit.batchtest.haltonfailure}"
+                 fork="${junit.batchtest.fork}">
+        
+        <fileset dir="${build.dir}/test">
+          <include name="**/*TestCase.class"/>
+        </fileset>
+      </batchtest>
+
+    </junit>
+    
+  </target>
+  
+  <!-- ================================= 
+       Target: docs
+       ================================= -->
+  <target name="docs" depends="compile">
+    <mkdir dir="${target.dir}/docs"/>
+    <javadoc packagenames="*"
+             sourcepath="src/main/java"
+             destdir="${target.dir}/docs"
+             classpathref="lib.path.id">
+    </javadoc>
+  </target>
+  
+  <!-- ================================= 
+       Target: clean              
+       ================================= -->
+  <target name="clean">
+    <delete>
+      <fileset dir="${basedir}" defaultexcludes="no">
+        <include name="**/*~"/>
+        <include name="**/*.bak"/>
+      </fileset>
+    </delete>
+    <delete dir="${build.dir}"/>
+    <delete dir="${target.dir}"/>
+    <delete dir="${basedir}/reports"/>
+
+    <!-- cmake environment -->
+    <delete file="${basedir}/Makefile"/>
+    <delete file="${basedir}/cmake_install.cmake"/>
+    <delete dir="${basedir}/CMakeFiles"/>
+    <delete file="${basedir}/CMakeCache.txt"/>
+  </target>
+
+  <!-- ================================= 
+       Target: dist-clean              
+       ================================= -->
+  <target name="dist-clean" depends="init,clean">
+    <delete includeemptydirs="true">
+      <fileset dir="${lib.dir}" includes="**/*"/>
+    </delete>
+  </target>
+
+</project>

Added: projects/jboss-jca/trunk/doc/samples/helloworld-native/helloworld.c
===================================================================
--- projects/jboss-jca/trunk/doc/samples/helloworld-native/helloworld.c	                        (rev 0)
+++ projects/jboss-jca/trunk/doc/samples/helloworld-native/helloworld.c	2011-10-12 18:11:27 UTC (rev 112319)
@@ -0,0 +1,32 @@
+#include <jni.h>
+#include <string.h>
+#include "build/c/HelloWorld.h"
+
+/*
+ * Class:     org_jboss_jca_samples_helloworld_HelloWorldManagedConnection
+ * Method:    helloWorld
+ * Signature: (Ljava/lang/String;)Ljava/lang/String;
+ */
+JNIEXPORT jstring JNICALL 
+Java_org_jboss_jca_samples_helloworld_HelloWorldManagedConnection_helloWorld(JNIEnv *env, jobject o, jstring s)
+{
+   int length = 0;
+
+   if (s != NULL)
+      length = (*env)->GetStringLength(env, s);
+
+   char *buf = (char*)malloc(16 + length);
+
+   strcpy(buf, "Hello world, ");
+
+   if (s != NULL)
+      strcat(buf, (*env)->GetStringUTFChars(env, s, 0));
+
+   strcat(buf, " !");
+
+   jstring result = (*env)->NewStringUTF(env, buf);
+
+   free(buf);
+
+   return result;
+}

Added: projects/jboss-jca/trunk/doc/samples/helloworld-native/src/main/java/org/jboss/jca/samples/helloworld/HelloWorldConnection.java
===================================================================
--- projects/jboss-jca/trunk/doc/samples/helloworld-native/src/main/java/org/jboss/jca/samples/helloworld/HelloWorldConnection.java	                        (rev 0)
+++ projects/jboss-jca/trunk/doc/samples/helloworld-native/src/main/java/org/jboss/jca/samples/helloworld/HelloWorldConnection.java	2011-10-12 18:11:27 UTC (rev 112319)
@@ -0,0 +1,48 @@
+/*
+ * 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.samples.helloworld;
+
+/**
+ * HelloWorldConnection
+ *
+ * @version $Revision: $
+ */
+public interface HelloWorldConnection
+{
+   /**
+    * HelloWorld
+    * @return String
+    */
+   public String helloWorld();
+
+   /**
+    * HelloWorld
+    * @param name A name
+    * @return String
+    */
+   public String helloWorld(String name);
+
+   /**
+    * Close
+    */
+   public void close();
+}

Added: projects/jboss-jca/trunk/doc/samples/helloworld-native/src/main/java/org/jboss/jca/samples/helloworld/HelloWorldConnectionFactory.java
===================================================================
--- projects/jboss-jca/trunk/doc/samples/helloworld-native/src/main/java/org/jboss/jca/samples/helloworld/HelloWorldConnectionFactory.java	                        (rev 0)
+++ projects/jboss-jca/trunk/doc/samples/helloworld-native/src/main/java/org/jboss/jca/samples/helloworld/HelloWorldConnectionFactory.java	2011-10-12 18:11:27 UTC (rev 112319)
@@ -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.samples.helloworld;
+
+import java.io.Serializable;
+
+import javax.resource.Referenceable;
+import javax.resource.ResourceException;
+
+/**
+ * HelloWorldConnectionFactory
+ *
+ * @version $Revision: $
+ */
+public interface HelloWorldConnectionFactory extends Serializable, Referenceable
+{
+   /** 
+    * Get connection from factory
+    *
+    * @return HelloWorldConnection instance
+    * @exception ResourceException Thrown if a connection can't be obtained
+    */
+   public HelloWorldConnection getConnection() throws ResourceException;
+
+}

Added: projects/jboss-jca/trunk/doc/samples/helloworld-native/src/main/java/org/jboss/jca/samples/helloworld/HelloWorldConnectionFactoryImpl.java
===================================================================
--- projects/jboss-jca/trunk/doc/samples/helloworld-native/src/main/java/org/jboss/jca/samples/helloworld/HelloWorldConnectionFactoryImpl.java	                        (rev 0)
+++ projects/jboss-jca/trunk/doc/samples/helloworld-native/src/main/java/org/jboss/jca/samples/helloworld/HelloWorldConnectionFactoryImpl.java	2011-10-12 18:11:27 UTC (rev 112319)
@@ -0,0 +1,91 @@
+/*
+ * 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.samples.helloworld;
+
+import javax.naming.NamingException;
+import javax.naming.Reference;
+
+import javax.resource.ResourceException;
+import javax.resource.spi.ConnectionManager;
+
+/**
+ * HelloWorldConnectionFactoryImpl
+ *
+ * @version $Revision: $
+ */
+public class HelloWorldConnectionFactoryImpl implements HelloWorldConnectionFactory
+{
+   /** The serialVersionUID */
+   private static final long serialVersionUID = 1L;
+
+   private Reference reference;
+
+   private HelloWorldManagedConnectionFactory mcf;
+   private ConnectionManager connectionManager;
+
+   /**
+    * Default constructor
+    * @param mcf ManagedConnectionFactory
+    * @param cxManager ConnectionManager
+    */
+   public HelloWorldConnectionFactoryImpl(HelloWorldManagedConnectionFactory mcf,
+                                          ConnectionManager cxManager)
+   {
+      this.mcf = mcf;
+      this.connectionManager = cxManager;
+   }
+
+   /** 
+    * Get connection from factory
+    *
+    * @return HelloWorldConnection instance
+    * @exception ResourceException Thrown if a connection can't be obtained
+    */
+   @Override
+   public HelloWorldConnection getConnection() throws ResourceException
+   {
+      return (HelloWorldConnection)connectionManager.allocateConnection(mcf, null);
+   }
+
+   /**
+    * 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/trunk/doc/samples/helloworld-native/src/main/java/org/jboss/jca/samples/helloworld/HelloWorldConnectionImpl.java
===================================================================
--- projects/jboss-jca/trunk/doc/samples/helloworld-native/src/main/java/org/jboss/jca/samples/helloworld/HelloWorldConnectionImpl.java	                        (rev 0)
+++ projects/jboss-jca/trunk/doc/samples/helloworld-native/src/main/java/org/jboss/jca/samples/helloworld/HelloWorldConnectionImpl.java	2011-10-12 18:11:27 UTC (rev 112319)
@@ -0,0 +1,80 @@
+/*
+ * 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.samples.helloworld;
+
+import java.util.logging.Logger;
+
+/**
+ * HelloWorldConnectionImpl
+ *
+ * @version $Revision: $
+ */
+public class HelloWorldConnectionImpl implements HelloWorldConnection
+{
+   /** The logger */
+   private static Logger log = Logger.getLogger("HelloWorldConnectionImpl");
+
+   /** ManagedConnection */
+   private HelloWorldManagedConnection mc;
+
+   /** ManagedConnectionFactory */
+   private HelloWorldManagedConnectionFactory mcf;
+
+   /**
+    * Default constructor
+    * @param mc HelloWorldManagedConnection
+    * @param mcf HelloWorldManagedConnectionFactory
+    */
+   public HelloWorldConnectionImpl(HelloWorldManagedConnection mc,
+                                   HelloWorldManagedConnectionFactory mcf)
+   {
+      this.mc = mc;
+      this.mcf = mcf;
+   }
+
+   /**
+    * Call helloWorld
+    * @return String helloworld
+    */
+   public String helloWorld()
+   {
+      return helloWorld(((HelloWorldResourceAdapter)mcf.getResourceAdapter()).getName());
+   }
+
+   /**
+    * Call helloWorld
+    * @param name String name
+    * @return String helloworld
+    */
+   public String helloWorld(String name)
+   {
+      return mc.helloWorld(name);
+   }
+
+   /**
+    * Close
+    */
+   public void close()
+   {
+      mc.closeHandle(this);
+   }
+}

Added: projects/jboss-jca/trunk/doc/samples/helloworld-native/src/main/java/org/jboss/jca/samples/helloworld/HelloWorldManagedConnection.java
===================================================================
--- projects/jboss-jca/trunk/doc/samples/helloworld-native/src/main/java/org/jboss/jca/samples/helloworld/HelloWorldManagedConnection.java	                        (rev 0)
+++ projects/jboss-jca/trunk/doc/samples/helloworld-native/src/main/java/org/jboss/jca/samples/helloworld/HelloWorldManagedConnection.java	2011-10-12 18:11:27 UTC (rev 112319)
@@ -0,0 +1,230 @@
+/*
+ * 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.samples.helloworld;
+
+import java.io.PrintWriter;
+import java.util.ArrayList;
+import java.util.List;
+import java.util.logging.Logger;
+
+import javax.resource.NotSupportedException;
+import javax.resource.ResourceException;
+import javax.resource.spi.ConnectionEvent;
+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;
+
+/**
+ * HelloWorldManagedConnection
+ *
+ * @version $Revision: $
+ */
+public class HelloWorldManagedConnection implements ManagedConnection
+{
+   /** The logger */
+   private static Logger log = Logger.getLogger("HelloWorldManagedConnection");
+
+   /** MCF */
+   private HelloWorldManagedConnectionFactory mcf;
+
+   /** Log writer */
+   private PrintWriter logWriter;
+
+   /** Listeners */
+   private List<ConnectionEventListener> listeners;
+
+   /** Connection */
+   private Object connection;
+
+   /**
+    * Constructor
+    * @param mcf mcf
+    */
+   public HelloWorldManagedConnection(HelloWorldManagedConnectionFactory mcf)
+   {
+      this.mcf = mcf;
+      this.logWriter = null;
+      this.listeners = new ArrayList<ConnectionEventListener>(1);
+      this.connection = null;
+   }
+
+   /**
+    * 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
+   {
+      connection = new HelloWorldConnectionImpl(this, mcf);
+
+      return connection;
+   }
+
+   /**
+    * 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
+   {
+      this.connection = connection;
+   }
+
+   /**
+    * 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
+   {
+   }
+
+   /**
+    * Destroys the physical connection to the underlying resource manager.
+    *
+    * @throws ResourceException generic exception if operation fails
+    */
+   public void destroy() throws ResourceException
+   {
+      this.connection = null;
+   }
+
+   /**
+    * Adds a connection event listener to the ManagedConnection instance.
+    *
+    * @param listener A new ConnectionEventListener to be registered
+    */
+   public void addConnectionEventListener(ConnectionEventListener listener)
+   {
+      if (listener == null)
+         throw new IllegalArgumentException("Listener is null");
+
+      listeners.add(listener);
+   }
+
+   /**
+    * 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)
+   {
+      if (listener == null)
+         throw new IllegalArgumentException("Listener is null");
+
+      listeners.remove(listener);
+   }
+
+   /**
+    * 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
+   {
+      return logWriter;
+   }
+
+   /**
+    * 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
+   {
+      this.logWriter = out;
+   }
+
+   /**
+    * Returns an <code>javax.resource.spi.LocalTransaction</code> instance.
+    *
+    * @return LocalTransaction instance
+    * @throws ResourceException generic exception if operation fails
+    */
+   public LocalTransaction getLocalTransaction() throws ResourceException
+   {
+      throw new NotSupportedException("LocalTransaction not supported");
+   }
+
+   /**
+    * Returns an <code>javax.transaction.xa.XAresource</code> instance. 
+    *
+    * @return XAResource instance
+    * @throws ResourceException generic exception if operation fails
+    */
+   public XAResource getXAResource() throws ResourceException
+   {
+      throw new NotSupportedException("GetXAResource not supported");
+   }
+
+   /**
+    * 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
+   {
+      return new HelloWorldManagedConnectionMetaData();
+   }
+
+   /**
+    * Call helloWorld
+    * @param name String name
+    * @return String helloworld
+    */
+   public native String helloWorld(String name);
+
+   /**
+    * Close handle
+    * @param handle The handle
+    */
+   void closeHandle(HelloWorldConnection handle)
+   {
+      ConnectionEvent event = new ConnectionEvent(this, ConnectionEvent.CONNECTION_CLOSED);
+      event.setConnectionHandle(handle);
+
+      for (ConnectionEventListener cel : listeners)
+      {
+         cel.connectionClosed(event);
+      }
+   }
+}

Added: projects/jboss-jca/trunk/doc/samples/helloworld-native/src/main/java/org/jboss/jca/samples/helloworld/HelloWorldManagedConnectionFactory.java
===================================================================
--- projects/jboss-jca/trunk/doc/samples/helloworld-native/src/main/java/org/jboss/jca/samples/helloworld/HelloWorldManagedConnectionFactory.java	                        (rev 0)
+++ projects/jboss-jca/trunk/doc/samples/helloworld-native/src/main/java/org/jboss/jca/samples/helloworld/HelloWorldManagedConnectionFactory.java	2011-10-12 18:11:27 UTC (rev 112319)
@@ -0,0 +1,218 @@
+/*
+ * 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.samples.helloworld;
+
+import java.io.PrintWriter;
+import java.util.Iterator;
+import java.util.Set;
+import java.util.logging.Logger;
+
+import javax.resource.ResourceException;
+import javax.resource.spi.ConnectionDefinition;
+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;
+
+/**
+ * HelloWorldManagedConnectionFactory
+ *
+ * @version $Revision: $
+ */
+ at ConnectionDefinition(connectionFactory = HelloWorldConnectionFactory.class,
+   connectionFactoryImpl = HelloWorldConnectionFactoryImpl.class,
+   connection = HelloWorldConnection.class,
+   connectionImpl = HelloWorldConnectionImpl.class)
+public class HelloWorldManagedConnectionFactory 
+   implements ManagedConnectionFactory, ResourceAdapterAssociation
+{
+
+   /** The serialVersionUID */
+   private static final long serialVersionUID = 1L;
+
+   /** The logger */
+   private static Logger log = Logger.getLogger("HelloWorldManagedConnectionFactory");
+
+   /** The resource adapter */
+   private ResourceAdapter ra;
+
+   /** The logwriter */
+   private PrintWriter logwriter;
+
+   /**
+    * Default constructor
+    */
+   public HelloWorldManagedConnectionFactory()
+   {
+      this.ra = null;
+      this.logwriter = null;
+   }
+
+   /**
+    * 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
+   {
+      throw new ResourceException("This resource adapter doesn't support non-managed environments");
+   }
+
+   /**
+    * 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
+   {
+      return new HelloWorldConnectionFactoryImpl(this, cxManager);
+   }
+
+   /**
+    * 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
+   {
+      return new HelloWorldManagedConnection(this);
+   }
+
+   /**
+    * 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
+   {
+      ManagedConnection result = null;
+
+      Iterator it = connectionSet.iterator();
+      while (result == null && it.hasNext()) 
+      {
+         ManagedConnection mc = (ManagedConnection)it.next();
+         if (mc instanceof HelloWorldManagedConnection) 
+         {
+            HelloWorldManagedConnection hwmc = (HelloWorldManagedConnection)mc;
+            result = hwmc;
+         }
+      }
+
+      return result;
+   }
+
+   /**
+    * Get the log writer for this ManagedConnectionFactory instance.
+    *
+    * @return PrintWriter
+    * @throws ResourceException generic exception
+    */
+   public PrintWriter getLogWriter() throws ResourceException
+   {
+      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
+   {
+      logwriter = out;
+   }
+
+   /**
+    * Get the resource adapter
+    *
+    * @return The handle
+    */
+   public ResourceAdapter getResourceAdapter()
+   {
+      return ra;
+   }
+
+   /**
+    * Set the resource adapter
+    *
+    * @param ra The handle
+    */
+   public void setResourceAdapter(ResourceAdapter ra)
+   {
+      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 HelloWorldManagedConnectionFactory))
+         return false;
+      HelloWorldManagedConnectionFactory obj = (HelloWorldManagedConnectionFactory)other;
+      boolean result = true; 
+      return result;
+   }
+
+
+}

Added: projects/jboss-jca/trunk/doc/samples/helloworld-native/src/main/java/org/jboss/jca/samples/helloworld/HelloWorldManagedConnectionMetaData.java
===================================================================
--- projects/jboss-jca/trunk/doc/samples/helloworld-native/src/main/java/org/jboss/jca/samples/helloworld/HelloWorldManagedConnectionMetaData.java	                        (rev 0)
+++ projects/jboss-jca/trunk/doc/samples/helloworld-native/src/main/java/org/jboss/jca/samples/helloworld/HelloWorldManagedConnectionMetaData.java	2011-10-12 18:11:27 UTC (rev 112319)
@@ -0,0 +1,91 @@
+/*
+ * 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.samples.helloworld;
+
+import javax.resource.ResourceException;
+
+import javax.resource.spi.ManagedConnectionMetaData;
+
+/**
+ * HelloWorldManagedConnectionMetaData
+ *
+ * @version $Revision: $
+ */
+public class HelloWorldManagedConnectionMetaData implements ManagedConnectionMetaData
+{
+   /**
+    * Default constructor
+    */
+   public HelloWorldManagedConnectionMetaData()
+   {
+   }
+
+   /**
+    * 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 "HelloWorld Resource Adapter";
+   }
+
+   /**
+    * 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 "1.0";
+   }
+
+   /**
+    * 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;
+   }
+
+   /**
+    * 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;
+   }
+}

Added: projects/jboss-jca/trunk/doc/samples/helloworld-native/src/main/java/org/jboss/jca/samples/helloworld/HelloWorldResourceAdapter.java
===================================================================
--- projects/jboss-jca/trunk/doc/samples/helloworld-native/src/main/java/org/jboss/jca/samples/helloworld/HelloWorldResourceAdapter.java	                        (rev 0)
+++ projects/jboss-jca/trunk/doc/samples/helloworld-native/src/main/java/org/jboss/jca/samples/helloworld/HelloWorldResourceAdapter.java	2011-10-12 18:11:27 UTC (rev 112319)
@@ -0,0 +1,175 @@
+/*
+ * 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.samples.helloworld;
+
+import java.util.logging.Logger;
+
+import javax.resource.ResourceException;
+import javax.resource.spi.ActivationSpec;
+import javax.resource.spi.BootstrapContext;
+import javax.resource.spi.ConfigProperty;
+import javax.resource.spi.Connector;
+import javax.resource.spi.ResourceAdapter;
+import javax.resource.spi.ResourceAdapterInternalException;
+import javax.resource.spi.TransactionSupport;
+import javax.resource.spi.endpoint.MessageEndpointFactory;
+
+import javax.transaction.xa.XAResource;
+
+/**
+ * HelloWorldResourceAdapter
+ *
+ * @version $Revision: $
+ */
+ at Connector(
+   reauthenticationSupport = false,
+   transactionSupport = TransactionSupport.TransactionSupportLevel.NoTransaction)
+public class HelloWorldResourceAdapter implements ResourceAdapter
+{
+   /** The logger */
+   private static Logger log = Logger.getLogger("HelloWorldResourceAdapter");
+
+   /** Name property */
+   @ConfigProperty(defaultValue = "AS 7", supportsDynamicUpdates = true)
+   private String name;
+
+   /**
+    * Default constructor
+    */
+   public HelloWorldResourceAdapter()
+   {
+   }
+
+   /** 
+    * Set name
+    * @param name The value
+    */
+   public void setName(String name)
+   {
+      this.name = name;
+   }
+
+   /** 
+    * Get name
+    * @return The value
+    */
+   public String getName()
+   {
+      return name;
+   }
+
+   /**
+    * 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
+   {
+   }
+
+   /**
+    * 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)
+   {
+   }
+
+   /**
+    * 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
+   {
+   }
+
+   /**
+    * This is called when a resource adapter instance is undeployed or
+    * during application server shutdown. 
+    */
+   public void 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
+   {
+      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 (name != null)
+         result += 31 * result + 7 * name.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 HelloWorldResourceAdapter))
+         return false;
+      HelloWorldResourceAdapter obj = (HelloWorldResourceAdapter)other;
+      boolean result = true; 
+      if (result)
+      {
+         if (name == null)
+            result = obj.getName() == null;
+         else
+            result = name.equals(obj.getName());
+      }
+      return result;
+   }
+}

Added: projects/jboss-jca/trunk/doc/samples/helloworld-native/src/main/java/org/jboss/jca/samples/helloworld/package.html
===================================================================
--- projects/jboss-jca/trunk/doc/samples/helloworld-native/src/main/java/org/jboss/jca/samples/helloworld/package.html	                        (rev 0)
+++ projects/jboss-jca/trunk/doc/samples/helloworld-native/src/main/java/org/jboss/jca/samples/helloworld/package.html	2011-10-12 18:11:27 UTC (rev 112319)
@@ -0,0 +1,3 @@
+<body>
+This package contains helloworld sample
+</body>

Added: projects/jboss-jca/trunk/doc/samples/helloworld-native/src/main/resources/META-INF/ironjacamar.xml
===================================================================
--- projects/jboss-jca/trunk/doc/samples/helloworld-native/src/main/resources/META-INF/ironjacamar.xml	                        (rev 0)
+++ projects/jboss-jca/trunk/doc/samples/helloworld-native/src/main/resources/META-INF/ironjacamar.xml	2011-10-12 18:11:27 UTC (rev 112319)
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<ironjacamar>
+  <connection-definitions>
+    <connection-definition 
+     class-name="org.jboss.jca.samples.helloworld.HelloWorldManagedConnectionFactory" 
+     jndi-name="java:/eis/HelloWorld"/>
+  </connection-definitions>
+</ironjacamar>

Added: projects/jboss-jca/trunk/doc/samples/helloworld-native/src/test/java/org/jboss/jca/samples/helloworld/ConnectorTestCase.java
===================================================================
--- projects/jboss-jca/trunk/doc/samples/helloworld-native/src/test/java/org/jboss/jca/samples/helloworld/ConnectorTestCase.java	                        (rev 0)
+++ projects/jboss-jca/trunk/doc/samples/helloworld-native/src/test/java/org/jboss/jca/samples/helloworld/ConnectorTestCase.java	2011-10-12 18:11:27 UTC (rev 112319)
@@ -0,0 +1,124 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2011, 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.samples.helloworld;
+
+import java.io.File;
+import java.util.UUID;
+import java.util.logging.Logger;
+
+import javax.annotation.Resource;
+
+import org.jboss.arquillian.container.test.api.Deployment;
+import org.jboss.arquillian.junit.Arquillian;
+
+import org.jboss.shrinkwrap.api.ShrinkWrap;
+import org.jboss.shrinkwrap.api.spec.JavaArchive;
+import org.jboss.shrinkwrap.api.spec.ResourceAdapterArchive;
+
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import static org.junit.Assert.*;
+
+/**
+ * Test case for the HelloWorld/Native resource adapter
+ */
+ at RunWith(Arquillian.class)
+public class ConnectorTestCase
+{
+   private static Logger log = Logger.getLogger("ConnectorTestCase");
+
+   /**
+    * Define the deployment
+    *
+    * @return The deployment archive
+    */
+   @Deployment
+   public static ResourceAdapterArchive createDeployment()
+   {
+      String deploymentName = "ConnectorTestCase.rar";
+
+      ResourceAdapterArchive raa =
+         ShrinkWrap.create(ResourceAdapterArchive.class, deploymentName);
+      JavaArchive ja = ShrinkWrap.create(JavaArchive.class, 
+         UUID.randomUUID().toString() + ".jar");
+      ja.addClasses(HelloWorldResourceAdapter.class, 
+         HelloWorldManagedConnectionFactory.class, 
+         HelloWorldManagedConnection.class, 
+         HelloWorldManagedConnectionMetaData.class, 
+         HelloWorldConnectionFactory.class, 
+         HelloWorldConnectionFactoryImpl.class, 
+         HelloWorldConnection.class, 
+         HelloWorldConnectionImpl.class);
+      raa.addAsLibrary(ja);
+      raa.addAsManifestResource("META-INF/ironjacamar.xml", "ironjacamar.xml");
+
+      String rootPath =
+         System.getProperty("test.dir") + File.separator + ".." + File.separator;
+
+      File root = new File(rootPath);
+      for (File f : root.listFiles())
+      {
+         if (f.getName().contains("HelloWorld"))
+            raa.addAsLibrary(f);
+      }
+
+      log.info(raa.toString(true));
+
+      return raa;
+   }
+
+   /** Resource */
+   @Resource(mappedName = "java:/eis/HelloWorld")
+   private HelloWorldConnectionFactory connectionFactory;
+
+   /**
+    * Test helloWorld
+    *
+    * @exception Throwable Thrown if case of an error
+    */
+   @Test
+   public void testHelloWorldNoArgs() throws Throwable
+   {
+      assertNotNull(connectionFactory);
+      HelloWorldConnection connection = connectionFactory.getConnection();
+      assertNotNull(connection);
+      String result = connection.helloWorld();
+      assertNotNull(result);
+      connection.close();
+   }
+
+   /**
+    * Test helloWorld
+    *
+    * @exception Throwable Thrown if case of an error
+    */
+   @Test
+   public void testHelloWorldNameString() throws Throwable
+   {
+      assertNotNull(connectionFactory);
+      HelloWorldConnection connection = connectionFactory.getConnection();
+      assertNotNull(connection);
+      String result = connection.helloWorld(null);
+      assertNotNull(result);
+      connection.close();
+   }
+}

Added: projects/jboss-jca/trunk/doc/samples/helloworld-native/src/test/java/org/jboss/jca/samples/helloworld/package.html
===================================================================
--- projects/jboss-jca/trunk/doc/samples/helloworld-native/src/test/java/org/jboss/jca/samples/helloworld/package.html	                        (rev 0)
+++ projects/jboss-jca/trunk/doc/samples/helloworld-native/src/test/java/org/jboss/jca/samples/helloworld/package.html	2011-10-12 18:11:27 UTC (rev 112319)
@@ -0,0 +1,3 @@
+<body>
+This package contains helloworld sample testcase
+</body>

Added: projects/jboss-jca/trunk/doc/samples/helloworld-native/src/test/resources/jndi.properties
===================================================================
--- projects/jboss-jca/trunk/doc/samples/helloworld-native/src/test/resources/jndi.properties	                        (rev 0)
+++ projects/jboss-jca/trunk/doc/samples/helloworld-native/src/test/resources/jndi.properties	2011-10-12 18:11:27 UTC (rev 112319)
@@ -0,0 +1,2 @@
+java.naming.factory.initial=org.jnp.interfaces.LocalOnlyContextFactory
+java.naming.factory.url.pkgs=org.jboss.naming:org.jnp.interfaces

Added: projects/jboss-jca/trunk/doc/samples/helloworld-native/src/test/resources/logging.properties
===================================================================
--- projects/jboss-jca/trunk/doc/samples/helloworld-native/src/test/resources/logging.properties	                        (rev 0)
+++ projects/jboss-jca/trunk/doc/samples/helloworld-native/src/test/resources/logging.properties	2011-10-12 18:11:27 UTC (rev 112319)
@@ -0,0 +1,39 @@
+
+# Additional logger names to configure (root logger is always configured)
+loggers=org.jboss.jca,org.jboss,org.jnp,com.arjuna
+
+# Root logger level
+logger.level=${iron.jacamar.log.level:INFO}
+logger.handlers=CONSOLE, FILE
+
+# org.jboss.jca
+logger.org.jboss.jca.level=DEBUG
+
+# org.jboss
+logger.org.jboss.level=INFO
+
+# org.jnp
+logger.org.jnp.level=INFO
+
+# com.arjuna
+logger.com.arjuna.level=INFO
+
+# Console handler configuration
+handler.CONSOLE=org.jboss.logmanager.handlers.ConsoleHandler
+handler.CONSOLE.properties=autoFlush
+handler.CONSOLE.level=${iron.jacamar.log.console.level:INFO}
+handler.CONSOLE.autoFlush=true
+handler.CONSOLE.formatter=PATTERN
+
+# File handler configuration
+handler.FILE=org.jboss.logmanager.handlers.FileHandler
+handler.FILE.level=${iron.jacamar.log.file.level:DEBUG}
+handler.FILE.properties=autoFlush,fileName
+handler.FILE.autoFlush=true
+handler.FILE.fileName=${reports.dir}/test.log
+handler.FILE.formatter=PATTERN
+
+# Formatter pattern configuration
+formatter.PATTERN=org.jboss.logmanager.formatters.PatternFormatter
+formatter.PATTERN.properties=pattern
+formatter.PATTERN.pattern=%d{HH:mm:ss,SSS} %-5p [%c{1}] %m%n

Modified: projects/jboss-jca/trunk/doc/userguide/en-US/modules/sample.xml
===================================================================
--- projects/jboss-jca/trunk/doc/userguide/en-US/modules/sample.xml	2011-10-12 13:14:15 UTC (rev 112318)
+++ projects/jboss-jca/trunk/doc/userguide/en-US/modules/sample.xml	2011-10-12 18:11:27 UTC (rev 112319)
@@ -124,4 +124,144 @@
 
   </section>
 
+  <section id="sample_helloworld_native">
+    <title>HelloWorld/Native example</title>
+
+    <section id="sample_helloworld_native_introduction">
+      <title>Introduction</title>
+
+      <para>The HelloWorld/Native resource adapter sample shows a simple example of how to use and
+      implement the interfaces in the Java EE Connector Architecture specification which calls a
+      native library.</para>
+
+      <para>The HelloWorld/Native sample exposes the HelloWorldConnection interface where developers
+      can invoke the exposed methods.</para>
+
+      <para>The sample shows how to build and test a resource adapter.</para>
+
+      <section id="sample_helloworld_native_introduction_setup">
+        <title>Setup</title>
+        <para>The build environment needs various libraries in order to being able to build and
+        test the resource adapter. The setup is done by</para>
+        <programlisting>
+cd doc/samples/helloworld-native
+cp -R ../../../lib .
+cp ../../../bin/ironjacamar-sjc.jar lib/
+        </programlisting>
+      </section>
+
+      <section id="sample_helloworld_native_introduction_building">
+        <title>Building</title>
+        <para>Building the resource adapter is done by</para>
+        <programlisting>
+ant native
+cmake .
+make
+ant rar
+        </programlisting>
+      </section>
+
+      <section id="sample_helloworld_native_introduction_testing">
+        <title>Testing</title>
+        <para>Testing the resource adapter is done by</para>
+        <programlisting>
+ant test
+        </programlisting>
+      </section>
+
+    </section>
+
+    <section id="sample_helloworld_native_resourceadpater">
+      <title>HelloWorld/Native Resource Adapter</title>
+      <programlisting language="java">
+<xi:include parse="text" href="../../samples/helloworld-native/src/main/java/org/jboss/jca/samples/helloworld/HelloWorldResourceAdapter.java" xmlns:xi="http://www.w3.org/2001/XInclude"/>
+      </programlisting>
+    </section>
+
+    <section id="sample_helloworld_native_mcf">
+      <title>HelloWorld/Native Managed Connection Factory</title>
+      <programlisting language="java">
+<xi:include parse="text" href="../../samples/helloworld-native/src/main/java/org/jboss/jca/samples/helloworld/HelloWorldManagedConnectionFactory.java" xmlns:xi="http://www.w3.org/2001/XInclude"/>
+      </programlisting>
+    </section>
+
+    <section id="sample_helloworld_native_mc">
+      <title>HelloWorld/Native Managed Connection</title>
+      <programlisting language="java">
+<xi:include parse="text" href="../../samples/helloworld-native/src/main/java/org/jboss/jca/samples/helloworld/HelloWorldManagedConnection.java" xmlns:xi="http://www.w3.org/2001/XInclude"/>
+      </programlisting>
+    </section>
+
+    <section id="sample_helloworld_native_cf">
+      <title>HelloWorld/Native Connection Factory</title>
+      <programlisting language="java">
+<xi:include parse="text" href="../../samples/helloworld-native/src/main/java/org/jboss/jca/samples/helloworld/HelloWorldConnectionFactory.java" xmlns:xi="http://www.w3.org/2001/XInclude"/>
+      </programlisting>
+    </section>
+
+    <section id="sample_helloworld_native_cfimpl">
+      <title>HelloWorld/Native Connection Factory Implementation</title>
+      <programlisting language="java">
+<xi:include parse="text" href="../../samples/helloworld-native/src/main/java/org/jboss/jca/samples/helloworld/HelloWorldConnectionFactoryImpl.java" xmlns:xi="http://www.w3.org/2001/XInclude"/>
+      </programlisting>
+    </section>
+
+    <section id="sample_helloworld_native_connection">
+      <title>HelloWorld/Native Connection</title>
+      <programlisting language="java">
+<xi:include parse="text" href="../../samples/helloworld-native/src/main/java/org/jboss/jca/samples/helloworld/HelloWorldConnection.java" xmlns:xi="http://www.w3.org/2001/XInclude"/>
+      </programlisting>
+    </section>
+
+    <section id="sample_helloworld_native_connectionimpl">
+      <title>HelloWorld/Native Connection Implementation</title>
+      <programlisting language="java">
+<xi:include parse="text" href="../../samples/helloworld-native/src/main/java/org/jboss/jca/samples/helloworld/HelloWorldConnectionImpl.java" xmlns:xi="http://www.w3.org/2001/XInclude"/>
+      </programlisting>
+    </section>
+
+    <section id="sample_helloworld_native_metadata">
+      <title>HelloWorld/Native Managed Connection MetaData</title>
+      <programlisting language="java">
+<xi:include parse="text" href="../../samples/helloworld-native/src/main/java/org/jboss/jca/samples/helloworld/HelloWorldManagedConnectionMetaData.java" xmlns:xi="http://www.w3.org/2001/XInclude"/>
+      </programlisting>
+    </section>
+
+    <section id="sample_helloworld_native_ironjacamarxml">
+      <title>HelloWorld/Native ironjacamar.xml</title>
+      <programlisting language="java">
+<xi:include parse="text" href="../../samples/helloworld-native/src/main/resources/META-INF/ironjacamar.xml" xmlns:xi="http://www.w3.org/2001/XInclude"/>
+      </programlisting>
+    </section>
+
+    <section id="sample_helloworld_native_c">
+      <title>HelloWorld/Native C</title>
+      <programlisting language="c">
+<xi:include parse="text" href="../../samples/helloworld-native/helloworld.c" xmlns:xi="http://www.w3.org/2001/XInclude"/>
+      </programlisting>
+    </section>
+
+    <section id="sample_helloworld_native_testcase">
+      <title>HelloWorld/Native Connection Test Case</title>
+      <programlisting language="java">
+<xi:include parse="text" href="../../samples/helloworld-native/src/test/java/org/jboss/jca/samples/helloworld/ConnectorTestCase.java" xmlns:xi="http://www.w3.org/2001/XInclude"/>
+      </programlisting>
+    </section>
+
+    <section id="sample_helloworld_native_buildxml">
+      <title>HelloWorld/Native Ant build.xml</title>
+      <programlisting language="xml">
+<xi:include parse="text" href="../../samples/helloworld-native/build.xml" xmlns:xi="http://www.w3.org/2001/XInclude"/>
+      </programlisting>
+    </section>
+
+    <section id="sample_helloworld_native_cmake">
+      <title>HelloWorld/Native cmake</title>
+      <programlisting language="text">
+<xi:include parse="text" href="../../samples/helloworld-native/CMakeLists.txt" xmlns:xi="http://www.w3.org/2001/XInclude"/>
+      </programlisting>
+    </section>
+
+  </section>
+
 </appendix>



More information about the jboss-cvs-commits mailing list