Hi Chris, Thx for the reply. I tried it but i gives me error. here are my simple code:
| EntityManagerFactory emf = Persistence.createEntityManagerFactory("mySession"); | EntityManager em = emf.createEntityManager(); | ManagedHibernateSession session = (ManagedHibernateSession) em.getDelegate(); | and here are the error: | javax.persistence.PersistenceException: No Persistence provider for EntityManager named mySession | at javax.persistence.Persistence.createEntityManagerFactory(Persistence.java:55) | at javax.persistence.Persistence.createEntityManagerFactory(Persistence.java:33) | at com.medansoft.controller.GeneralJournalActionTest.createGeneralJournalTest(GeneralJournalActionTest.java:19) | ... Removed 21 stack frames | | =============================================== | GeneralJournalAction | Tests run: 1, Failures: 1, Skips: 0 | =============================================== | | | =============================================== | Accounting System Test Suite | Total tests run: 1, Failures: 1, Skips: 0 | =============================================== | As I named my hibernate session -- mySession in component.xml... Any help will be appreciated... Thanks View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4053379#4053379 Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4053379 _______________________________________________ jboss-user mailing list jboss-user@lists.jboss.org https://lists.jboss.org/mailman/listinfo/jboss-user