• 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: EOF problems
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: EOF problems


  • Subject: Re: EOF problems
  • From: Chuck Hill <email@hidden>
  • Date: Fri, 5 Nov 2004 10:08:01 -0800

Hi Damien,


On Nov 5, 2004, at 5:30 AM, Damien Lust wrote:


In webobjects , each user share the same connection and use a defaultEditingContext to execute request on DB.


No exactly. Users are associated with a session, each session has one or more editing contexts, each editing context is connected to a single object store and the connections from the object store to the database are more or less an implementation details.


In my case, i must use a unique connection for each user because his connection must be unique (my connection use of a workSessionToken , for each request a trigger tests if the workSessionToken is correct, the DB has been developed by my client)

I'm not sure why you are doing that, but if your client thinks you must... Is it a "security" thing? What exactly is your client fearful of?


So if the number of user grows (more than 100), the number of connection grows , so it cans generate problems with space memory/resources for the DB (Oracle)


Well, then do it the WO way.



I have some problems

- Objects I manipulate are complex (use of nested table that can content another nested table, or a type of XML.TYPE,...) , i have a eomodel for my objects but not very useful ( i use it to retrieve name) , i use EOUtilities.rawRowsForSQL() to execute my SQL request / (it can be a call of procedure) . My class is "hybrid" , some method use eof and other are very similar of a jdbc approach

With WO there are two ways of doing things: the WO way, and the wrong way. You are doing it the wrong way. You are going to spend endless time fighting EOF and WO. EOF and WO are going to win.

I don't often give this advice, but here it is: don't use WO for this project. Use Tapestry and Hibernate, or whatever, Manage all the SQL and infrastructure by hand. You will be happier.

- To decrease the number of connection, i would like to open a connection to the DB at the begin of the request-response loop, and to close it a the end. I don't know how to do it.

I don't know how to do it either, but I am really sure that you would not like the result.


- I have always 2 connections opened for one user , i don't know when the second is created. Is there a way to know, the number of current connection?

EOF opens two connection per object store. I don't know why. It is an irrelevant implementation detail.

Chuck


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


  • Follow-Ups:
    • Re: EOF problems
      • From: Jean-François Veillette <email@hidden>
  • Prev by Date: Re: EOF inserts PK automatically
  • Next by Date: Re: Temporarily Refusing New Sessions
  • Previous by thread: Re: Temporarily Refusing New Sessions
  • Next by thread: Re: EOF problems
  • Index(es):
    • Date
    • Thread