RES: AW: Urgent help, please!Best practices using Connection Pool

2003-10-09 Thread Jose Euclides da Silva Junior - DATAPREVRJ
Good! Its enough to me! So, i always can use the 'close()' method whenever
the query statement ends since my connection pool will stand 'alive', still.
Of course, my pool wraps the connection object... My email service was down
yesterday...
Thanks at all,
Euclides.

-Mensagem original-
De: Adam Hardy [mailto:[EMAIL PROTECTED]
Enviada em: quinta-feira, 9 de outubro de 2003 10:42
Para: Tomcat Users List
Assunto: Re: AW: Urgent help, please!Best practices using Connection
Pool


I think he must be having problems with his email because he send more 
or less the same msg 12 hours ago but didn't respond to any of the replies.

On 10/09/2003 03:27 PM Nitschke Michael wrote:
> I could remember that there was a mail today that answered your question.
> The pool provides an wrapper for the connection object that you receive,
this means you call getConnection and you do not get the real connection
instead you recive an object implementing the Connection functionality with
an altered "close()" method, which does not close/release the connection,
but returns the connection to the pool.
> 
> If it was to short, read the original post in the archives.
> Mike
> 
> -Ursprüngliche Nachricht-
> Von: Jose Euclides da Silva Junior - DATAPREVRJ
[mailto:[EMAIL PROTECTED] 
> Gesendet: Donnerstag, 09. Oktober 2003 15:27
> An: '[EMAIL PROTECTED]'
> Betreff: Urgent help, please!Best practices using Connection Pool
> 
> Hi gurus, help me please.
> i am using DBCP 1.0 to make connection pool avaiable. My question can be
> easy: since DBCP 1.0 doesnt create a singleton object ( just a datasource
> object), what should i do whenever my sql queries are done? Should i close
> the connection after each sql command is completed? But, if i do this,
will
> i loose my connection pool facility, so my next sql command will spend
more
> time since the connection process ( with the database ) would be started
> before the sql running. I really need to improve my database response
time!
> Thanks in advance,
> Euclides.  
> 
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 

-- 
struts 1.1 + tomcat 5.0.12 + java 1.4.2
Linux 2.4.20 RH9


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: AW: Urgent help, please!Best practices using Connection Pool

2003-10-09 Thread Adam Hardy
I think he must be having problems with his email because he send more 
or less the same msg 12 hours ago but didn't respond to any of the replies.

On 10/09/2003 03:27 PM Nitschke Michael wrote:
I could remember that there was a mail today that answered your question.
The pool provides an wrapper for the connection object that you receive, this means you call 
getConnection and you do not get the real connection instead you recive an object implementing 
the Connection functionality with an altered "close()" method, which does not 
close/release the connection, but returns the connection to the pool.
If it was to short, read the original post in the archives.
Mike
-Ursprüngliche Nachricht-
Von: Jose Euclides da Silva Junior - DATAPREVRJ [mailto:[EMAIL PROTECTED] 
Gesendet: Donnerstag, 09. Oktober 2003 15:27
An: '[EMAIL PROTECTED]'
Betreff: Urgent help, please!Best practices using Connection Pool

Hi gurus, help me please.
i am using DBCP 1.0 to make connection pool avaiable. My question can be
easy: since DBCP 1.0 doesnt create a singleton object ( just a datasource
object), what should i do whenever my sql queries are done? Should i close
the connection after each sql command is completed? But, if i do this, will
i loose my connection pool facility, so my next sql command will spend more
time since the connection process ( with the database ) would be started
before the sql running. I really need to improve my database response time!
Thanks in advance,
Euclides.  

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

--
struts 1.1 + tomcat 5.0.12 + java 1.4.2
Linux 2.4.20 RH9
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


RE: Urgent help, please!Best practices using Connection Pool

2003-10-09 Thread Edson Alves Pereira
Usually you should return every connection to your Persistence
mechanism, you cannot close the connection, because if do that other process
won´t use it.

> --
> De:   Jose Euclides da Silva Junior -
> DATAPREVRJ[SMTP:[EMAIL PROTECTED]
> Responder:Tomcat Users List
> Enviada:  quinta-feira, 9 de outubro de 2003 10:26
> Para: '[EMAIL PROTECTED]'
> Assunto:  Urgent help, please!Best practices using Connection Pool
> 
> Hi gurus, help me please.
> i am using DBCP 1.0 to make connection pool avaiable. My question can be
> easy: since DBCP 1.0 doesnt create a singleton object ( just a datasource
> object), what should i do whenever my sql queries are done? Should i close
> the connection after each sql command is completed? But, if i do this,
> will
> i loose my connection pool facility, so my next sql command will spend
> more
> time since the connection process ( with the database ) would be started
> before the sql running. I really need to improve my database response
> time!
> Thanks in advance,
> Euclides.  
> 
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 


RE: Urgent help, please!Best practices using Connection Pool

2003-10-09 Thread Arnaud HERITIER
You should close your pool connection because the pool doesn't close the
real connection.
this doc can help you :
http://jakarta.apache.org/tomcat/tomcat-4.1-doc/jndi-datasource-examples-how
to.html#Random%20Connection%20Closed%20Exceptions

Arnaud

> -Message d'origine-
> De : Jose Euclides da Silva Junior - DATAPREVRJ
> [mailto:[EMAIL PROTECTED]
> Envoyé : jeudi 9 octobre 2003 15:27
> À : '[EMAIL PROTECTED]'
> Objet : Urgent help, please!Best practices using Connection Pool
>
>
> Hi gurus, help me please.
> i am using DBCP 1.0 to make connection pool avaiable. My
> question can be
> easy: since DBCP 1.0 doesnt create a singleton object ( just
> a datasource
> object), what should i do whenever my sql queries are done?
> Should i close
> the connection after each sql command is completed? But, if i
> do this, will
> i loose my connection pool facility, so my next sql command
> will spend more
> time since the connection process ( with the database ) would
> be started
> before the sql running. I really need to improve my database
> response time!
> Thanks in advance,
> Euclides.
>
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



AW: Urgent help, please!Best practices using Connection Pool

2003-10-09 Thread Nitschke Michael
I could remember that there was a mail today that answered your question.
The pool provides an wrapper for the connection object that you receive, this means 
you call getConnection and you do not get the real connection instead you recive an 
object implementing the Connection functionality with an altered "close()" method, 
which does not close/release the connection, but returns the connection to the pool.

If it was to short, read the original post in the archives.
Mike

-Ursprüngliche Nachricht-
Von: Jose Euclides da Silva Junior - DATAPREVRJ [mailto:[EMAIL PROTECTED] 
Gesendet: Donnerstag, 09. Oktober 2003 15:27
An: '[EMAIL PROTECTED]'
Betreff: Urgent help, please!Best practices using Connection Pool

Hi gurus, help me please.
i am using DBCP 1.0 to make connection pool avaiable. My question can be
easy: since DBCP 1.0 doesnt create a singleton object ( just a datasource
object), what should i do whenever my sql queries are done? Should i close
the connection after each sql command is completed? But, if i do this, will
i loose my connection pool facility, so my next sql command will spend more
time since the connection process ( with the database ) would be started
before the sql running. I really need to improve my database response time!
Thanks in advance,
Euclides.  


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Urgent help, please!Best practices using Connection Pool

2003-10-09 Thread Jose Euclides da Silva Junior - DATAPREVRJ
Hi gurus, help me please.
i am using DBCP 1.0 to make connection pool avaiable. My question can be
easy: since DBCP 1.0 doesnt create a singleton object ( just a datasource
object), what should i do whenever my sql queries are done? Should i close
the connection after each sql command is completed? But, if i do this, will
i loose my connection pool facility, so my next sql command will spend more
time since the connection process ( with the database ) would be started
before the sql running. I really need to improve my database response time!
Thanks in advance,
Euclides.  


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Urgent help, please!Best practices using Connection Pool

2003-10-08 Thread Adam Hardy
Hi Jose,
the connection that you are served by your data source is a connection 
wrapper where the close method will not really close the connection, 
rather it will tell the connection pool that this connection is free and 
can be put back in the pool.

HTH
Adam
PS I wouldn't flag your email as "urgent" - I doubt it makes much 
difference to how quickly you get an answer, and often it only serves to 
put people off from reading your mail at all, simply because it annoys 
them that you consider your email should have higher priority for some 
reason than everyone else's. As if everyone is sitting around happily 
chatting about really non-urgent things. (which they do sometimes, but 
mostly not).

On 10/09/2003 01:18 AM Jose Euclides da Silva Junior - DATAPREVRJ wrote:
Hi,
i am using DBCP 1.0. My question is simple: since DBCP doesnt create a
singleton object ( just a data source object), what should i do whenever my
sql queries are done? Should i close the connection after that? But, if i do
this, will i loose my connection pool facility, so my next connection time
will waste more time...
Thanks in advance,
Euclides.  

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

--
struts 1.1 + tomcat 5.0.12 + java 1.4.2
Linux 2.4.20 RH9
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


RE: Urgent help, please!Best practices using Connection Pool

2003-10-08 Thread Nathan Christiansen
DBCP wraps the connection object. When you call conn.close(); on the connection object 
given to you by the DataSource.getConnection(); method, it just releases it back into 
the pool, it dosen't actually close the connection.

-- Nathan Christiansen
   Tahitian Noni International
   http://www.tahitiannoni.com


-Original Message-
From: Jose Euclides da Silva Junior - DATAPREVRJ
[mailto:[EMAIL PROTECTED]
Sent: Wednesday, October 08, 2003 5:19 PM
To: '[EMAIL PROTECTED]'
Subject: Urgent help, please!Best practices using Connection Pool


Hi,
i am using DBCP 1.0. My question is simple: since DBCP doesnt create a
singleton object ( just a data source object), what should i do whenever my
sql queries are done? Should i close the connection after that? But, if i do
this, will i loose my connection pool facility, so my next connection time
will waste more time...
Thanks in advance,
Euclides.  

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Urgent help, please!Best practices using Connection Pool

2003-10-08 Thread Jose Euclides da Silva Junior - DATAPREVRJ
Hi,
i am using DBCP 1.0. My question is simple: since DBCP doesnt create a
singleton object ( just a data source object), what should i do whenever my
sql queries are done? Should i close the connection after that? But, if i do
this, will i loose my connection pool facility, so my next connection time
will waste more time...
Thanks in advance,
Euclides.  

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Compiling Jsps With Tomcat (URGENT Help Please!)

2003-03-12 Thread Chayim I . Kirshen
All,

I've gone through the archive trying to find the solution to this one, and spent some 
time in th e irc room hunting.  Hopefully someone here can help me out.

OS: Linux and Solaris
jdk: 1.4.1_01
tomcat: 4.1.12 (but also tested with 4.1.18 and 4.1.21 beta)

I have a jsp file (that is valid and has already been tested) that I'm trying to 
compile to java code with jspc. I've tried doing the following:
./jspc test.jsp
./jspc -uriroot /tmp test.jsp

Both cases give me the following error (as does ant's jspc task):

Exception in thread "main" java.lang.ArrayIndexOutOfBoundsException: 1
at org.apache.jasper.JspC.locateUriRoot(JspC.java:616)
at org.apache.jasper.JspC.execute(JspC.java:747)
at org.apache.jasper.JspC.main(JspC.java:810

If I make the WEB-INF dir I get:

2003-03-12 03:08:30 - ERROR-the file '/test.jsp' generated the following general 
exception: java.lang.NullPointerException
error:null

Can someone please help?  I've tried everything I can think of and really need this.  
Oh, and please email me and the list since I'm not subscribed.

Thanks! 

--chayim

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



AW: urgent help please!

2002-08-02 Thread Ralph Einfeldt

I just can provide some suggestions that might 
help to identify the problem.

- compare the hashcode of the object that is stored as 
  attribute between your servlet and the jsp.
- allow the setting of iMaxBookmarks only through 
  an accessor. Log each access through the accessor.

How does the code look like when you store and 
retrieve the attribute? 

Ralph Einfeldt
Uptime Internet Solution Center GmbH
Hamburg, Germany
Hosting, Content Management, Java Consulting
http://www.uptime-isc.de 

> -Ursprüngliche Nachricht-
> Von: Richard Diaz [mailto:[EMAIL PROTECTED]]
> Gesendet: Freitag, 2. August 2002 10:38
> An: [EMAIL PROTECTED]
> Betreff: urgent help please!
> 
> This servlet creates and sets the values for an
> application scope object called TwcMaxes. I have
> verified that my TwcMaxes object is created in the
> application scope and its values are set
> (TwcMaxes.iMaxBookmarks = 3). 
> 
> However once TOMCAT is done booting and when I go to
> reference the value in a JSP page OR in another
> servlet the value for TwcMaxes.iMaxBookmarks is 0
> (zero). 
> 

--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>




urgent help please!

2002-08-02 Thread Richard Diaz

I hope this is formated well for this list-serv...

problem: application scope objects launched by web.xml


In my Tomcat boot sequence (web.xml file) I am
launching a servlet called InitTwc. 

This servlet creates and sets the values for an
application scope object called TwcMaxes. I have
verified that my TwcMaxes object is created in the
application scope and its values are set
(TwcMaxes.iMaxBookmarks = 3). 

However once TOMCAT is done booting and when I go to
reference the value in a JSP page OR in another
servlet the value for TwcMaxes.iMaxBookmarks is 0
(zero). 

My guess only is that I cannot set values during the
web.xml boot up servlet launch, I hope I am wrong. Any
help is much apprecited. I have been stuck on this for
days =p 

Rich Diaz 

=


__
Do You Yahoo!?
Yahoo! Health - Feel better, live better
http://health.yahoo.com

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: urgent help please

2001-03-23 Thread Pradeep Kumar

Rajeev,
Thanks for your reply.
I don't see any log file under logs dir.

I have no clue, why the context is not loading and why the log file is not
generated. Please help
pradeep

 -Original Message-
From:   Rajeev Jha [mailto:[EMAIL PROTECTED]] 
Sent:   Friday, March 23, 2001 4:32 AM
To: [EMAIL PROTECTED]
Subject:    Re: urgent help please

first thing is to check the log files , if it has something like:
loaded context /abcd
or not.if this context is loaded as per the log files then check the docBase
attribute of your context , whether it is pointing to correct physical
directory
or not. and check for possible case-mismatch also.

Pradeep Kumar wrote:

> Hello all,
> I need some urgent help from you guys.
>
> I have tomcat 3.2.1 on solaris box. The problem is when start the server,
my
> context is not loading. I have a directory defined under webapps called at
> and it has WEB-INF directory and web.xml
>
> Please give me a quick reply if you know about this.
>
> Thanks,

--
eagles may soar, but weasels don't get sucked into jet engines
 -- anonymous psycopath on ./
---
Rajeev Jha
Indegene Lifesystems P Ltd.
130, 1st cross , 5th block, kormangla , bang!ore - 95
voice -- +91-80- 55243 14/24

http://www.indegene.com







Re: urgent help please

2001-03-23 Thread Rajeev Jha

first thing is to check the log files , if it has something like:
loaded context /abcd
or not.if this context is loaded as per the log files then check the docBase
attribute of your context , whether it is pointing to correct physical directory
or not. and check for possible case-mismatch also.

Pradeep Kumar wrote:

> Hello all,
> I need some urgent help from you guys.
>
> I have tomcat 3.2.1 on solaris box. The problem is when start the server, my
> context is not loading. I have a directory defined under webapps called at
> and it has WEB-INF directory and web.xml
>
> Please give me a quick reply if you know about this.
>
> Thanks,

--
eagles may soar, but weasels don't get sucked into jet engines
 -- anonymous psycopath on ./
---
Rajeev Jha
Indegene Lifesystems P Ltd.
130, 1st cross , 5th block, kormangla , bang!ore - 95
voice -- +91-80- 55243 14/24

http://www.indegene.com





urgent help please

2001-03-23 Thread Pradeep Kumar

Hello all,
I need some urgent help from you guys.

I have tomcat 3.2.1 on solaris box. The problem is when start the server, my
context is not loading. I have a directory defined under webapps called at
and it has WEB-INF directory and web.xml

Please give me a quick reply if you know about this.

Thanks,