Re: Automatic Realm login?

2005-07-13 Thread Mark Winslow
CSJakharia,
   Did you find a resolution to this problem?  I'm
sorry I have been away for a while and forgot about
this.



--- Chirag [EMAIL PROTECTED] wrote:

 
 
 I don't think this is a session issue but I think
 they
 must be inserting something extra rather than
 username
 and password so that they can come to know that the
 persons have comed from the login screen
 
 But I can't figure out the way out
 
 As I have done much part of the work in Tomcat 5.5.2
 and am stuck up
 
 Bye for now
 
 CSJakharia
 
 
 --- Mark Winslow [EMAIL PROTECTED] wrote:
 
  I'm using 5.5.9.  Do you need to set a session
  timeout
  variable?  I imagine I'll run into login timeouts
 as
  well, but my quick signup page seems to work with
  the
  referral for now.
  
  There's also this issue of simple redirects
 putting
  passwords into the log files which is insecure. 
 I'm
  looking for a method of redirecting with the post
  method.
  
  
  --- Chirag [EMAIL PROTECTED] wrote:
  
   The Following Error Comes when I try to use the
   method
   which you suggest.
   I am working on Tomcat 5.5.2
   
   What are you working on?
   
   Bye for now
   
   CSJakharia
   
   
   
   HTTP Status 408 - The time allowed for the login
   process has been exceeded. If you wish to
 continue
   you
   must either click back twice and re-click the
 link
   you
   requested or close and re-open your browser
   
   type Status report
   
   message The time allowed for the login process
 has
   been exceeded. If you wish to continue you must
   either
   click back twice and re-click the link you
  requested
   or close and re-open your browser
   
   description The client did not produce a request
   within the time that the server was prepared to
  wait
   (The time allowed for the login process has been
   exceeded. If you wish to continue you must
 either
   click back twice and re-click the link you
  requested
   or close and re-open your browser).
   Apache Tomcat/5.5.2
   
Subscribe to bermudaEmail:  [input]  [input] 
   Browse Archives at groups-beta.google.com 
   
   
   
   
 
   __ 
   Yahoo! Mail Mobile 
   Take Yahoo! Mail with you! Check email on your
   mobile phone. 
   http://mobile.yahoo.com/learn/mail 
   
  
 

-
   To unsubscribe, e-mail:
   [EMAIL PROTECTED]
   For additional commands, e-mail:
   [EMAIL PROTECTED]
   
   
  
  
  
  
 
 
  
  Yahoo! Sports 
  Rekindle the Rivalries. Sign up for Fantasy
 Football
  
  http://football.fantasysports.yahoo.com
  
 
 
  Subscribe to bermudaEmail:  [input]  [input] 
 Browse Archives at groups-beta.google.com 
 
 
 
 
   
 
 
 Yahoo! Sports 
 Rekindle the Rivalries. Sign up for Fantasy Football
 
 http://football.fantasysports.yahoo.com
 

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





Start your day with Yahoo! - make it your home page
http://www.yahoo.com/r/hs
 

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



Re: Automatic Realm login?

2005-07-05 Thread Mark Winslow
I'm using 5.5.9.  Do you need to set a session timeout
variable?  I imagine I'll run into login timeouts as
well, but my quick signup page seems to work with the
referral for now.

There's also this issue of simple redirects putting
passwords into the log files which is insecure.  I'm
looking for a method of redirecting with the post
method.


--- Chirag [EMAIL PROTECTED] wrote:

 The Following Error Comes when I try to use the
 method
 which you suggest.
 I am working on Tomcat 5.5.2
 
 What are you working on?
 
 Bye for now
 
 CSJakharia
 
 
 
 HTTP Status 408 - The time allowed for the login
 process has been exceeded. If you wish to continue
 you
 must either click back twice and re-click the link
 you
 requested or close and re-open your browser
 
 type Status report
 
 message The time allowed for the login process has
 been exceeded. If you wish to continue you must
 either
 click back twice and re-click the link you requested
 or close and re-open your browser
 
 description The client did not produce a request
 within the time that the server was prepared to wait
 (The time allowed for the login process has been
 exceeded. If you wish to continue you must either
 click back twice and re-click the link you requested
 or close and re-open your browser).
 Apache Tomcat/5.5.2
 
  Subscribe to bermudaEmail:  [input]  [input] 
 Browse Archives at groups-beta.google.com 
 
 
 
 
   
 __ 
 Yahoo! Mail Mobile 
 Take Yahoo! Mail with you! Check email on your
 mobile phone. 
 http://mobile.yahoo.com/learn/mail 
 

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




 
Yahoo! Sports 
Rekindle the Rivalries. Sign up for Fantasy Football 
http://football.fantasysports.yahoo.com

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



Re: Apache Jakarta-Tomcat using very slow

2005-07-04 Thread Mark Winslow
Sounds like some sort of memory/trash collector
thrashing.  Do you have enough memory?  Does it run
slowly when you run just static web pages and not your
app?  It could be some funky code in your app.


--- Lars Nielsen Lind [EMAIL PROTECTED] wrote:

 Hi.
 
  
 
 I am using Apache 2.0.54 and Jakarta-Tomcat-5.5.9
 with mod_jk 1.2.10, and
 after some time it is becomming very slow. When I
 restarts Apache and
 Jakarta-Tomcat the server regains resources.
 
  
 
 Any solutions?
 
  
 
  
 
  
 
 thanks,
 
  
 
 Lars Nielsen Lind
 
 




 
Yahoo! Sports 
Rekindle the Rivalries. Sign up for Fantasy Football 
http://football.fantasysports.yahoo.com

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



Re: Automatic Realm login?

2005-07-04 Thread Mark Winslow
OK, I found something that seems to work.  In my login
page I check for certain conditions and if they exist
I execute the following:

response.sendRedirect(j_security_check?j_username=userj_password=password);

I guess much simpler than trying to mess with session,
realm, authenticator code.


--- Mark Winslow [EMAIL PROTECTED] wrote:

 Is there a way to programmatically login a user to a
 realm?  I want to do this for two reasons:
 
 1. Save login state for users.
 2. Automatically login after a user creates an
 account.
 
 I've seen some discussion of a setRemoteUser method
 in
 one of the Tomcat classes, but I can't figure out
 how
 it works and if it would work for my purpose.
 
 Thanks.
 
 
 
   
 
 
 Yahoo! Sports 
 Rekindle the Rivalries. Sign up for Fantasy Football
 
 http://football.fantasysports.yahoo.com
 

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




__ 
Yahoo! Mail 
Stay connected, organized, and protected. Take the tour: 
http://tour.mail.yahoo.com/mailtour.html 


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



Re: Tomcat JDK 1.5 and osx bug

2005-07-04 Thread Mark Winslow
Rebuild the files as zip?


--- Werner Punz [EMAIL PROTECTED] wrote:

 Does anyone know how to get around this bug, I have
 the same problem, 
 but I do not really want to remove the files in the
 extensions dir, too 
 many files I use are affected from that one:
 

http://lists.apple.com/archives/Java-dev/2005/May/msg00760.html
 
 Basically the bug is, that jasper assumes everything
 in the OSX jdk 
 extensions dir is a zip and thus starts to choke on
 binaries.
 Does anyone know the fix for this one.
 I basically have the problem with the latest Tomcat
 as well.
 
 Werner
 
 

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




__ 
Do you Yahoo!? 
Yahoo! Mail - Helps protect you from nasty viruses. 
http://promotions.yahoo.com/new_mail

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



Automatic Realm login?

2005-07-03 Thread Mark Winslow
Is there a way to programmatically login a user to a
realm?  I want to do this for two reasons:

1. Save login state for users.
2. Automatically login after a user creates an
account.

I've seen some discussion of a setRemoteUser method in
one of the Tomcat classes, but I can't figure out how
it works and if it would work for my purpose.

Thanks.




 
Yahoo! Sports 
Rekindle the Rivalries. Sign up for Fantasy Football 
http://football.fantasysports.yahoo.com

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



Anybody using Godaddy ssl certs?

2005-05-26 Thread Mark Winslow
I'm having problems getting them to work.  I'm
wondering if anybody has had either problems or
successes with them.  The self-generated keys from
keytool work, but I get a message that the browsers
don't have common encryption algorithms once I install
the tomcat alias cert from godaddy.com.

Thanks.




__ 
Do you Yahoo!? 
Yahoo! Small Business - Try our new Resources site
http://smallbusiness.yahoo.com/resources/

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



Anybody using Godaddy ssl certs?

2005-05-26 Thread Mark Winslow
I'm having problems getting them to work.  I'm
wondering if anybody has had either problems or
successes with them.  The self-generated keys from
keytool work, but I get a message that the browsers
don't have common encryption algorithms once I install
the tomcat alias cert from godaddy.com.

Thanks.



__ 
Do you Yahoo!? 
Yahoo! Small Business - Try our new Resources site
http://smallbusiness.yahoo.com/resources/

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



Only one ssl domain per server instance?

2005-05-26 Thread Mark Winslow
I'm wondering if there's a way to get more than one
ssl domain per server instance.  The ssl Connector tag
seems to be in the top level in server.xml.  Is there
a way to put it with a particular host or context or
have more than one instance per server?  Java's ssl
library seems to accept only one tomcat alias per
keystore.  Is there a way around this?

Thanks.




__ 
Do you Yahoo!? 
Yahoo! Small Business - Try our new Resources site
http://smallbusiness.yahoo.com/resources/

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



Re: Anybody using Godaddy ssl certs?

2005-05-26 Thread Mark Winslow
I'm wondering.  Did you have to match all the fields
like Organization Name and Organizational unit
exactly to what Godaddy uses?  I just put the common
name as my domain name, but noticed after the cert was
issued some of the other fields didn't match.

Thanks.

--- Scott Reynolds [EMAIL PROTECTED] wrote:
 I installed an SSL Cert from GoDaddy a few weeks ago
 and haven't had any
 trouble with Tomcat 4.1.
 
 Scott
 
 --- Mark Winslow [EMAIL PROTECTED] wrote:
  I'm having problems getting them to work.  I'm
  wondering if anybody has had either problems or
  successes with them.  The self-generated keys from
  keytool work, but I get a message that the
 browsers
  don't have common encryption algorithms once I
 install
  the tomcat alias cert from godaddy.com.
  
  Thanks.
  
  
  
  __ 
  Do you Yahoo!? 
  Yahoo! Small Business - Try our new Resources site
  http://smallbusiness.yahoo.com/resources/
  
 

-
  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]
 
 



__ 
Do you Yahoo!? 
Yahoo! Small Business - Try our new Resources site
http://smallbusiness.yahoo.com/resources/

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



Re: Anybody using Godaddy ssl certs?

2005-05-26 Thread Mark Winslow
OK, I did a rekey and it now works.  I did match
everything up like below, but I'm not sure if it was
that, rekeying, or something else like errors during
downloading previously.

Thanks!

--- Mark Winslow [EMAIL PROTECTED] wrote:
 I'm wondering.  Did you have to match all the fields
 like Organization Name and Organizational unit
 exactly to what Godaddy uses?  I just put the common
 name as my domain name, but noticed after the cert
 was
 issued some of the other fields didn't match.
 
 Thanks.
 
 --- Scott Reynolds [EMAIL PROTECTED] wrote:
  I installed an SSL Cert from GoDaddy a few weeks
 ago
  and haven't had any
  trouble with Tomcat 4.1.
  
  Scott
  
  --- Mark Winslow [EMAIL PROTECTED] wrote:
   I'm having problems getting them to work.  I'm
   wondering if anybody has had either problems or
   successes with them.  The self-generated keys
 from
   keytool work, but I get a message that the
  browsers
   don't have common encryption algorithms once I
  install
   the tomcat alias cert from godaddy.com.
   
   Thanks.
   
   
 
   __ 
   Do you Yahoo!? 
   Yahoo! Small Business - Try our new Resources
 site
   http://smallbusiness.yahoo.com/resources/
   
  
 

-
   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]
  
  
 
 
   
 __ 
 Do you Yahoo!? 
 Yahoo! Small Business - Try our new Resources site
 http://smallbusiness.yahoo.com/resources/
 

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



__ 
Do you Yahoo!? 
Yahoo! Small Business - Try our new Resources site
http://smallbusiness.yahoo.com/resources/

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



Why so much virtual memory?

2005-03-11 Thread Mark Winslow
I start Tomcat 5.5.7 and it immediately reports about
450 megabytes of virtual memory usage in the linux app
top.  Is this normal?  Is it just allocating it or is
it really using it?  It takes about 1 to 2 seconds to
start and there's no way an application can write 450
megs of disk memory in that time period, or at least I
don't think it can.

I'm asking because I'm wondering what my memory
requirements are going to be for a collocated server
I'm setting up.  The ISP charges more for more memory.
 I'm looking at 512 megs, but can pay about 50% more
and get 1024.  

If Tomcat could run more efficiently without having to
put things in virtual memory, I may want to pay the
extra money.

Thanks.




__ 
Do you Yahoo!? 
Yahoo! Small Business - Try our new resources site!
http://smallbusiness.yahoo.com/resources/ 

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



Re: Idle servlet won't restart

2005-03-11 Thread Mark Winslow
What happens when you try to get an image?  What, if
any, error messages do you get?


--- Nat Titman [EMAIL PROTECTED] wrote:
 Hi,
 
 I'm using Tomcat 5.5.3 running as part of an Apache
 webserver on Fedora 
 Core 1.
 
 My webapps are supported by a servlet which serves
 gif images stored in 
 a database, it's mapped to the URL pattern
 /servlet/image by the 
 following XML which is inside the web-app tag of
 the web.xml files for 
 two webapps, including ROOT.
 
  servlet
  servlet-nameDBImageViewer/servlet-name
 
 servlet-classshared.DBImageViewer/servlet-class
  /servlet
 
  servlet-mapping
  servlet-nameDBImageViewer/servlet-name
  url-pattern/servlet/image/url-pattern
  /servlet-mapping
 
 My problem is that after leaving the webapps
 overnight and returning to 
 the site, the image servlet appears to have stopped.
 While the two 
 webapps run fine, the servlet doesn't function until
 Tomcat is restarted.
 
 Is there some setting or configuration I'm missing
 which would cause the 
 servlet to restart after it has 'idled off', or have
 I put the servlet 
 mapping in the wrong place?
 
 Any advice would help greatly,
 
 Thanks,
 
 
 Nat.
 
 -- 
 Nat Titman
 Developer
 
 MitchellConnerSearson
 3-5 High Pavement
 The Lace Market
 Nottingham  NG1 1HF
 Tel +44 (0)115 959 6455
 Fax +44 (0)115 959 6456
 Direct +44 (0)115 959 6462
 www.choosemcs.co.uk
 
 Confidentiality: This e-mail and its attachments are
 intended
 for the above named only and may be confidential. If
 they have
 come to you in error you must take no action based
 on them,
 nor must you copy or show them to anyone; please
 reply to this
 e-mail and highlight the error.
 
 Security Warning: Please note that this e-mail has
 been
 created in the knowledge that Internet e-mail is not
 a 100%
 secure communications medium. We advise that you
 understand
 and observe this lack of security when e-mailing us.
 
 Viruses: Although we have taken steps to ensure that
 this
 e-mail and attachments are free from any virus, we
 advise that
 in keeping with good computing practice the
 recipient should
 ensure they are actually virus free.
 
 

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



__ 
Do you Yahoo!? 
Make Yahoo! your home page 
http://www.yahoo.com/r/hs

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



Re: null pointer

2005-03-11 Thread Mark Winslow
What program gives you the null pointer exception?  Is
it your own servlet/jsp?

--- Tony Lavalle [EMAIL PROTECTED] wrote:
 I am a student taking a jsp class.  the class
 project uses an access 
 database.  my problem is that every time i run the
 program it keeps 
 giving me and npe error.  i have check the html and
 the jsp.  but i can 
 see no error.  can you folks give me some ideas as
 where to start to fix 
 this.  i am running apache 2.0.52 with tomcat 5.5.7.
  i have office 2003 
 install.  the other students are runnig tomcat 4 i
 believe there are 
 others that are using tomcat5 but not sure.
 

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



__ 
Do you Yahoo!? 
Yahoo! Small Business - Try our new resources site!
http://smallbusiness.yahoo.com/resources/ 

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



Connection pooling verse one connection per session

2005-03-10 Thread Mark Winslow
Hi, I have a sort of theoretical question.  I'm
wondering about the pros and cons of using a one
connection per tomcat session strategy for connecting
to a Postgresql server rather than connection pooling.
 

My users generally login in the morning and keep my
app open for extended periods of time, usually
serveral hours at least.  The one connection per
session method seems to work well.  Here are the
reasons I'm using it.

1.  Can cache prepared statements, something that is
more problematic to do with a generic connection pool.

2.  Have better control of connection releases via the
finalize() method in a session helper class that
contains the one single connection.

3.  Easier to code and implement than connection
pooling.

4.  Potentially faster than connection pooling because
of only one connection open per session.  

Are there issues that I'm overlooking?  If I had more
users with shorter sessions, would it make a
difference?


Thanks.




__ 
Do you Yahoo!? 
Yahoo! Small Business - Try our new resources site!
http://smallbusiness.yahoo.com/resources/ 

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



Re: Connection pooling verse one connection per session

2005-03-10 Thread Mark Winslow
OK, I see your points and they are well taken.  A lot
of my concern has to do with this 

http://jakarta.apache.org/tomcat/tomcat-5.5-doc/printer/jndi-datasource-examples-howto.html#Database%20Connection%20Pool%20(DBCP)%20Configurations

There is one problem with connection pooling. A web
application has to explicetely close ResultSet's,
Statement's, and Connection's.

So I don't close my result sets, etc.  I have say 5
unique connection hits per page.  Say the tomcat
connection trash collector (set with
removeAbandoned=true) runs every 1 minute.  In one
minute a user can easily hit 5 pages.  That's 25
connections I've created and used for that user
instead of just 1.  

Am I wrong about this?  

A lot of my confusion has to do with the details of
how the underlying connection pool code works and how
efficient it is.  For instance can you assume that the
overhead to create a Pooled Connection based an an
already established connection is negligable? 
Releasing it the same thing?  There are threading
issues involved with connection pools.  Do they create
inefficient blocking conditions?

I understand that there are problems associated with
hanging onto a resource like a connection for extended
periods of time.  It's sort of a non-standard thing to
do and maybe not worth any potential cpu/memory
benefits.  I think I'm probably trying to talk myself
into droping my strategy and implementing connection
pools.

Thanks.

--- QM [EMAIL PROTECTED] wrote:
 On Thu, Mar 10, 2005 at 10:31:41AM -0800, Mark
 Winslow wrote:
 : Hi, I have a sort of theoretical question.  I'm
 : wondering about the pros and cons of using a one
 : connection per tomcat session strategy for
 connecting
 : to a Postgresql server rather than connection
 pooling.
 
 The great benefit of pooling is that objects that
 aren't being
 (actively) used by one person/login/etc can be used
 by another.  
 Put another way, the Connection objects aren't
 specific to a user, so
 there's no need to treat them as such.  (If you've
 done any EJB, think
 of Stateless vs Stateful Session Beans.)
 
 You say your users are logged into your app all day;
 but are they
 constantly streaming data from the minute they login
 to the minute they
 logout?  If not, then holding open the DB connection
 for them isn't
 helping much.  (I'd hesitate to say it's doing
 harm or anything bad,
 just that it's not helping.)
 
 For this same reason, pooling also helps in
 scalability: when a
 Connection is idle (not being used by anyone),
 someone else can use it.  
 
 
 
 : 1.  Can cache prepared statements, something that
 is
 : more problematic to do with a generic connection
 pool.
 
 True; but have you seen a significant performance
 gain due to prepared
 statement caching?
 
 
 : 2.  Have better control of connection releases via
 the
 : finalize() method in a session helper class that
 : contains the one single connection.
 
 I'm not sure I understand this.  If your app is
 written such that
 data-access code fetches a Connection as needed,
 then returns it to the
 pool when it's done (Connection#close()), then what
 other control would
 you need?
 
 You realize, for a pooled connection, close()
 doesn't really shutdown
 the network connection.  It just sends the
 Connection object back to the
 pool.
 
 
 : 3.  Easier to code and implement than connection
 : pooling.
 
 Again, I don't understand this.  Please explain.
 
 
 : 4.  Potentially faster than connection pooling
 because
 : of only one connection open per session.  
 
 Yes and no. The connection pool keeps the connection
 open all the time;
 so users who go through a pooled Connection object
 don't suffer any
 first time access hits.
 
 -QM
 
 
 -- 
 
 software  -- http://www.brandxdev.net
 tech news -- http://www.RoarNetworX.com
 
 

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



__ 
Do you Yahoo!? 
Yahoo! Small Business - Try our new resources site!
http://smallbusiness.yahoo.com/resources/ 

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



Re: Connection pooling verse one connection per session

2005-03-10 Thread Mark Winslow
I'm still not entirely sure about this issue.  The
close/=null + finally blocks make for pretty ugly and
error prone code if you ask me.

Why doesn't the connection pool encapsulate closing
anyway?  Can't it encapsulate closing into the
finalize() methods?  Are there ordering issues for
closing ResultSets, Statements, and Connections? Is
infrequent garbage collection an issue?

I'm asking about encapsulating into the finalize()
methods because I don't like the asthetics of all the
close/=null + finally statements.  I believe they make
for confusing and error prone code and would like a
way to make my own encapsulating classes.


--- QM [EMAIL PROTECTED] wrote:
 On Thu, Mar 10, 2005 at 12:30:22PM -0800, Mark
 Winslow wrote:
 :

http://jakarta.apache.org/tomcat/tomcat-5.5-doc/printer/jndi-datasource-examples-howto.html#Database%20Connection%20Pool%20(DBCP)%20Configurations
 : 
 : There is one problem with connection pooling. A
 web
 : application has to explicetely close ResultSet's,
 : Statement's, and Connection's.
 
 I'd hardly say that's a problem; that's just good
 coding practice. =)
 (example: When I'm done cooking, I should turn off
 the stove.  Is that a
 problem with stoves, or just how stoves work?)
 
 



__ 
Do you Yahoo!? 
Yahoo! Small Business - Try our new resources site!
http://smallbusiness.yahoo.com/resources/ 

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



RE: Connection pooling verse one connection per session

2005-03-10 Thread Mark Winslow
if ever.??? Is that really the case?  My personal
experience with Tomcat is that it does indeed have
memory leak problems.  In theory, shouldn't all
objects created in a web user session eventually be
garbage collected after the session ends?

I in fact did mean the finalize() method.  Is that the
main reason not to encapsulate close() methodology
there because of slow garbage collection?  


--- Caldarale, Charles R
[EMAIL PROTECTED] wrote:
 On Thu, Mar 10, 2005 at 10:31:41AM -0800, Mark
 Winslow wrote:
  
  2.  Have better control of connection releases via
 the
  finalize() method in a session helper class that
  contains the one single connection.
 
 I hope you meant finally clause rather than
 finalize() method.  A finalize() method is only
 called when an object is garbage collected, which
 may not happen for a long, long time, if ever.
 
  - Chuck
 
 
 THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR
 OTHERWISE PROPRIETARY MATERIAL and is thus for use
 only by the intended recipient. If you received this
 in error, please contact the sender and delete the
 e-mail and its attachments from all computers.
 

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



__ 
Do you Yahoo!? 
Yahoo! Sports - Sign up for Fantasy Baseball. 
http://baseball.fantasysports.yahoo.com/

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



RE: Connection pooling verse one connection per session

2005-03-10 Thread Mark Winslow
I don't know.  I have one pure Tomcat (no Apache)
server that all it does is serve about 300,000 static
files per day.  The memory usage grows and grows
unexplicably.  I run a cron job that restarts it
everyday, which I had to started running with version
5.0.something or else it would eventually run out of
memory and crash.  I haven't seen what not restarting
will do on 5.5 and the latest version of Java/Linux. 
I guess I'll try and see.

I'm going to switch to using connection pools
regardless.  I really just had some questions about
the standard way of releasing them and gc issues
regarding them which have been answered by the nice
people on this list.

Thanks.


 
 Nearly all the memory leaks I've seen have been in
 the apps, frequently related to use of static
 variables to hold references to various session- or
 request-related items.  The few that have actually
 been a Tomcat problem seem to get fixed fairly
 quickly.
 
 



__ 
Do you Yahoo!? 
Yahoo! Small Business - Try our new resources site!
http://smallbusiness.yahoo.com/resources/ 

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



RE: Connection pooling verse one connection per session

2005-03-10 Thread Mark Winslow
Sorry, just had one other question about the use of
static variables.  Can this really be a problem?  I
thought that a static variable only gets a single copy
per JVM/Context.  For instance the use of static
variables to define formats shouls save on memory
usage shouldn't it?

public class Helper
{

public static final DecimalFormat dFormat1 = new
DecimalFormat(00);

public static final DecimalFormat dFormat2 = new
DecimalFormat(#,##0.00);

public static final SimpleDateFormat df1 = new
SimpleDateFormat(HH:mm);

public static final SimpleDateFormat df2 = new
SimpleDateFormat(EEE, d MMM, );

}

 the apps, frequently related to use of static
 variables to hold references to various session- or
 



__ 
Do you Yahoo!? 
Yahoo! Small Business - Try our new resources site!
http://smallbusiness.yahoo.com/resources/ 

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



JNDI resources different between 5.0 and 5.5?

2005-02-02 Thread Mark Winslow
Hi, I'm trying to upgrade from 5.0.28 to 5.5.4.  I
have a java bean resource that no longer works in
5.5.4.  Apparently the resource isn't being found.  My
code for looking up the resources is:

 public static Manager getManager()
 {
try
{
Context initCtx = new InitialContext();
Context envCtx = (Context)
initCtx.lookup(java:comp/env);
Manager manager = (Manager)
envCtx.lookup(bean/MyManager); // fails here on
lookup.
return manager;  
}
catch (Exception e)
{
e.printStackTrace();
return null;
}
 }

In server.xml:

Resourcource name=bean/MyManager auth=Container
type=MXForm.Manager/

I didn't have a web.xml entry in 5.0, but I added one
after reading the docs.
In web.xml:
resource-env-ref
  Description
Manager resource.
  /Description
  resource-env-ref-name
bean/MyManager
  /resource-env-ref-name
  resource-env-ref-type
MXForm.Manager
  /resource-env-ref-type
/resource-env-ref

Thanks.




__ 
Do you Yahoo!? 
The all-new My Yahoo! - Get yours free! 
http://my.yahoo.com 
 


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



Re: JNDI resources different between 5.0 and 5.5?

2005-02-02 Thread Mark Winslow
OK, I think I found the problem.  You need to put in
the resource factory in the context section which I
didn't do.  I have one question about the docs,
though.  The docs seem to indicate that a new instance
of the bean will be created with every call to lookup.
This is not the behavior that I am noticing.  I
actually want a single instance of the bean that spans
all sessions which is the behavior as I see it, but
the docs seem to indicate otherwise.

The resource factory will create a new instance of
the appropriate bean class every time a lookup() for
this entry is made.

http://jakarta.apache.org/tomcat/tomcat-5.5-doc/jndi-resources-howto.html


Context ...
  ...
  Resource name=bean/MyBeanFactory auth=Container
type=com.mycompany.MyBean
   
factory=org.apache.naming.factory.BeanFactory
bar=23/
  ...
/Context
--- Mark Winslow [EMAIL PROTECTED] wrote:

 Hi, I'm trying to upgrade from 5.0.28 to 5.5.4.  I
 have a java bean resource that no longer works in
 5.5.4.  Apparently the resource isn't being found. 
 My
 code for looking up the resources is:
 
  public static Manager getManager()
  {
   try
   {
   Context initCtx = new InitialContext();
   Context envCtx = (Context)
 initCtx.lookup(java:comp/env);
   Manager manager = (Manager)
 envCtx.lookup(bean/MyManager); // fails here on
 lookup.
   return manager;  
   }
   catch (Exception e)
   {
   e.printStackTrace();
   return null;
   }
  }
 
 In server.xml:
 
 Resourcource name=bean/MyManager auth=Container
 type=MXForm.Manager/
 
 I didn't have a web.xml entry in 5.0, but I added
 one
 after reading the docs.
 In web.xml:
 resource-env-ref
   Description
 Manager resource.
   /Description
   resource-env-ref-name
 bean/MyManager
   /resource-env-ref-name
   resource-env-ref-type
 MXForm.Manager
   /resource-env-ref-type
 /resource-env-ref
 
 Thanks.
 
 
 
   
 __ 
 Do you Yahoo!? 
 The all-new My Yahoo! - Get yours free! 
 http://my.yahoo.com 
  
 
 

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




__ 
Do you Yahoo!? 
Yahoo! Mail - Helps protect you from nasty viruses. 
http://promotions.yahoo.com/new_mail

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



Re: sharing session across Hosts

2005-02-02 Thread Mark Winslow
I imagine creating a static variable would be global
to the JVM.  Something like:

public class MyClass
{

public static int nUsers;

};

would allow you to set and retrieve MyClass.nUsers in
a global maner.  I haven't tested this and its an
absurdly trivial example, but it seems like it should
work.


--- Charles N. Harvey III [EMAIL PROTECTED]
wrote:

 Hello.
 I have two Hosts setup in the same Engine, and I
 would like to
 be able to share session variables across them.  Is
 this possible?
 And, if so, what do I have to configure?  Realm? 
 Listener?
 
 Thanks a lot.
 
 
 Charlie
 
 

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





__ 
Do you Yahoo!? 
Yahoo! Mail - You care about security. So do we. 
http://promotions.yahoo.com/new_mail

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