I've just taken a look at the hibernte, cocoon, spring petstore. Looks like it does precisely what I was saying..
Getting the appContext in flow script seems obvious now I've seen it done.. Mark On Apr 11, 2005 12:08 AM, Mark Lowe <[EMAIL PROTECTED]> wrote: > If you want to start the DB with the webapplication then i can think > of worse things than simply having a DBServer.init() which would also > allow you to configure parameters in web.xml. Thats about as closely > as you'd want to couple cocoon to the DB. I'm not sure if HSQLDB > supported transactions, but should be okay for read access apps. Its > possible that the hibernate wrappers for the JDBC calls report that > transactions are working, when the db will tell you otherwise, this is > the case with mysql when using myisam table engine (depends on who > wrote the jdbc driver). > > On hibernate. > I'm not sure how you access the application context in flowscript (if > thats a problem, I have a feeling that only the cocoon servlet context > would be avialiable in flowscript), but i'd look around at any notes > on intgregrating spring with cocoon. This would give you a very clean > separation, spring makes light work of hibernate, the spring servlet > places any configured services (means of accessing your hibernated > objects) and then the trick would just be getting the services in your > view (in this case cocoon). This would mean no need to have db > configuration in your view resources (cocoon.xconf etc), but rather in > spring. > > I'd have a look for one of the numberous examples on hibernate and > spring, and then look for folk who have used spring with cocoon. It > must be doable. > > "The Hibernate builtin connection pool is for testing purposes only. It > might work on some databases, but I definately saw it break on MySQL > when leaving it running overnight." > > Regarding the connection pooling breaking on mysql, this could be the > mysql driver rather than the hibernate's default pooling (commons dbcp > i believe, although not entirly sure). There were a few pesky drivers > around with mysql that where causing strife for a while. I've used > hibernate with mysql and postgres without issue (other than the weeks > tracking down the jdbc issue), both with spring and a more standard > hibernate way. > > Mark > > > On Apr 9, 2005 5:57 PM, Grzegorz Sikora <[EMAIL PROTECTED]> wrote: > > Hello Sebastien, > > > > Saturday, April 9, 2005, 4:42:04 PM, you wrote: > > > > SA> - What is the URL of my HSQLDB database ? > > SA> - How can I configure it to tell him for example where to put its files > > ? > > SA> I know I can find information about that in HSQLDB documentation but > > SA> here as I'd like my database to be embedded in my web application, I > > SA> guess there is somewhere in Cocoon where I have to add code to > > SA> initialize it when Cocoon is started... > > SA> Any ideas ? Or at least has somebody already successfully used that > > SA> configuration ? > > > > Search for hsqldb-server tag and datasources tag both in > > cocoon.xconf. > > > > -- > > Best regards, > > Grzegorz Sikora > > > > > > --------------------------------------------------------------------- > > To unsubscribe, e-mail: [EMAIL PROTECTED] > > For additional commands, e-mail: [EMAIL PROTECTED] > > > > > --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]