You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@myfaces.apache.org by im...@apache.org on 2007/08/19 14:26:06 UTC

svn commit: r567389 - /myfaces/orchestra/trunk/core/src/main/java/org/apache/myfaces/orchestra/connectionManager/ConnectionManagerDataSource.java

Author: imario
Date: Sun Aug 19 05:26:06 2007
New Revision: 567389

URL: http://svn.apache.org/viewvc?view=rev&rev=567389
Log:
throw UOE for the jdk 1.6 interface - reflection code commented - lets activate it once we have to cross this bridge.

Modified:
    myfaces/orchestra/trunk/core/src/main/java/org/apache/myfaces/orchestra/connectionManager/ConnectionManagerDataSource.java

Modified: myfaces/orchestra/trunk/core/src/main/java/org/apache/myfaces/orchestra/connectionManager/ConnectionManagerDataSource.java
URL: http://svn.apache.org/viewvc/myfaces/orchestra/trunk/core/src/main/java/org/apache/myfaces/orchestra/connectionManager/ConnectionManagerDataSource.java?view=diff&rev=567389&r1=567388&r2=567389
==============================================================================
--- myfaces/orchestra/trunk/core/src/main/java/org/apache/myfaces/orchestra/connectionManager/ConnectionManagerDataSource.java (original)
+++ myfaces/orchestra/trunk/core/src/main/java/org/apache/myfaces/orchestra/connectionManager/ConnectionManagerDataSource.java Sun Aug 19 05:26:06 2007
@@ -180,10 +180,58 @@
 	public Object unwrap(Class iface) throws SQLException
 	{
 		throw new UnsupportedOperationException();
+		/*
+		try
+		{
+			if (iface.isAssignableFrom(dataSource.getClass()))
+			{
+				return dataSource;
+			}
+
+			Method method = dataSource.getClass().getMethod("unwrap", new Class[]{Class.class});
+			return method.invoke(dataSource, new Object[] { iface });
+		}
+		catch (NoSuchMethodException e)
+		{
+			throw new UnsupportedOperationException();
+		}
+		catch (IllegalAccessException e)
+		{
+			throw new SQLException(e);
+		}
+		catch (InvocationTargetException e)
+		{
+			throw new SQLException(e);
+		}
+		*/
 	}
 
 	public boolean isWrapperFor(Class iface) throws SQLException
 	{
-		return false;
+		throw new UnsupportedOperationException();
+
+		/*
+		try
+		{
+			if (iface.isAssignableFrom(dataSource.getClass()))
+			{
+				return true;
+			}
+			Method method = dataSource.getClass().getMethod("isWrapperFor", new Class[]{Class.class});
+			return Boolean.TRUE.equals(method.invoke(dataSource, new Object[] { iface }));
+		}
+		catch (NoSuchMethodException e)
+		{
+			throw new UnsupportedOperationException();
+		}
+		catch (IllegalAccessException e)
+		{
+			throw new SQLException(e);
+		}
+		catch (InvocationTargetException e)
+		{
+			throw new SQLException(e);
+		}
+		*/
 	}
 }