You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@felix.apache.org by LongkerDandy <lo...@gmail.com> on 2010/09/11 14:03:03 UTC

ORM Framework Suggestions

Hi

I'm been try to use DataNucleus/JDO with felix, but no success.
There are some ClassNotDefine exception which I think is something about
classloader.

I may able bypass this, but since most JDO/JPA framwork are based on
classloader.
I wonder if there are any better way to do the ORM thing with OSGi.
And if anyone has some successful story with it.

Regards
LongkerDandy

Re: ORM Framework Suggestions

Posted by Daoud AbdelMonem Faleh <ab...@gmail.com>.
LongkerDandy a écrit :
> Hi
>
> I'm been try to use DataNucleus/JDO with felix, but no success.
> There are some ClassNotDefine exception which I think is something about
> classloader.
>
> I may able bypass this, but since most JDO/JPA framwork are based on
> classloader.
> I wonder if there are any better way to do the ORM thing with OSGi.
> And if anyone has some successful story with it.
>
> Regards
> LongkerDandy
>
>   

Am using EclipseLink in my current project. The only requirement besides
installing EclipseLink bundles is to add "JPA-PersistenceUnits" to the
bundle containing Entity classes.

Checkout the examples http://wiki.eclipse.org/EclipseLink/Examples/OSGi

HTH,
--Daoud.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
For additional commands, e-mail: users-help@felix.apache.org


Re: ORM Framework Suggestions

Posted by Christian Schneider <ch...@die-schneider.net>.
  I also had the case with cxf where annotations were not used. In my 
case I forgot to import the annotation packages.

Regards

Christian


Am 13.09.2010 10:16, schrieb Charles Moulliard:
> Hi,
>
> Unfortunately, I haven't use Hibernate annotations except Spring
> annotations to inject transactional aspects in my service layer. I
> will try to replay with them in the next coming weeks as I have
> experienced problems. @Transaction were not injected so the
> transactions were not committed and data not saved in the DB.
>
> Regards,
>
> Charles Moulliard
>
> Senior Enterprise Architect (J2EE, .NET, SOA)
> Apache Camel - Karaf - ServiceMix Committer
> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> Blog : http://cmoulliard.blogspot.com |  Twitter : http://twitter.com/cmoulliard
> Linkedin : http://www.linkedin.com/in/charlesmoulliard | Skype: cmoulliard
>
>
>
> On Mon, Sep 13, 2010 at 10:05 AM, Christian Schneider
> <ch...@die-schneider.net>  wrote:
>>   Hi Charles,
>>
>> have you been able to use hibernate annotations with pure bundles? I used
>> the hibernate packages from springsource. The annotations bundle is a
>> fragment for the hibernate bundle but at least in my case I was not able to
>> import the annotation classes. It looked as if the annotation bundle was not
>> there. Did you do anything special to make it work? Btw. I used equinox not
>> servicemix or felix.
>>
>> Thanks
>>
>> Christian
>>
>>
>> Am 13.09.2010 09:37, schrieb Charles Moulliard:
>>> Hi,rom springs
>>>
>>> As you plan to use ORM top of OSGI framework like Apache Felix (and
>>> maybe Apache Karaf or ServiceMix), I suggest that you have a look to
>>> Apache ARIES project which propose a JPA implementation based on OSGI
>>> EE specification.
>>> You can find info here : http://incubator.apache.org/aries/&
>>> http://incubator.apache.org/aries/jpaproject.html
>>>
>>> Examples can be find here : http://incubator.apache.org/aries/samples.html
>>>
>>> I have personaly used Hibernate + Spring on Apache ServiceMix
>>> successfully but will considering to use in the future JPA with
>>> OpenJPA or EclipseLink.
>>>
>>> When you will select a product, check that the features/functionality
>>> provided will correspond to your expectations because sometimes the
>>> behavior of an ORM is not the same as another.
>>>
>>> Regards,
>>>
>>> Charles Moulliard
>>>
>>> Senior Enterprise Architect (J2EE, .NET, SOA)
>>> Apache Camel - Karaf - ServiceMix Committer
>>> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>>> Blog : http://cmoulliard.blogspot.com |  Twitter :
>>> http://twitter.com/cmoulliard
>>> Linkedin : http://www.linkedin.com/in/charlesmoulliard | Skype: cmoulliard
>>>
>>>
>>>
>>> On Mon, Sep 13, 2010 at 9:29 AM, Jim Talbut<Ji...@groupgti.com>
>>>   wrote:
>>>> I've used OpenJPA 2.0 with OSGi, though only in as yet unreleased
>>>> projects so there may be things I missed.
>>>> I found it much simpler to get going in OSGi than Hibernate (which was my
>>>> first attempt).
>>>> I strongly recommend giving OpenJPA a go - I've switched to using it in
>>>> my non-JPA projects too now, partly because I only want to work with one ORM
>>>> and partly because I find OpenJPA better documented than Hibernate with JPA
>>>> (the documentation for Hibernate with JPA tends to relate everything to the
>>>> normal behaviour of Hibernate, which isn't much help if you don't know
>>>> that).
>>>>
>>>> Jim
>>>>
>>>> -----Original Message-----
>>>> From: LongkerDandy [mailto:longkerdandy@gmail.com]
>>>> Sent: 11 September 2010 13:03
>>>> To: users@felix.apache.org
>>>> Subject: ORM Framework Suggestions
>>>>
>>>> Hi
>>>>
>>>> I'm been try to use DataNucleus/JDO with felix, but no success.
>>>> There are some ClassNotDefine exception which I think is something about
>>>> classloader.
>>>>
>>>> I may able bypass this, but since most JDO/JPA framwork are based on
>>>> classloader.
>>>> I wonder if there are any better way to do the ORM thing with OSGi.
>>>> And if anyone has some successful story with it.
>>>>
>>>> Regards
>>>> LongkerDandy
>>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
>>> For additional commands, e-mail: users-help@felix.apache.org
>>>
>>>
>> --
>> ----
>> http://www.liquid-reality.de
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
>> For additional commands, e-mail: users-help@felix.apache.org
>>
>>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
> For additional commands, e-mail: users-help@felix.apache.org
>
>

-- 
----
http://www.liquid-reality.de


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
For additional commands, e-mail: users-help@felix.apache.org


Re: ORM Framework Suggestions

Posted by Charles Moulliard <cm...@gmail.com>.
Hi,

Unfortunately, I haven't use Hibernate annotations except Spring
annotations to inject transactional aspects in my service layer. I
will try to replay with them in the next coming weeks as I have
experienced problems. @Transaction were not injected so the
transactions were not committed and data not saved in the DB.

Regards,

Charles Moulliard

Senior Enterprise Architect (J2EE, .NET, SOA)
Apache Camel - Karaf - ServiceMix Committer
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Blog : http://cmoulliard.blogspot.com |  Twitter : http://twitter.com/cmoulliard
Linkedin : http://www.linkedin.com/in/charlesmoulliard | Skype: cmoulliard



On Mon, Sep 13, 2010 at 10:05 AM, Christian Schneider
<ch...@die-schneider.net> wrote:
>  Hi Charles,
>
> have you been able to use hibernate annotations with pure bundles? I used
> the hibernate packages from springsource. The annotations bundle is a
> fragment for the hibernate bundle but at least in my case I was not able to
> import the annotation classes. It looked as if the annotation bundle was not
> there. Did you do anything special to make it work? Btw. I used equinox not
> servicemix or felix.
>
> Thanks
>
> Christian
>
>
> Am 13.09.2010 09:37, schrieb Charles Moulliard:
>>
>> Hi,rom springs
>>
>> As you plan to use ORM top of OSGI framework like Apache Felix (and
>> maybe Apache Karaf or ServiceMix), I suggest that you have a look to
>> Apache ARIES project which propose a JPA implementation based on OSGI
>> EE specification.
>> You can find info here : http://incubator.apache.org/aries/&
>> http://incubator.apache.org/aries/jpaproject.html
>>
>> Examples can be find here : http://incubator.apache.org/aries/samples.html
>>
>> I have personaly used Hibernate + Spring on Apache ServiceMix
>> successfully but will considering to use in the future JPA with
>> OpenJPA or EclipseLink.
>>
>> When you will select a product, check that the features/functionality
>> provided will correspond to your expectations because sometimes the
>> behavior of an ORM is not the same as another.
>>
>> Regards,
>>
>> Charles Moulliard
>>
>> Senior Enterprise Architect (J2EE, .NET, SOA)
>> Apache Camel - Karaf - ServiceMix Committer
>> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>> Blog : http://cmoulliard.blogspot.com |  Twitter :
>> http://twitter.com/cmoulliard
>> Linkedin : http://www.linkedin.com/in/charlesmoulliard | Skype: cmoulliard
>>
>>
>>
>> On Mon, Sep 13, 2010 at 9:29 AM, Jim Talbut<Ji...@groupgti.com>
>>  wrote:
>>>
>>> I've used OpenJPA 2.0 with OSGi, though only in as yet unreleased
>>> projects so there may be things I missed.
>>> I found it much simpler to get going in OSGi than Hibernate (which was my
>>> first attempt).
>>> I strongly recommend giving OpenJPA a go - I've switched to using it in
>>> my non-JPA projects too now, partly because I only want to work with one ORM
>>> and partly because I find OpenJPA better documented than Hibernate with JPA
>>> (the documentation for Hibernate with JPA tends to relate everything to the
>>> normal behaviour of Hibernate, which isn't much help if you don't know
>>> that).
>>>
>>> Jim
>>>
>>> -----Original Message-----
>>> From: LongkerDandy [mailto:longkerdandy@gmail.com]
>>> Sent: 11 September 2010 13:03
>>> To: users@felix.apache.org
>>> Subject: ORM Framework Suggestions
>>>
>>> Hi
>>>
>>> I'm been try to use DataNucleus/JDO with felix, but no success.
>>> There are some ClassNotDefine exception which I think is something about
>>> classloader.
>>>
>>> I may able bypass this, but since most JDO/JPA framwork are based on
>>> classloader.
>>> I wonder if there are any better way to do the ORM thing with OSGi.
>>> And if anyone has some successful story with it.
>>>
>>> Regards
>>> LongkerDandy
>>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
>> For additional commands, e-mail: users-help@felix.apache.org
>>
>>
>
> --
> ----
> http://www.liquid-reality.de
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
> For additional commands, e-mail: users-help@felix.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
For additional commands, e-mail: users-help@felix.apache.org


Re: ORM Framework Suggestions

Posted by Christian Schneider <ch...@die-schneider.net>.
  Hi Charles,

have you been able to use hibernate annotations with pure bundles? I 
used the hibernate packages from springsource. The annotations bundle is 
a fragment for the hibernate bundle but at least in my case I was not 
able to import the annotation classes. It looked as if the annotation 
bundle was not there. Did you do anything special to make it work? Btw. 
I used equinox not servicemix or felix.

Thanks

Christian


Am 13.09.2010 09:37, schrieb Charles Moulliard:
> Hi,rom springs
>
> As you plan to use ORM top of OSGI framework like Apache Felix (and
> maybe Apache Karaf or ServiceMix), I suggest that you have a look to
> Apache ARIES project which propose a JPA implementation based on OSGI
> EE specification.
> You can find info here : http://incubator.apache.org/aries/&
> http://incubator.apache.org/aries/jpaproject.html
>
> Examples can be find here : http://incubator.apache.org/aries/samples.html
>
> I have personaly used Hibernate + Spring on Apache ServiceMix
> successfully but will considering to use in the future JPA with
> OpenJPA or EclipseLink.
>
> When you will select a product, check that the features/functionality
> provided will correspond to your expectations because sometimes the
> behavior of an ORM is not the same as another.
>
> Regards,
>
> Charles Moulliard
>
> Senior Enterprise Architect (J2EE, .NET, SOA)
> Apache Camel - Karaf - ServiceMix Committer
> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> Blog : http://cmoulliard.blogspot.com |  Twitter : http://twitter.com/cmoulliard
> Linkedin : http://www.linkedin.com/in/charlesmoulliard | Skype: cmoulliard
>
>
>
> On Mon, Sep 13, 2010 at 9:29 AM, Jim Talbut<Ji...@groupgti.com>  wrote:
>> I've used OpenJPA 2.0 with OSGi, though only in as yet unreleased projects so there may be things I missed.
>> I found it much simpler to get going in OSGi than Hibernate (which was my first attempt).
>> I strongly recommend giving OpenJPA a go - I've switched to using it in my non-JPA projects too now, partly because I only want to work with one ORM and partly because I find OpenJPA better documented than Hibernate with JPA (the documentation for Hibernate with JPA tends to relate everything to the normal behaviour of Hibernate, which isn't much help if you don't know that).
>>
>> Jim
>>
>> -----Original Message-----
>> From: LongkerDandy [mailto:longkerdandy@gmail.com]
>> Sent: 11 September 2010 13:03
>> To: users@felix.apache.org
>> Subject: ORM Framework Suggestions
>>
>> Hi
>>
>> I'm been try to use DataNucleus/JDO with felix, but no success.
>> There are some ClassNotDefine exception which I think is something about
>> classloader.
>>
>> I may able bypass this, but since most JDO/JPA framwork are based on
>> classloader.
>> I wonder if there are any better way to do the ORM thing with OSGi.
>> And if anyone has some successful story with it.
>>
>> Regards
>> LongkerDandy
>>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
> For additional commands, e-mail: users-help@felix.apache.org
>
>

-- 
----
http://www.liquid-reality.de


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
For additional commands, e-mail: users-help@felix.apache.org


Re: ORM Framework Suggestions

Posted by Charles Moulliard <cm...@gmail.com>.
Hi,

As you plan to use ORM top of OSGI framework like Apache Felix (and
maybe Apache Karaf or ServiceMix), I suggest that you have a look to
Apache ARIES project which propose a JPA implementation based on OSGI
EE specification.
You can find info here : http://incubator.apache.org/aries/ &
http://incubator.apache.org/aries/jpaproject.html

Examples can be find here : http://incubator.apache.org/aries/samples.html

I have personaly used Hibernate + Spring on Apache ServiceMix
successfully but will considering to use in the future JPA with
OpenJPA or EclipseLink.

When you will select a product, check that the features/functionality
provided will correspond to your expectations because sometimes the
behavior of an ORM is not the same as another.

Regards,

Charles Moulliard

Senior Enterprise Architect (J2EE, .NET, SOA)
Apache Camel - Karaf - ServiceMix Committer
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Blog : http://cmoulliard.blogspot.com |  Twitter : http://twitter.com/cmoulliard
Linkedin : http://www.linkedin.com/in/charlesmoulliard | Skype: cmoulliard



On Mon, Sep 13, 2010 at 9:29 AM, Jim Talbut <Ji...@groupgti.com> wrote:
> I've used OpenJPA 2.0 with OSGi, though only in as yet unreleased projects so there may be things I missed.
> I found it much simpler to get going in OSGi than Hibernate (which was my first attempt).
> I strongly recommend giving OpenJPA a go - I've switched to using it in my non-JPA projects too now, partly because I only want to work with one ORM and partly because I find OpenJPA better documented than Hibernate with JPA (the documentation for Hibernate with JPA tends to relate everything to the normal behaviour of Hibernate, which isn't much help if you don't know that).
>
> Jim
>
> -----Original Message-----
> From: LongkerDandy [mailto:longkerdandy@gmail.com]
> Sent: 11 September 2010 13:03
> To: users@felix.apache.org
> Subject: ORM Framework Suggestions
>
> Hi
>
> I'm been try to use DataNucleus/JDO with felix, but no success.
> There are some ClassNotDefine exception which I think is something about
> classloader.
>
> I may able bypass this, but since most JDO/JPA framwork are based on
> classloader.
> I wonder if there are any better way to do the ORM thing with OSGi.
> And if anyone has some successful story with it.
>
> Regards
> LongkerDandy
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
For additional commands, e-mail: users-help@felix.apache.org


RE: ORM Framework Suggestions

Posted by Jim Talbut <Ji...@groupgti.com>.
I've used OpenJPA 2.0 with OSGi, though only in as yet unreleased projects so there may be things I missed.
I found it much simpler to get going in OSGi than Hibernate (which was my first attempt).
I strongly recommend giving OpenJPA a go - I've switched to using it in my non-JPA projects too now, partly because I only want to work with one ORM and partly because I find OpenJPA better documented than Hibernate with JPA (the documentation for Hibernate with JPA tends to relate everything to the normal behaviour of Hibernate, which isn't much help if you don't know that).

Jim

-----Original Message-----
From: LongkerDandy [mailto:longkerdandy@gmail.com] 
Sent: 11 September 2010 13:03
To: users@felix.apache.org
Subject: ORM Framework Suggestions

Hi

I'm been try to use DataNucleus/JDO with felix, but no success.
There are some ClassNotDefine exception which I think is something about
classloader.

I may able bypass this, but since most JDO/JPA framwork are based on
classloader.
I wonder if there are any better way to do the ORM thing with OSGi.
And if anyone has some successful story with it.

Regards
LongkerDandy

Re: ORM Framework Suggestions

Posted by Christian Schneider <ch...@die-schneider.net>.
  I have succesfully used hibernate with osgi (Eclipse RCP). I used the 
bundles from Springsource. I had two problems. The first were
package use problems for some javax packages that were exported by 
Equinox with version 0.0.0 and required in another version.
I could solve this by using solution A' from 
http://blog.springsource.com/2009/01/19/exposing-the-boot-classpath-in-osgi/. 

The other problem was that I did not manage to get the hibernate 
annotations working with a bundle. But I was able to include the jar in my
model project and reexport the annotation packages.

So the experience was not perfect but it worked. Switching to 
eclipselink was no short term option for us as we used some hibernate 
specialities in the project before the switch to osgi.

Best regards

Christian


Am 11.09.2010 14:03, schrieb LongkerDandy:
> Hi
>
> I'm been try to use DataNucleus/JDO with felix, but no success.
> There are some ClassNotDefine exception which I think is something about
> classloader.
>
> I may able bypass this, but since most JDO/JPA framwork are based on
> classloader.
> I wonder if there are any better way to do the ORM thing with OSGi.
> And if anyone has some successful story with it.
>
> Regards
> LongkerDandy
>

-- 
----
http://www.liquid-reality.de


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
For additional commands, e-mail: users-help@felix.apache.org