Re: JNDIAdaptor and openChannels
Re: JNDIAdaptor and openChannels
- Subject: Re: JNDIAdaptor and openChannels
- From: Chuck Hill <email@hidden>
- Date: Thu, 11 May 2006 10:55:39 -0700
On May 11, 2006, at 10:26 AM, Timmy wrote:
Everyone:
I'm a bit of a WebObjects (and java) newbie so I am just throwing
this out as a general consensus type question. My app is using ldap
authentication but, beyond that, is also correlating ldap users to
a person object in an SQL database. These separate uses happen in
pretty quick succession since authentication and setting the user
are all part of logging in. This all works as it should right now
however, I've been frustrated during development with how often I
have gotten errors related to open channels - something I never see
with the jdbc adaptor.
That is rather odd. Do you have any other information as to when
these happen? This is usually (or should be) the result of starting
another LDAP query in the same thread before the current one has
completed. There is also a notification that you can register for
and create more channels as needed.
EODatabaseContext.DatabaseChannelNeededNotification
See http://tuvix.apple.com/documentation/WebObjects/
Enterprise_Objects/Connecting/chapter_10_section_9.html
I am quite sure that I am not employing the most scalable use of
the adaptor - or am I? I of course have a method to close all
channels but I end up having to call that (in ugly fashion) all
over the place to ensure that everything works. And I am concerned
that I'll have problems when users are concurrently opening
channels to login and get registered with the session.
Well, it does sound as if something is wrong.
I've noticed Chuck's book seems to favor staying away from the jndi
adaptor for auth which will probably help this problem. But as my
use of objects from ldap increases (it will) I want to use the best
practices for working with those objects.
Anyone have any thoughts from experience with the adaptor?
I just avoided using the JNDI adaptor for authentication as that is
not the "right" way to do it WRT LDAP. It _will_ work if you are OK
with doing an LDAP query instead of a bind. I do use the JNDI
adaptor for authorization and it does get called a lot for that. I
have not seen the problems you are describing. My guess is that you
have done something wrong, probably in an EOF method that you have
overridden. Have you used awakeFromFetch anywhere?
Chuck
--
Coming in 2006 - an introduction to web applications using WebObjects
and Xcode http://www.global-village.net/wointro
Practical WebObjects - for developers who want to increase their
overall knowledge of WebObjects or who are trying to solve specific
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