Nice. Thanks for the help, gary
-----Original Message----- From: [email protected] [mailto:[email protected]] On Behalf Of Michael Blakeley Sent: Tuesday, May 24, 2011 3:06 PM To: General MarkLogic Developer Discussion Subject: Re: [MarkLogic Dev General] validate connection in XCC The easiest technique would be to do something that requires server interaction. So this would work: session.newAdhocQuery ("1"); But I'd prefer to use that round-trip to get useful information back. I often log the server version as part of my debug code, so I might start by getting the metadata object for that: ContentbaseMetaData md = session.getContentbaseMetaData(); Then I'd log the output from md.getServerVersionString() and md.getDriverVersionString() -- Mike On 24 May 2011, at 11:59 , Gary Larsen wrote: > Hi, > > I'm in XCC crash course mode so I may have a few more questions like this. > > I can create a ContentSource and a Session with bad credentials and won't throw an exception (it appears) until I try to do something for example session.insertContent(). > > Is there a method to check credentials early on? > > Thanks, > gary > _______________________________________________ > General mailing list > [email protected] > http://developer.marklogic.com/mailman/listinfo/general _______________________________________________ General mailing list [email protected] http://developer.marklogic.com/mailman/listinfo/general _______________________________________________ General mailing list [email protected] http://developer.marklogic.com/mailman/listinfo/general
