cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jeremy Quinn <jer...@media.demon.co.uk>
Subject Re: Hibernate sessions (was Re: [vote results] FOM)
Date Thu, 19 Jun 2003 09:21:45 GMT

On Thursday, June 19, 2003, at 08:20 AM, Ugo Cei wrote:

> Jeremy Quinn wrote:
>> is that:
>> var session = Package.package.name.Persistence.getSession(); ?
>
> Yep.

Phew ;)

>> Would you do something like this, if you wanted to use Transactions? :

<snip/>

>
> Yes. What's important is that you must perform your transaction in the 
> scope of a single HTTP request, otherwise you'll have to use another 
> strategy.

Yes, OK, no great hardship.

>> Would you consider doing something like the above from inside a 
>> sendView validation function, adding a violation if you had to roll 
>> back?
>
> Haven't thought about it.
>
>> By what I understand now ..... what I require is the Persistence 
>> class from the page you sent me and a configuration to add to 
>> web.xml. What I am not sure I understand is what that configuration 
>> should be.
>
> First of all, you need a Servlet 2.3 compliant container. Recent 
> versions of Jetty or Tomcat are OK.

Good

> Then you need to patch Cocoon's web.xml file to refer to the 2.3 DTD:

That's a step I would have missed!!

<snip wot="sample"/>

> As far as JNDI is concerned, I've removed all JNDI code from my 
> Persistence class and simplified it a little.

AH HA! That was freaking me ..... "gosh it looks like it's doing 
something really important, and I don't understand any of it!!!"

> I'm sending you privately the class.

Very kind of you

regards Jeremy


Mime
View raw message