Aha i c.. .. my mistake then. :P

G

On May 20, 2009, at 11:23 AM, Hugi Thordarson wrote:

Thanks - but this overrides the connection dictionary; I'l looking at the connection properties (it's a JDBC thing)...

I'll posta notification once I get this working :)

Cheers,
- Hugi

// Hugi Thordarson
// http://hugi.karlmenn.is/



On 19.5.2009, at 17:38, Gustavo Adolfo Pizano wrote:

Hello..

I think this is quite similar to what I was looking but on a LDAP server.. what I did was the follwoing:

EOModel model = EOModelGroup.defaultGroup().modelNamed("LDAPModel");
NSMutableDictionary<String, String> overrides = new NSMutableDictionary<String, String>(); overrides.takeValueForKey("ldap://localhost:389/ cn=internal,cn=Users,o=xws", "serverUrl"); EODatabaseContext.forceConnectionWithModel(model, overrides, defaultEditingContext()); now note that the line overrides.takeValueForKey(value,key), the key "serverUrl: I got making an NSLog before

like this.. from the EO prgramming guide

EOModel model = EOModelGroup.defaultGroup().modelNamed("RealEstate");
NSLog.out.appendln("connection dictionary keys:" + model.connectionDictionary().allKeys());

NSMutableDictionary overrides = new NSMutableDictionary();
overrides.takeValueForKey("brent", "username");
overrides.takeValueForKey("secret", "password");
EODatabaseContext.forceConnectionWithModel(model, overrides, new EOEditingContext());




I hope this helps you.


Gus


On May 19, 2009, at 7:17 PM, Hugi Thordarson wrote:

Hi all.

I need to set a property for the Oracle JDBC-driver, can anyone tell me how to do that?
This is wat I've tried (without success):

---------
EOModel model = EOModelGroup.defaultGroup().modelNamed( "MyModel" );
EODatabaseContext dbc = EODatabaseContext.registeredDatabaseContextForModel( model, ec );
JDBCAdaptor adaptor = (JDBCAdaptor)dbc.adaptorContext().adaptor();
adaptor.connectionProperties().put( "oracle.jdbc.ReadTimeout", 5000 );

System.out.println( adaptor.connectionProperties() );
---------

The last line's sysout will not show the newly added property - any idea how I can get it in there?

Cheers,
- hugi

// Hugi Thordarson
// http://hugi.karlmenn.is/
_______________________________________________
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/webobjectspicora%40gmail.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