Galera a minha aplicação não esta persistindo os dados, segue abaixo as configurações.
persistence.xml
<?xml version="1.0" encoding="UTF-8"?>
<persistence version="1.0"
xmlns="http://java.sun.com/xml/ns/persistence" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/persistence http://java.sun.com/xml/ns/persistence/persistence_1_0.xsd">
<persistence-unit name="unitDS" transaction-type="JTA">
<provider>org.hibernate.ejb.HibernatePersistence</provider>
<jta-data-source>jdbc/appDS</jta-data-source>
<properties>
<property name="hibernate.show_sql" value="true" />
<property name="hibernate.format_sql" value="true" />
<property name="hibernate.dialect" value="org.hibernate.dialect.Oracle10gDialect"/>
<property name="hibernate.connection.driver_class" value="oracle.jdbc.driver.OracleDriver"/>
<property name="jboss.entity.manager.factory.jndi.name" value="java:jboss/EntityManagerFactory" />
</properties>
</persistence-unit>
</persistence>
root-context.xml
<?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:context="http://www.springframework.org/schema/context"
xmlns:jee="http://www.springframework.org/schema/jee" xmlns:tx="http://www.springframework.org/schema/tx"
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-3.0.xsd
http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx-3.0.xsd
http://www.springframework.org/schema/jee http://www.springframework.org/schema/jee/spring-jee-3.0.xsd">
<!-- Root Context: defines shared resources visible to all other web components -->
<context:annotation-config />
<context:component-scan base-package="br.com.app.dao.*" />
<!-- JPA -->
<jee:jndi-lookup id="entityManagerFactory"
jndi-name="java:jboss/EntityManagerFactory"
expected-type="org.hibernate.ejb.HibernateEntityManagerFactory" />
<bean id="transactionManager" class="org.springframework.transaction.jta.JtaTransactionManager">
<property name="transactionManagerName" value="java:jboss/TransactionManager"/>
</bean>
<tx:annotation-driven transaction-manager="transactionManager" />
</beans>
servlet-context.xml
<?xml version="1.0" encoding="UTF-8"?>
<beans:beans xmlns="http://www.springframework.org/schema/mvc"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:beans="http://www.springframework.org/schema/beans"
xmlns:mvc="http://www.springframework.org/schema/mvc" xmlns:context="http://www.springframework.org/schema/context"
xmlns:jee="http://www.springframework.org/schema/jee" xmlns:tx="http://www.springframework.org/schema/tx"
xmlns:aop="http://www.springframework.org/schema/aop"
xsi:schemaLocation="http://www.springframework.org/schema/mvc http://www.springframework.org/schema/mvc/spring-mvc-3.0.xsd
http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-3.0.xsd
http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx-3.0.xsd
http://www.springframework.org/schema/jee http://www.springframework.org/schema/jee/spring-jee-3.0.xsd
http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-3.0.xsd">
<beans:import resource="controllers.xml" />
<!-- Configure the multipart resolver -->
<beans:bean id="multipartResolver"
class="org.springframework.web.multipart.commons.CommonsMultipartResolver">
<beans:property name="maxUploadSize" value="5000000" />
<beans:property name="maxInMemorySize" value="5000000" />
</beans:bean>
<!-- Enables the Spring MVC @Controller programming model -->
<annotation-driven />
<mvc:annotation-driven />
<beans:bean
class="org.springframework.web.servlet.view.InternalResourceViewResolver">
<beans:property name="viewClass"
value="org.springframework.web.servlet.view.JstlView" />
<beans:property name="prefix" value="/WEB-INF/views/" />
<beans:property name="suffix" value=".jsp" />
</beans:bean>
<beans:bean
class="org.springframework.context.support.ReloadableResourceBundleMessageSource"
id="messageSource">
<beans:property name="basenames">
<beans:array>
<beans:value>/WEB-INF/messages</beans:value>
</beans:array>
</beans:property>
<beans:property name="fallbackToSystemLocale" value="false" />
</beans:bean>
<!-- Imports EJB to Autowired -->
<beans:import resource="ejb.xml" />
</beans:beans>
controlles.xml
<?xml version="1.0" encoding="UTF-8"?>
<beans:beans xmlns="http://www.springframework.org/schema/mvc"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:beans="http://www.springframework.org/schema/beans"
xmlns:p="http://www.springframework.org/schema/p" xmlns:context="http://www.springframework.org/schema/context"
xmlns:aop="http://www.springframework.org/schema/aop" xmlns:tx="http://www.springframework.org/schema/tx"
xmlns:mvc="http://www.springframework.org/schema/mvc"
xsi:schemaLocation="http://www.springframework.org/schema/mvc
http://www.springframework.org/schema/mvc/spring-mvc-3.0.xsd
http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
http://www.springframework.org/schema/context
http://www.springframework.org/schema/context/spring-context-3.0.xsd
http://www.springframework.org/schema/aop
http://www.springframework.org/schema/aop/spring-aop-3.0.xsd
http://www.springframework.org/schema/tx
http://www.springframework.org/schema/tx/spring-tx-3.0.xsd">
<!-- Maps '/' requests to the 'home' view -->
<!-- Scans within the base package of the application for @Components to configure as beans -->
<context:component-scan base-package="br.com.app" />
<beans:bean id="usuarioFacade" class="br.com.app.UsuarioFacade" />
</beans:beans>
ExtratoPnc.java
@Entity
@Table(name = "ARQUV_GERDO")
public class ExtratoPnc implements Serializable {
private static final long serialVersionUID = 5841741053020805711L;
@Id
@Column(name = "ID_ARQUV_GERDO")
@GeneratedValue(generator = "SQ0006_ARQUV_GERDO_GEN")
@SequenceGenerator(name = "SQ0006_ARQUV_GERDO_GEN", sequenceName = "SQ0006_ARQUV_GERDO", allocationSize = 1)
private Long idArquivoGerado = null;
@Column(name = "CD_SEGMT_USURO")
private String codigoSegmentoUsuario = null;
@Column(name = "CD_TIPO_ARQUV")
private Long codigoTipoArquivo = null;
// ...
}[/code]
ExtratoPncDao .java
[code]@Service
@Transactional(propagation=Propagation.REQUIRED)
public class ExtratoPncDao implements IExtratoPncDao {
Log logger = LogFactory.getLog(getClass());
private EntityManager entityManager;
@Autowired
private HibernateEntityManagerFactory factory;
public EntityManager getEntityManager() {
if(entityManager == null) {
entityManager = factory.createEntityManager();
}
return entityManager;
}
@TransactionAttribute(TransactionAttributeType.SUPPORTS)
public ExtratoPnc inserir(ExtratoPnc extrato) {
getEntityManager().persist(extrato);
return extrato;
}
}
Alguem pode me ajudar, eu ja pesquisei muito na net e ja tentei varias coisa, porém não consegui ainda?