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 PROTECTED]> 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 PROTECTED]> 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 [EMAIL PROTECTED]
[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
[EMAIL PROTECTED]
[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 PROTECTED]>
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 protected])
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/varscsak%40smarthealth.com

This email sent to [EMAIL PROTECTED]

_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list      ([email protected])
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/lists%40farol.pt

This email sent to [EMAIL PROTECTED]

_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list      ([email protected])
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/varscsak%40smarthealth.com

This email sent to [EMAIL PROTECTED]


_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list      ([email protected])
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/kenlists%40anderhome.com

This email sent to [EMAIL PROTECTED]

_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list      ([email protected])
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

This email sent to [EMAIL PROTECTED]

Reply via email to