db-torque-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Saravana Krishnan <saravkr...@uky.edu>
Subject Re: Torque using Tomcat
Date Fri, 31 Dec 2004 18:43:07 GMT
Hi,

  This is a late reply to this Tomcat problem. But I have no problems
using Torque 3.1 (or 3.1.1 not sure)  with Tomcat 4.x. The main
application in which I do development is a jar file when it is started
in Tomcat. If I make some changes, to the java files, I recompile and
create a jar file and simply overwrite the jar file that Tomcat is
using. When I do this, within a span of 10 secs, Tomcat realizes that
the jar file has changed and restarts itself. Torque is reinitialized
and everything works without a problem except the fact that the session
before the restart is no more there. I don't need the session to exist
between restarts, so it's not an issue for me. I can give more details
on how I configure this if anyone is interested. Btw, yes I use a JNDI
datasource that is provided by Tomcat.

Thanks,
Sarav

On Thu, 2004-12-30 at 08:33 +0000, Henning P. Schmiedehausen wrote:
> "M. Sean Gilligan" <Sean_Gilligan@catalla.com> writes:
> 
> Hi,
> 
> 
> >>"M. Sean Gilligan" <Sean_Gilligan@catalla.com> writes:
> >>
> >>I took a good look at the JndiDataSourceFactory and this patch just
> >>plasters over
> 
> >What are the consequences of a patch that just "plasters over"?
> 
> That one just made sure that the config loop was not run when the
> object was empty. The deeper problem is, that the loop _should_ be run
> when it is empty, but should have no effect (which it had, because
> after the loop, but inside the if (c == null) statement, the
> datasource was blindingly initialized.
> 
> I cleaned the code to make sure that this does not happen. "Plastering
> over" in my personal speaking means that you simply add "if (xxx ==
> null)" or "if (foo.isEmpty())" tests to a code logic without solving
> the inherent problems with the control flow. In this case, it was
> possible to add a null DataSource object which is a bad thing in
> itself. And it does not matter, _how_ we got there but that the
> program logic allows it.
> 
> >>(there is also a good NPE chance in there)
> 
> >I'm sorry, I'm not familiar with the acronym NPE, what does "NPE" mean?
> 
> NullPointerException. :-) 
> 
> >>I would prefer having you test the TORQUE_3_1_BRANCH HEAD by doing
> >>
> >>cvs -d :pserver:anoncvs@cvs.apache.org:/home/cvspublic checkout -r TORQUE_3_1_BRANCH
db-torque
> >>
> >>and compiling it,
> 
> >I did this and it fixed the problem, but...
> 
> >> but if you are stuck to a released version due to QA
> >>reasons, simply take the released 3.1.1 version and replace the
> >>JndiDataSourceFactory.java file.
> 
> >I really do want to use a QA'ed release for my alpha/beta/production release, so
I also tried copying JndiDataSourceFactory.java into the 3.1.1 directory tree and am unable
to do a build:
> 
> Yep, now that you say it: You will probably need all the contents of
> the dsfactory package because the inheritance of the DataSource
> factories changed.
> 
> For a released version, I do plan to put out 3.1.2 early next year
> (which means probably around end of January), depending on how much
> issues will crop up and what the other developers think.
> 
> [...]
> 
> >Any suggestions on what to do with the 3.1.1 tree?  I'm going to try the "plasters
over" patch for now...
> 
> I didn't mean to use "plaster over" as a derogatory term. I was just
> stating a fact. Sorry if you felt offended.
> 
> 	Regards
> 		Henning
> 
-- 
Saravana Krishnan <saravkrish@uky.edu>


---------------------------------------------------------------------
To unsubscribe, e-mail: torque-user-unsubscribe@db.apache.org
For additional commands, e-mail: torque-user-help@db.apache.org


Mime
View raw message