Re: The conection dictionary at "start-up"
Re: The conection dictionary at "start-up"
- Subject: Re: The conection dictionary at "start-up"
- From: email@hidden
- Date: Mon, 13 Oct 2003 10:59:24 CDT
- Priority: 3 (Normal)
[demime could not interpret encoding binary - treating as plain text]
Keep in mind that normally, in WO, there is a single EOF stack (often
meaning a single db connection) shared by multiple users (WOSessions).
Under this design, it's rather dificult to have a user log in to the
db---multiple users share the connection dictionary. Unless you are just
talking about an admin setting the connection dictionary once on startup
or something.
You can theoretically give each user her own EOF stack. That's probably
what you'd need to do, if you really want each user to log in to the db
themselves. I've never tried this myself. It could be a memory or
performance problem, I'm not sure how well it would work. Maybe others
have tried it and have comments.
--Jonathan
On Fri, 10 Oct 2003 16:55:00 -1000 Art Isbell wrote:
> On Friday, October 10, 2003, at 01:05 PM, Ricardo Strausz wrote:
>
> > In the old (good) days of NeXT's EOF 1, it was very simple to call the
> > db-connection dictionary panel when the app was lunching in order to
> > set the user and password to be used by the instance.
>
> > Is this possible to do in WO 5.2??
>
> If I recall, EOF had an API that would display a database-specific
> login panel. Or this panel would be automatically displayed when a
> connection to a database was attempted if the connection info was
> incorrect.
>
> I don't believe this API or behavior exists now. But you should be
> able to implement it yourself without much difficulty. EOAdaptor
> includes the API needed. If you require a user to log in to the DB,
> open an NSPanel of your own design to collect the necessary connection
> info. Maybe you can specify the techy stuff in your eomodel (e.g., the
> JDBC URL) but leave the user and password empty. Then your custom
> login panel could collect the user and password and add them to
> EOAdaptor's connection dictionary. You could test their validity by
> invoking EOAdaptor's assertConnectionDictionaryIsValid(). If this
> throws no exception, you could open a channel and start accessing the
> DB.
>
> Aloha,
> Art
> _______________________________________________
> webobjects-dev mailing list | email@hidden
> Help/Unsubscribe/Archives:
> http://www.lists.apple.com/mailman/listinfo/webobjects-dev
> Do not post admin requests to the list. They will be ignored.
_______________________________________________
webobjects-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/webobjects-dev
Do not post admin requests to the list. They will be ignored.