• 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: Connecting to DB with user supplied credentials.
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Connecting to DB with user supplied credentials.


  • Subject: Re: Connecting to DB with user supplied credentials.
  • From: Ken Anderson <email@hidden>
  • Date: Wed, 11 Jun 2008 14:36:47 -0400

Henrique,

Can you give a little background as to why you need to do this? As people have said, it's possible, but it's not terribly straightforward, and can be expensive. Why do you need to login to the DB with separate credentials?

Ken

On Jun 11, 2008, at 1:28 PM, Lon Varscsak wrote:

Google for: separate database connection WebObjects

It's the first apple link (I can't cut and paste on my phone).  Look
at Project WOnder there may be some stuff there to aid on this.
-Lon


On 6/11/08, Lon Varscsak <email@hidden> wrote:
I believe you need a separate EOF stack for every session. While this
isn't difficult, you'll need to watch memory.


Umm, its not difficult...but, I'm on my iPhone and don't remember how
to do it exactly. :)
Google around for this, you'll find it, if not I'll catch you later
when I get to a computer.

Lon

On 6/11/08, Henrique Gomes <email@hidden> wrote:
Funny, the first connectWithModelNamed throws a NPE, but the second
invocation I put on the catch wasn't even necessary.
If I only invoke it once, swallow the NPE and continue to fetch some
EOs,  a connection is then started with the provided credentials...

[2008-6-11 16:41:54 WEST] <WorkerThread3> Using JDBCPlugIn
'PostgresqlPlugIn' for JDBCAdaptor@16434995
[2008-6-11 16:41:54 WEST] <WorkerThread3> connecting with dictionary:
{plugin = "PostgresqlPlugIn"; username = "hgomes"; driver = "";
password = "<password deleted for log>"; URL = "jdbc:postgresql://
server/db"; }
java.lang.NullPointerException
at
com
.webobjects
.eoaccess
.EODatabaseContext.forceConnectionWithModel(EODatabaseContext.java: 1139)
at
com
.webobjects
.eoaccess.EOUtilities.connectWithModelNamed(EOUtilities.java:840)
.....
[2008-6-11 16:42:4 WEST] <WorkerThread3> fetching JDBC Info with
JDBCContext@16175446
[2008-6-11 16:42:4 WEST] <WorkerThread3> connecting with dictionary:
{plugin = "PostgresqlPlugIn"; username = "hgomes"; driver = "";
password = "<password deleted for log>"; URL = "jdbc:postgresql://
server/db"; }
[2008-6-11 16:42:18 WEST] <WorkerThread3> === Begin Internal
Transaction
[2008-6-11 16:42:18 WEST] <WorkerThread3> evaluateExpression:
<com.webobjects.jdbcadaptor.PostgresqlExpression: "SELECT ....


Why does the invocation of connectWithModelNamed throw an exception
and subsequent uses of the EditingContext work??

Henrique Gomes

On Jun 11, 2008, at 4:25 PM, Lon Varscsak wrote:

To clarify, you want each session to have it's own connection to the
database?


Lon

On Wed, Jun 11, 2008 at 7:50 AM, Henrique Gomes <email@hidden>
wrote:


On Jun 11, 2008, at 3:41 PM, Daniele Corti wrote:

But, were you connected to a DB before calling
EOUtilities.connectWithModelNamed?




I restart the app and only see this message *after* calling
EOUtilities.connectWithModelNamed :

<WorkerThread0> Using JDBCPlugIn 'PostgresqlPlugIn' for JDBCAdaptor

So I guess not?

---
Henrique Gomes
_______________________________________________
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

_______________________________________________
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

_______________________________________________ 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


_______________________________________________
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

_______________________________________________ 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: 
 >Connecting to DB with user supplied credentials. (From: Henrique Gomes <email@hidden>)
 >Re: Connecting to DB with user supplied credentials. (From: Henrique Gomes <email@hidden>)
 >Re: Connecting to DB with user supplied credentials. (From: "Daniele Corti" <email@hidden>)
 >Re: Connecting to DB with user supplied credentials. (From: Henrique Gomes <email@hidden>)
 >Re: Connecting to DB with user supplied credentials. (From: "Lon Varscsak" <email@hidden>)
 >Re: Connecting to DB with user supplied credentials. (From: Henrique Gomes <email@hidden>)
 >Re: Connecting to DB with user supplied credentials. (From: "Lon Varscsak" <email@hidden>)
 >Re: Connecting to DB with user supplied credentials. (From: "Lon Varscsak" <email@hidden>)

  • Prev by Date: Re: DatabaseContextDelegate + Compound Primary Keys that Include Foreign Keys (+INHERITANCE!!!)
  • Next by Date: Re: Buying Books question
  • Previous by thread: Re: Connecting to DB with user supplied credentials.
  • Next by thread: Buying Books question
  • Index(es):
    • Date
    • Thread