I'm trying to run the DatabaseExample I got from the es-wiki site. I am assuming that I can run it out-of-box once I configure the Extension.xml file to point to my local MySQL instance (and set the two plug-ins as Server Level plug-ins). I'm doing this and I believe it is connecting properly, but I'm having an issue obtaining a connection from the ManagedObjectFactory. Specifically, this line:
Connection con = (Connection) getApi().acquireManagedObject("ManagedConnectionPo ol", esDB);
in the DatabasePlugin object is returning a null value. I've checked the name of the ManagedObject specified in this line of code with the name in the Extensions.xml and they match. Is there some other sort of set-up I should be doing?
As an aside, you have the above line in a try/catch block of code, but the catch only deals with SQLExceptions. At the risk of exposing myself as a buffoon (slightly embarrassing how long I spent on this), you might want to wrap your example code in a generic Exception catch block . . . ;-).
Let me know, Thanks,
Joe


Reply With Quote
