Subject FBWrappingDataSource again
Author Rick Fincher
Hi,
 
Some more questions on FBWrappingDataSource in an unmanaged environment.
 
Is the "databaseName" the same as the connection URL in FBDriver?
 
I can connect to the DB using FBDriver, but when I use the code below to try to set up a pooled connection FBWrappingDataSource , I get the error:
"getting new fbwds connection failed! Error: java.sql.SQLException: Problem getting connection: javax.resource.ResourceException: could not get a db connection!"
What am I messing up here?
 
Thanks,
 
Rick
 
         try
            {
            fbwds = new org.firebirdsql.jdbc.FBWrappingDataSource();
            }
         catch (ResourceException e)
            {
            System.out.println("Could Not create org.firebirdsql.jdbc.FBWrappingDataSource, error: "+e+"\n");
            System.exit(0);
            }
            
            System.out.println("FBWrappingDataSource successfully loaded.");          
        fbwds.setDatabaseName("jdbc:firebirdsql:server.tbird.com/3050:/db/databases/mydb.gdb");
        fbwds.setUser("userName");
        fbwds.setPassword("password");
        fbwds.setIdleTimeoutMinutes(5);
        fbwds.setPooling(true);
        fbwds.setMinSize(5);
        fbwds.setMaxSize(50);
 
        try
            {
            c = fbwds.getConnection();
            return c;
            }
        catch (SQLException e)
           {
           System.out.println("getting new fbwds connection failed! Error: "+e+"\n");
           showSQLException(e);
           System.exit(0);
           return null;
           }
 
getting new fbwds connection failed! Error: java.sql.SQLException: Problem getting connection: javax.resource.ResourceException: could not get a db connection!