Subject Re: [IB-Java] Re: Firebirdsql and Jboss Connection pooling, how to use it?
Author David Jencks
How would you like to be the test guinea pig for this (I don't have
Catalina readily available/set up)

Include the encloded class in the org.firebirdsql.jdbc directory. ( I hope
this list allows attachments!)

Include something like this in catalina's server.xml

<Resource name="java:/firebirdDS" auth="Container"

type="org.firebirdsql.jdbc.FBWrappingDataSource"/>

<ResourceParams name="java:/firebirdDS">

<parameter>

<name>factory</name>

<value>org.firebirdsql.jdbc.FBDataSourceObjectFactory</value>

</parameter>

<parameter>

<name>DatabaseName</name>

<value>localhost/3050:/usr/.....(url)</value>

</parameter>

<parameter>

<name>User</name>

<value>sysdba</value>

</parameter>


<parameter>

<name>Password/name>

<value>masterkey</value>

</parameter>


<parameter>

<name>MinSize</name>

<value>1</value>

</parameter>


<parameter>

<name>MaxSize</name>

<value>10</value>

</parameter>


<parameter>

<name>BlockingTimeout</name>

<value>5000</value>

</parameter>


<parameter>

<name>IdleTimeoutMinutes</name>

<value>30</value>

</parameter>



</ResourceParams>


I made it set pooling always true: if this seems like a bad idea we could
make it configurable.

Let me know if it works ;-)

david jencks

On 2002.01.11 04:34:00 -0500 jwcanada wrote:
> David,
>
> Thank you for the example. Here is a document on how to use jndi.
>
> http://jakarta.apache.org/tomcat/tomcat-4.0-doc/jndi-resources-
> howto.html
>
> If use the codes below, what is the purpose of using JBoss Pooling as
> your wrapped Datasouce has already provided?
>
> jw
>
>
>
> --- In IB-Java@y..., David Jencks <davidjencks@d...> wrote:
> > >
> >
> > I think executing code like this on container startup will work:
> >
> > private final static String DB_DATASOURCE_URL =
> > "localhost/3050:tmp/testfb.gdb";
> > private final static String DB_USER = "sysdba";
> > private final static String DB_PASSWORD = "masterkey";
> > private final static String JNDI_NAME = "java:/firebirdSQLDS";
> >
> >
> >
> > FBWrappingDataSource ds = new FBWrappingDataSource();
> > ds.setDatabaseName(DB_DATASOURCE_URL);
> > ds.setUser(DB_USER);
> > ds.setPassword(DB_PASSWORD);
> > ds.setMinSize(3);
> > ds.setMaxSize(5);
> > ds.setBlockingTimeout(1000);
> > ds.setIdleTimeoutMinutes(15);
> > ds.setPooling(true);
> >
> > InitialContext ctx = new InitialConext();
> > ctx.bind(JNDI_NAME, ds);
> >
> > Note that the db url is not a jdbc url and DOES NOT have
> jdbc:firebirdsql:
> > at the beginning.
> >
> > If you need each user to log on as themselves, I recommend not using
> > pooling, unless you know for sure the maximum number of users.
> Each user
> > gets up to maxsize connections, rather than maxsize being the total
> number
> > of connections available for everyone together.
> >
> > I don't know what facilities tomcat provides for running code at
> startup.
> > This is one of the nice things about the jboss mbean architecture,
> it is
> > very easy.
> >
> > david jencks
>
>
>
> To unsubscribe from this group, send an email to:
> IB-Java-unsubscribe@egroups.com
>
>
>
> Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
>
>
>
>
>