Thanks a lot for your message.

Your web application is normally thread safe.
But, there is probably something incorrect.
I'm going to search on the web the "best practices" to have a real application thread 
safe.


Sylvie


-----Original Message-----
From: Bruce Snyder [mailto:ferret@;frii.com]
Sent: mar. 29 octobre 2002 20:09
To: [EMAIL PROTECTED]
Subject: Re: [castor-dev] [castor-dev]Pb with concurrent access on
database Oracle


This one time, at band camp, Sylvie Ramon said:

SR>Hi, 
SR>
SR>I have a problem and I don't understand what append.
SR>
SR>I work with WSAD 4.0, Oracle 8i  and castor 0.9.3.9 .
SR>
SR>I develop an web application that read and create objects in database.
SR>All is ok if I run this with one or several user in a real time.
SR>
SR>I try to test my web application with Opensta.
SR>I store a scenario, and do an iteration on it.
SR>I reduct "wait" to have intensives tests.
SR>All is ok if I run ONE scenario.
SR>
SR>But, if I run SEVERAL scenarios ( concurrent access ) , I have some Exception, that 
append randomly : 
SR>
SR>
SR>org.exolab.castor.jdo.TransactionNotInProgressException: This database is closed
SR>     at 
org.exolab.castor.jdo.engine.DatabaseImpl.getTransaction(DatabaseImpl.java:464)
SR>     at org.exolab.castor.jdo.engine.DatabaseImpl.load(DatabaseImpl.java:269)
SR>     at org.exolab.castor.jdo.engine.DatabaseImpl.load(DatabaseImpl.java:287)
SR>     at 
fr.cmc.umm.entreprise.typologieappel.MotifContactService.getFicheMotif(MotifContactService.java:236)
SR>     .....
SR>
SR>OR 
SR>
SR>
SR>java.lang.NullPointerException
SR>     at 
org.exolab.castor.jdo.engine.DatabaseImpl.getLockEngine(DatabaseImpl.java:196)
SR>     at org.exolab.castor.jdo.engine.OQLQueryImpl.create(OQLQueryImpl.java:270)
SR>     at org.exolab.castor.jdo.engine.DatabaseImpl.getOQLQuery(DatabaseImpl.java:439)
SR>     at 
fr.cmc.umm.entreprise.typologieappel.MotifContactService.getListeMotifActif(MotifContactService.java:314)
SR>     .....
SR>
SR>
SR>OR 
SR>
SR>
SR>org.exolab.castor.jdo.TransactionNotInProgressException: No transaction in progress 
for the current thread
SR>     at 
org.exolab.castor.jdo.engine.DatabaseImpl.getTransaction(DatabaseImpl.java:467)
SR>     at org.exolab.castor.jdo.engine.OQLQueryImpl.execute(OQLQueryImpl.java:458)
SR>     at org.exolab.castor.jdo.engine.OQLQueryImpl.execute(OQLQueryImpl.java:405)
SR>     at 
fr.cmc.umm.entreprise.typologieappel.SousMotifContactService.getListeSousMotifActif(SousMotifContactService.java:396)
SR>     ....
SR>
SR>
SR>
SR>Someone has an idea ?

Sylvie,

In my experience, these types of problems usually occur in either a
multi-threaded environment (like your concurrent accesses) or in a
situation where transactions are being nested. In either case, it is
unclear as to which transaction needs to be commit()ed by Castor so it
closes the closest one which may or may not be correct. The solution
here is to make the application more thread safe or to name each Database
instance differently. I have usually chosen to make the application more
thread safe so that the confusion doesn't occur. 

Bruce
-- 
perl -e 'print unpack("u30","<0G)U8V4\@4VYY9&5R\"F9E<G)E=\$\!F<FEI+F-O;0\`\`");'

----------------------------------------------------------- 
If you wish to unsubscribe from this mailing, send mail to
[EMAIL PROTECTED] with a subject of:
        unsubscribe castor-dev



Disclaimer

This communication together with any attachments transmitted with it ('this E-mail') 
is intended only for the use of the addressee and may contain information which is 
privileged and confidential. If the reader of this E-mail is not the intended 
recipient or the employee or agent responsible for delivering it to the intended 
recipient you are notified that any use of this E-mail is prohibited. Addressees 
should ensure this E-mail is checked for viruses. The Carphone Warehouse Group PLC 
makes no representations as regards the absence of viruses in this E-mail. If you have 
received this E-mail in error please notify our ISe Response Team immediately by 
telephone on + 44 (0)20 8896 5828 or via E-mail at [EMAIL PROTECTED] Please then 
immediately destroy this E-mail and any copies of it.

Please feel free to visit our website: 

UK
http://www.carphonewarehouse.com

Group
http://www.phonehouse.com

----------------------------------------------------------- 
If you wish to unsubscribe from this mailing, send mail to
[EMAIL PROTECTED] with a subject of:
        unsubscribe castor-dev

Reply via email to