• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: multiple instances
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: multiple instances


  • Subject: Re: multiple instances
  • From: Nathan Dumar <email@hidden>
  • Date: Tue, 28 Dec 2004 10:14:30 -0500

Aw geez. This deployment stuff makes me feel like a day-1 newbie again. Yup, you are right. I didn't even notice that multiple instances are running. (My app is deployed on a commercial server; only they have access to JavaMonitor. Plus, the app opens a fresh window with no trimmings -- I don't even see the URL under normal circumstances.)

I'll have to learn a bit more about optimistic locking and stale data. In the mean time, I'm back down to one instance. I shouldn't outgrow that for a while.

Thank you again.

Nathan


On Dec 27, 2004, at 7:51 PM, Chuck Hill wrote:

ERROR - [2004-12-25 17:13:02 EST] <WorkerThread4> com.webobjects.eoaccess.EOGeneralAdaptorException: updateValuesInRowDescribedByQualifier -- com.webobjects.jdbcadaptor.JDBCChannel method failed to update row in database

Is an optimistic locking failure. Are you running multiple instances? If so, the login was processed on different instances and they have different views of the data in the database. One is stale. See refreshing on www.wodev.com or in Practical WebObjects.

Chuck


On Dec 27, 2004, at 12:44 PM, Nathan Dumar wrote:

I hope everyone had a good Christmas (or holidays, for other faiths).

Yet another error occurs in deployment and not in development, but I have some clues this time.

Here's what I'm doing in code:

The user record/object has a field for the session ID. When logging in, my code expires the session if a session ID is found:

if ( (String)theUser().userSession() != null ) {
this.application().sessionStore().removeSessionWithID((String)theUser( ).userSession());
// does nothing if session object for the session ID no longer exists
}


Then it records the current session ID:

theUser().setUserSession((String)this.session().sessionID());
ec().saveChanges(); // ec() returns this.session().defaultEditingContext();




This works great, allowing each user to be logged in only once, but not blocking them from logging in if they simply close the window and forget to log out (logging out removes the session ID from the record and expires the session).


When deployed, however, the following error is thrown at the line ec().saveChanges() above:


ERROR - [2004-12-25 17:13:02 EST] <WorkerThread4> com.webobjects.eoaccess.EOGeneralAdaptorException: updateValuesInRowDescribedByQualifier -- com.webobjects.jdbcadaptor.JDBCChannel method failed to update row in database
at com.webobjects.eoaccess.EODatabaseContext._exceptionWithDatabaseContex tInformationAdded(EODatabaseContext.java:4676)
at com.webobjects.eoaccess.EODatabaseContext.performChanges(EODatabaseCon text.java:6384)
at com.webobjects.eocontrol.EOObjectStoreCoordinator.saveChangesInEditing Context(EOObjectStoreCoordinator.java:415)
at com.webobjects.eocontrol.EOEditingContext.saveChanges(EOEditingContext .java:3165)
at Main.verifyUser(Main.java:54)
... <snip>




This only occurs when I attempt to log the same user in twice in a row. Doing this should (and does in development) get the existing session ID in the user object/record, expire it, set the new ID in the user object/record, then save.

I've been looking at the docs at the methods listed in the error, but have not yet come up with anything definitive, so ... What could be causing this? How can I fix it?

Thank you for any help.

Nathan

_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
village.net


This email sent to email@hidden

--
Practical WebObjects - a book for intermediate WebObjects developers who want to increase their overall knowledge of WebObjects, or those who are trying to solve specific application development problems.
http://www.global-village.net/products/practical_webobjects





_______________________________________________ Do not post admin requests to the list. They will be ignored. Webobjects-dev mailing list (email@hidden) Help/Unsubscribe/Update your Subscription: This email sent to email@hidden
References: 
 >(no subject) (From: Nathan Dumar <email@hidden>)
 >Re: (no subject) (From: Chuck Hill <email@hidden>)

  • Prev by Date: Re: (no subject)
  • Next by Date: Customizing the app...
  • Previous by thread: Re: (no subject)
  • Next by thread: Adding Third Party Java Class Files
  • Index(es):
    • Date
    • Thread