-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 
Author Message
 Post subject: Async Session handling
PostPosted: Tue Jan 30, 2007 8:12 am 
Newbie

Joined: Wed Aug 24, 2005 12:08 pm
Posts: 1
Hi all,
I'm facing jBPM (workflow engine) for the first time (and I'm not an expert in hibernate) and just when I was about to start coding my application, I faced an issue that I couldn't find any answer for the last two days.
jBPM uses hibernate.

I'm using jBPM-3.1.3 as lib's (jbpm-3.1.3.jar and jbpm-identity-3.1.3.jar) inside my Enterprise Application (.ear) deployed in a SJSAS 8.1 2005Q1.
For the database I'm using Oracle 9i with the Oracle JDBC driver, 9.2.0.8 version. Hibernate 3.2.1 connects through a datasource defined in the SJSAS.

I'm creating a ProcessInstance (hibernate object) inside a jsp (web based application front end) and sending a signal to a jPBM process instance to start up. This will trigger a action configured to send a message to a MDB (Message Driven Bean) through a queue.

The problem is that sometimes (race condition) the MDB starts to process the message before the jsp finishes its work (commiting the transaction and writing the process instance to the database). In the message that the MDB receives comes a processInstanceId that is used to search for that process instance in the database. Every now and then when the MDB starts the process before the jsp commits the transaction it will lead to a:
Code:
org.hibernate.ObjectNotFoundException: No row with the given identifier exists: [org.jbpm.graph.exe.
ProcessInstance#644]
        at org.hibernate.impl.SessionFactoryImpl$1.handleEntityNotFound(SessionFactoryImpl.java:375)

        at org.hibernate.proxy.AbstractLazyInitializer.checkTargetState(AbstractLazyInitializer.java
:79)
        at org.hibernate.proxy.AbstractLazyInitializer.initialize(AbstractLazyInitializer.java:68)
        at org.hibernate.proxy.AbstractLazyInitializer.getImplementation(AbstractLazyInitializer.jav
a:111)
        at org.hibernate.proxy.pojo.cglib.CGLIBLazyInitializer.invoke(CGLIBLazyInitializer.java:140)

        at org.jbpm.graph.exe.ProcessInstance$$EnhancerByCGLIB$$f514ef34.signal(<generated>)
        at my.package.ResponseMDBean.onMessage(ResponseMDBean.java:88)
        at sun.reflect.GeneratedMethodAccessor107.invoke(Unknown Source)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:585)
        at com.sun.enterprise.security.application.EJBSecurityManager.runMethod(EJBSecurityManager.j
ava:983)
        at com.sun.enterprise.security.SecurityUtil.invoke(SecurityUtil.java:147)
        at com.sun.ejb.containers.MessageBeanContainer.deliverMessage(MessageBeanContainer.java:956)

        at com.sun.ejb.containers.MessageBeanListenerImpl.deliverMessage(MessageBeanListenerImpl.jav
a:42)
        at com.sun.enterprise.connectors.inflow.MessageEndpointInvocationHandler.invoke(MessageEndpo
intInvocationHandler.java:130)
        at $Proxy25.onMessage(Unknown Source)
        at com.sun.messaging.jms.ra.OnMessageRunner.run(OnMessageRunner.java:187)
        at com.sun.enterprise.connectors.work.OneWork.doWork(OneWork.java:45)
        at com.sun.corba.ee.impl.orbutil.threadpool.ThreadPoolImpl$WorkerThread.run(Unknown Source)


Can anyone help me on this please?
Thanks in advance,
Délio Guerra


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.