• 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: Modifying Properties for an EOF JDBC-connection
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Modifying Properties for an EOF JDBC-connection


  • Subject: Re: Modifying Properties for an EOF JDBC-connection
  • From: Gustavo Adolfo Pizano <email@hidden>
  • Date: Wed, 20 May 2009 11:46:40 +0200

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@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: 
 >Modifying Properties for an EOF JDBC-connection (From: Hugi Thordarson <email@hidden>)
 >Re: Modifying Properties for an EOF JDBC-connection (From: Gustavo Adolfo Pizano <email@hidden>)
 >Re: Modifying Properties for an EOF JDBC-connection (From: Hugi Thordarson <email@hidden>)

  • Prev by Date: Re: Modifying Properties for an EOF JDBC-connection
  • Next by Date: Re: Modifying Properties for an EOF JDBC-connection
  • Previous by thread: Re: Modifying Properties for an EOF JDBC-connection
  • Next by thread: Re: Modifying Properties for an EOF JDBC-connection
  • Index(es):
    • Date
    • Thread