You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Dragomir Nikolov <d....@bg.seeburger.com> on 2001/09/27 18:19:15 UTC

Using Poolman without JNDI

Hello,
    I am trying to use the Poolman for JDBC connection for the struts
application I am developing.
    I have set up everything needed to run the Poolman. Initially it
runs ok. Connection is retrieved successfully using the
           DataSource dataSource = PoolMan.findDataSource("geniedb");

geniedb is the jndi name of my database defined in the poolman.xml
When I try to execute a query, the resulting ResultSet is empty
(although it should not be empty).
The same poolman.xml deployed into the Poolman web application works
just fine and the same query returns the appropriate data..
According to the poolman usersguide this way of retrieving a DataSource
should work without JNDI.

I am using tomcat 3.2.2, poolman 2.0.4 and mm.mysql-2.0.4.
Does anyone have ever experienced such problems?

Greetings Dragomir Nikolov



RE: Using Poolman without JNDI

Posted by Toni Charlot <to...@fdplus.com>.
I'm using tomcat 3.2.2 with poolman 2.04 with interbase and it works fine.
I'm using
the PoolmanResultSet though.  The only reason I didn't use Resultset was
because I needed
a scroll insensitive resultset and my JDBC driver did not return that.

               stmt = createPreparedStatement(conn, sqlScript);

stmt.setResultSetType(java.sql.ResultSet.TYPE_SCROLL_INSENSITIVE);
               result = (PoolManResultSet)stmt.executeQuery();

can you attach the code where you're getting the connection, preparing the
sqlScript and parsing the result set.  I can try it out here and see what
the difference is.

good luck,


-----Original Message-----
From: Dragomir Nikolov [mailto:d.nikolov@bg.seeburger.com]
Sent: Friday, September 28, 2001 4:09 AM
To: struts-user@jakarta.apache.org
Subject: Re: Using Poolman without JNDI


Thats not problem. I have this in my poolman.xml.
As wrote before the Poolman Web application works with this poolman.xml.
Accesses the Databeses and executes queries correctly.
I had a look into this web application. it uses the SQLUtil class for
operating over the database which is specific non JDBC way to do that. In
my application I am using the standard JDBC connection, dataSource and etc.
classes. That is the only difference.
It is really really strange. There are no reported problems by the api.
Just the resultset of every wuery is empty

Dragomir

Toni Charlot wrote:

> you should also have <dbname>geniedb</dbname> in poolman.xml?
>
> -----Original Message-----
> From: Dragomir Nikolov [mailto:d.nikolov@bg.seeburger.com]
> Sent: Thursday, September 27, 2001 12:19 PM
> To: struts-user@jakarta.apache.org
> Subject: Using Poolman without JNDI
>
> Hello,
>     I am trying to use the Poolman for JDBC connection for the struts
> application I am developing.
>     I have set up everything needed to run the Poolman. Initially it
> runs ok. Connection is retrieved successfully using the
>            DataSource dataSource = PoolMan.findDataSource("geniedb");
>
> geniedb is the jndi name of my database defined in the poolman.xml
> When I try to execute a query, the resulting ResultSet is empty
> (although it should not be empty).
> The same poolman.xml deployed into the Poolman web application works
> just fine and the same query returns the appropriate data..
> According to the poolman usersguide this way of retrieving a DataSource
> should work without JNDI.
>
> I am using tomcat 3.2.2, poolman 2.0.4 and mm.mysql-2.0.4.
> Does anyone have ever experienced such problems?
>
> Greetings Dragomir Nikolov





Re: Using Poolman without JNDI

Posted by Dragomir Nikolov <d....@bg.seeburger.com>.
Thats not problem. I have this in my poolman.xml.
As wrote before the Poolman Web application works with this poolman.xml.
Accesses the Databeses and executes queries correctly.
I had a look into this web application. it uses the SQLUtil class for
operating over the database which is specific non JDBC way to do that. In
my application I am using the standard JDBC connection, dataSource and etc.
classes. That is the only difference.
It is really really strange. There are no reported problems by the api.
Just the resultset of every wuery is empty

Dragomir

Toni Charlot wrote:

> you should also have <dbname>geniedb</dbname> in poolman.xml?
>
> -----Original Message-----
> From: Dragomir Nikolov [mailto:d.nikolov@bg.seeburger.com]
> Sent: Thursday, September 27, 2001 12:19 PM
> To: struts-user@jakarta.apache.org
> Subject: Using Poolman without JNDI
>
> Hello,
>     I am trying to use the Poolman for JDBC connection for the struts
> application I am developing.
>     I have set up everything needed to run the Poolman. Initially it
> runs ok. Connection is retrieved successfully using the
>            DataSource dataSource = PoolMan.findDataSource("geniedb");
>
> geniedb is the jndi name of my database defined in the poolman.xml
> When I try to execute a query, the resulting ResultSet is empty
> (although it should not be empty).
> The same poolman.xml deployed into the Poolman web application works
> just fine and the same query returns the appropriate data..
> According to the poolman usersguide this way of retrieving a DataSource
> should work without JNDI.
>
> I am using tomcat 3.2.2, poolman 2.0.4 and mm.mysql-2.0.4.
> Does anyone have ever experienced such problems?
>
> Greetings Dragomir Nikolov


RE: Using Poolman without JNDI

Posted by Toni Charlot <to...@fdplus.com>.
you should also have <dbname>geniedb</dbname> in poolman.xml?

-----Original Message-----
From: Dragomir Nikolov [mailto:d.nikolov@bg.seeburger.com]
Sent: Thursday, September 27, 2001 12:19 PM
To: struts-user@jakarta.apache.org
Subject: Using Poolman without JNDI


Hello,
    I am trying to use the Poolman for JDBC connection for the struts
application I am developing.
    I have set up everything needed to run the Poolman. Initially it
runs ok. Connection is retrieved successfully using the
           DataSource dataSource = PoolMan.findDataSource("geniedb");

geniedb is the jndi name of my database defined in the poolman.xml
When I try to execute a query, the resulting ResultSet is empty
(although it should not be empty).
The same poolman.xml deployed into the Poolman web application works
just fine and the same query returns the appropriate data..
According to the poolman usersguide this way of retrieving a DataSource
should work without JNDI.

I am using tomcat 3.2.2, poolman 2.0.4 and mm.mysql-2.0.4.
Does anyone have ever experienced such problems?

Greetings Dragomir Nikolov