Subject Re: [Firebird-Java] Re: 'Cannot provide new connection' error in EJB3 EAR app on Glassfish 2.1 (Sun)
Author Lutz Müller
Ok, since this seems to be solved, i will start a new thread for my problems
with the glassfish connection pool :)

On Wednesday 29 April 2009 18:01:10 meinhardt.baer wrote:
> OK, I changed my Glassfish 2.1 connection pool settings to:
> Resource type: javax.sql.DataSource
> Datasource classname: org.firebirdsql.pool.sun.AppServerDataSource
>
> and now I can show the list of records without errors. The architecture of
> my application is - there is EJB module with EJB3 entities and EJB3 session
> beans as facades to this entities and then there is WAR module with special
> controller class that is JSF managed bean and that call the EJB3 facade
> from EJB module. Controller is used by JSF page backing bean. And the JSF
> itself is ICEfaces page. It is being developed on Netbeans 6.5.1 with
> ICEFaces plugins. So - I guess - this is normal architecture and now it is
> clear that this can be made with Firebird database. Well - I guess - there
> can be scalability issues due to not using pooled connections, but at
> present - it is good as it is.
>
> --- In Firebird-Java@yahoogroups.com, Lutz Müller <lutz.mueller@...> wrote:
> > i dont know yet if this could be related, but i ran into the following
> > issue with jaybird and glassfish connection pooling just yesterday. atm
> > im trying to setup a testscenario.
> > the following happened:
> > we tried to deploy a webapplication (db access via spring/hibernate) that
> > is normally deployed on tomcat to glassfish 2.1. The first thing we
> > noticed was the infamous "Could not obtain connection during blocking
> > timeout (5000 ms)" exception when our application started to use more
> > than 10 connections at a time.
> > Firts thing we checked were the poolsettings ofc. Nothing special there.
> > When i raised the minimum number of connections in pool above 10, the
> > creation of the pool itself would fail, otherwise the error would occur
> > when our application requested more than 10 connections from pool.
> > Next suspect was xinetd, since we were running classic server.i changed
> > the settings in et/xinetd.d/firebird, then replaced classic with
> > superserver. but the problem remained.
> > at the moment i am trying to setup a testcase on my developer machine and
> > plan to debug in to glassfishs and jaybirds sources to see whats going
> > on.
> >
> > lutz
> >
> > On Monday 27 April 2009 22:30:43 Roman Rokytskyy wrote:
> > > > And this connection pool is then used by JDBC data source. I guess -
> > > > the only option is to change
> > > > org.firebirdsql.pool.sun.AppServerConnectionPoolDataSource but what
> > > > other value can I use - I guess, it can be the same as on other J2EE
> > > > server like JBoss (it should have JDBC data source and connection
> > > > pool as well).
> > >
> > > If you do not need XA transactions, you can use the configuration with
> > > JDBC driver. The connection pooling should be provided out of the box
> > > by the Sun Application Server (sorry, I did not use it for a long time,
> > > but there must be some docs how to configure connection pool with JDBC
> > > driver).
> > >
> > > If you need XA transactions, there is no other way to use something
> > > different than AppServerConnectionPoolDataSource. And I need a
> > > reproducable test case (e.g. Server: EJB + config, client: JUnit) that
> > > would reproduce the issue.
> > >
> > > Roman