OK. It appears that at least part of the problem is that you are creating the DSN and Gateway objects inside your service's init(). Don't do that. Define them in ColdSpring (like you appear to have done) and let CS manage them.
Now then, the reason you are still getting the error message is because in your createObject() calls (actually the init() call afterward), you are passing the DSN _string_ into your DAO/Gateway objects. They are expecting the object itself. Ultimately, though, there seem to be a number of design issues involved here. Hopefully something that follows will help. :-) 1) As I said above, let CS manage your stuff for you. 2) Use a single data access layer. Pick a name, it really doesn't matter. Either "DAO" or "Gateway". There really is no reason whatsoever to create both. You can search blogs for a litany of posts that go into details on that. (Check Sean Corfield's blog and Brian Kotek's blog for starters.) 3) I am not understanding why you would pass your datasource object into your service. Since you have a data layer (DAO/Gateway), your service should not use the datasource at all. 4) In production, use ducktyping. That is, type="any" on your arguments. Your life will be hella easier, and you'll get a performance boost, to boot. -- Model-Glue Sites: Home Page: http://www.model-glue.com Documentation: http://docs.model-glue.com Bug Tracker: http://bugs.model-glue.com Blog: http://www.model-glue.com/blog You received this message because you are subscribed to the Google Groups "model-glue" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/model-glue?hl=en
