[Jboss-cvs] JBossAS SVN: r56722 - trunk/testsuite/src/main/org/jboss/test/cmp2/lob

jboss-cvs-commits at lists.jboss.org jboss-cvs-commits at lists.jboss.org
Mon Sep 11 07:30:44 EDT 2006


Author: dimitris at jboss.org
Date: 2006-09-11 07:30:37 -0400 (Mon, 11 Sep 2006)
New Revision: 56722

Added:
   trunk/testsuite/src/main/org/jboss/test/cmp2/lob/GetObjectParameter.java
   trunk/testsuite/src/main/org/jboss/test/cmp2/lob/GetSetObjectParameter.java
Modified:
   trunk/testsuite/src/main/org/jboss/test/cmp2/lob/Facade.java
   trunk/testsuite/src/main/org/jboss/test/cmp2/lob/FacadeHome.java
   trunk/testsuite/src/main/org/jboss/test/cmp2/lob/FacadeSessionBean.java
   trunk/testsuite/src/main/org/jboss/test/cmp2/lob/ValueHolder.java
   trunk/testsuite/src/main/org/jboss/test/cmp2/lob/ValueHolderStateFactory.java
Log:
synch with Branch_4_0

Modified: trunk/testsuite/src/main/org/jboss/test/cmp2/lob/Facade.java
===================================================================
--- trunk/testsuite/src/main/org/jboss/test/cmp2/lob/Facade.java	2006-09-11 11:28:12 UTC (rev 56721)
+++ trunk/testsuite/src/main/org/jboss/test/cmp2/lob/Facade.java	2006-09-11 11:30:37 UTC (rev 56722)
@@ -1,24 +1,24 @@
 /*
-  * JBoss, Home of Professional Open Source
-  * Copyright 2005, JBoss Inc., and individual contributors as indicated
-  * by the @authors tag. See the copyright.txt 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.
-  */
+* JBoss, Home of Professional Open Source
+* Copyright 2005, JBoss Inc., and individual contributors as indicated
+* by the @authors tag. See the copyright.txt 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.test.cmp2.lob;
 
 import java.rmi.RemoteException;

Modified: trunk/testsuite/src/main/org/jboss/test/cmp2/lob/FacadeHome.java
===================================================================
--- trunk/testsuite/src/main/org/jboss/test/cmp2/lob/FacadeHome.java	2006-09-11 11:28:12 UTC (rev 56721)
+++ trunk/testsuite/src/main/org/jboss/test/cmp2/lob/FacadeHome.java	2006-09-11 11:30:37 UTC (rev 56722)
@@ -1,24 +1,24 @@
 /*
-  * JBoss, Home of Professional Open Source
-  * Copyright 2005, JBoss Inc., and individual contributors as indicated
-  * by the @authors tag. See the copyright.txt 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.
-  */
+* JBoss, Home of Professional Open Source
+* Copyright 2005, JBoss Inc., and individual contributors as indicated
+* by the @authors tag. See the copyright.txt 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.test.cmp2.lob;
 
 /**

Modified: trunk/testsuite/src/main/org/jboss/test/cmp2/lob/FacadeSessionBean.java
===================================================================
--- trunk/testsuite/src/main/org/jboss/test/cmp2/lob/FacadeSessionBean.java	2006-09-11 11:28:12 UTC (rev 56721)
+++ trunk/testsuite/src/main/org/jboss/test/cmp2/lob/FacadeSessionBean.java	2006-09-11 11:30:37 UTC (rev 56722)
@@ -1,24 +1,24 @@
 /*
-  * JBoss, Home of Professional Open Source
-  * Copyright 2005, JBoss Inc., and individual contributors as indicated
-  * by the @authors tag. See the copyright.txt 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.
-  */
+* JBoss, Home of Professional Open Source
+* Copyright 2005, JBoss Inc., and individual contributors as indicated
+* by the @authors tag. See the copyright.txt 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.test.cmp2.lob;
 
 

Added: trunk/testsuite/src/main/org/jboss/test/cmp2/lob/GetObjectParameter.java
===================================================================
--- trunk/testsuite/src/main/org/jboss/test/cmp2/lob/GetObjectParameter.java	2006-09-11 11:28:12 UTC (rev 56721)
+++ trunk/testsuite/src/main/org/jboss/test/cmp2/lob/GetObjectParameter.java	2006-09-11 11:30:37 UTC (rev 56722)
@@ -0,0 +1,29 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2005, JBoss Inc., and individual contributors as indicated
+* by the @authors tag. See the copyright.txt 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.test.cmp2.lob;
+
+/**
+ @author Scott.Stark at jboss.org
+ @version $Revision: 37393 $ */
+public class GetObjectParameter
+{
+}

Added: trunk/testsuite/src/main/org/jboss/test/cmp2/lob/GetSetObjectParameter.java
===================================================================
--- trunk/testsuite/src/main/org/jboss/test/cmp2/lob/GetSetObjectParameter.java	2006-09-11 11:28:12 UTC (rev 56721)
+++ trunk/testsuite/src/main/org/jboss/test/cmp2/lob/GetSetObjectParameter.java	2006-09-11 11:30:37 UTC (rev 56722)
@@ -0,0 +1,102 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2005, JBoss Inc., and individual contributors as indicated
+* by the @authors tag. See the copyright.txt 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.test.cmp2.lob;
+
+import java.sql.PreparedStatement;
+import java.sql.SQLException;
+import java.sql.Types;
+import java.sql.ResultSet;
+import java.sql.Blob;
+import java.io.IOException;
+
+import org.jboss.ejb.plugins.cmp.jdbc.JDBCParameterSetter;
+import org.jboss.ejb.plugins.cmp.jdbc.JDBCResultSetReader;
+import org.jboss.logging.Logger;
+import org.jboss.invocation.MarshalledValue;
+
+/**
+ @author Scott.Stark at jboss.org
+ @version $Revision: 37393 $
+ */
+public class GetSetObjectParameter
+   implements JDBCParameterSetter, JDBCResultSetReader
+{
+   public Object get(ResultSet rs, int index, Class destination, Logger log) throws SQLException
+   {
+      Object value = rs.getObject(index);
+      log.debug("get: i=" + index + ", destination="+destination+", value=" + value);
+      Object result = value;
+      if(rs.wasNull())
+      {
+         result = null;
+      }
+      else if( value instanceof MarshalledValue )
+      {
+         MarshalledValue mv = (MarshalledValue) value;
+         try
+         {
+            result = mv.get();
+         }
+         catch (Exception e)
+         {
+            SQLException sqe = new SQLException("Unable to extract MarshalledValue");
+            sqe.initCause(e);
+            throw sqe;
+         }
+      }
+      return result;
+   }
+
+   public void set(PreparedStatement ps, int index, int jdbcType, Object value,
+      Logger log) throws SQLException
+   {
+      log.debug("set: i=" + index + ", jdbcType="+jdbcType+", value=" + value);
+      if( value instanceof MarshalledValue )
+      {
+         MarshalledValue mv = (MarshalledValue) value;
+         try
+         {
+            value = mv.get();
+         }
+         catch (Exception e)
+         {
+            SQLException sqe = new SQLException("Unable to extract MarshalledValue");
+            sqe.initCause(e);
+            throw sqe;
+         }
+      }
+
+      switch( jdbcType )
+      {
+         case Types.BLOB:
+         {
+            ps.setObject(index, value, jdbcType);
+            break;
+         }
+         case Types.OTHER:
+            ps.setObject(index, value);
+            break;
+         default:
+            throw new SQLException("Unsupported jdbcType: "+jdbcType);
+      }
+   }
+}

Modified: trunk/testsuite/src/main/org/jboss/test/cmp2/lob/ValueHolder.java
===================================================================
--- trunk/testsuite/src/main/org/jboss/test/cmp2/lob/ValueHolder.java	2006-09-11 11:28:12 UTC (rev 56721)
+++ trunk/testsuite/src/main/org/jboss/test/cmp2/lob/ValueHolder.java	2006-09-11 11:30:37 UTC (rev 56722)
@@ -1,24 +1,24 @@
 /*
-  * JBoss, Home of Professional Open Source
-  * Copyright 2005, JBoss Inc., and individual contributors as indicated
-  * by the @authors tag. See the copyright.txt 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.
-  */
+* JBoss, Home of Professional Open Source
+* Copyright 2005, JBoss Inc., and individual contributors as indicated
+* by the @authors tag. See the copyright.txt 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.test.cmp2.lob;
 
 import java.io.Serializable;
@@ -30,6 +30,7 @@
 public class ValueHolder
    implements Serializable
 {
+   static final long serialVersionUID = 7517067716611752031L;
    private String value;
    private boolean dirty;
 

Modified: trunk/testsuite/src/main/org/jboss/test/cmp2/lob/ValueHolderStateFactory.java
===================================================================
--- trunk/testsuite/src/main/org/jboss/test/cmp2/lob/ValueHolderStateFactory.java	2006-09-11 11:28:12 UTC (rev 56721)
+++ trunk/testsuite/src/main/org/jboss/test/cmp2/lob/ValueHolderStateFactory.java	2006-09-11 11:30:37 UTC (rev 56722)
@@ -1,24 +1,24 @@
 /*
-  * JBoss, Home of Professional Open Source
-  * Copyright 2005, JBoss Inc., and individual contributors as indicated
-  * by the @authors tag. See the copyright.txt 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.
-  */
+* JBoss, Home of Professional Open Source
+* Copyright 2005, JBoss Inc., and individual contributors as indicated
+* by the @authors tag. See the copyright.txt 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.test.cmp2.lob;
 
 import org.jboss.ejb.plugins.cmp.jdbc.CMPFieldStateFactory;




More information about the jboss-cvs-commits mailing list