[jboss-user] [jBPM] - Re: Unknown error using timer in JEE
Francesco Pietrobelli
do-not-reply at jboss.com
Wed Aug 10 11:10:24 EDT 2011
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]
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/jboss-user/attachments/20110810/f357ce19/attachment.html
More information about the jboss-user
mailing list