You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@felix.apache.org by jerome moliere <je...@gmail.com> on 2012/03/06 15:35:41 UTC

JPA , OSGi but without blueprint

Hi all,
I'd like to setup an OSGi platform (felix but who cares) containing
JPA client code.
I'd like to use plain OSGi but I don't like much the enterprise
specifications and I would like to use it in a standard environment...
Did someone succeed to export JPA capabilities in a standard OSGi platform ?
I am wondering about using the Apache Aries stuff and to drop all
blueprint stuff....
That is to say :
exporting the JPA API
publishing DataSources into the OSGi platform (whiteboard like model)
being able to provide bytecode enhancement

Thanks for any feedback/guidelines or pointers
kind regards

J.MOLIERE - Mentor/J
auteur Eyrolles
blog: http://romjethoughts.blogspot.com
OSGi book available now!!!

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


Re: JPA , OSGi but without blueprint

Posted by Christian Schneider <ch...@die-schneider.net>.
Am 07.03.2012 16:54, schrieb jerome moliere:
>> c) using bytecode weaving it's (in theory at least) possible to make
>> this work without any blueprint and aries; though, the problem right
>> now will be (AFAIK) that there are no annotations for injecting the
>> entity manager and for transactions in aries right now which will make
>> this approach (at least for now) impossible.
>>
> yes , I just mentionned this point because JPA uses bytecode injection
> massively....
> I don't have other technical requirements for bytecode injection
You should be able to use the build time weaving instead. At least that 
works for me.

If you use jpa "by hand" I think it should work without blueprint.

Like this:
         EntityManagerFactory emf = 
Persistence.createEntityManagerFactory("dispatcher");
         EntityManager em = emf.createEntityManager();
         EntityTransaction trans = em.getTransaction();
         trans.begin();

That means of course you have no nice abstractions for transaction 
management.

Christian

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

Open Source Architect
Talend Application Integration Division http://www.talend.com


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


Re: JPA , OSGi but without blueprint

Posted by jerome moliere <je...@gmail.com>.
Hi Andreas ,
thanks for your answers please find my answers below...

best regards
J.MOLIERE - Mentor/J
auteur Eyrolles
blog: http://romjethoughts.blogspot.com
OSGi book available now!!!


> a) why do you want to drop blueprint?


to keep it as simple as possible .... I don't need another dependency
injection system , SCR is powerful and far sufficient for my needs...
I don't need XML parsing and so on...
> b) aries might be the better place for those questions?

may be you are right
> c) using bytecode weaving it's (in theory at least) possible to make
> this work without any blueprint and aries; though, the problem right
> now will be (AFAIK) that there are no annotations for injecting the
> entity manager and for transactions in aries right now which will make
> this approach (at least for now) impossible.
>

yes , I just mentionned this point because JPA uses bytecode injection
massively....
I don't have other technical requirements for bytecode injection


Thanks once again

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


Re: JPA , OSGi but without blueprint

Posted by Andreas Pieber <an...@gmail.com>.
Hey Jerome,

a) why do you want to drop blueprint?
b) aries might be the better place for those questions?
c) using bytecode weaving it's (in theory at least) possible to make
this work without any blueprint and aries; though, the problem right
now will be (AFAIK) that there are no annotations for injecting the
entity manager and for transactions in aries right now which will make
this approach (at least for now) impossible.

Kind regards,
Andreas

On Tue, Mar 6, 2012 at 15:35, jerome moliere <je...@gmail.com> wrote:
> Hi all,
> I'd like to setup an OSGi platform (felix but who cares) containing
> JPA client code.
> I'd like to use plain OSGi but I don't like much the enterprise
> specifications and I would like to use it in a standard environment...
> Did someone succeed to export JPA capabilities in a standard OSGi platform ?
> I am wondering about using the Apache Aries stuff and to drop all
> blueprint stuff....
> That is to say :
> exporting the JPA API
> publishing DataSources into the OSGi platform (whiteboard like model)
> being able to provide bytecode enhancement
>
> Thanks for any feedback/guidelines or pointers
> kind regards
>
> J.MOLIERE - Mentor/J
> auteur Eyrolles
> blog: http://romjethoughts.blogspot.com
> OSGi book available now!!!
>
> ---------------------------------------------------------------------
> 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