[JBoss jBPM] - Scheduler and asynchronous flow in in web app
by jeklund
Hi everyone,
I'm trying to get asynchronous tasks and scheduling for things like
<reminder duedate="1 minute" repeat="30 seconds"/>
to work.
I'm deploying the application as a WAR using Seam and jbpm-jpdl-3.3.0.GA.jar. But I get complaints about the 'scheduler' service isn't started. And I don't think it is, since I have only declared
<jbpm-context>
| ...
| <service name="scheduler" factory="org.jbpm.scheduler.db.DbSchedulerServiceFactory" />
| ...
| </jbpm-configuration>
and not configured any org.jbpm.web.JbpmThreadsServlet in web.xml, since this wasn't included in the latest jbpm-3.3.0.GA release. (Instead it looks like it has been replaced with an EJB service, which isn't great for my WAR.)
Could anyone kick me in the right direction here..? Is this Servlet removed and some other method should be used instead?
Best Regards,
Johan
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4194388#4194388
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4194388
17 years, 7 months
[JBoss Messaging] - On durable subsciption in a synchronous mode.
by francesco_81
HI all,
I'm in trouble about two things using durable subscriber in synchronous mode.
First, is exactly once semantic and ordered garanted on receiver side?
Second, I experimented that a second durable late joiner on a topic does't receive any message while the first receive it. This also happen if I change the clientId on the connection for the second late joiner. Is there a manner to get this behavior?
Follow you can find the Sender and Receiver code that I use in my test
Best Regards,
Francesco Russo.
--------------------------- Sender ------------------------
|
|
| public class Sender {
|
| public static void main(String[] args) {
| Properties props;
| Context jndiContext;
| TopicConnectionFactory connectionFactory;
| TopicConnection connection;
| TopicSession session;
| Topic jmsTopic;
| TopicPublisher writer;
| TextMessage message;
|
| try {
| System.out.println("--- SENDER ---");
| props = new Properties();
| props.load(new FileInputStream("jndi.properties"));
| System.out.println("props: "+props);
| jndiContext = new InitialContext(props);
| connectionFactory = (TopicConnectionFactory)jndiContext.lookup("ConnectionFactory");
| connection = connectionFactory.createTopicConnection();
|
| connection.start();
|
| session = connection.createTopicSession(false, TopicSession.AUTO_ACKNOWLEDGE);
| System.out.println("session: "+ session);
| jmsTopic = (Topic) jndiContext.lookup("topic/example_francesco");
| System.out.println("topic: "+jmsTopic);
| writer = session.createPublisher(jmsTopic);
|
| //message = session.createTextMessage("Hello!");
| for (int i=0; i<5; i++){
| message = session.createTextMessage("Hello!"+i);
| System.out.println("[Sender] writing message: "+message.getText());
| writer.send(message);
| Thread.sleep(1000);
| }
|
| System.out.println("--- END SENDER ---");
| } catch (NamingException e) {
| e.printStackTrace();
| } catch (JMSException e) {
| e.printStackTrace();
| } catch (InterruptedException e) {
| e.printStackTrace();
| } catch (FileNotFoundException e) {
| e.printStackTrace();
| } catch (IOException e) {
| e.printStackTrace();
| }
| }
|
| }
|
------------------------ Receiver -----------------------------------
|
| public class Receiver {
|
| public static void main(String[] args) {
| Properties props;
| Context jndiContext;
| TopicConnectionFactory connectionFactory;
| TopicConnection connection;
| TopicSession session;
| Topic jmsTopic;
| TopicSubscriber reader;
| TextMessage message;
|
| try {
| System.out.println("--- READER ---");
|
| props = new Properties();
| props.load(new FileInputStream("jndi.properties"));
| jndiContext = new InitialContext(props);
| System.out.println("props: "+props);
| connectionFactory = (TopicConnectionFactory)jndiContext.lookup("ConnectionFactory");
| connection = connectionFactory.createTopicConnection();
| connection.setClientID("client_06");
|
| connection.start();
|
| session = connection.createTopicSession(false, TopicSession.AUTO_ACKNOWLEDGE);
| System.out.println("session: "+ session);
| jmsTopic = (Topic) jndiContext.lookup("topic/example_francesco");
| System.out.println("topic: "+jmsTopic);
| reader = session.createDurableSubscriber(jmsTopic,"client_06");
|
| System.out.println("[Reader] begin receiving");
| TextMessage msg;
|
| for (int i=0; i<100; i++){
| Thread.sleep(1000);
| msg = ((TextMessage)reader.receive(10));
| if (msg != null){
| System.out.println("[Receiver] received: " + msg.getText());
| }else System.out.println("[Receiver] received: " + msg);
| }
|
| System.out.println("--- END READER ---");
| } catch (NamingException e) {
| e.printStackTrace();
| } catch (JMSException e) {
| e.printStackTrace();
| } catch (FileNotFoundException e) {
| e.printStackTrace();
| } catch (IOException e) {
| e.printStackTrace();
| } catch (InterruptedException e) {
| e.printStackTrace();
| }
| }
| }
|
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4194383#4194383
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4194383
17 years, 7 months
[JBoss jBPM] - Re: jBPM/Spring/jUnit
by pojomonkey
"kukeltje" wrote : Assignment handlers do not work in the start task.
That is an interesting nugget of information - why would the start task not permit assignment? Guess I'll have to re-read the docs etc.
My question still stands though - why does it fail when I try to jUnit the code, but (apparently) doesn't fail when the same code is executed in the application?
"kukeltje" wrote : What does the logging tell you (maybe turn up the log level)I can't run the app up right now - in the middle of some changes going through. But I will check as soon as I can.
"kukeltje" wrote : And guys... better to make a unit test from the beginning that demonstrates the problem instead of separate code snippets...
I would have, but trying to extract a 'unit test' from hundreds lines of an application wasn't really practical.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4194372#4194372
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4194372
17 years, 7 months
[JBoss Tools (users)] - DataModelSelection doesnt work
by zkaya
Hi,
i am trying to select a row of a DataModel List. But get always the first Row.
could you halp me please?
a Part of my session Bean:
| @Stateful
| @Name("paxop")
| public class PaxOpBean implements paxOpI {
|
| FbMwOpDatevEinzelbuchung fbEinzelbuchung;
| FbMwOpDatevRechnung fbRechnung;
|
| @DataModel
| private List<Object[]> oposLst;
|
| @DataModelSelection(value="oposLst")
| @Out(required = false, value="datarow")
| private Object[] datarow;
|
my xhtml Page
|
| <ui:composition xmlns="http://www.w3.org/1999/xhtml"
| xmlns:s="http://jboss.com/products/seam/taglib"
| xmlns:ui="http://java.sun.com/jsf/facelets"
| xmlns:f="http://java.sun.com/jsf/core"
| xmlns:h="http://java.sun.com/jsf/html"
| xmlns:rich="http://richfaces.org/rich"
| xmlns:a="http://richfaces.org/a4j"
| template="layout/template.xhtml">
|
|
| <ui:define name="head">
| <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
| </ui:define>
|
| <rich:modalPanel id="panel" width="350" height="100">
| <f:facet name="header">
| <h:panelGroup>
| <h:outputText value="Details"></h:outputText>
| </h:panelGroup>
| </f:facet>
| <f:facet name="controls">
| <h:panelGroup>
| <h:graphicImage value="/images/modal/close.png"
| style="cursor:pointer" id="hidelink" />
| <rich:componentControl for="panel" attachTo="hidelink"
| operation="hide" event="onclick" />
| </h:panelGroup>
| </f:facet>
| <h:outputText
| value="This panel is called using Component Control Component"></h:outputText>
| <br />
| <h:outputText value="#{datarow[1]}"></h:outputText>
| </rich:modalPanel>
|
|
| <ui:define name="body">
|
| <h:messages globalOnly="true" styleClass="message" />
|
| <h:form>
|
| <rich:panel style=" width : 480px;">
|
|
| <s:decorate id="valueDecoration4" template="layout/edit.xhtml">
| <ui:define name="label">PaXSuiteMandant</ui:define>
| <h:selectOneMenu id="Mandant" value="#{paxop.value}">
|
| <f:selectItem itemLabel="PaX AG" itemValue="1000" />
| <f:selectItem itemLabel="PaX Fenster Hermeskeil GmbH"
| itemValue="2000" />
| <f:selectItem itemLabel="PaX Fenster Rositz GmbH" itemValue="3000" />
| <f:selectItem itemLabel="PaX Türen Rositz GmbH" itemValue="3500" />
| <f:selectItem itemLabel="PaX Classic GmbH" itemValue="4000" />
| <f:selectItem itemLabel="PaXoptima GmbH" itemValue="5000" />
| <f:selectItem itemLabel="alle" itemValue="0" />
|
| </h:selectOneMenu>
| </s:decorate>
|
| <s:decorate id="valueDecoration889" template="layout/edit.xhtml">
| <ui:define name="label">Konten</ui:define>
| <h:selectOneMenu id="Mandant" value="#{paxop.auswahlkonten}">
|
| <f:selectItem itemLabel="Zahlungseingang" itemValue="1" />
| <f:selectItem itemLabel="Umsatz" itemValue="2" />
| <f:selectItem itemLabel="Skonto" itemValue="3" />
|
| </h:selectOneMenu>
| </s:decorate>
|
| <s:decorate id="valueDecoration2" template="layout/edit.xhtml">
| <ui:define name="label">Anfangsdatum</ui:define>
| <rich:calendar id="adatum" value="#{paxop.adatum}" required="false"
| datePattern="dd.MM.yyyy" showInput="true" enableManualInput="true">
| <f:convertDateTime timeZone="GMT+1" />
| </rich:calendar>
|
| </s:decorate>
| <s:decorate id="valueDecoration3" template="layout/edit.xhtml">
| <ui:define name="label">Enddatum</ui:define>
| <rich:calendar id="edatum" value="#{paxop.edatum}" required="false"
| datePattern="dd.MM.yyyy" showInput="true" enableManualInput="true">
| <f:convertDateTime timeZone="GMT+1" />
| </rich:calendar>
|
| </s:decorate>
|
| <div style="clear: both" />
|
| </rich:panel>
|
|
|
|
|
|
|
| <div class="actionButtons"><h:commandButton id="auflisten"
| value="auflisten" action="#{paxop.auflisten}" /></div>
|
| <rich:spacer height="30" />
|
|
|
| <rich:modalPanel id="panel" width="350" height="100">
| <f:facet name="header">
| <h:panelGroup>
| <h:outputText value="Modal Panel"></h:outputText>
| </h:panelGroup>
| </f:facet>
| <f:facet name="controls">
| <h:panelGroup>
| <h:graphicImage value="img/close.png" style="cursor:pointer" id="hidelink"/>
| <rich:componentControl for="panel" attachTo="hidelink" operation="hide" event="onclick"/>
| </h:panelGroup>
| </f:facet>
| <h:outputText value="Rechnungsnummer: "></h:outputText>
| <br/>
| <h:outputText value="#{datarow[1]}"></h:outputText>
| </rich:modalPanel>
|
|
|
| <rich:dataTable value="#{oposLst}" var="sp" id="datarow"
| onRowMouseOver="this.style.backgroundColor='#F1F1F1'"
| onRowMouseOut="this.style.backgroundColor='#{a4jSkin.tableBackgroundColor}'"
| style=" width : 480px;" width="480px"
| rendered="#{oposLst.rowCount >= 0}">
| <f:facet name="header">
| <rich:columnGroup>
| <rich:column colspan="5">
| <h:outputText value="Kunden" />
| </rich:column>
| <rich:column breakBefore="true">
| <h:outputText value="KundenNr" />
| </rich:column>
| <rich:column>
| <h:outputText value="Kundenname" />
| </rich:column>
| <rich:column>
| <h:outputText value="RechnungsNr" />
| </rich:column>
| <rich:column>
| <h:outputText value="Datum" />
| </rich:column>
| <rich:column>
| <h:outputText value="Betrag" />
| </rich:column>
|
|
|
| </rich:columnGroup>
|
| </f:facet>
| <rich:column filterBy="#{sp[0]}" filterEvent="onkeyup">
| <h:outputText value="#{sp[0]}" />
| </rich:column>
| <rich:column filterBy="#{sp[5]}" filterEvent="onkeyup">
| <h:outputText value="#{sp[5]}" />
| </rich:column>
| <rich:column filterBy="#{sp[1]}" filterEvent="onkeyup">
|
| <h:outputLink value="#" id="link">
| <h:outputText value="#{sp[1]}" />
| <rich:componentControl for="panel" attachTo="link"
| operation="show" event="onclick" />
| </h:outputLink>
|
|
|
| </rich:column>
| <rich:column filterBy="#{sp[7]}" filterEvent="onkeyup">
| <h:outputText value="#{sp[7]}">
| <f:convertDateTime type="date" dateStyle="medium" timeZone="GMT+1" />
| </h:outputText>
| </rich:column>
| <rich:column filterBy="#{sp[6]}" filterEvent="onkeyup" align="right">
| <h:outputText value="#{sp[6]}">
| <f:convertNumber pattern="###,###.##" />
| </h:outputText>
| </rich:column>
|
|
|
| <f:facet name="footer">
| <rich:columnGroup>
| <rich:column></rich:column>
| <rich:column></rich:column>
| <rich:column></rich:column>
| <rich:column></rich:column>
|
|
| <rich:column>
| <h:outputText value="#{paxop.sumze}" align="right">
| <f:convertNumber pattern="###,###.##" />
| </h:outputText>
| </rich:column>
| </rich:columnGroup>
|
| </f:facet>
| </rich:dataTable>
|
| </h:form>
|
| </ui:define>
|
| </ui:composition>
|
|
thanks!
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4194371#4194371
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4194371
17 years, 7 months