3 Replies Latest reply on Apr 16, 2006 7:34 AM by kukeltje

    new  webapp performance

    kukeltje

      Hi,

      I'm impressed by the development of the new webapp. There is however one thing that I hope is just not addressed yet. The performance is rather low. Just starting a process takes allmost two seconds.

      There are however some obvious delays in the system almost 1.5 secons is 'lost' beginning and committing a transaction and flushing the logs. See the log below.

      01:52:21,093 DEBUG [LogFilter] request http://127.0.0.1:8080/jbpm/participant/home.jsf
      01:52:21,093 DEBUG [LogFilter] request parameter [linkDummyForm:_link_hidden_]=newExe1
      01:52:21,093 DEBUG [LogFilter] request parameter [taskInstanceId]=
      01:52:21,093 DEBUG [LogFilter] request parameter [processDefinitionId]=1
      01:52:21,093 DEBUG [LogFilter] session parameter [org.apache.myfaces.application.jsp.JspStateManagerImpl.SERIALIZED_VIEW-/common/taskreassign.xhtml]=[Ljava.lang.Object;@13214d1
      01:52:21,093 DEBUG [LogFilter] session parameter [org.apache.myfaces.application.jsp.JspStateManagerImpl.SERIALIZED_VIEW-/manager/home.xhtml]=[Ljava.lang.Object;@1b3d448
      01:52:21,093 DEBUG [LogFilter] session parameter [org.apache.myfaces.application.jsp.JspStateManagerImpl.SERIALIZED_VIEW-/participant/home.xhtml]=[Ljava.lang.Object;@3b84ee
      01:52:21,093 DEBUG [LogFilter] session parameter [org.apache.myfaces.application.jsp.JspStateManagerImpl.SERIALIZED_VIEW-/common/login.xhtml]=[Ljava.lang.Object;@1fac7cf
      01:52:21,093 DEBUG [LogFilter] session parameter [org.apache.myfaces.application.jsp.JspStateManagerImpl.SERIALIZED_VIEW-/administrator/home.xhtml]=[Ljava.lang.Object;@7a8ba4
      01:52:21,093 DEBUG [JbpmPhaseListener] after phase RESTORE_VIEW(1)
      01:52:21,093 DEBUG [JbpmPhaseListener] after phase APPLY_REQUEST_VALUES(2)
      01:52:21,093 DEBUG [JbpmPhaseListener] after phase PROCESS_VALIDATIONS(3)
      01:52:21,093 DEBUG [JbpmPhaseListener] after phase UPDATE_MODEL_VALUES(4)
      01:52:21,093 DEBUG [ParticipantBean] starting new process instance 1
      01:52:21,093 DEBUG [JbpmContextInfo] creating jbpm context with service factories '[message, scheduler, logging, persistence, authentication]'
      01:52:21,093 DEBUG [JbpmContext] creating JbpmContext
      01:52:21,093 DEBUG [DbPersistenceServiceFactory] creating persistence service
      01:52:21,093 DEBUG [DbPersistenceService] creating hibernate session
      01:52:21,093 DEBUG [DbPersistenceService] beginning hibernate transaction
       01:52:21,234 DEBUG [GraphElement] event 'process-start' on 'ProcessDefinition(websale)' for 'Token(/)'
      01:52:21,296 DEBUG [TaskController] creating task instance variable 'item' from process variable 'item', value 'null'
      01:52:21,296 DEBUG [VariableContainer] create variable 'item' in 'TaskInstance[Create new web sale order]' with value 'null'
      01:52:21,296 DEBUG [TaskController] creating task instance variable 'quantity' from process variable 'quantity', value 'null'
      01:52:21,296 DEBUG [VariableContainer] create variable 'quantity' in 'TaskInstance[Create new web sale order]' with value 'null'
      01:52:21,296 DEBUG [TaskController] creating task instance variable 'address' from process variable 'address', value 'null'
      01:52:21,296 DEBUG [VariableContainer] create variable 'address' in 'TaskInstance[Create new web sale order]' with value 'null'
      01:52:21,296 DEBUG [GraphElement] event 'task-create' on 'Task(Create new web sale order)' for 'Token(/)'
      01:52:21,375 DEBUG [TaskInstance] assigning task 'Create new web sale order' to 'ernie'
      01:52:21,375 DEBUG [GraphElement] event 'task-assign' on 'Task(Create new web sale order)' for 'Token(/)'
      01:52:21,375 DEBUG [Services] executing default save operations
      01:52:21,375 DEBUG [HibernateSaveOperation] saving process instance
      01:52:21,375 DEBUG [SaveLogsOperation] flushing logs to logging service.
       01:52:21,906 DEBUG [CascadeSaveOperation] cascading save of 'org.jbpm.graph.exe.ProcessInstance@66a008'
      01:52:21,906 DEBUG [TaskBean] selecting task instance 246
      01:52:21,906 DEBUG [TaskInstanceVariableMap] initializing task instance in variables map
      01:52:21,906 DEBUG [JbpmPhaseListener] after phase INVOKE_APPLICATION(5)
      01:52:21,906 DEBUG [JbpmPhaseListener] starting new transaction for the rendering phase
      01:52:21,906 DEBUG [DbPersistenceService] committing hibernate transaction
       01:52:22,921 DEBUG [DbPersistenceService] beginning hibernate transaction
      01:52:22,953 DEBUG [TaskForms] task form path for 'Task(Create new web sale order)' is '/form.create.xhtml'
      01:52:22,968 DEBUG [TaskInstanceVariableMap] fetched value 'null' for task variable 'item'
      01:52:22,968 DEBUG [TaskInstanceVariableMap] fetched value 'null' for task variable 'quantity'
      01:52:22,968 DEBUG [TaskInstanceVariableMap] fetched value 'null' for task variable 'address'
      01:52:22,968 DEBUG [JbpmPhaseListener] after phase RENDER_RESPONSE(6)
      01:52:22,968 DEBUG [JbpmContext] closing JbpmContext
      01:52:22,968 DEBUG [Services] closing service 'persistence': org.jbpm.persistence.db.DbPersistenceService@15decc0
      01:52:22,968 DEBUG [DbPersistenceService] committing hibernate transaction
      01:52:23,015 DEBUG [DbPersistenceService] closing hibernate session
      01:52:23,015 DEBUG [Services] closing service 'logging': org.jbpm.logging.db.DbLoggingService@ba936a
      01:52:23,015 DEBUG [Services] closing service 'authentication': org.jbpm.security.authentication.DefaultAuthenticationService@12421db
      



      Ending one task takes even longer, more than 11 seconds. With delays in the same areas as above with the addition of the assignmenthandler.

      01:53:40,062 DEBUG [LogFilter] request http://127.0.0.1:8080/jbpm/common/taskform.jsf
      01:53:40,062 DEBUG [LogFilter] request parameter [taskform:_id30]=e
      01:53:40,062 DEBUG [LogFilter] request parameter [taskform:_link_hidden_]=
      01:53:40,062 DEBUG [LogFilter] request parameter [taskform:_id28]=e
      01:53:40,062 DEBUG [LogFilter] request parameter [taskform:taskInstanceId]=246
      01:53:40,062 DEBUG [LogFilter] request parameter [taskform:_id26]=e
      01:53:40,062 DEBUG [LogFilter] request parameter [taskform_SUBMIT]=1
      01:53:40,062 DEBUG [LogFilter] request parameter [taskform:transitionButton]=Save and Close Task
      01:53:40,062 DEBUG [LogFilter] session parameter [org.apache.myfaces.application.jsp.JspStateManagerImpl.SERIALIZED_VIEW-/com
      mon/taskform.xhtml]=[Ljava.lang.Object;@12ad974
      01:53:40,062 DEBUG [LogFilter] session parameter [org.apache.myfaces.application.jsp.JspStateManagerImpl.SERIALIZED_VIEW-/common/taskreassign.xhtml]=[Ljava.lang.Object;@13214d1
      01:53:40,062 DEBUG [LogFilter] session parameter [org.apache.myfaces.application.jsp.JspStateManagerImpl.SERIALIZED_VIEW-/manager/home.xhtml]=[Ljava.lang.Object;@1b3d448
      01:53:40,078 DEBUG [LogFilter] session parameter [org.apache.myfaces.application.jsp.JspStateManagerImpl.SERIALIZED_VIEW-/common/login.xhtml]=[Ljava.lang.Object;@1fac7cf
      01:53:40,078 DEBUG [LogFilter] session parameter [org.apache.myfaces.application.jsp.JspStateManagerImpl.SERIALIZED_VIEW-/administrator/home.xhtml]=[Ljava.lang.Object;@7a8ba4
      01:53:40,078 DEBUG [JbpmPhaseListener] after phase RESTORE_VIEW(1)
      01:53:40,078 DEBUG [JbpmPhaseListener] after phase APPLY_REQUEST_VALUES(2)
      01:53:40,078 DEBUG [TaskInstanceVariableMap] no task instance was set so returning null
      01:53:40,078 DEBUG [TaskInstanceVariableMap] no task instance was set so returning null
      01:53:40,078 DEBUG [TaskInstanceVariableMap] no task instance was set so returning null
      01:53:40,078 DEBUG [TaskInstanceVariableMap] no task instance was set so returning null
      01:53:40,078 DEBUG [TaskInstanceVariableMap] no task instance was set so returning null
      01:53:40,078 DEBUG [TaskInstanceVariableMap] no task instance was set so returning null
      01:53:40,078 DEBUG [JbpmPhaseListener] after phase PROCESS_VALIDATIONS(3)
      01:53:40,078 DEBUG [TaskBean] selecting task instance 246
      01:53:40,078 DEBUG [JbpmContextInfo] creating jbpm context with service factories '[message, scheduler, logging, persistence, authentication]'
      01:53:40,078 DEBUG [JbpmContext] creating JbpmContext
      01:53:40,078 DEBUG [DbPersistenceServiceFactory] creating persistence service
      01:53:40,078 DEBUG [DbPersistenceService] creating hibernate session
      01:53:40,078 DEBUG [DbPersistenceService] beginning hibernate transaction
      01:53:40,171 DEBUG [TaskInstanceVariableMap] initializing task instance in variables map
      01:53:40,171 DEBUG [TaskInstanceVariableMap] setting task variable 'item' to 'e'
      01:53:40,171 DEBUG [TaskInstanceVariableMap] setting task variable 'quantity' to 'e'
      01:53:40,171 DEBUG [TaskInstanceVariableMap] setting task variable 'address' to 'e'
      01:53:40,171 DEBUG [JbpmPhaseListener] after phase UPDATE_MODEL_VALUES(4)
      01:53:40,171 DEBUG [TaskBean] saving the task parameters org.jbpm.webapp.bean.TaskInstanceVariableMap@1aa9b4d
      01:53:40,171 DEBUG [TaskBean] saving variable 'item': e
       01:53:40,562 DEBUG [VariableContainer] variable type change. deleting 'item' from 'TaskInstance[Create new web sale order]'
      01:53:40,562 DEBUG [VariableContainer] create variable 'item' in 'TaskInstance[Create new web sale order]' with value 'e'
      01:53:40,562 DEBUG [TaskBean] saving variable 'address': e
      01:53:40,562 DEBUG [VariableContainer] variable type change. deleting 'address' from 'TaskInstance[Create new web sale order]'
      01:53:40,562 DEBUG [VariableContainer] create variable 'address' in 'TaskInstance[Create new web sale order]' with value 'e'
      01:53:40,562 DEBUG [TaskBean] saving variable 'quantity': e
      01:53:40,562 DEBUG [VariableContainer] variable type change. deleting 'quantity' from 'TaskInstance[Create new web sale order]'
      01:53:40,562 DEBUG [VariableContainer] create variable 'quantity' in 'TaskInstance[Create new web sale order]' with value 'e'
      01:53:40,562 DEBUG [Services] executing default save operations
      01:53:40,562 DEBUG [HibernateSaveOperation] saving process instance
      01:53:40,562 DEBUG [SaveLogsOperation] flushing logs to logging service.
       01:53:41,296 DEBUG [CascadeSaveOperation] cascading save of 'org.jbpm.graph.exe.ProcessInstance@2ed1e8'
      01:53:41,296 DEBUG [TaskBean] Submitted button:default
      01:53:41,312 WARN [StatefulPersistenceContext] Narrowing proxy to class org.jbpm.graph.node.StartState - this operation breaks ==
      01:53:41,312 DEBUG [GraphElement] event 'task-end' on 'Task(Create new web sale order)' for 'Token(/)'
      01:53:41,375 DEBUG [TaskController] submitting task variable 'item' to process variable 'item', value 'e'
      01:53:41,375 DEBUG [VariableContainer] create variable 'item' in 'TokenVariableMap13e6577' with value 'e'
      01:53:41,375 DEBUG [TaskController] submitting task variable 'quantity' to process variable 'quantity', value 'e'
      01:53:41,375 DEBUG [VariableContainer] create variable 'quantity' in 'TokenVariableMap13e6577' with value 'e'
      01:53:41,375 DEBUG [TaskController] submitting task variable 'address' to process variable 'address', value 'e'
      01:53:41,375 DEBUG [VariableContainer] create variable 'address' in 'TokenVariableMap13e6577' with value 'e'
      01:53:41,375 DEBUG [TaskInstance] completion of task 'Create new web sale order' results in taking the default transition
      01:53:41,390 DEBUG [GraphElement] event 'before-signal' on 'StartState(Create new web sale order)' for 'Token(/)'
      01:53:41,390 DEBUG [GraphElement] event 'node-leave' on 'StartState(Create new web sale order)' for 'Token(/)'
      01:53:41,390 DEBUG [GraphElement] event 'transition' on 'Transition(66db4e)' for 'Token(/)'
      01:53:41,390 DEBUG [GraphElement] event 'node-enter' on 'TaskNode(Evaluate web order)' for 'Token(/)'
      01:53:41,390 WARN [StatefulPersistenceContext] Narrowing proxy to class org.jbpm.graph.node.TaskNode - this operation breaks ==
      01:53:41,531 DEBUG [TaskController] creating task instance variable 'item' from process variable 'item', value 'e'
      01:53:41,531 DEBUG [VariableContainer] create variable 'item' in 'TaskInstance[Evaluate web order]' with value 'e'
      01:53:41,531 DEBUG [TaskController] creating task instance variable 'quantity' from process variable 'quantity', value 'e'
      01:53:41,531 DEBUG [VariableContainer] create variable 'quantity' in 'TaskInstance[Evaluate web order]' with value 'e'
      01:53:41,531 DEBUG [TaskController] creating task instance variable 'address' from process variable 'address', value 'e'
      01:53:41,531 DEBUG [VariableContainer] create variable 'address' in 'TaskInstance[Evaluate web order]' with value 'e'
      01:53:41,531 DEBUG [TaskController] creating task instance variable 'comment' from process variable 'comment', value 'null'
      01:53:41,531 DEBUG [VariableContainer] create variable 'comment' in 'TaskInstance[Evaluate web order]' with value 'null'
      01:53:41,531 DEBUG [GraphElement] event 'task-create' on 'Task(Evaluate web order)' for 'Token(/)'
      01:53:41,531 DEBUG [GraphElement] executing action 'CreateTimerAction(fc63be)'
      01:53:41,531 DEBUG [GraphElement] event 'timer-create' on 'Task(Evaluate web order)' for 'Token(/)'
      01:53:41,734 DEBUG [ExpressionAssignmentHandler] resolving first term 'user(ernie)'
       01:53:42,375 DEBUG [TaskInstance] assigning task 'Evaluate web order' to 'ernie'
      01:53:42,375 DEBUG [GraphElement] event 'task-assign' on 'Task(Evaluate web order)' for 'Token(/)'
      01:53:42,375 DEBUG [GraphElement] event 'after-signal' on 'StartState(Create new web sale order)' for 'Token(/)'
      01:53:42,375 DEBUG [Services] executing default save operations
      01:53:42,375 DEBUG [HibernateSaveOperation] saving process instance
      01:53:42,375 DEBUG [SaveLogsOperation] flushing logs to logging service.
       01:53:44,296 DEBUG [CascadeSaveOperation] cascading save of 'org.jbpm.graph.exe.ProcessInstance@2ed1e8'
      01:53:44,296 DEBUG [TaskBean] assignmentlogs: [task-assign[ernie,TaskInstance[Evaluate web order]]]
      01:53:44,296 DEBUG [JbpmPhaseListener] after phase INVOKE_APPLICATION(5)
      01:53:44,296 DEBUG [JbpmPhaseListener] starting new transaction for the rendering phase
      01:53:44,296 DEBUG [DbPersistenceService] committing hibernate transaction
       01:53:47,093 DEBUG [DbPersistenceService] beginning hibernate transaction
      01:53:47,109 DEBUG [LogFilter] request http://127.0.0.1:8080/jbpm/participant/home.jsf
      01:53:47,109 DEBUG [LogFilter] session parameter [org.apache.myfaces.application.jsp.JspStateManagerImpl.SERIALIZED_VIEW-/common/taskreassign.xhtml]=[Ljava.lang.Object;@13214d1
      01:53:47,109 DEBUG [LogFilter] session parameter [org.apache.myfaces.application.jsp.JspStateManagerImpl.SERIALIZED_VIEW-/manager/home.xhtml]=[Ljava.lang.Object;@1b3d448
      01:53:47,109 DEBUG [LogFilter] session parameter [org.apache.myfaces.application.jsp.JspStateManagerImpl.SERIALIZED_VIEW-/common/login.xhtml]=[Ljava.lang.Object;@1fac7cf
      01:53:47,109 DEBUG [LogFilter] session parameter [org.apache.myfaces.application.jsp.JspStateManagerImpl.SERIALIZED_VIEW-/administrator/home.xhtml]=[Ljava.lang.Object;@7a8ba4
      01:53:47,109 DEBUG [JbpmPhaseListener] after phase RESTORE_VIEW(1)
      01:53:47,109 DEBUG [JbpmContextInfo] creating jbpm context with service factories '[message, scheduler, logging, persistence, authentication]'
      01:53:47,109 DEBUG [JbpmContext] creating JbpmContext
      01:53:47,109 DEBUG [DbPersistenceServiceFactory] creating persistence service
      01:53:47,109 DEBUG [DbPersistenceService] creating hibernate session
      01:53:47,109 DEBUG [DbPersistenceService] beginning hibernate transaction
       01:53:51,828 DEBUG [JbpmPhaseListener] after phase RENDER_RESPONSE(6)
      01:53:51,828 DEBUG [JbpmContext] closing JbpmContext
      01:53:51,828 DEBUG [Services] closing service 'persistence': org.jbpm.persistence.db.DbPersistenceService@1e74fe9
      01:53:51,828 DEBUG [DbPersistenceService] committing hibernate transaction
      01:53:51,859 DEBUG [DbPersistenceService] closing hibernate session
      01:53:51,859 DEBUG [Services] closing service 'authentication': org.jbpm.security.authentication.DefaultAuthenticationService@1788551


      I see all these actions are DB related and my DB is not running locally, but at the other end of a 2Mbit ADSL line. So that would account for some delay, but this high? I'll do another run tomorrow with hibernate debugging on to see if I can pinpoint it a little.

        • 1. Re: new  webapp performance
          tom.baeyens

          if your db is located remotely and you see performance problems related to commit, that's where i would start looking.

          when i run the webapp in the out-of-the-box configuration, i don't see any such performance problems.

          that doesn't mean anything, but it might be interesting info to guide your search.

          let me know if you find any non-db-related problem.

          note that if your network latency is multiplied by the number of db accesses (queries or updates) i would expect that to be the main reason for the long delays you're seeing.

          • 2. Re: new  webapp performance
            salahssaid2

            hi evrybody

            I m trying to test defferent models of the jbpm3 with jUnit; so i run this java code as junit test,

            package junittest;

            import org.jbpm.JbpmConfiguration;
            import org.jbpm.JbpmContext;
            import org.jbpm.db.GraphSession;
            import org.jbpm.graph.def.ProcessDefinition;
            import org.jbpm.graph.exe.ProcessInstance;
            import org.jbpm.graph.exe.Token;

            import java.util.List;

            import junit.framework.TestCase;

            public class HelloWorldDbTest extends TestCase {




            static JbpmConfiguration jbpmConfiguration = JbpmConfiguration.getInstance();


            /*static JbpmConfiguration jbpmConfiguration = null;

            static {
            // An example configuration file such as this can be found in
            // 'src/config.files'. Typically the configuration information is in the
            // resource file 'jbpm.cfg.xml', but here we pass in the configuration
            // information as an XML string.

            // First we create a JbpmConfiguration statically. One JbpmConfiguration
            // can be used for all threads in the system, that is why we can safely
            // make it static.

            jbpmConfiguration = JbpmConfiguration.parseResource(
            "<jbpm-configuration>" +

            // A jbpm-context mechanism separates the jbpm core
            // engine from the services that jbpm uses from
            // the environment.

            " <jbpm-context>" +
            " <service name='persistence' " +
            " factory='org.jbpm.persistence.db.DbPersistenceServiceFactory' />" +
            " </jbpm-context>" +

            // Also all the resource files that are used by jbpm are
            // referenced from the jbpm.cfg.xml

            " <string name='resource.hibernate.cfg.xml' " +
            " value='hibernate.cfg.xml' />" +
            " <string name='resource.business.calendar' " +
            " value='org/jbpm/calendar/jbpm.business.calendar.properties' />" +
            " <string name='resource.default.modules' " +
            " value='org/jbpm/graph/def/jbpm.default.modules.properties' />" +
            " <string name='resource.converter' " +
            " value='org/jbpm/db/hibernate/jbpm.converter.properties' />" +
            " <string name='resource.action.types' " +
            " value='org/jbpm/graph/action/action.types.xml' />" +
            " <string name='resource.node.types' " +
            " value='org/jbpm/graph/node/node.types.xml' />" +
            " <string name='resource.varmapping' " +
            " value='org/jbpm/context/exe/jbpm.varmapping.xml' />" +
            "</jbpm-configuration>"
            );
            }*/

            public void setUp() {

            System.out.println("deployment va commencer!!!");

            jbpmConfiguration.createSchema();

            }

            public void tearDown() {

            System.out.println("deployment va commencer!!!");
            jbpmConfiguration.dropSchema();
            }

            public void testSimplePersistence() {
            // Between the 3 method calls below, all data is passed via the
            // database. Here, in this unit test, these 3 methods are executed
            // right after each other because we want to test a complete process
            // scenario. But in reality, these methods represent different
            // requests to a server.

            // Since we start with a clean, empty in-memory database, we have to
            // deploy the process first. In reality, this is done once by the
            // process developer.
            deployProcessDefinition();

            // Suppose we want to start a process instance (=process execution)
            // when a user submits a form in a web application...
            processInstanceIsCreatedWhenUserSubmitsWebappForm();

            // Then, later, upon the arrival of an asynchronous message the
            // execution must continue.
            theProcessInstanceContinuesWhenAnAsyncMessageIsReceived();
            }

            public void deployProcessDefinition() {
            // This test shows a process definition and one execution
            // of the process definition. The process definition has
            // 3 nodes: an unnamed start-state, a state 's' and an
            // end-state named 'end'.
            ProcessDefinition processDefinition = ProcessDefinition.parseXmlString(
            "<process-definition name='hello world'>" +
            " <start-state name='start'>" +
            " " +
            " </start-state>" +
            " " +
            " " +
            " " +
            " <end-state name='end' />" +
            "</process-definition>"
            );

            // Lookup the pojo persistence context-builder that is configured above
            JbpmContext jbpmContext = jbpmConfiguration.createJbpmContext();
            try {


            // Deploy the process definition in the database
            jbpmContext.deployProcessDefinition(processDefinition);

            } finally {
            // Tear down the pojo persistence context.
            // This includes flush the SQL for inserting the process definition
            // to the database.


            jbpmContext.close();


            }


            }

            public void processInstanceIsCreatedWhenUserSubmitsWebappForm() {
            // The code in this method could be inside a struts-action
            // or a JSF managed bean.

            // Lookup the pojo persistence context-builder that is configured above
            JbpmContext jbpmContext = jbpmConfiguration.createJbpmContext();
            try {

            GraphSession graphSession = jbpmContext.getGraphSession();

            ProcessDefinition processDefinition =
            graphSession.findLatestProcessDefinition("hello world");

            // With the processDefinition that we retrieved from the database, we
            // can create an execution of the process definition just like in the
            // hello world example (which was without persistence).
            ProcessInstance processInstance =
            new ProcessInstance(processDefinition);

            Token token = processInstance.getRootToken();
            assertEquals("start", token.getNode().getName());
            // Let's start the process execution
            token.signal();
            // Now the process is in the state 's'.
            assertEquals("s", token.getNode().getName());

            // Now the processInstance is saved in the database. So the
            // current state of the execution of the process is stored in the
            // database.
            jbpmContext.save(processInstance);
            // The method below will get the process instance back out
            // of the database and resume execution by providing another
            // external signal.

            } finally {
            // Tear down the pojo persistence context.
            jbpmContext.close();
            }
            }

            public void theProcessInstanceContinuesWhenAnAsyncMessageIsReceived() {
            // The code in this method could be the content of a message driven bean.

            // Lookup the pojo persistence context-builder that is configured above
            JbpmContext jbpmContext = jbpmConfiguration.createJbpmContext();
            try {

            GraphSession graphSession = jbpmContext.getGraphSession();
            // First, we need to get the process instance back out of the database.
            // There are several options to know what process instance we are dealing
            // with here. The easiest in this simple test case is just to look for
            // the full list of process instances. That should give us only one
            // result. So let's look up the process definition.

            ProcessDefinition processDefinition =
            graphSession.findLatestProcessDefinition("hello world");

            // Now, we search for all process instances of this process definition.
            List processInstances =
            graphSession.findProcessInstances(processDefinition.getId());

            // Because we know that in the context of this unit test, there is
            // only one execution. In real life, the processInstanceId can be
            // extracted from the content of the message that arrived or from
            // the user making a choice.
            ProcessInstance processInstance =
            (ProcessInstance) processInstances.get(0);

            // Now we can continue the execution. Note that the processInstance
            // delegates signals to the main path of execution (=the root token).
            processInstance.signal();

            // After this signal, we know the process execution should have
            // arrived in the end-state.
            assertTrue(processInstance.hasEnded());

            // Now we can update the state of the execution in the database
            jbpmContext.save(processInstance);

            } finally {
            // Tear down the pojo persistence context.
            jbpmContext.close();
            }
            }

            }


            I have in the console:

            18:19:36,531 [main] INFO JbpmConfiguration : using jbpm configuration resource 'jbpm.cfg.xml'
            18:19:36,843 [main] DEBUG JbpmConfiguration : creating jbpm configuration from input stream
            deployment va commencer!!!
            18:19:36,875 [main] DEBUG JbpmContextInfo : creating jbpm context with service factories '[message, scheduler, logging, persistence, authentication]'
            18:19:36,875 [main] DEBUG JbpmContext : creating JbpmContext
            18:19:36,875 [main] DEBUG DbPersistenceServiceFactory : creating schema export
            18:19:36,875 [main] DEBUG JbpmContext : closing JbpmContext

            and an error:

            java.lang.NoClassDefFoundError: org/hibernate/tool/hbm2ddl/SchemaExport
            at org.jbpm.persistence.db.DbPersistenceServiceFactory.getSchemaExport(DbPersistenceServiceFactory.java:79)
            at org.jbpm.persistence.db.DbPersistenceServiceFactory.createSchema(DbPersistenceServiceFactory.java:110)
            at org.jbpm.JbpmConfiguration.createSchema(JbpmConfiguration.java:383)
            at org.jbpm.JbpmConfiguration.createSchema(JbpmConfiguration.java:375)
            at junittest.HelloWorldDbTest.setUp(HelloWorldDbTest.java:71)
            at junit.framework.TestCase.runBare(TestCase.java:125)
            at junit.framework.TestResult$1.protect(TestResult.java:106)
            at junit.framework.TestResult.runProtected(TestResult.java:124)
            at junit.framework.TestResult.run(TestResult.java:109)
            at junit.framework.TestCase.run(TestCase.java:118)
            at junit.framework.TestSuite.runTest(TestSuite.java:208)
            at junit.framework.TestSuite.run(TestSuite.java:203)
            at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:478)
            at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:344)
            at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:196)


            plllllllllllzzz some know wath s the problem exactly??
            I have MySQL db already created..

            • 3. Re: new  webapp performance
              kukeltje

              I think I know what's wrong (and please use a new thread for a just partially related subject)

              java.lang.NoClassDefFoundError: org/hibernate/tool/hbm2ddl/SchemaExport


              Ronald