Subject | Re: [IB-Java] Re: Firebirdsql and Jboss Connection pooling, how to use it? |
---|---|
Author | David Jencks |
Post date | 2002-01-11T14:08:07Z |
On 2002.01.11 04:34:00 -0500 jwcanada wrote:
below won't work. I need to provide an ObjectFactory implementation so you
get the same DataSource back each time you look it up. Coming soon..
david jencks
> David,After looking at the above, I am about 99.9% sure that what I suggested
>
> 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
below won't work. I need to provide an ObjectFactory implementation so you
get the same DataSource back each time you look it up. Coming soon..
david jencks
>
> 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/
>
>
>
>
>