[Resin-interest] com.caucho.sql.UserConnection.createSQLXML throws UnsupportedOperationException

2010-06-29 Thread Marcin Koziej

Hello!

I have the following issue with resin 4.0.7:

When using a DataSource provided by resin, and trying to use createSQLXML i get 
UnsupportedOperationException.

the Datasource is defined as follows in web.xml:

database jndi-name=jdbc/foobar
driver type=com.microsoft.sqlserver.jdbc.SQLServerDriver
urljdbc:sqlserver://foobar.pl;databaseName=db/url
useru/user
passwordp/password
/driver
/database


The driver I am using seems to support this operation, because when using  
org.springframework.jdbc.datasource.SimpleDriverDataSource in uni tests  I am 
able to create the XML object.

How should I handle this issue? Use different DataSource implementation? (like 
commons-dbcp?)
I'd like to use the one provided by Resin though.

Regards,

Marcin Koziej



___
resin-interest mailing list
resin-interest@caucho.com
http://maillist.caucho.com/mailman/listinfo/resin-interest


Re: [Resin-interest] com.caucho.sql.UserConnection.createSQLXML throws UnsupportedOperationException

2010-06-29 Thread Alex
 
 
 The driver I am using seems to support this operation, because when using  
 org.springframework.jdbc.datasource.SimpleDriverDataSource in uni tests  I am 
 able to create the XML object.
 
 How should I handle this issue? Use different DataSource implementation? 
 (like commons-dbcp?)
 I'd like to use the one provided by Resin though.

Thanks Marcin,

I filed a bug http://bugs.caucho.com/view.php?id=4092

Using a different DataSource implementation for now is a good option or use the 
code below to get to access the underlying connection object as a work around:

  InitialContext context = new InitialContext();
  DataSource ds = (DataSource)context.lookup(java:comp/env/jdbc/mysql);
  Connection conn = ds.getConnection();
  out.println(((com.caucho.sql.UserConnection)conn).getDriverConnection());

Thanks,


Alex

 
 Regards,
 
 Marcin Koziej
 
 
 
 ___
 resin-interest mailing list
 resin-interest@caucho.com
 http://maillist.caucho.com/mailman/listinfo/resin-interest



___
resin-interest mailing list
resin-interest@caucho.com
http://maillist.caucho.com/mailman/listinfo/resin-interest