Subject | Re: [IB-Java] Re: Firebirdsql and Jboss Connection pooling, how to use it? |
---|---|
Author | David Jencks |
Post date | 2002-01-11T13:35:28Z |
On 2002.01.11 04:34:00 -0500 jwcanada wrote:
indicate that jboss has a xml based deployment descriptor system for server
components that makes writing code to set up datasources unnecessary: you
just include a little bit of xml configuration information. I don't know
how to do something equivalent for Tomcat, which doesn't mean it's not
possible.
david jencks
> David,Well, if you aren't using the ejb container, none. I was trying to
>
> 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?
>
indicate that jboss has a xml based deployment descriptor system for server
components that makes writing code to set up datasources unnecessary: you
just include a little bit of xml configuration information. I don't know
how to do something equivalent for Tomcat, which doesn't mean it's not
possible.
david jencks
> 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/
>
>
>
>
>