I've also spent a lot of time looking through the sample applications trying
to find out how JPA works with Aries. In my case I use managed JPA which I
think is closer to how the samples work. I agree with Harald that this is
pretty tough to grasp without clear and concise documentation. It would be
extremely useful with a tutorial (not a sample) where all the necessary
steps are described.

BTW I have been using "aries:" and not "osgi:" when referring to a published
service and I did not know that Aries JNDI was required for that. I thought
a namespace handler for this namespace was part of "core" Aries Blueprint.
Good evidence that better documentation is really needed.

/Bengt

2010/9/17 Alasdair Nottingham <[email protected]>

> On 16 September 2010 11:31, Harald Wellmann <[email protected]>
> wrote:
> >
> > Another question: how does the Persistence Provider discover the data
> source - where does the magic happen so that the lookup of
> <jta-data-source>osgi:service:/javax.sql.DataSource</jta-data-source> will
> work? Is that done by Aries alone, or does the persistence provider need to
> be OSGi aware in this respect?
> >
>
> The osgi:service/javax.sql.DataSource (your example had an extra : I
> removed), is a JNDI lookup into the service registry. Aries does not
> have any code for creating DataSources, but the blog and aries trader
> sample use blueprint to cause a derby datasource to be defined and
> registered, I suspect you can use DS or anything to get one
> registered. You then need the aries JNDI sub project which makes this
> all work.
>
> > Thanks in advance for any hints!
> >
> > Best regards,
> > Harald
> >
>
>
>
> --
> Alasdair Nottingham
> [email protected]
>

Reply via email to