Just use a simple ResultSet:
Connection connection = ((DataSource)new
InitialContext().lookup("java:comp/env/jdbc/DefaultDS")).getConnection();
Statement stmt = connection.createStatement();
ResultSet rs = stmt.executeQuery("SELECT count(*) from account");
----- Original Message -----
From: "Jose Ramon Diaz" <[EMAIL PROTECTED]>
To: "JBOSS Mail List" <[EMAIL PROTECTED]>
Sent: Thursday, April 19, 2001 1:41 PM
Subject: [JBoss-user] ResultSet or minerva.ResultSetInPool
> Hi,
>
> We are trying to obtain a ResultSet from an Oracle database. We find
> a trouble with Minerva types,
> We are using JBoss 2.2, with JDBC 2.0 and Oracle 8.1.7.
>
> We are using MinervaPool driver for the JDBC. In our configuration
> files,
> - jboss.jcml: We use 'org.jboss.minerva.xa.XADataSourceImpl' in
> the Pool configuration
> - jboss.properties:
> #jboss.xa.xidclass=oracle.jdbc.xa.OracleXid
>
> First, is OraclePool (oracle.jdbc.xa.client.OracleXADataSource) better
> than MinervaPool (org.jboss.minerva.xa.XADataSourceImpl) ?
> Second, When we try to execute a ResultSet from the EJB it throws:
>
> [noticiasAccesoBD] Exception in
> noticiasAccesoBD::obtenerNoticiasBoletin()
> [noticiasAccesoBD] java.lang.ClassCastException:
> org.opentools.minerva.jdbc.ResultSetInPool
> [noticiasAccesoBD] at
> es.westlaw.noticiasAccesoBDBean.obtenerNoticiasBoletin(Compiled Code)
>
> The code we use:
> l_query = "SELECT noticia FROM noticias";
> l_pstmt = l_con.prepareStatement(l_query);
> l_rst = l_pstmt.executeQuery();
> // which of the next two lines should be here??
> // l_rst2 =
> ((org.jboss.minerva.jdbc.ResultSetInPool)l_rst).getUnderlyingResultSet()
> ; // JBOSS
> l_rst2 =
>
((org.opentools.minerva.jdbc.ResultSetInPool)l_rst).getUnderlyingResultSet()
> ; // JBOSS
> while (l_rst2.next())
> {
> l_noticiasCLOB = ((OracleResultSet)l_rst2).getCLOB(1);
> }
>
> Any help would be appreciated...
>
> Thanks in advance...
>
> Jose R. & Juan
>
>
>
>
>
>
>
>
>
>
>
>
> _______________________________________________
> JBoss-user mailing list
> [EMAIL PROTECTED]
> http://lists.sourceforge.net/lists/listinfo/jboss-user
>
_______________________________________________
JBoss-user mailing list
[EMAIL PROTECTED]
http://lists.sourceforge.net/lists/listinfo/jboss-user