felix-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Peter Kriens <peter.kri...@aqute.biz>
Subject Re: Exploring Felix/Karaf
Date Wed, 07 Apr 2010 14:26:59 GMT
Hibernate works very well with OSGi as long as you provide it the actually to be persisted
class objects. Hibernate locates the mapping resources from these classes. The problems with
Hibernate always originate when people try to use strings, e.g. XML, to tell hibernate which
classes to map. The mapping from a class name to a class is not defined in OSGi because you
can actually have multiple versions of the same class in the VM ...

Kind regards,

	Peter Kriens



On 10 mrt 2010, at 03:12, Chris Hane wrote:

> Leen,
> 
> Thanks for the info.  I did a little reading around the net today and it sounds like
using Hibernate in an OSGI bundle is not common practice. Too bad, because we like a lot of
the features OSGI provides.
> 
> Here's hoping the OSGI and hibernate play nicely one day without a ton of developer hacking
required.
> 
> Thanks again for the info.  I might take a look at EclipseLink; but we are pretty set
using hibernate for now.
> Chris....
> 
> On 3/8/2010 5:22 PM, Leen Toelen wrote:
>> Hi,
>> 
>> I am using Felix and Spring-DM, which has excellent support for Quartz
>> scheduling inside an OSGI container. Spring-DM takes care of the
>> lifecycle of the jobs when updating/uninstalling bundles. The Quartz
>> context is best exposed as an OSGI service however, so all jobs share
>> the same context (if needed of course).
>> Hibernate is a bit more complicated inside OSGI, since Hibernate uses
>> bytecode weaving to intercept changes to the entities, and this gets
>> messy when crossing the bundle boundaries. It is possible however, and
>> I am using EclipseLink entities in OSGI without a problem.
>> 
>> Regards,
>> Leen
>> 
>> On Mon, Mar 8, 2010 at 4:26 PM, Chris Hane<chrishane@gmail.com>  wrote:
>>> yes we are using quartz internally.
>>> 
>>> What I'm really asking is can we use OSGI to create a bundle for our
>>> entities that all of the other bundles can share?  We use hibernate for
>>> persistence.  All of the jobs use these entities.
>>> 
>>> Are there any docs / tutorials for using hibernate entities in an OSGI
>>> bundle.
>>> 
>>> We are thinking of creating a bundle for each job so that it can be run
>>> (stopped/started) / upgraded independently of the other jobs.
>>> 
>>> And no we don't want to use a full J2EE server.  It is way to heavy weight -
>>> we would rather stick with our own application than go back to a J2EE server
>>> (we used that for iteration one and really did not like it).
>>> 
>>> Thanks,
>>> Chris....
>>> 
>>> On 3/4/2010 4:05 PM, Guillaume Nodet wrote:
>>>> 
>>>> I think Chris is well aware of what OSGi is.  His application is
>>>> certainly already based on quartz.
>>>> Whether OSGi can be leveraged in a way to update jobs, started /
>>>> stopped individually and other advanced things, I can't say for sure.
>>>> I suppose all those advanced features will be handled by your
>>>> integration layer, as afaik, Quartz does not provide much around
>>>> versioning.
>>>> I guess you'd have to store the version of the job in the job details
>>>> and have some way to map it to a java class from a bundle or such.
>>>> But that sounds like a very interesting project.  Good luck!
>>>> 
>>>> On Thu, Mar 4, 2010 at 21:03, Guo Du<mrduguo@gmail.com>    wrote:
>>>>> 
>>>>> On Thu, Mar 4, 2010 at 4:01 PM, Chris Hane<chrishane@gmail.com>
   wrote:
>>>>>> 
>>>>>> I'm pretty sure the answers are yes but wanted to confirm and then
ask
>>>>>> if
>>>>>> there are any suggested tutorials or examples. Navigating the felix
site
>>>>>> isn't very easy and the karaf documentation is not complete.
>>>>> 
>>>>> Felix/OSGi is nothing to do with scheduler, you may look for:
>>>>> http://www.quartz-scheduler.org/
>>>>> 
>>>>> -Guo
>>>>> 
>>>>> ---------------------------------------------------------------------
>>>>> 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
>>> 
>>> 
>> 
>> ---------------------------------------------------------------------
>> 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
> 


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


Mime
View raw message