The @PersistenceContext, @PersistenceUnit and @Transactional annotations
are evaluated at runtime. So they work with hand written xml as well as
with the
generated one.
The CDI annotions are evaluated at compile time to create the blueprint
xml using the maven-blueprint-plugin. So to use these you need to
generate the xml.
Even if you generate the xml you can add a hand written xml too and both
will then be used together. So for example you can configure cxf
endpoints and clients using xml and still configure the bulk of your
beans using annotations.
Christian
On 16.09.2015 11:09, Achim Nierbeck wrote:
does that imply you only can use the annotations, and rely on a
generated blueprint.xml?
2015-09-16 11:05 GMT+02:00 Christian Schneider
<[email protected] <mailto:[email protected]>>:
Hi Jochen,
yes this is correct. Aries JPA 2 only uses the annotations.
In addition I am currently working on a new Aries Transaction 3
that will then also only use the jta 1.2 annotations.
This means that the whole JPA/JTA setup will then be based on the
standard set of annotations. The advantage is that you do not need
any Aries specific imports in your bundle.
I will also release a new maven-blueprint-plugin version that is
adapted for the new JPA and JTA versions and creates the blueprint
xml from CDI + JEE annotations. So in the end you can use
blueprint with almost the same set of annotations like JEE.
Christian
On 16.09.2015 10:50, jochenw wrote:
Does this mean that now it is *mandatory *to define the
persistence unit per
annotation, and it is no longer possible to define it in the
blueprint file?
Is this a bug of a feature? Or, in other words, does it make
sense to open a
Jira for Aries if I want to get the blueprint.xml mechanism
back (the
respective entries seem to be missing in the xsd file)?
Best Regards,
Jochen
--
View this message in context:
http://karaf.922171.n3.nabble.com/Bundle-is-waiting-for-namespace-handlers-http-aries-apache-org-xmlns-jpa-v1-0-0-tp4042275p4042618.html
Sent from the Karaf - User mailing list archive at Nabble.com.
--
Christian Schneider
http://www.liquid-reality.de
Open Source Architect
http://www.talend.com
--
Apache Member
Apache Karaf <http://karaf.apache.org/> Committer & PMC
OPS4J Pax Web <http://wiki.ops4j.org/display/paxweb/Pax+Web/>
Committer & Project Lead
blog <http://notizblog.nierbeck.de/>
Co-Author of Apache Karaf Cookbook <http://bit.ly/1ps9rkS>
Software Architect / Project Manager / Scrum Master
--
Christian Schneider
http://www.liquid-reality.de
Open Source Architect
http://www.talend.com