[JBoss JIRA] Created: (JBPM-1732) Clarify the unit test strategy
by Thomas Diesler (JIRA)
Clarify the unit test strategy
------------------------------
Key: JBPM-1732
URL: https://jira.jboss.org/jira/browse/JBPM-1732
Project: JBoss jBPM
Issue Type: Task
Security Level: Public (Everyone can see)
Components: Core Engine
Reporter: Thomas Diesler
Fix For: jBPM 3.3.0
The AbstractDbTestCase currently has a call to createSchema() in setUp
public void setUp() throws Exception
{
log.debug("### starting " + getClass().getName() + "." + getName() + " ####################################################");
createSchema();
createJbpmContext();
initializeMembers();
}
What assumptions can a test make on the state of the DB? What is the required cleanup that needs to be done?
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://jira.jboss.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
16 years, 2 months
[JBoss JIRA] Resolved: (JBPM-1445) The jBPM 'websale' sample application fails
by Thomas Diesler (JIRA)
[ https://jira.jboss.org/jira/browse/JBPM-1445?page=com.atlassian.jira.plug... ]
Thomas Diesler resolved JBPM-1445.
----------------------------------
Resolution: Done
> The jBPM 'websale' sample application fails
> --------------------------------------------
>
> Key: JBPM-1445
> URL: https://jira.jboss.org/jira/browse/JBPM-1445
> Project: JBoss jBPM
> Issue Type: Bug
> Security Level: Public(Everyone can see)
> Components: Core Engine
> Environment: JBoss Developer Studio
> Build id: 1.0.0.GA
> SOA-P GA
> /opt/GA/soa-4.2.0.GA.zip
> /opt/GA/standalone-soa-4.2.0.GA.zip
> RHEL5
> Linux ldimaggi.csb 2.6.18-53.1.13.el5 #1 SMP Mon Feb 11 13:27:52 EST 2008 i686 i686 i386 GNU/Linux
> Sun Java 1.5
> java version "1.5.0_14"
> Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_14-b03)
> Java HotSpot(TM) Client VM (build 1.5.0_14-b03, mixed mode)
> RDBMS
> H2, version: 1.0.66 (2008-01-18)
> CPU
> cat /proc/cpuinfo
> processor : 0
> vendor_id : GenuineIntel
> cpu family : 6
> model : 13
> model name : Intel(R) Pentium(R) M processor 1.70GHz
> stepping : 6
> cpu MHz : 1700.000
> cache size : 2048 KB
> fdiv_bug : no
> hlt_bug : no
> f00f_bug : no
> coma_bug : no
> fpu : yes
> fpu_exception : yes
> cpuid level : 2
> wp : yes
> flags : fpu vme de pse tsc msr mce cx8 mtrr pge mca cmov pat clflush dts acpi mmx fxsr sse sse2 ss tm pbe up est tm2
> bogomips : 3398.35
> Reporter: Len DiMaggio
> Fix For: SOA 4.2 CP03, SOA 4.3
>
> Attachments: Screenshot-1.png, server.log, server.log, server.log.gz
>
>
> The jBPM 'websale' sample application fails - when an order is approved (OK is selected). This exception is displayed back to the user:
> Error completing task: An exception of type "org.jbpm.graph.def.DelegationException" was thrown.
> Closing the database context failed: An exception of type org.jbpm.JbpmException was thrown, with the message: problem closing services {persistence=org.jbpm.JbpmException: setRollbackOnly was invoked while configuration specifies user managed transactions}
> The server.log is attached.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://jira.jboss.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
16 years, 2 months
[JBoss JIRA] Resolved: (JBPM-1071) Possible problem in concurrent signalling from multiple threads
by Thomas Diesler (JIRA)
[ https://jira.jboss.org/jira/browse/JBPM-1071?page=com.atlassian.jira.plug... ]
Thomas Diesler resolved JBPM-1071.
----------------------------------
Resolution: Done
The test passes in Hudson
http://jbpm.dyndns.org:8280/hudson/job/jBPM3-Matrix/16/container=jboss422...
Please remember that Hudson QA is an integral part of the project, which includes container configuration.
> Possible problem in concurrent signalling from multiple threads
> ---------------------------------------------------------------
>
> Key: JBPM-1071
> URL: https://jira.jboss.org/jira/browse/JBPM-1071
> Project: JBoss jBPM
> Issue Type: Bug
> Components: Core Engine
> Affects Versions: jBPM 3.2.2
> Environment: Linux 2.6.21-1.3228.fc7 #1 SMP Tue Jun 12 14:56:37 EDT 2007 x86_64 x86_64 x86_64 GNU/Linux
> MySQL 5.0.22
> Reporter: Jiri Pechanec
> Priority: Critical
> Attachments: expl.tar.gz, LockingTest.java, log.txt
>
>
> Attached is a simple test case that
> 1) Deploys process definition with two nodes
> 2) Starts the process instance that will go to the wait state on first node
> 3) Starts 20 threads that tries concurrently signal the same process instance
> 4) The second node writes a record to the database
> The test case needs to be executed multiple times to see the incorrect behaviour.
> This is an example of run output
> Isol 8
> Action 1
> Action 2
> Action 2
> Action 2
> Action 2
> Action 2 1
> Action 2 1
> Action 2 1
> Action 2 1
> Signalist 5
> Signalist 6
> Signalist 8
> Signalist 12
> Signalist 7
> Signalist 13
> Signalist 14
> Signalist 15
> Signalist 9
> Signalist 16
> Signalist 17
> Signalist 18
> Signalist 4
> Success 7
> Failure 13
> Explanation of the outcome
> 4 threads successfully executed the node action including database operation. All database opeartion were comitted (4 new records were created)
> 3 threads successfully executed the signal operation but no real action was performed
> 13 threads attempted to execute the signal operation but ended with an exception
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://jira.jboss.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
16 years, 2 months
[JBoss JIRA] Moved: (JBPM-1770) Using the same entityManager for Seam and jbpm
by Pete Muir (JIRA)
[ https://jira.jboss.org/jira/browse/JBPM-1770?page=com.atlassian.jira.plug... ]
Pete Muir moved JBSEAM-2975 to JBPM-1770:
-----------------------------------------
Project: JBoss jBPM (was: Seam)
Key: JBPM-1770 (was: JBSEAM-2975)
Component/s: (was: BPM)
Affects Version/s: (was: 2.0.1.GA)
Security: Public
> Using the same entityManager for Seam and jbpm
> ----------------------------------------------
>
> Key: JBPM-1770
> URL: https://jira.jboss.org/jira/browse/JBPM-1770
> Project: JBoss jBPM
> Issue Type: Feature Request
> Security Level: Public(Everyone can see)
> Reporter: stefan meyer
>
> I wrote an entry in the forum and was asked to create a JIRA issue. Following is the forum entry and my code. The code is ugly whenever calls come via MDBs. ManagedPersistenceContext.beforeCompletion does not work nicely with this implementation. Because I cannot get the entityManager anymore. Even if the code was called in destroy the entitymanager would be gone. If ManagedJbpmContext was in conversation scope and depended on ManagedPersistenceContext and the dependency would lead to the destruction of managedJbpmContext first, then things would be better.
> The problem is actually only that Jbpm-DbLogging does not work. Maybe that should be fixed. Or Maybe the Jbpm people should work on it.
> "
> Jbpm and seam using the same entityManager makes sense, because storing entities in variable context and refernecing processInstance or token from entities is possible.
> I have the following problem though. My SeamPersistenceService Implementation of Jbpm's PersistenceService is closed with the destruction of the ManagedJbpmContext. Since ManagedJbpmContext is in scope EVENT and entityManager in scope CONVERSATION the entityManager is destroyed before. Jbpm tries to save the log entities upon close and thus fails because the seam managed entityManager is gone and even closed.
> In my scenario it would help to close JbpmContext in the destroy Method of managedJbpmContext. Transactions and Connections are managed by JbpmContext anyways. Unfortunately direct access to the entityManager will not be possiblle in destroy because the entityManager is removed from Contexts before the ManagedJbpmContext. Maybe ManagedJbpmContext should also be in the Conversation scope.
> Could you include an alternative version of ManagedJbpmContext that works with a SeamPersistenceService?
> "
> Here is my Implementation of Jbpm's PersistenceService that uses a seam managed EntityManager (actually the wrapped hibernate session):
> package xx.jbpm.persistence.seam;
> import org.apache.commons.logging.Log;
> import org.apache.commons.logging.LogFactory;
> import org.hibernate.Session;
> import org.jboss.seam.Component;
> import org.jboss.seam.ScopeType;
> import org.jboss.seam.contexts.Contexts;
> import org.jbpm.persistence.db.DbPersistenceServiceFactory;
> import org.jbpm.persistence.jta.JtaDbPersistenceService;
> public class SeamPersistenceService extends JtaDbPersistenceService
> {
> private static Log log = LogFactory.getLog(SeamPersistenceService.class);
> public SeamPersistenceService(final DbPersistenceServiceFactory persistenceServiceFactory)
> {
> super(persistenceServiceFactory);
> }
> @Override
> public void close()
> {
> // session is not closed here.
> super.close();
> }
> @Override
> public Session getSession()
> {
> boolean initialized = Contexts.isApplicationContextActive();
> if (initialized)
> {
> Session hibernateSession = (Session) Component.getInstance("hibernateSession", ScopeType.EVENT);
> if (hibernateSession == null || !hibernateSession.isOpen())
> {
> // see comment in else clause
> return new DummySession();
> }
> else
> {
> return hibernateSession;
> }
>
> }
> else
> {
> // seam is not active any more but entityManager is closed in transaction synchronization.
> // unfortunately ManagedJbpmContext wants to flush the entityManager in beforeCompletion, but we can't get
> // it via seam anymore. This is probably happening right now. Also saving of instances might happen here. These
> // are all persistent entites - that is why seam ignores it. Except for the log entries - those get lost
> // when db logging is used. return Dummy Session
> return new DummySession();
> }
> }
> }
> Extract from DummySession:
> ...
> public Serializable save(final Object object) throws HibernateException
> {
> try
> {
> Method getIdMethod = object.getClass().getMethod("getId", new Class[0]);
> Object value = getIdMethod.invoke(object, new Object[0]);
> if (value != null && ((Number) value).intValue() == 0)
> {
> Logger.getLogger("dummy session").warn("not saving transient entity " + object.getClass().getName());
> }
> }
> catch (Exception e)
> {
> Logger.getLogger("dummy session").warn("cannot check state of entities " + object.getClass().getName(), e);
> }
> return null;
> }
> ...
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://jira.jboss.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
16 years, 2 months
[JBoss JIRA] Created: (JBPM-1766) Node.java getLeavingTransitionsMap() not thread safe when constructing leavingTransitionMap
by joe freeman (JIRA)
Node.java getLeavingTransitionsMap() not thread safe when constructing leavingTransitionMap
-------------------------------------------------------------------------------------------
Key: JBPM-1766
URL: https://jira.jboss.org/jira/browse/JBPM-1766
Project: JBoss jBPM
Issue Type: Bug
Security Level: Public (Everyone can see)
Components: Core Engine
Affects Versions: jBPM 3.3.0 CR1
Environment: N/A
Reporter: joe freeman
The code in getLeavingTransitionsMap() lazily constructs the map the first time the method is called. Our application can have 100s of users going through the same node at the start of their shift. It is possible to have more than one user leaving the first node at the same time in the same VM. This can put multiple users in the getLeavingTransitionsMap() method at the same time. We can get deadlock in the put() method for the map which means no one else can enter the application. The block of code should be synchronized or the map should be synchronized.
We're running just the jpdl which has this problem up through and including the current 3.2.3 version
/**
* are the leaving {@link Transition}s, mapped by their name (java.lang.String).
*/
public Map getLeavingTransitionsMap() {
if ( (leavingTransitionMap==null)
&& (leavingTransitions!=null) ){
// initialize the cached leaving transition map
leavingTransitionMap = new HashMap();
ListIterator iter = leavingTransitions.listIterator(leavingTransitions.size());
while (iter.hasPrevious()) {
Transition leavingTransition = (Transition) iter.previous();
leavingTransitionMap.put(leavingTransition.getName(), leavingTransition);
}
}
return leavingTransitionMap;
}
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://jira.jboss.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
16 years, 2 months