[jboss-osgi-dev] Arquillian for Hibernate OSGi unit tests

Scott Marlow smarlow at redhat.com
Wed Jun 5 10:41:38 EDT 2013


On 06/05/2013 03:00 AM, Thomas Diesler wrote:
> Hi Brett,
>
> The primary target for the Arquillian OSGi Container
> <https://github.com/arquillian/arquillian-container-osgi> is our own
> OSGi Framework <https://github.com/jbosgi/jbosgi-framework>, which is a
> compliant R5 implementation. This also explains why I removed support
> for Felix because it is not (yet) R5 compliant AFAIK. Theoretically, it
> would probably be possible to change pom such that it uses an older
> version of the OSGi APIs when running with Felix.
>
> To be a good (corporate) citizen you run and talk about hibernate on the
> jbosgi framework. Do you have a specific reason not to?

I thought this is what people are already doing when they use the 
Hibernate ORM on jbosgi (since Hibernate ORM is a component).  I think 
the Hibernate team is already contributing quite a bit and I see no 
reason to accuse (insulting) them of not being good citizens of the world.

For standalone use though, what is the model for getting the jbosgi 
framework as a single (maven artifact) component?  I'm asking this for 
my own information (not related to Hibernate native OSGi container 
support which I think is what Brett is talking about).  I have heard 
talk about *embedded* (framework/platform) support in the past but not 
sure if we have anything to show yet.

>
> ARQ OSGi tests run in the framework so they would have access any OSGi
> service including the LogService
> <http://www.osgi.org/javadoc/r5/enterprise/org/osgi/service/log/package-summary.html>.
> The Framework and very likely also Hibernate does not use that service
> for logging I suppose. AFAIK, ARQ stays out of the business of container
> logging. With all our OSGi stuff we use jboss-logging and everything
> running on the framework would be delegated to that. The logging from
> the hibernate bundle should show up in the configured framework log.
>
> cheers
> --thomas
>
> On Jun 5, 2013, at 6:51 AM, Brett Meyer <brmeyer at redhat.com
> <mailto:brmeyer at redhat.com>> wrote:
>
>> Thomas,
>>
>> Hello!  We recently wrapped up initial support for Hibernate in OSGi.
>>  I've been attempting to create unit tests with an embedded container,
>> but had a few questions for you.  Up for it?
>>
>> I've been using your arquillian-container-osgi fork's
>> "container-embedded" area as a reference.  I have
>> arquillian-container-osgi-embedded on the classpath, as well as Felix,
>> but it wasn't resolving my test bundle.  I noticed your comment on
>> 30124a93cd [1] and am guessing that's part of the problem, although I
>> know a few 3rd party bundles are missing from my deployment.
>>
>> So, it's more of a general question.  I'd like to be able to kick this
>> off as a part of Hibernate's standalone unit tests and was hoping the
>> embedded container would do the trick.  What setup would you
>> recommend?  What OSGi frameworks will work with
>> arquillian-container-osgi-embedded?
>>
>> One secondary (and possibly elementary) question: does Arquillian have
>> a way to tap into the embedded container's logs?  log4j bundle?  Or,
>> are the container's logs still written out somewhere?
>>
>> Thanks for any help available!
>>
>> [1]
>> https://github.com/tdiesler/arquillian-container-osgi/commit/30124a93cdd69b2d791c041cbe9ae89ac6cabee4
>>
>> Brett Meyer
>> Red Hat Software Engineer, Hibernate
>> +1 260.349.5732
>>
>
> xxxxxxxxxxxxxxxxxxxxxxxxxxxx
> Thomas Diesler
> JBoss OSGi Lead
> JBoss, a division of Red Hat
> xxxxxxxxxxxxxxxxxxxxxxxxxxxx
>
>
>
>
>
>
> _______________________________________________
> jboss-osgi-dev mailing list
> jboss-osgi-dev at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/jboss-osgi-dev
>



More information about the jboss-osgi-dev mailing list