Ben Anderson wrote:
Hi,
I need to hit the database from outside of cocoon, but within the same
webapp. I would like to share the same datasource. My first thought
was to follow this example:
http://cocoon.apache.org/2.1/developing/datasources.html
which is to implement the Composable interface. However, I'm not sure
how to do this because I'll need a static hook somewhere to get my
object. Does anyone have any pointers for doing this?
Thanks,
Ben
Adding a static hook is less than ideal, and it isn't hard to just
create your system to live as a component inside of the Cocoon world.
Nevertheless, if you are hell-bent on this approach, here is how you
would do it:
http://cocoon.apache.org/2.1/developing/parent-component-manager.html
Set up the component manager in your static class, with the entry for
the database, and let cocoon just use it.
--
Design is a funny word. Some people think design means how it looks.
But of course, if you dig deeper, it's really how it works.
-- Steve Jobs
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]