[hibernate-dev] OSGI manifests for hibernate-orm

Steve Ebersole steve at hibernate.org
Thu Aug 16 16:25:39 EDT 2012


I found them your side of the conversation in my inbox :)  Yes they 
were comments made on the fork branch which no longer exists :(

The discussion centered around cases where HEM defines the same 
operations differently from CORE.  Here it is the notion of persist(); 
the difference is that CORE and HEM cascade that differently.   HEM I 
would guess is following JPA spec requirements.


On Thu 16 Aug 2012 10:35:38 AM CDT, Hardy Ferentschik wrote:
>
> On 16 Jan 2012, at 12:42 AM, Steve Ebersole wrote:
>
>> In fact splitting those purposes alone solves the problem with
>> org.hibernate.engine.spi.JpaCascadingAction I believe
>>
>> As for org.hibernate.engine.spi.JpaCascadeStyle, TBH, I am not sure
>> exactly why we need this split between persist() handling for
>> hibernate-core versus persist() handling for hibernate-entitymanager. I
>> asked Hardy about this a few weeks ago when I was working on integrating
>> JPA 2.1 on master.  But I forget the reasoning.  Hardy?  I just remember
>> that the end result was we decided it was best to leave them separate.
>> Even leaving them split, I would think we could do something like having
>> the org.hibernate.jpa.internal.event.JpaIntegrator register the
>> override, rather than doing it in static loading blocks.
>
> I don't remember either. I think we had a discussion on GitHub on some of your commits.
> Not sure whether these comments are still somehow preserved.
>
>
>
> --Hardy
>
>> On 08/15/2012 05:08 PM, mailing at bibbernet.org wrote:
>>> Hello,
>>>
>>> because I need clean OSGI bundles for Hibernate and especially Envers,
>>> I am working on some patches for the 4.1 branch of hibernate-orm to
>>> enable generation of OSGI compatible jar files.
>>>
>>> During the work I have found the following problems, and need some
>>> help and/or feedback. The problems are:
>>>
>>> - The package org.hibernate.engine.spi is exported by two jar files,
>>> hibernate-core and hibernate-entitymanager, which is not possible in
>>> OSGI. The Problem is the STYLES map in CascadeStyle in hibernate-core
>>> which prevent that the package in hibernate-entitymanager can be
>>> refactored from org.hibernate.engine.spi to
>>> org.hibernate.ejb.engine.spi, to solve the duplicate export.
>>> I think to fix this problem, the following steps should be done:
>>> - Add a setter method to CascadeStyle to allow subclasses to add
>>> CascadeStyles to the map STYLES
>>> - Refactor the package org.hibernate.engine.spi in hibernate-envers to
>>> org.hibernate.ejb.engine.spi
>>> - Use the setter method to add the new CascadeStyle in EJB3CascadeStyle
>>>
>>> - The package org.hibernate.tool.ant is exported by to jars,
>>> hibernate-tools (version: 3.2.0.ga) and hibernate-envers, which is
>>> also a duplicate export problem. The problem is that HibernateToolTask
>>> in hibernate-tools has no getters/setters for configurationTask and
>>> thus hibernate-envers is directly reading/modyifing the property
>>> configurationTask. I think to fix this problem, the following steps
>>> should be done:
>>> - hibernate-tools should add public getters/setters for
>>> configurationTask in class HibernateToolTask
>>> - the package org.hibernate.tool.ant in hibernate-envers should be
>>> refactored to org.hibernate.envers.tool.ant
>>> - the property configurationTask should be accessed sole thru the
>>> getters/setters .
>>>
>>> It would be nice if someone could check and comment my planned and
>>> already done  changes.
>>>
>>> I have already done the CascadeStyle fix, the configurationTask fix is
>>> outstanding because I need to know against which version of
>>> hibernate-tools I should create the fix.
>>>
>>> In generally the following tasks are done until now:
>>> - added configuration to gradle scripts to generate the osgi manifests
>>> for all jar files in hibernate-orm (needs maybe some cleanup) - right
>>> now the build files for hibernate-core, hibernate-entitymanager and
>>> hibernate-envers are modified.
>>> - added blueprint.xml to hibernate-entitymanager to announce the
>>> availabillity of a javax.persistence.provider
>>>
>>> Next steps:
>>> - add osgi manifests to the other jars of hibernate-orm
>>> - write integration tests with pax exam and karaf 2.2.x
>>> - finish refactoring of hibernate-tools
>>> - add patches for other needed dependencies
>>> (hibernate-commons-annotations and more)
>>> - more testing, more integration tests
>>>
>>> Help, reviews and comments are welcome, and if someone has already
>>> done the work or parts, please drop me a note.
>>>
>>> Attached find a patch against the branch 4.1 of hibernate-orm.
>>>
>>> regards
>>> Martin Neimeier
>>>
>>>
>>>
>>> _______________________________________________
>>> hibernate-dev mailing list
>>> hibernate-dev at lists.jboss.org
>>> https://lists.jboss.org/mailman/listinfo/hibernate-dev
>>
>>
>> --
>> steve at hibernate.org
>> http://hibernate.org
>>
>> _______________________________________________
>> hibernate-dev mailing list
>> hibernate-dev at lists.jboss.org
>> https://lists.jboss.org/mailman/listinfo/hibernate-dev
>

--
steve at hibernate.org
http://hibernate.org


More information about the hibernate-dev mailing list