Hi everybody!
I've got 2 problems I'd like to helped with.
I'm just startet working with JBoss and I'm using the 4.0.4RC1 version of it. During the start up i get the following warning output:
WARN [TreeCache] No transaction manager lookup class has been defined. Transactions cannot be used
1.) Now where can I define this transaction manager look up class?
And I'm trying to inject an EntityManager into a stateless Session Bean. However, I don't get an instance of it. I've written a persistence.xml file :
<persistence 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" version="1.0"> <persistence-unit name="persistenceSample"> <provider>org.hibernate.ejb.HibernatePersistence</provider> <jta-data-source>java:/DefaultDS</jta-data-source> <properties> <property name="hibernate.dialect" value="org.hibernate.dialect.HSQLDialect" /> <property name="hibernate.hbm2ddl.auto" value="create-drop" /> </properties> </persistence-unit> </persistence>
@PersistenceContext(unitName="persistenceSample") private EntityManager manager;
Map<String, String> properties = new HashMap<String, String>(); EntityManagerFactory emf = Persistence .createEntityManagerFactory("persistenceSample", properties); EntityManager manager = emf.getEntityManager();