[jBPM] - Command service txn management
by M M
M M [http://community.jboss.org/people/gubespam] created the discussion
"Command service txn management"
To view the discussion, visit: http://community.jboss.org/message/552223#552223
--------------------------------------------------------------
In the default jbpm JTA configuration (jbpm.tx.jta.cfg.xml), the command service is set up three different ways (see below). Can someone say how jbpm which one to pick in each case? Looking at the code, it seems like jbpm should always pick the "newTxRequiredCommandService".
<command-service name="txRequiredCommandService"> <skip-interceptor /> <environment-interceptor /> <retry-interceptor type="jta" /> <jta-transaction-interceptor /> </command-service>
<command-service name="newTxRequiredCommandService"> <environment-interceptor policy="requiresNew" /> <retry-interceptor type="jta" /> <jta-transaction-interceptor policy="requiresNew" /> </command-service>
<command-service> <environment-interceptor /> </command-service>
--------------------------------------------------------------
Reply to this message by going to Community
[http://community.jboss.org/message/552223#552223]
Start a new discussion in jBPM at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&cont...]
13 years, 12 months
[jBPM] - Integrate with Web Application
by jDev Dev
jDev Dev [http://community.jboss.org/people/dSalam] created the discussion
"Integrate with Web Application"
To view the discussion, visit: http://community.jboss.org/message/552214#552214
--------------------------------------------------------------
Hi
I have developed a process definition in JBPM (3.2.3) and it is functioning properly.
I would like to integrate it as part of my web application but I am having some issues. I created my interface using only JSF (faces pages, face-config that includes navigation rules and managed beans). Every time I run my jsp page it gives an error at the following line
"*jbpmContext.deployProcessDefinition(processDefinition);*" in the code below
> public void execute() throws Exception
> {
> ProcessDefinition processDefinition = ProcessDefinition.parseXmlResource("TimerProcess/Tprocessdefinition.xml");
> JbpmContext jbpmContext= JbpmConfiguration.getInstance().createJbpmContext();
>
> System.out.println("------ parsing");
>
> try{
> // Create an instance of the process definition.
> ProcessInstance instance = processDefinition.createProcessInstance();
> System.out.println("------------ deploying process");
> jbpmContext.deployProcessDefinition(processDefinition);
> instance.signal("trSetTimer");
> JobExecutor jobExecutor = jbpmContext.getJbpmConfiguration().getJobExecutor();
>
>
> if (jobExecutor==null) {
> throw new JbpmException("no job executor configured in resource ");
> }
> jobExecutor.start();
>
> jbpmContext.save(instance);
> }finally{
> jbpmContext.close();
> }
> }
>
the error is
> [12/07/10 16:01:16:015 EDT] 00000026 ServletWrappe E SRVE0068E: Uncaught exception thrown in one of the service methods of the servlet: Faces Servlet. Exception thrown : javax.servlet.ServletException: Exception while invoking expression #{scheduleMgrBean.init}
> at javax.faces.webapp.FacesServlet.service(FacesServlet.java:154)
> at com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.java:966)
> at com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:478)
> at com.ibm.ws.wswebcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:463)
> at com.ibm.ws.webcontainer.servlet.CacheServletWrapper.handleRequest(CacheServletWrapper.java:92)
> at com.ibm.ws.webcontainer.WebContainer.handleRequest(WebContainer.java:744)
> at com.ibm.ws.wswebcontainer.WebContainer.handleRequest(WebContainer.java:1433)
> at com.ibm.ws.webcontainer.channel.WCChannelLink.ready(WCChannelLink.java:93)
> at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleDiscrimination(HttpInboundLink.java:465)
> at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleNewInformation(HttpInboundLink.java:394)
> at com.ibm.ws.http.channel.inbound.impl.HttpICLReadCallback.complete(HttpICLReadCallback.java:102)
> at com.ibm.ws.tcp.channel.impl.AioReadCompletionListener.futureCompleted(AioReadCompletionListener.java:152)
> at com.ibm.io.async.AbstractAsyncFuture.invokeCallback(AbstractAsyncFuture.java:213)
> at com.ibm.io.async.AbstractAsyncFuture.fireCompletionActions(AbstractAsyncFuture.java:195)
> at com.ibm.io.async.AsyncFuture.completed(AsyncFuture.java:136)
> at com.ibm.io.async.ResultHandler.complete(ResultHandler.java:194)
> at com.ibm.io.async.ResultHandler.runEventProcessingLoop(ResultHandler.java:741)
> at com.ibm.io.async.ResultHandler$2.run(ResultHandler.java:863)
> at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:1510)
> ---- Begin backtrace for Nested Throwables
> javax.faces.el.EvaluationException: Exception while invoking expression #{scheduleMgrBean.init}
> at org.apache.myfaces.el.MethodBindingImpl.invoke(MethodBindingImpl.java:156)
> at javax.faces.component.UICommand.broadcast(UICommand.java:89)
> at javax.faces.component.UIViewRoot._broadcastForPhase(UIViewRoot.java:97)
> at javax.faces.component.UIViewRoot.processApplication(UIViewRoot.java:171)
> at org.apache.myfaces.lifecycle.InvokeApplicationExecutor.execute(InvokeApplicationExecutor.java:32)
> at org.apache.myfaces.lifecycle.LifecycleImpl.executePhase(LifecycleImpl.java:95)
> at org.apache.myfaces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:70)
> at javax.faces.webapp.FacesServlet.service(FacesServlet.java:139)
> at com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.java:966)
> at com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:478)
> at com.ibm.ws.wswebcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:463)
> at com.ibm.ws.webcontainer.servlet.CacheServletWrapper.handleRequest(CacheServletWrapper.java:92)
> at com.ibm.ws.webcontainer.WebContainer.handleRequest(WebContainer.java:744)
> at com.ibm.ws.wswebcontainer.WebContainer.handleRequest(WebContainer.java:1433)
> at com.ibm.ws.webcontainer.channel.WCChannelLink.ready(WCChannelLink.java:93)
> at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleDiscrimination(HttpInboundLink.java:465)
> at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleNewInformation(HttpInboundLink.java:394)
> at com.ibm.ws.http.channel.inbound.impl.HttpICLReadCallback.complete(HttpICLReadCallback.java:102)
> at com.ibm.ws.tcp.channel.impl.AioReadCompletionListener.futureCompleted(AioReadCompletionListener.java:152)
> at com.ibm.io.async.AbstractAsyncFuture.invokeCallback(AbstractAsyncFuture.java:213)
> at com.ibm.io.async.AbstractAsyncFuture.fireCompletionActions(AbstractAsyncFuture.java:195)
> at com.ibm.io.async.AsyncFuture.completed(AsyncFuture.java:136)
> at com.ibm.io.async.ResultHandler.complete(ResultHandler.java:194)
> at com.ibm.io.async.ResultHandler.runEventProcessingLoop(ResultHandler.java:741)
> at com.ibm.io.async.ResultHandler$2.run(ResultHandler.java:863)
> at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:1510)
> Caused by: java.lang.NoClassDefFoundError: javax.jcr.RepositoryException
> at java.lang.J9VMInternals.verifyImpl(Native Method)
> at java.lang.J9VMInternals.verify(J9VMInternals.java:59)
> at java.lang.J9VMInternals.initialize(J9VMInternals.java:120)
> at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
> at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:67)
> at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
> at java.lang.reflect.Constructor.newInstance(Constructor.java:521)
> at org.hibernate.engine.UnsavedValueFactory.instantiate(UnsavedValueFactory.java:22)
> at org.hibernate.engine.UnsavedValueFactory.getUnsavedIdentifierValue(UnsavedValueFactory.java:44)
> at org.hibernate.tuple.PropertyFactory.buildIdentifierProperty(PropertyFactory.java:44)
> at org.hibernate.tuple.entity.EntityMetamodel.<init>(EntityMetamodel.java:118)
> at org.hibernate.persister.entity.AbstractEntityPersister.<init>(AbstractEntityPersister.java:425)
> at org.hibernate.persister.entity.SingleTableEntityPersister.<init>(SingleTableEntityPersister.java:109)
> at org.hibernate.persister.PersisterFactory.createClassPersister(PersisterFactory.java:55)
> at org.hibernate.impl.SessionFactoryImpl.<init>(SessionFactoryImpl.java:226)
> at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1291)
> at org.jbpm.persistence.db.DbPersistenceServiceFactory.getSessionFactory(DbPersistenceServiceFactory.java:91)
> at org.jbpm.persistence.db.DbPersistenceService.getSessionFactory(DbPersistenceService.java:95)
> at org.jbpm.persistence.db.DbPersistenceService.getSession(DbPersistenceService.java:99)
> at org.jbpm.persistence.db.DbPersistenceService.getGraphSession(DbPersistenceService.java:345)
> at org.jbpm.JbpmContext.getGraphSession(JbpmContext.java:571)
> at org.jbpm.JbpmContext.deployProcessDefinition(JbpmContext.java:173)
> at ca.gc.hc.sc.cpirs.ScheduleMgr.execute(ScheduleMgr.java:35)
> at ca.gc.hc.sc.cpirs.ScheduleMgr.init(ScheduleMgr.java:18)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:64)
> at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> at java.lang.reflect.Method.invoke(Method.java:615)
> at org.apache.myfaces.el.MethodBindingImpl.invoke(MethodBindingImpl.java:132)
> ... 25 more
>
> [12/07/10 16:01:16:156 EDT] 00000026 WebApp E [Servlet Error]-[Faces Servlet]: javax.faces.el.EvaluationException: Exception while invoking expression #{scheduleMgrBean.init}
> at org.apache.myfaces.el.MethodBindingImpl.invoke(MethodBindingImpl.java:156)
> at javax.faces.component.UICommand.broadcast(UICommand.java:89)
> at javax.faces.component.UIViewRoot._broadcastForPhase(UIViewRoot.java:97)
> at javax.faces.component.UIViewRoot.processApplication(UIViewRoot.java:171)
> at org.apache.myfaces.lifecycle.InvokeApplicationExecutor.execute(InvokeApplicationExecutor.java:32)
> at org.apache.myfaces.lifecycle.LifecycleImpl.executePhase(LifecycleImpl.java:95)
> at org.apache.myfaces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:70)
> at javax.faces.webapp.FacesServlet.service(FacesServlet.java:139)
> at com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.java:966)
> at com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:478)
> at com.ibm.ws.wswebcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:463)
> at com.ibm.ws.webcontainer.servlet.CacheServletWrapper.handleRequest(CacheServletWrapper.java:92)
> at com.ibm.ws.webcontainer.WebContainer.handleRequest(WebContainer.java:744)
> at com.ibm.ws.wswebcontainer.WebContainer.handleRequest(WebContainer.java:1433)
> at com.ibm.ws.webcontainer.channel.WCChannelLink.ready(WCChannelLink.java:93)
> at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleDiscrimination(HttpInboundLink.java:465)
> at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleNewInformation(HttpInboundLink.java:394)
> at com.ibm.ws.http.channel.inbound.impl.HttpICLReadCallback.complete(HttpICLReadCallback.java:102)
> at com.ibm.ws.tcp.channel.impl.AioReadCompletionListener.futureCompleted(AioReadCompletionListener.java:152)
> at com.ibm.io.async.AbstractAsyncFuture.invokeCallback(AbstractAsyncFuture.java:213)
> at com.ibm.io.async.AbstractAsyncFuture.fireCompletionActions(AbstractAsyncFuture.java:195)
> at com.ibm.io.async.AsyncFuture.completed(AsyncFuture.java:136)
> at com.ibm.io.async.ResultHandler.complete(ResultHandler.java:194)
> at com.ibm.io.async.ResultHandler.runEventProcessingLoop(ResultHandler.java:741)
> at com.ibm.io.async.ResultHandler$2.run(ResultHandler.java:863)
> at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:1510)
> Caused by: java.lang.NoClassDefFoundError: javax.jcr.RepositoryException
> at java.lang.J9VMInternals.verifyImpl(Native Method)
> at java.lang.J9VMInternals.verify(J9VMInternals.java:59)
> at java.lang.J9VMInternals.initialize(J9VMInternals.java:120)
> at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
> at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:67)
> at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
> at java.lang.reflect.Constructor.newInstance(Constructor.java:521)
> at org.hibernate.engine.UnsavedValueFactory.instantiate(UnsavedValueFactory.java:22)
> at org.hibernate.engine.UnsavedValueFactory.getUnsavedIdentifierValue(UnsavedValueFactory.java:44)
> at org.hibernate.tuple.PropertyFactory.buildIdentifierProperty(PropertyFactory.java:44)
> at org.hibernate.tuple.entity.EntityMetamodel.<init>(EntityMetamodel.java:118)
> at org.hibernate.persister.entity.AbstractEntityPersister.<init>(AbstractEntityPersister.java:425)
> at org.hibernate.persister.entity.SingleTableEntityPersister.<init>(SingleTableEntityPersister.java:109)
> at org.hibernate.persister.PersisterFactory.createClassPersister(PersisterFactory.java:55)
> at org.hibernate.impl.SessionFactoryImpl.<init>(SessionFactoryImpl.java:226)
> at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1291)
> at org.jbpm.persistence.db.DbPersistenceServiceFactory.getSessionFactory(DbPersistenceServiceFactory.java:91)
> at org.jbpm.persistence.db.DbPersistenceService.getSessionFactory(DbPersistenceService.java:95)
> at org.jbpm.persistence.db.DbPersistenceService.getSession(DbPersistenceService.java:99)
> at org.jbpm.persistence.db.DbPersistenceService.getGraphSession(DbPersistenceService.java:345)
> at org.jbpm.JbpmContext.getGraphSession(JbpmContext.java:571)
> at org.jbpm.JbpmContext.deployProcessDefinition(JbpmContext.java:173)
> at ca.gc.hc.sc.cpirs.ScheduleMgr.execute(ScheduleMgr.java:35)
> at ca.gc.hc.sc.cpirs.ScheduleMgr.init(ScheduleMgr.java:18)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:64)
> at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> at java.lang.reflect.Method.invoke(Method.java:615)
> at org.apache.myfaces.el.MethodBindingImpl.invoke(MethodBindingImpl.java:132)
> ... 25 more
*Any assistance is appreciated. Am I missing any servlets or classes?*
my servlets are as follows
<!-- Faces Servlet -->
<servlet>
<servlet-name>Faces Servlet</servlet-name>
<servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
<load-on-startup>1</load-on-startup>
</servlet>
<!-- Servlet Mappings -->
<servlet-mapping>
<servlet-name>Faces Servlet</servlet-name>
<url-pattern>/faces/*</url-pattern>
</servlet-mapping>
<servlet-mapping>
<servlet-name>Faces Servlet</servlet-name>
<url-pattern>*.faces</url-pattern>
</servlet-mapping>
<servlet>
<servlet-name>GDP Deployer Servlet</servlet-name>
<servlet-class>org.jbpm.web.ProcessUploadServlet</servlet-class>
<load-on-startup>-1</load-on-startup>
</servlet>
<servlet-mapping>
<servlet-name>GDP Deployer Servlet</servlet-name>
<url-pattern>/upload/*</url-pattern>
</servlet-mapping>
I am simply using JSF and JBPM only. I moved all my hibernate.cfg and jbpm.confg and processdefinition.xml files into my class path. I also included the jbpm library and jbpm.jpdl and jbpm-identity jar files in my lib folder. *Am I missing anything else?*
thanks
--------------------------------------------------------------
Reply to this message by going to Community
[http://community.jboss.org/message/552214#552214]
Start a new discussion in jBPM at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&cont...]
13 years, 12 months
[JBoss Messaging] - equivalent of Websphere's Asynchronous remote queues
by Dean Hiller
Dean Hiller [http://community.jboss.org/people/deanhiller2001] created the discussion
"equivalent of Websphere's Asynchronous remote queues"
To view the discussion, visit: http://community.jboss.org/message/552197#552197
--------------------------------------------------------------
Websphere had this in their docs..
"+Asynchronous+ remote queues are queues used to send messages to remote queues and can store messages pending transmission. They cannot remotely retrieve messages. If the network connection is established, messages are sent to the owning queue manager and queue. However, if the network is not connected, messages are stored locally until there is a network connection and then the messages are transmitted. This allows applications to operate on the queue when the device is offline. As a result, these queues temporarily store messages at the sending queue manager while awaiting transmission."
I am looking for the same EXACT thing in JBoss. We have 4 jboss clusters(8 nodes total) and we want to send a message from one of 3 clusters to the single receiving cluster and once sendMsg returns, we want it so it is delivered regardless of if the receiving cluster is down or not. Is this possible? I am still trying to go down this path to find out if it can be done(and how to do it if it can be done), but at least an answer of can it be done or not would be fabulous.
thanks,
Dean
--------------------------------------------------------------
Reply to this message by going to Community
[http://community.jboss.org/message/552197#552197]
Start a new discussion in JBoss Messaging at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&cont...]
13 years, 12 months