WIP:site
[hibernate4-maven-plugin] / src / it / tutorials-5.0.12 / osgi / managed-jpa / src / main / resources / OSGI-INF / blueprint / blueprint.xml
1 <?xml version="1.0" encoding="UTF-8"?>
2 <!--
3   ~ Hibernate, Relational Persistence for Idiomatic Java
4   ~
5   ~ License: GNU Lesser General Public License (LGPL), version 2.1 or later.
6   ~ See the lgpl.txt file in the root directory or <http://www.gnu.org/licenses/lgpl-2.1.html>.
7   -->
8 <blueprint default-activation="eager"
9            xmlns="http://www.osgi.org/xmlns/blueprint/v1.0.0"
10            xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
11            xmlns:jpa="http://aries.apache.org/xmlns/jpa/v1.0.0"
12            xmlns:tx="http://aries.apache.org/xmlns/transactions/v1.0.0">
13
14   <!-- This gets the container-managed EntityManager and injects it into the DataPointServiceImpl bean. -->
15   <bean id="dpService" class="org.hibernate.osgitest.DataPointServiceImpl">
16     <jpa:context unitname="managed-jpa" property="entityManager"/>
17     <tx:transaction method="*" value="Required"/>
18   </bean>
19   <service ref="dpService" interface="org.hibernate.osgitest.DataPointService"/>
20
21   <!-- This demonstrates how to register your custom implementations of Hibernate extension points, such as
22        Integrator and TypeContributor. -->
23   <!-- <bean id="integrator" class="your.package.IntegratorImpl"/>
24   <service ref="integrator" interface="org.hibernate.integrator.spi.Integrator"/>
25   <bean id="typeContributor" class="your.package.TypeContributorImpl"/>
26   <service ref="typeContributor" interface="org.hibernate.metamodel.spi.TypeContributor"/> -->
27
28   <!-- This bundle makes use of Karaf commands to demonstrate core persistence operations.  Feel free to remove it. -->
29   <command-bundle xmlns="http://karaf.apache.org/xmlns/shell/v1.1.0">
30     <command>
31       <action class="org.hibernate.osgitest.command.AddCommand">
32         <property name="dpService" ref="dpService"/>
33       </action>
34     </command>
35     <command>
36       <action class="org.hibernate.osgitest.command.GetAllCommand">
37         <property name="dpService" ref="dpService"/>
38       </action>
39     </command>
40     <command>
41       <action class="org.hibernate.osgitest.command.DeleteAllCommand">
42         <property name="dpService" ref="dpService"/>
43       </action>
44     </command>
45   </command-bundle>
46 </blueprint>