You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cocoon.apache.org by Leszek Gawron <ou...@wlkp.org> on 2004/04/05 15:04:43 UTC

Cocoon and Hibernate

I have an application written using cocoon ( flow + jx ) and hibernate. I
could strip it down to a simple example and provide a patch. What form should
it take? Another block like OJB? A scratchpad directory ? 

The case is nearly the same as in hibernate  - there can be no sample working
out of the box due to the licensing but I think it will be simpler to run
(hibernate is not as sensitive to libraries version and it does not use class
enhancment, only reflection) 

If anyone is interested please advise.
	lg

-- 
            __
         | /  \ |        Leszek Gawron            //  \\
        \_\\  //_/       ouzo@wlkp.org           _\\()//_
         .'/()\'.     Phone: +48(501)720812     / //  \\ \
          \\  //  recursive: adj; see recursive  | \__/ |


Re: Cocoon and Hibernate

Posted by Leszek Gawron <ou...@wlkp.org>.
On Mon, Apr 05, 2004 at 03:04:43PM +0200, Leszek Gawron wrote:
> I have an application written using cocoon ( flow + jx ) and hibernate. I
> could strip it down to a simple example and provide a patch. What form should
> it take? Another block like OJB? A scratchpad directory ? 
> 
> The case is nearly the same as in hibernate  - there can be no sample working
Of course I meant OJB, sorry for that

	lg
-- 
            __
         | /  \ |        Leszek Gawron            //  \\
        \_\\  //_/       ouzo@wlkp.org           _\\()//_
         .'/()\'.     Phone: +48(501)720812     / //  \\ \
          \\  //  recursive: adj; see recursive  | \__/ |


Re: Cocoon and Hibernate

Posted by Mark Lundquist <ml...@wrinkledog.com>.
On Apr 5, 2004, at 11:31 AM, Hugo Burm wrote:

> I have been thinking about a
> Hibernate block on cocoondev.org.

That would be great!

I've been working on getting your Hibernate+Woody sample working for:

• Cocoon 2.1.5_dev
• Hibernate 2.0, w/ minimal changes to hibernate.properties (just the 
dialect & credentials for MySQL)
• MySQL 4.0

I left it in 'woody' as I had no particular need to make the sample 
work in 'CForms'.  Only minor changes were needed, I think just to the 
form definition (added <wd:datatype base-"string"> to a couple of 
widgets).

Here is the exact set of jars from the Hibernate2 distro that need to 
be copied for this sample to work:

hibernate2.jar
odmg-3.0.jar
dom4j-1.4.jar
cglib-2.0-rc2.jar
jta.jar
ehcache-0.6.jar
mysql-connector-java-3.0.8-stable-bin.jar

Here's where I'm stuck now: the form.load() crapped out saying it 
expected a java.lang.Long and got a java.lang.Integer instead.  So I 
changed the datatype from "long" to "integer" in the form definition, 
and behold — the first load() worked, I ran through the sample, and the 
save() worked, too.  But when I tried the sample again, the load() 
barfed again, saying that now it wants an Integer and is getting a Long 
instead!

Any ideas?  I'm the rankest of noobs to Hibernate, so kind of 
scratching my head right now...

Thanks for any help,
mark


RE: Cocoon and Hibernate

Posted by Hugo Burm <hu...@xs4all.nl>.
The authors of Hibernate make a statement on their website that we are
allowed to use the Hibernate API without affecting our own license:

"Using Hibernate (by importing Hibernate's public interfaces in your Java
code), and extending Hibernate (by subclassing) is considered by the authors
of Hibernate to be dynamic linking. Hence our interpretation of the LGPL is
that the use of the unmodified Hibernate source or binary does not affect
the license of your application code."

But during the Gettogether in Gent, last autumn 2003, while discussing this
Hibernate issue, Stefano Mazzocchi told us that the ASF will not take the
risk. The risk is that a GPL contribution may GPL-ify a whole subtree of the
ASF code. At least that is what I understand of this issue.

So I think we must wait for the new block mechanism that will make it easier
to maintain a block outside of the CVS.

To Leszek: I am trying to maintain a few Wiki pages about Hibernate on the
wiki.cocoondev.org. These pages tend to be outdated (especially nowadays,
after the recent Cocoon "renaming game"). I have been thinking about a
Hibernate block on cocoondev.org. So feel free to contact me.


Hugo Burm


> -----Original Message-----
> From: Vadim Gritsenko [mailto:vadim@reverycodes.com]
> Sent: Monday, April 05, 2004 5:23 PM
> To: dev@cocoon.apache.org
> Subject: Re: Cocoon and Hibernate
>
>
> Leszek Gawron wrote:
>
> >On Mon, Apr 05, 2004 at 03:24:26PM +0200, Reinhard Pötz wrote:
> >
> >
> >>Leszek Gawron wrote:
> >>
> >>
> >>
> >>>I have an application written using cocoon ( flow + jx )
> and hibernate. I
> >>>could strip it down to a simple example and provide a
> patch. What form
> >>>should
> >>>it take? Another block like OJB? A scratchpad directory ?
> >>>
> >>>The case is nearly the same as in hibernate  - there can
> be no sample
> >>>working
> >>>out of the box due to the licensing but I think it will be
> simpler to run
> >>>(hibernate is not as sensitive to libraries version and it
> does not use
> >>>class
> >>>enhancment, only reflection)
> >>>
> >>>If anyone is interested please advise.
> >>>	lg
> >>>
> >>>
> >>>
> >>>
> >>>
> >>Sorry, but we can't add Hibernate to our CVS because it
> licensed under
> >>LGPL. You could ask at cocoondev.org.
> >>
> >>
> >I am not talking about adding hibernate. I am proposing to
> add hibernate
> >sample same way ojb sample is added - the user has to add
> some libraries
> >himself before building.
> >
> >
>
> This should be possible as long as samples are coded against some
> standard, non-(L)GPL API (JDO?) and do not use any hibernate classes
> directly. We can not also host mocks of hibrnate classes.
>
>
> Vadim
>
>


Re: Cocoon and Hibernate

Posted by Vadim Gritsenko <va...@reverycodes.com>.
Leszek Gawron wrote:

>On Mon, Apr 05, 2004 at 03:24:26PM +0200, Reinhard Pötz wrote:
>  
>
>>Leszek Gawron wrote:
>>
>>    
>>
>>>I have an application written using cocoon ( flow + jx ) and hibernate. I
>>>could strip it down to a simple example and provide a patch. What form 
>>>should
>>>it take? Another block like OJB? A scratchpad directory ? 
>>>
>>>The case is nearly the same as in hibernate  - there can be no sample 
>>>working
>>>out of the box due to the licensing but I think it will be simpler to run
>>>(hibernate is not as sensitive to libraries version and it does not use 
>>>class
>>>enhancment, only reflection) 
>>>
>>>If anyone is interested please advise.
>>>	lg
>>>
>>>
>>>
>>>      
>>>
>>Sorry, but we can't add Hibernate to our CVS because it licensed under 
>>LGPL. You could ask at cocoondev.org.
>>    
>>
>I am not talking about adding hibernate. I am proposing to add hibernate
>sample same way ojb sample is added - the user has to add some libraries
>himself before building.
>  
>

This should be possible as long as samples are coded against some 
standard, non-(L)GPL API (JDO?) and do not use any hibernate classes 
directly. We can not also host mocks of hibrnate classes.


Vadim


Re: Cocoon and Hibernate

Posted by Leszek Gawron <ou...@wlkp.org>.
On Mon, Apr 05, 2004 at 03:24:26PM +0200, Reinhard Pötz wrote:
> Leszek Gawron wrote:
> 
> >I have an application written using cocoon ( flow + jx ) and hibernate. I
> >could strip it down to a simple example and provide a patch. What form 
> >should
> >it take? Another block like OJB? A scratchpad directory ? 
> >
> >The case is nearly the same as in hibernate  - there can be no sample 
> >working
> >out of the box due to the licensing but I think it will be simpler to run
> >(hibernate is not as sensitive to libraries version and it does not use 
> >class
> >enhancment, only reflection) 
> >
> >If anyone is interested please advise.
> >	lg
> >
> > 
> >
> Sorry, but we can't add Hibernate to our CVS because it licensed under 
> LGPL. You could ask at cocoondev.org.
I am not talking about adding hibernate. I am proposing to add hibernate
sample same way ojb sample is added - the user has to add some libraries
himself before building.
	lg
-- 
            __
         | /  \ |        Leszek Gawron            //  \\
        \_\\  //_/       ouzo@wlkp.org           _\\()//_
         .'/()\'.     Phone: +48(501)720812     / //  \\ \
          \\  //  recursive: adj; see recursive  | \__/ |


Re: Cocoon and Hibernate

Posted by Reinhard Pötz <re...@apache.org>.
Leszek Gawron wrote:

>I have an application written using cocoon ( flow + jx ) and hibernate. I
>could strip it down to a simple example and provide a patch. What form should
>it take? Another block like OJB? A scratchpad directory ? 
>
>The case is nearly the same as in hibernate  - there can be no sample working
>out of the box due to the licensing but I think it will be simpler to run
>(hibernate is not as sensitive to libraries version and it does not use class
>enhancment, only reflection) 
>
>If anyone is interested please advise.
>	lg
>
>  
>
Sorry, but we can't add Hibernate to our CVS because it licensed under 
LGPL. You could ask at cocoondev.org.

-- 
Reinhard


Re: Cocoon and Hibernate

Posted by Antonio Gallardo <ag...@agssa.net>.
Brian McCallister dijo:
> fwiw: OJB can be done completely legally, the OJB block just happens to
> really be a JDO via OJB block, which requires the JDORI jars.

The OJB block also work with PB.

Best Regards,

Antonio Gallardo

Re: Cocoon and Hibernate

Posted by Brian McCallister <br...@apache.org>.
fwiw: OJB can be done completely legally, the OJB block just happens to 
really be a JDO via OJB block, which requires the JDORI jars. I am 
working on fixing that (the need for the JDORI jars, not the JDO -- JDO 
isn't too bad in and of itself ;-)

-Brian

On Apr 5, 2004, at 9:04 AM, Leszek Gawron wrote:

> I have an application written using cocoon ( flow + jx ) and 
> hibernate. I
> could strip it down to a simple example and provide a patch. What form 
> should
> it take? Another block like OJB? A scratchpad directory ?
>
> The case is nearly the same as in hibernate  - there can be no sample 
> working
> out of the box due to the licensing but I think it will be simpler to 
> run
> (hibernate is not as sensitive to libraries version and it does not 
> use class
> enhancment, only reflection)
>
> If anyone is interested please advise.
> 	lg
>
> -- 
>             __
>          | /  \ |        Leszek Gawron            //  \\
>         \_\\  //_/       ouzo@wlkp.org           _\\()//_
>          .'/()\'.     Phone: +48(501)720812     / //  \\ \
>           \\  //  recursive: adj; see recursive  | \__/ |
>
>
>