Index: src/test/java/org/jboss/ejb3/test/ejbthree1629/unit/PrimitiveHandlingTestCase.java
===================================================================
--- src/test/java/org/jboss/ejb3/test/ejbthree1629/unit/PrimitiveHandlingTestCase.java	(revision 0)
+++ src/test/java/org/jboss/ejb3/test/ejbthree1629/unit/PrimitiveHandlingTestCase.java	(revision 0)
@@ -0,0 +1,95 @@
+/*
+ * 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.
+ */
+package org.jboss.ejb3.test.ejbthree1629.unit;
+
+import javax.naming.Context;
+import javax.naming.InitialContext;
+
+import junit.framework.Test;
+
+import org.jboss.ejb3.test.ejbthree1629.PrimitiveTesterRemote;
+import org.jboss.ejb3.test.ejbthree1629.PrimitiveTesterWithTransactionBean;
+import org.jboss.logging.Logger;
+import org.jboss.test.JBossTestCase;
+
+/**
+ * PrimitiveHandlingTestCase
+ * 
+ * Test case for EJBTHREE-1629 issue.
+ * Incorrect handling of primitives. The issue arises when there's a bean method
+ * accepting a primitive type (double or float) and also has a annotation on the 
+ * method (ex: @TransactionAttribute). Furthermore, the bean needs to have a
+ * corresponding entry (minimally ejb-name and ejb-class) in ejb-jar.xml, for this
+ * issue to manifest.
+ *
+ * @author Jaikiran Pai
+ * @version $Revision: $
+ */
+public class PrimitiveHandlingTestCase extends JBossTestCase
+{
+
+   /**
+    * Logger
+    */
+   private static final Logger logger = Logger.getLogger(PrimitiveHandlingTestCase.class);
+
+   /**
+    * Constructor
+    * 
+    * @param name
+    */
+   public PrimitiveHandlingTestCase(String name)
+   {
+      super(name);
+   }
+
+   public static Test suite() throws Exception
+   {
+      return getDeploySetup(PrimitiveHandlingTestCase.class, "ejbthree1629.jar");
+   }
+
+   /**
+    * Test that the bean has been deployed and available for
+    * method invocations.
+    * 
+    * @throws Throwable
+    */
+   public void testBeanInvocation() throws Throwable
+   {
+      Context ctx = new InitialContext();
+      String jndiName = PrimitiveTesterWithTransactionBean.JNDI_NAME;
+      Object bean = ctx.lookup(jndiName);
+      logger.info("Successfully looked up the bean at " + jndiName);
+
+      assertNotNull("Object returned from JNDI lookup for " + jndiName + " is null", bean);
+      assertTrue("Object returned from JNDI lookup for " + jndiName + " is not an instance of "
+            + PrimitiveTesterRemote.class, (bean instanceof PrimitiveTesterRemote));
+
+      // Call the method on the bean
+      PrimitiveTesterRemote primitiveTesterBean = (PrimitiveTesterRemote) bean;
+      primitiveTesterBean.doOpAndReturnDouble(2.0);
+      logger.info("Successfully called doOpAndReturnDouble on the bean");
+      primitiveTesterBean.doOpAndReturnFloat(3.0f);
+      logger.info("Successfully called doOpAndReturnFloat on the bean");
+   }
+
+}
Index: src/test/java/org/jboss/ejb3/test/ejbthree1629/PrimitiveTesterWithTransactionBean.java
===================================================================
--- src/test/java/org/jboss/ejb3/test/ejbthree1629/PrimitiveTesterWithTransactionBean.java	(revision 0)
+++ src/test/java/org/jboss/ejb3/test/ejbthree1629/PrimitiveTesterWithTransactionBean.java	(revision 0)
@@ -0,0 +1,69 @@
+/*
+ * 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.
+ */
+package org.jboss.ejb3.test.ejbthree1629;
+
+import javax.ejb.Remote;
+import javax.ejb.Stateless;
+import javax.ejb.TransactionAttribute;
+import javax.ejb.TransactionAttributeType;
+
+import org.jboss.ejb3.annotation.RemoteBinding;
+
+/**
+ * PrimitiveTesterWithTransactionBean
+ * 
+ * Will be used for testing EJBTHREE-1629 issue. The issue happens
+ * only when the methods have a annotaiton present like @TransactionAttribute
+ * and accept primitive type parameters (especially double or float). To reproduce
+ * the issue, there needs to be a entry for this bean in the ejb-jar.xml too, minimally
+ * just the ejb-name and ejb-class. 
+ * 
+ *
+ * @author Jaikiran Pai
+ * @version $Revision: $
+ */
+@Stateless
+@Remote(PrimitiveTesterRemote.class)
+@RemoteBinding(jndiBinding = PrimitiveTesterWithTransactionBean.JNDI_NAME)
+public class PrimitiveTesterWithTransactionBean implements PrimitiveTesterRemote
+{
+
+   /**
+    * Not appropriate to expose the JNDI_NAME through this class, since
+    * the client will have to be aware of the bean implementation class.
+    * But since this is just being used by a testcase, we are OK.
+    */
+   public static final String JNDI_NAME = "PrimitiveTesterWithTransactionBean@SomeJNDIName";
+
+   @TransactionAttribute (TransactionAttributeType.REQUIRED)
+   public double doOpAndReturnDouble(double someDouble)
+   {
+      return someDouble * 1.0;
+   }
+
+   @TransactionAttribute (TransactionAttributeType.REQUIRED)
+   public float doOpAndReturnFloat(float someFloat)
+   {
+      return someFloat * 1.0f;
+   }
+
+}
Index: src/test/java/org/jboss/ejb3/test/ejbthree1629/PrimitiveTesterRemote.java
===================================================================
--- src/test/java/org/jboss/ejb3/test/ejbthree1629/PrimitiveTesterRemote.java	(revision 0)
+++ src/test/java/org/jboss/ejb3/test/ejbthree1629/PrimitiveTesterRemote.java	(revision 0)
@@ -0,0 +1,38 @@
+/*
+ * 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.
+ */
+package org.jboss.ejb3.test.ejbthree1629;
+
+import javax.ejb.Remote;
+
+/**
+ * PrimitiveTesterRemote
+ *
+ * @author Jaikiran Pai
+ * @version $Revision: $
+ */
+@Remote
+public interface PrimitiveTesterRemote
+{
+   double doOpAndReturnDouble(double someDouble);
+   
+   float doOpAndReturnFloat(float someFloat);
+}
Index: src/test/resources/test/ejbthree1629/META-INF/ejb-jar.xml
===================================================================
--- src/test/resources/test/ejbthree1629/META-INF/ejb-jar.xml	(revision 0)
+++ src/test/resources/test/ejbthree1629/META-INF/ejb-jar.xml	(revision 0)
@@ -0,0 +1,21 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<ejb-jar
+        xmlns="http://java.sun.com/xml/ns/javaee"
+        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+        xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
+                            http://java.sun.com/xml/ns/javaee/ejb-jar_3_0.xsd"
+        version="3.0">
+
+   <enterprise-beans>
+   
+   		<session>
+            <ejb-name>PrimitiveTesterWithTransactionBean</ejb-name>
+            <ejb-class>org.jboss.ejb3.test.ejbthree1629.PrimitiveTesterWithTransactionBean</ejb-class>
+      	</session>
+
+    
+   </enterprise-beans>
+
+	
+   
+</ejb-jar>
Index: build-test.xml
===================================================================
--- build-test.xml	(revision 82546)
+++ build-test.xml	(working copy)
@@ -270,6 +270,11 @@
       <jvmarg value="-Djgroups.udp.ip_ttl=${jbosstest.udp.ip_ttl}" />
       <jvmarg value="-Djboss.messaging.ServerPeerID=1" />
    </server>
+  	
+  	<!-- ejbthree1629 -->
+    <server name="ejbthree1629" host="${node0}">
+      <jvmarg value="${ejb3.jboss.jvmargs}" />
+    </server>
 
   </server:config>
 
@@ -4171,6 +4176,22 @@
          </fileset>
       </jar>
    </target>
+	
+	<target name="ejbthree1629"
+	      description="Builds the jar file(s) needed for testing EJBTHREE-1629."
+	      >
+
+	      <mkdir dir="${build.lib}"/>
+
+		<jar jarfile="${build.lib}/ejbthree1629.jar">
+	         <fileset dir="${build.classes}">
+	            <include name="org/jboss/ejb3/test/ejbthree1629/*.class"/>
+	         </fileset>
+	         <fileset dir="${resources}/test/ejbthree1629">
+	            <include name="META-INF/*.xml"/>
+	         </fileset>
+		</jar>
+	</target>
    
    <target name="jars" depends="statefulproxyfactoryoverride, removedislocal, statelesscreation, defaultremotebindings, localfromremote, clusteredjms, entityoptimisticlocking, concurrentnaming, propertyreplacement, persistenceunits, appclient, tck5sec, invalidtxmdb, descriptortypo, libdeployment, homeinterface, arjuna, mdbtransactions, unauthenticatedprincipal, clusteredservice, invoker, classloader,
       concurrent,
@@ -4199,7 +4220,7 @@
       timer, benchmark, entity, joininheritance, singletable, tableperclass, dependent, mdb, manytomany, regression,
       composite, composite2, entitycallback, relationships, ssl, ssladvanced, clusteredsession, strictpool, jacc,
       localcall, interceptors, interceptors2, interceptors3, iiop, clientinterceptor,
-      statelesscreation, changexml, externalrefscoped, singleton"/>
+      statelesscreation, changexml, externalrefscoped, singleton, ejbthree1629"/>
 
    <target name="test" depends="init" if="test"
       description="Execute all tests in the given test directory.">
