<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xmlns:tx="http://www.springframework.org/schema/tx"
    xsi:schemaLocation="http://www.springframework.org/schema/beans
      http://www.springframework.org/schema/beans/spring-beans.xsd
      http://www.springframework.org/schema/tx
      http://www.springframework.org/schema/tx/spring-tx.xsd">
      
	<bean id="entityManagerFactory" class="org.springframework.orm.jpa.LocalEntityManagerFactoryBean" />

	<bean id="transactionManager" class="org.springframework.orm.jpa.JpaTransactionManager">
    	<property name="entityManagerFactory" ref="entityManagerFactory" />
	</bean>
	
	<tx:annotation-driven />

	<bean class="org.springframework.orm.jpa.support.PersistenceAnnotationBeanPostProcessor" />
	
	<bean id="main" class="ru.crystalservice.ScalesComponent"/>	 
		 
	<bean id="testIface" class="ru.crystalservice.ScalesImpl"/>
 
	<!-- RMI -->
	<bean class="org.springframework.remoting.rmi.RmiServiceExporter">
		<property name="serviceName" value="ScalesService"/>
		<property name="service" ref="testIface"/>
		<property name="serviceInterface" value="ru.crystalservice.remote.IScalesComponent"/>
		<property name="registryPort" value="1099"/>
	</bean>
	
	<!-- SOAP -->
	
	<bean class="org.springframework.remoting.jaxws.SimpleJaxWsServiceExporter">
		<property name="baseAddress" value="http://localhost:8080/"/>
	</bean>
	

</beans>
