Subject Re: [Firebird-Java] FBWrappingDataSource again
Author David Jencks
As I recall you need to use just this part:

fbwds.setDatabaseName("server.tbird.com/3050:/db/databases/mydb.gdb");

You already know you are using the fb stuff so you don't need it in the
"url" like string.

david jencks

On 2002.07.03 16:27:24 -0400 Rick Fincher wrote:
> 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!
>
>
> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
> <HTML><HEAD>
> <META http-equiv=Content-Type content="text/html; charset=iso-8859-1">
> <META content="MSHTML 6.00.2600.0" name=GENERATOR>
> <STYLE></STYLE>
> </HEAD>
> <BODY bgColor=#ffffff>
>
>
> <DIV><FONT face=Arial size=2>Hi,</FONT></DIV>
> <DIV><FONT face=Arial size=2></FONT> </DIV>
> <DIV><FONT face=Arial size=2>Some more questions on FBWrappingDataSource
> in an
> unmanaged environment.</FONT></DIV>
> <DIV><FONT face=Arial size=2></FONT> </DIV>
> <DIV><FONT face=Arial size=2>Is the "databaseName" the same as the
> connection
> URL in FBDriver?</FONT></DIV>
> <DIV><FONT face=Arial size=2></FONT> </DIV>
> <DIV><FONT face=Arial size=2>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:</FONT></DIV>
> <DIV>
> <DIV><FONT face=Arial size=2>"getting new fbwds connection failed! Error:
>
> java.sql.SQLException: Problem getting connection:
> javax.resource.ResourceException: could not get a db
> connection!"<BR></FONT></DIV>
> <DIV><FONT face=Arial size=2>What am I messing up here?</FONT></DIV>
> <DIV><FONT face=Arial size=2></FONT> </DIV>
> <DIV><FONT face=Arial size=2>Thanks,</FONT></DIV>
> <DIV><FONT face=Arial size=2></FONT> </DIV>
> <DIV><FONT face=Arial size=2>Rick</FONT></DIV>
> <DIV><FONT face=Arial size=2> </DIV></FONT></DIV>
> <DIV><FONT face=Arial
> size=2>         try<BR>           
>
> {<BR>           
> fbwds =
> new
> org.firebirdsql.jdbc.FBWrappingDataSource();<BR>           
>
> }<BR>         catch
> (ResourceException
> e)<BR>           
> {<BR>           
> System.out.println("Could Not create
> org.firebirdsql.jdbc.FBWrappingDataSource,
> error:
> "+e+"\n");<BR>           
>
> System.exit(0);<BR>           
>
> }<BR>            <BR>           
>
> System.out.println("FBWrappingDataSource successfully
> loaded.");          <BR></FONT></DIV>
> <DIV><FONT face=Arial size=2>       
> fbwds.setDatabaseName("jdbc:firebirdsql:server.tbird.com/3050:/db/databases/mydb.gdb");<BR>       
>
> fbwds.setUser("userName");<BR>       
> fbwds.setPassword("password");<BR>       
>
> fbwds.setIdleTimeoutMinutes(5);<BR>       
>
> fbwds.setPooling(true);<BR>       
> fbwds.setMinSize(5);<BR>       
> fbwds.setMaxSize(50);</FONT></DIV>
> <DIV><FONT face=Arial size=2></FONT> </DIV>
> <DIV><FONT face=Arial size=2>       
> try<BR>          
>  {<BR>            c
>
> =
> fbwds.getConnection();<BR>           
>
> return c;<BR>           
>
> }<BR>        catch (SQLException
> e)<BR>          
> {<BR>          
> System.out.println("getting new fbwds connection failed! Error:
> "+e+"\n");<BR>          
>
> showSQLException(e);<BR>          
>
> System.exit(0);<BR>          
>
> return
> null;<BR>           }</FONT></DIV>
> <DIV><FONT face=Arial size=2></FONT> </DIV>
> <DIV><FONT face=Arial size=2>getting new fbwds connection failed! Error:
> java.sql.SQLException: Problem getting connection:
> javax.resource.ResourceException: could not get a db
> connection!<BR></DIV></FONT>
> <br>
>
> <!-- |**|begin egp html banner|**| -->
>
> <table border=0 cellspacing=0 cellpadding=2>
> <tr bgcolor=#FFFFCC>
> <td align=center><font size="-1" color=#003399><b>Yahoo! Groups
> Sponsor</b></font></td>
> </tr>
> <tr bgcolor=#FFFFFF>
> <td align=center width=470><IMG SRC="http://us.a1.yimg.com/us.yimg.com/a/de/debtscape/dt_60_468x60north.gif"
> ALT="{short description of image}" WIDTH="468"
> HEIGHT="60" BORDER="0" USEMAP="#map5"><MAP NAME="map5">
> <AREA SHAPE="RECT" COORDS="286,42,435,57"
> HREF="http://rd.yahoo.com/M=229641.2166546.3626727.1829184/D=egroupweb/S=1705006764:HM/A=1142363/R=0/*http://promo.yahoo.com/debtscape/">
> <AREA SHAPE="RECT" COORDS="283,24,437,39"
> HREF="http://rd.yahoo.com/M=229641.2166546.3626727.1829184/D=egroupweb/S=1705006764:HM/A=1142363/R=1/*http://www.debtscape.org/debtcalc.htm">
> <AREA SHAPE="RECT" COORDS="284,3,465,19"
> HREF="http://rd.yahoo.com/M=229641.2166546.3626727.1829184/D=egroupweb/S=1705006764:HM/A=1142363/R=2/*http://www.debtscape.org/application.htm">
> </MAP></td>
> </tr>
> </table>
>
> <!-- |**|end egp html banner|**| -->
>
>
> <br>
> <tt>
> To unsubscribe from this group, send an email to:<BR>
> Firebird-Java-unsubscribe@yahoogroups.com<BR>
> <BR>
> </tt>
> <br>
>
> <br>
> <tt>Your use of Yahoo! Groups is subject to the <a
> href="http://docs.yahoo.com/info/terms/">Yahoo! Terms of
> Service</a>.</tt>
> </br>
>
> </BODY></HTML>
>