Francesco Pietrobelli [http://community.jboss.org/people/francesco.pietrobelli] 
created the discussion

"Re: Unknown error using timer in JEE"

To view the discussion, visit: http://community.jboss.org/message/620405#620405

--------------------------------------------------------------
Thank of your answer, but my problem is slighty different because i use 
container managed transaction and i don't have NPE on TranscationManager but i 
have it on appScopedEntityManager of 
org.drools.persistence.jpa.JpaPersistenceContextManager.

I can't understand why since my stateless EJB load the session specify an 
enviroment in this way:

@Stateless
public class .... {
    
     @PersistenceUnit(unitName = "org.jbpm.persistence.jpa")
     private EntityManagerFactory engineEmf;
 
     @PostConstruct
     public void init(){
          ....
          env = KnowledgeBaseFactory.newEnvironment();
          env.set(EnvironmentName.ENTITY_MANAGER_FACTORY, engineEmf);
          ....
     }
 
     ....
     
     private StatefulKnowledgeSession getSessionById(int id) {
          StatefulKnowledgeSession ksession = 
JPAKnowledgeService.loadStatefulKnowledgeSession(id, kbase, null, env);
          log.info("Loaded session with id=" + id + ": " + ksession);
          ksession = registerSessionStuff(ksession);
          return ksession;
     }
     ....
}


and my persistence.xml is like this:

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<persistence version="1.0"
          xsi:schemaLocation="http://java.sun.com/xml/ns/persistence 
http://java.sun.com/xml/ns/persistence/persistence_1_0.xsd 
http://java.sun.com/xml/ns/persistence/orm 
http://java.sun.com/xml/ns/persistence/orm_1_0.xsd";
          xmlns:orm="http://java.sun.com/xml/ns/persistence/orm"; 
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
          xmlns="http://java.sun.com/xml/ns/persistence";>
          <persistence-unit name="org.jbpm.persistence.jpa" 
transaction-type="JTA">
                    <jta-data-source>java:myDataSource</jta-data-source>
                    <!-- Runtime classes -->
                    <class>org.drools.persistence.info.SessionInfo</class>
                    <class>org.drools.persistence.info.WorkItemInfo</class>
                    
<class>org.jbpm.persistence.processinstance.ProcessInstanceInfo</class>
  
                    <!-- BAM classes-->
                    <class>org.jbpm.process.audit.ProcessInstanceLog</class>
                    <class>org.jbpm.process.audit.NodeInstanceLog</class>
                    <class>org.jbpm.process.audit.VariableInstanceLog</class>
  
                    <properties>
                              <property name="hibernate.dialect" 
value="org.hibernate.dialect.H2Dialect" />
                              <property name="hibernate.hbm2ddl.auto" 
value="update" />
                              <property name="hibernate.show_sql" value="false" 
/>
                              <property name="hibernate.jdbc.batch_size" 
value="0"/>
                    </properties>
          </persistence-unit>
</persistence>



maybe is a bug?
--------------------------------------------------------------

Reply to this message by going to Community
[http://community.jboss.org/message/620405#620405]

Start a new discussion in jBPM at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2034]

_______________________________________________
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user

Reply via email to