You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@karaf.apache.org by Tario <pa...@tario.org> on 2011/04/19 00:39:32 UTC

Aries and Karaf

Hi,

I've worked with OSGi before and would now like to use some of the OSGi
enterprise features, like deploying eba and using jpa.

I've found karaf and it makes a solid impression as a container (I
especially like the out of the box OS integration). I'm currently using the
standard osgi container (felix) but could also switch to equinox.

I'd like to deploy the jpa example from apache aries on karaf.

Is there any description what the required steps are? 
Karaf seems to already include some aries stuff, does it require some
additional bundles for the example? Which ones?

I've seen some discussions about the examples in google, but did not find a
description what to do, to actually deploy the example.

What is required to get eba files deployed in karaf? Does the jpa feature
provide the necessary stuff for the aries jpa example?

Thanks,
Patrick



--
View this message in context: http://karaf.922171.n3.nabble.com/Aries-and-Karaf-tp2836655p2836655.html
Sent from the Karaf - User mailing list archive at Nabble.com.

Re: Aries and Karaf

Posted by Ioannis Canellos <io...@gmail.com>.
I recently made some enhancements on camel-jpa (upgraded to openjpa 2.1.1).
Among the tests I did while working on that was to deploy a cut down version
of the blog sample (a simpler project based on the blog sample) so that I
can test the integration.

It might help if you look at the bundles the camel-jpa is using. Not all of
these are required just to run the blog sample, but you'll get a brief idea:

https://svn.apache.org/repos/asf/camel/trunk/platforms/karaf/features/src/main/resources/features.xml


You will also need jpa, transaction karaf featrues to be installed.

I hope that it helps.
-- 
*Ioannis Canellos*
*
FuseSource <http://fusesource.com>

**
Blog: http://iocanel.blogspot.com
**
Apache Karaf <http://karaf.apache.org/> Committer & PMC
Apache ServiceMix <http://servicemix.apache.org/>  Committer
Apache Gora <http://incubator.apache.org/gora/> Committer
*

Re: Aries and Karaf

Posted by Matt Madhavan <ma...@gmail.com>.
Hello,
I'm facing similar issues my self. I have all the required bundles from the
Blog I tests, but I persistence bundle never starts.

Does anyone have a list of bundles/features to start the Aries Bog example
in KARAF?

Thanks
Matt

--
View this message in context: http://karaf.922171.n3.nabble.com/Aries-and-Karaf-tp2836655p3343319.html
Sent from the Karaf - User mailing list archive at Nabble.com.

Re: Aries and Karaf

Posted by Johan Edstrom <se...@gmail.com>.
No, not at all (Wrong direction)
The learning curve may be a tad steep for the first project, once you are over that hurdle - you'll have gained a bunch of knowledge.

From the karaf side, you get a great runtime and nice management tools around the osgi container, 
with the Aries projects you get things like JPA, TX, JNDI that conforms to how things work in an osgi environment.

You can use hibernate as well, but having used both in anger :) I;d suggest using the aries JPA, aries TX in combination
with OpenJPA. This also implies that you use aries blueprint, which will save you plenty headaches as opposed to using spring-dm
in a complex environment.

A good start is looking at the itests bundles and setups in the aries code. I think there also is a JPA blog sample that would
be a good reference.

On the karaf side I'd recommend reading up a bit around the features, learning that will make things clearer I think.




On Apr 21, 2011, at 9:14 AM, Tario wrote:

> Ok, that makes sense. Is there any tutorial/manual how I actually do this?
> Do I fetch all those bundles by hand from somewhere and also copy them to
> the deploy folder?
> 
> Maybe to explain my problems in this a bit better.
> 
> On the one hand I've worked with osgi a bit before, but this was in a very
> small context with a couple of dependencies that were all very clear from my
> side.
> 
> On the other hand I've worked with the java EE stack where certain services
> are given (such as JPA).
> 
> Now I'd like to create an application that consists of an api (xmlrpc) some
> business logic and some persistency.
> 
> The entprise osgi standard sounded to me good in a way that it would combine
> the best of the two sides, osgi for managing my dependencies and still
> provide persistency service.
> 
> Am I going the wrong direction? Is there a better/simpler solution?
> 
> Thanks,
> Patrick
> 
> 
> 
> Johan Edstrom-2 wrote:
>> 
>> The core blueprint bundles are.
>> But Karaf is a small runtime, you'll have to provide the necessary
>> components to your deployment 
>> just as you would if you were using tomcat/jetty.
>> 
> 
> 
> --
> View this message in context: http://karaf.922171.n3.nabble.com/Aries-and-Karaf-tp2836655p2847367.html
> Sent from the Karaf - User mailing list archive at Nabble.com.


Re: Aries and Karaf

Posted by Tario <pa...@tario.org>.
Ok, that makes sense. Is there any tutorial/manual how I actually do this?
Do I fetch all those bundles by hand from somewhere and also copy them to
the deploy folder?

Maybe to explain my problems in this a bit better.

On the one hand I've worked with osgi a bit before, but this was in a very
small context with a couple of dependencies that were all very clear from my
side.

On the other hand I've worked with the java EE stack where certain services
are given (such as JPA).

Now I'd like to create an application that consists of an api (xmlrpc) some
business logic and some persistency.

The entprise osgi standard sounded to me good in a way that it would combine
the best of the two sides, osgi for managing my dependencies and still
provide persistency service.

Am I going the wrong direction? Is there a better/simpler solution?

Thanks,
Patrick



Johan Edstrom-2 wrote:
> 
> The core blueprint bundles are.
> But Karaf is a small runtime, you'll have to provide the necessary
> components to your deployment 
> just as you would if you were using tomcat/jetty.
> 


--
View this message in context: http://karaf.922171.n3.nabble.com/Aries-and-Karaf-tp2836655p2847367.html
Sent from the Karaf - User mailing list archive at Nabble.com.

Re: Aries and Karaf

Posted by Johan Edstrom <se...@gmail.com>.
The core blueprint bundles are.
But Karaf is a small runtime, you'll have to provide the necessary components to your deployment 
just as you would if you were using tomcat/jetty.

/je

On Apr 21, 2011, at 9:02 AM, Tario wrote:

> I did not deploy any additional bundles, shouldn't this at least result in an
> error? Aren't some of those bundles not also already part of karaf itself
> (e.g. the blueprint stuff).
> 
> --
> View this message in context: http://karaf.922171.n3.nabble.com/Aries-and-Karaf-tp2836655p2847333.html
> Sent from the Karaf - User mailing list archive at Nabble.com.


Re: Aries and Karaf

Posted by Tario <pa...@tario.org>.
I did not deploy any additional bundles, shouldn't this at least result in an
error? Aren't some of those bundles not also already part of karaf itself
(e.g. the blueprint stuff).

--
View this message in context: http://karaf.922171.n3.nabble.com/Aries-and-Karaf-tp2836655p2847333.html
Sent from the Karaf - User mailing list archive at Nabble.com.

Re: Aries and Karaf

Posted by Charles Moulliard <cm...@gmail.com>.
Have you deployed the required bundles which are defined in the
org.apache.aries.samples.blog.itests.JpasBlogSampleWithEbaTest of
Aries ?

            // Bundles
            mavenBundle("org.eclipse.equinox", "cm"),
            mavenBundle("org.eclipse.osgi", "services"),

            mavenBundle("org.ops4j.pax.web", "pax-web-extender-war"),
            mavenBundle("org.ops4j.pax.web", "pax-web-jetty-bundle"),
            mavenBundle("org.ops4j.pax.web", "pax-web-jsp"),
            mavenBundle("org.apache.derby", "derby"),
            mavenBundle("org.apache.geronimo.specs", "geronimo-jpa_2.0_spec"),

            mavenBundle("org.apache.geronimo.specs", "geronimo-jta_1.1_spec"),
            mavenBundle("org.apache.geronimo.specs",
"geronimo-j2ee-connector_1.5_spec"),
            mavenBundle("org.apache.geronimo.specs",
"geronimo-servlet_2.5_spec"),
            mavenBundle("org.apache.geronimo.components",
"geronimo-transaction"),
            mavenBundle("org.apache.openjpa", "openjpa"),
            mavenBundle("commons-lang", "commons-lang"),
            mavenBundle("commons-collections", "commons-collections"),
            mavenBundle("commons-pool", "commons-pool"),
            mavenBundle("org.apache.servicemix.bundles",
"org.apache.servicemix.bundles.serp"),
            mavenBundle("org.apache.aries.blueprint",
"org.apache.aries.blueprint" ),
            mavenBundle("org.apache.aries.proxy", "org.apache.aries.proxy"),
            mavenBundle("org.apache.aries", "org.apache.aries.util" ),
            mavenBundle("org.apache.aries.jndi", "org.apache.aries.jndi" ),
            mavenBundle("org.apache.felix",
"org.apache.felix.bundlerepository"),
            mavenBundle("org.apache.felix", "org.apache.felix.fileinstall" ),
            mavenBundle("org.apache.aries.application",
"org.apache.aries.application.resolver.obr"),
            mavenBundle("org.apache.aries.application",
"org.apache.aries.application.install" ),
            mavenBundle("org.apache.aries.application",
"org.apache.aries.application.api" ),
            mavenBundle("org.apache.aries.application",
"org.apache.aries.application.management" ),
            mavenBundle("org.apache.aries.application",
"org.apache.aries.application.runtime" ),
            mavenBundle("org.apache.aries.application",
"org.apache.aries.application.utils" ),
            mavenBundle("org.apache.aries.application",
"org.apache.aries.application.modeller"),
            mavenBundle("org.apache.aries.application",
"org.apache.aries.application.default.local.platform"),
            mavenBundle("org.apache.aries.application",
"org.apache.aries.application.deployment.management"),
            mavenBundle("org.apache.aries.jpa", "org.apache.aries.jpa.api" ),
            mavenBundle("org.apache.aries.jpa",
"org.apache.aries.jpa.container" ),
            mavenBundle("org.apache.aries.jpa",
"org.apache.aries.jpa.blueprint.aries" ),
            mavenBundle("org.apache.aries.jpa",
"org.apache.aries.jpa.container.context" ),
            mavenBundle("org.apache.aries.transaction",
"org.apache.aries.transaction.manager" ),
            mavenBundle("org.apache.aries.transaction",
"org.apache.aries.transaction.blueprint" ),
            mavenBundle("org.apache.aries.transaction",
"org.apache.aries.transaction.wrappers" ),
            mavenBundle("org.apache.aries.samples.blog",
"org.apache.aries.samples.blog.datasource" ),
            mavenBundle("asm", "asm-all" ),
            equinox().version("3.5.0")
        );
        options = updateOptions(options);
        return options;
    }

Regards,

Charles Moulliard

Sr. Principal Solution Architect - FuseSource
Apache Committer

Blog : http://cmoulliard.blogspot.com
Twitter : http://twitter.com/cmoulliard
Linkedin : http://www.linkedin.com/in/charlesmoulliard
Skype: cmoulliard



On Thu, Apr 21, 2011 at 2:48 AM, Tario <pa...@tario.org> wrote:
> I tried to deploy the blog jpa example.
>
> org.apache.aries.samples.blog.jpa.eba-0.3.eba
>
> Thanks,
> Patrick
>
> --
> View this message in context: http://karaf.922171.n3.nabble.com/Aries-and-Karaf-tp2836655p2845110.html
> Sent from the Karaf - User mailing list archive at Nabble.com.
>

Re: Aries and Karaf

Posted by Tario <pa...@tario.org>.
I tried to deploy the blog jpa example.

org.apache.aries.samples.blog.jpa.eba-0.3.eba

Thanks,
Patrick

--
View this message in context: http://karaf.922171.n3.nabble.com/Aries-and-Karaf-tp2836655p2845110.html
Sent from the Karaf - User mailing list archive at Nabble.com.

Re: Aries and Karaf

Posted by Charles Moulliard <cm...@gmail.com>.
Did you try to deploy an EBA example from Aries project ? If yes, can
you tell me which one to allow us to make a test

On Wed, Apr 20, 2011 at 4:07 PM, Tario <pa...@tario.org> wrote:
> No log entries appear in data/log/karaf.log after copying the eba in the
> deploy folder.
>
> --
> View this message in context: http://karaf.922171.n3.nabble.com/Aries-and-Karaf-tp2836655p2842911.html
> Sent from the Karaf - User mailing list archive at Nabble.com.
>

Re: Aries and Karaf

Posted by Tario <pa...@tario.org>.
No log entries appear in data/log/karaf.log after copying the eba in the
deploy folder.

--
View this message in context: http://karaf.922171.n3.nabble.com/Aries-and-Karaf-tp2836655p2842911.html
Sent from the Karaf - User mailing list archive at Nabble.com.

Re: Aries and Karaf

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

Can you check the log of karaf to see if Aries Application has generated 
some errors. Sometimes, this is a bit tricky to find them but eba 
application without should be deployed if all the required bundles are 
there ;-)

Regards,

Charles

On 20/04/11 14:49, Jean-Baptiste Onofré wrote:
> You did right :)
>
> If you dropped the EBA into the deploy folder and nothing occurs, it 
> means that there is no deployer for the EBA artifacts.
> The Aries bundles managing the EBA deployment is the 
> deployment.management one.
> I'm not sure that it's a Karaf compliant deployer.
>
> I will make a try and raise an Aries Jira (with a Karaf deployer patch 
> attached).
>
> Thanks
> Regards
> JB
>
> On 04/20/2011 02:45 PM, Tario wrote:
>> Hi JB,
>>
>> I did now install the features jpa and application-without-isolation. 
>> But if
>> I copy the eba into the deploy folder, still nothing happens. It doesn't
>> even generate any log entry in data/log/karaf.log
>>
>> What am I doing wrong? What is the right way to do this?
>>
>> Thanks,
>> Patrick
>>
>> -- 
>> View this message in context: 
>> http://karaf.922171.n3.nabble.com/Aries-and-Karaf-tp2836655p2842541.html
>> Sent from the Karaf - User mailing list archive at Nabble.com.

Re: Aries and Karaf

Posted by Jean-Baptiste Onofré <jb...@nanthrax.net>.
You did right :)

If you dropped the EBA into the deploy folder and nothing occurs, it 
means that there is no deployer for the EBA artifacts.
The Aries bundles managing the EBA deployment is the 
deployment.management one.
I'm not sure that it's a Karaf compliant deployer.

I will make a try and raise an Aries Jira (with a Karaf deployer patch 
attached).

Thanks
Regards
JB

On 04/20/2011 02:45 PM, Tario wrote:
> Hi JB,
>
> I did now install the features jpa and application-without-isolation. But if
> I copy the eba into the deploy folder, still nothing happens. It doesn't
> even generate any log entry in data/log/karaf.log
>
> What am I doing wrong? What is the right way to do this?
>
> Thanks,
> Patrick
>
> --
> View this message in context: http://karaf.922171.n3.nabble.com/Aries-and-Karaf-tp2836655p2842541.html
> Sent from the Karaf - User mailing list archive at Nabble.com.

Re: Aries and Karaf

Posted by Tario <pa...@tario.org>.
Hi JB,

I did now install the features jpa and application-without-isolation. But if
I copy the eba into the deploy folder, still nothing happens. It doesn't
even generate any log entry in data/log/karaf.log

What am I doing wrong? What is the right way to do this?

Thanks,
Patrick

--
View this message in context: http://karaf.922171.n3.nabble.com/Aries-and-Karaf-tp2836655p2842541.html
Sent from the Karaf - User mailing list archive at Nabble.com.

Re: Aries and Karaf

Posted by Jean-Baptiste Onofré <jb...@nanthrax.net>.
Hi Patrick,

Karaf provide Enterprise feature which provide:
- Aries JTA
- Aires JPA
- Aries JNDI
- Aries EBA

You can take a look on the features descriptor:
http://repo2.maven.org/maven2/org/apache/karaf/assemblies/features/enterprise/2.2.0/enterprise-2.2.0-features.xml

Regards
JB

On 04/19/2011 12:39 AM, Tario wrote:
> Hi,
>
> I've worked with OSGi before and would now like to use some of the OSGi
> enterprise features, like deploying eba and using jpa.
>
> I've found karaf and it makes a solid impression as a container (I
> especially like the out of the box OS integration). I'm currently using the
> standard osgi container (felix) but could also switch to equinox.
>
> I'd like to deploy the jpa example from apache aries on karaf.
>
> Is there any description what the required steps are?
> Karaf seems to already include some aries stuff, does it require some
> additional bundles for the example? Which ones?
>
> I've seen some discussions about the examples in google, but did not find a
> description what to do, to actually deploy the example.
>
> What is required to get eba files deployed in karaf? Does the jpa feature
> provide the necessary stuff for the aries jpa example?
>
> Thanks,
> Patrick
>
>
>
> --
> View this message in context: http://karaf.922171.n3.nabble.com/Aries-and-Karaf-tp2836655p2836655.html
> Sent from the Karaf - User mailing list archive at Nabble.com.