Pretty weird. XAPoolDataSource clearly implements
DataSource. Unless, of course, this is a ClassLoader problem where the
DataSource it implements is not the DataSource you're looking for...
Again, do the PostgreSQL drivers have their own javax.sql classes
in their JAR?
Aaron
On 9 Oct 2000, Lars [iso-8859-1] Bj�nnes wrote:
> Cool :-) (and thanks for quick reply)
>
> I dug a little further into the problem and split the code up somewhat
> more. I've tried to put in some comments here, telling what I got on
> stdout etc. :
>
> protected Connection getConnection() throws SQLException {
> try {
>
> Context naming = new InitialContext();
> NamingEnumeration n = naming.list("java:comp/env");
> while(n.hasMore()) {
>
> Object o = n.next();
> // ** Prints: Postgresql: javax.naming.LinkRef
> System.out.println(o);
> }
>
> Object o = naming.lookup("java:comp/env/Postgresql");
> // ** This println gives:
> // ** org.jboss.minerva.datasource.XAPoolDataSource@50daa1b3
> System.out.println(o);
> DataSource ds;
> Connection conn;
>
> // ** This is where it goes haywire **
> ds = (DataSource) o;
>
> // Never gets to this
> conn = ds.getConnection();
> return conn;
> }....
>
>
>
--
--------------------------------------------------------------
To subscribe: [EMAIL PROTECTED]
To unsubscribe: [EMAIL PROTECTED]
Problems?: [EMAIL PROTECTED]