[jBPM Users] - Incorrect Incoming Transition evaluation on Join Node
by pradeep.gulla
I'm Using JBPM4.1 with SQLServer 2000.
My process xml contains a FORK node for assigning 2 parallel tasks.
I've created on extra Task Node which is not part of Fork but contains outgoing transition to JOIN.
When I'm trying to complete the 2 created tasks, execution is not forwarding.
JOIN node waits for the completion of extra task (which is not created).
Process definition:
| <?xml version="1.0" encoding="UTF-8"?>
| <process name="join_test" version="1" xmlns="http://jbpm.org/4.0/jpdl">
| <start><transition to="Assign Parallel Tasks"/></start>
| <fork name="Assign Parallel Tasks">
| <transition to="Task 1"/><transition to="Task 2"/>
| </fork>
| <task assignee="#{approver1}" name="Task 1">
| <transition to="wait"/>
| </task>
| <task assignee="#{approver2}" name="Task 2">
| <transition g="-104,-54" to="wait"/>
| </task>
| <!-- This won't particpate in workflow but still comes in the list of incoming transitions -->
| <task assignee="#{approver3}" name="Task 3">
| <transition g="-104,-54" to="wait"/>
| </task>
|
| <join name="wait">
| <transition to="Final task"/>
| </join>
| <task assignee="#{approver4}" name="Final task">
| <transition to="Finish"/>
| </task>
| <end name="Finish" state="Completed"/>
| </process>
|
Test case:
| public void testOptionalParallelAssignment() {
| HashMap variables = new HashMap();
| variables.put("approver1", "approver1");
| variables.put("approver2", "approver2");
| variables.put("approver3", "approver3");
| variables.put("approver4", "approver4");
|
| executionService.startProcessInstanceByKey("join_test", variables);
|
| //First Task Approval
| List<Task> taskList = taskService.findPersonalTasks("approver1");
| taskService.completeTask(taskList.get(0).getId());
| //Second Task Approval
| taskList = taskService.findPersonalTasks("approver2");
| taskService.completeTask(taskList.get(0).getId());
| assertTrue("Atleast One Task should be Active", taskService.findPersonalTasks("approver4").size() == 1);
| assertTrue("Final Task should present", taskService.findPersonalTasks("approver4").get(0).getName().equals("Final task"));
| }
|
How to remove this unwanted transition ??
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4266864#4266864
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4266864
16 years, 5 months
[EJB 3.0 Users] - Re: Custom StrictMaxPool settings in ...-aop.xml ignored
by shreyasshinde
I am trying to use StrictMaxPool in JBoss 5.1.0.GA and the properties in the -aop.xml file seem to be ignored. This is for a stateless session bean.
The EJB3 container seems to honor only the properties in ejb3-interceptors-aop.xml. Any -aop.xml bundled with the EJB application seem to be ignored.
Any ideas what I could be missing?
Thanks,
Shreyas
jboss.xml:
| <?xml version="1.0" encoding="UTF-8" standalone="no"?>
| <jboss xmlns="http://www.jboss.com/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="5.0" xsi:schemaLocation="http://www.jboss.com/xml/ns/javaee http://www.jboss.org/j2ee/schema/jboss_5_0.xsd">
| <enterprise-beans>
| <session>
| <ejb-name>ClusterOne.USA_MAP.MapServer</ejb-name>
| <jndi-name>esri/services/ClusterOne/MapServer/USA_MAP</jndi-name>
| <clustered>true</clustered>
| <cluster-config>
| <partition-name>ClusterOne</partition-name>
| <load-balance-policy>org.jboss.ha.framework.interfaces.RoundRobin</load-balance-policy>
| </cluster-config>
| <aop-domain-name>Strictly Pooled Stateless Bean</aop-domain-name>
| </session>
| </enterprise-beans>
| </jboss>
|
mydomain-aop.xml:
<?xml version="1.0" encoding="UTF-8"?>
| <aop xmlns="urn:jboss:aop-beans:1.0">
|
| <domain name="Strictly Pooled Stateless Bean" extends="Stateless Bean" inheritBindings="true">
| <annotation expr="!class((a)org.jboss.ejb3.annotation.Pool)">
| @org.jboss.ejb3.annotation.Pool (value="StrictMaxPool", maxSize=10, timeout=10000)
| </annotation>
| </domain>
|
| <domain name="Strictly Pooled Message Driven Bean" extends="Message Driven Bean" inheritBindings="true">
| <annotation expr="class(*) AND !class((a)org.jboss.ejb3.annotation.Pool)">
| @org.jboss.ejb3.annotation.Pool (value="StrictMaxPool", maxSize=10, timeout=10000)
| </annotation>
| </domain>
| </aop>
|
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4266854#4266854
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4266854
16 years, 5 months
[JBoss Messaging Users] - Exception when trying to get ConnectionFactory
by sacauskis
I have this simple program to use JMS. When it runs:
TopicConnectionFactory tcf = (TopicConnectionFactory) context.lookup("ConnectionFactory");
I get an exception:
Exception in thread "main" java.lang.NoClassDefFoundError: javassist/NotFoundException
at org.jboss.jms.client.delegate.ClientConnectionFactoryDelegate.(ClientConnectionFactoryDelegate.java)
at sun.misc.Unsafe.ensureClassInitialized(Native Method)
at sun.reflect.UnsafeFieldAccessorFactory.newFieldAccessor(UnsafeFieldAccessorFactory.java:25)
at sun.reflect.ReflectionFactory.newFieldAccessor(ReflectionFactory.java:122)
at java.lang.reflect.Field.acquireFieldAccessor(Field.java:918)
at java.lang.reflect.Field.getFieldAccessor(Field.java:899)
at java.lang.reflect.Field.getLong(Field.java:528)
at java.io.ObjectStreamClass.getDeclaredSUID(ObjectStreamClass.java:1614)
at java.io.ObjectStreamClass.access$700(ObjectStreamClass.java:52)
at java.io.ObjectStreamClass$2.run(ObjectStreamClass.java:425)
at java.security.AccessController.doPrivileged(Native Method)
at java.io.ObjectStreamClass.(ObjectStreamClass.java:413)
at java.io.ObjectStreamClass.lookup(ObjectStreamClass.java:310)
at java.io.ObjectStreamClass.initNonProxy(ObjectStreamClass.java:547)
at java.io.ObjectInputStream.readNonProxyDesc(ObjectInputStream.java:1583)
at java.io.ObjectInputStream.readClassDesc(ObjectInputStream.java:1496)
at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1732)
at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1329)
at java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:1947)
at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1871)
at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1753)
at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1329)
at java.io.ObjectInputStream.readObject(ObjectInputStream.java:351)
at java.rmi.MarshalledObject.get(MarshalledObject.java:142)
at org.jnp.interfaces.MarshalledValuePair.get(MarshalledValuePair.java:72)
at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:710)
at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:627)
at javax.naming.InitialContext.lookup(InitialContext.java:392)
at com.gdit.listener.JMSExample.testMessage(JMSExample.java:35)
at com.gdit.listener.JMSExample.main(JMSExample.java:20)
Caused by: java.lang.ClassNotFoundException: javassist.NotFoundException
at java.net.URLClassLoader$1.run(URLClassLoader.java:200)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
at java.lang.ClassLoader.loadClass(ClassLoader.java:307)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
at java.lang.ClassLoader.loadClass(ClassLoader.java:252)
at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:320)
... 30 more
| package com.gdit.listener;
|
| import java.util.Properties;
|
| import javax.jms.Message;
| import javax.jms.MessageListener;
| import javax.jms.TextMessage;
| import javax.jms.Topic;
| import javax.jms.TopicConnection;
| import javax.jms.TopicConnectionFactory;
| import javax.jms.TopicPublisher;
| import javax.jms.TopicSession;
| import javax.jms.TopicSubscriber;
| import javax.naming.Context;
| import javax.naming.InitialContext;
|
| public class JMSExample implements MessageListener {
|
| public static void main(String argc[]) {
| new JMSExample().testMessage();
| }
|
| public void testMessage() {
| TopicConnection conn = null;
| TopicSession session = null;
| Topic topic = null;
| try {
| Properties props = new Properties();
| props.setProperty("java.naming.factory.initial",
| "org.jboss.naming.NamingContextFactory");
| props.setProperty("java.naming.factory.url.pkgs",
| "org.jboss.naming");
| props.setProperty("java.naming.provider.url", "jnp://localhost:1199");
| Context context = new InitialContext(props);
| TopicConnectionFactory tcf = (TopicConnectionFactory) context.lookup("ConnectionFactory");
| conn = tcf.createTopicConnection();
| topic = (Topic) context.lookup("topic/testTopic");
| session = conn.createTopicSession(false,
| TopicSession.AUTO_ACKNOWLEDGE);
| conn.start();
| TopicPublisher send = session.createPublisher(topic);
| TextMessage tm = session.createTextMessage("JavaBeat Test Message");
| send.publish(tm);
| send.close();
| TopicSubscriber topicSubscriber = session.createSubscriber(
| topic);
| topicSubscriber.setMessageListener(this);
| while (true) {
| Message message = topicSubscriber.receive(1);
| if (message != null) {
| if (message instanceof TextMessage) {
| TextMessage textMessage = (TextMessage) message;
| System.out.println(message);
| System.out.println(
| textMessage.getText());
| } else {
| break;
| }
| }
| }
|
| } catch (Exception e) {
| System.out.println(e.toString() + " Does the queue exist?");
| e.printStackTrace();
| }
| }
|
| public void onMessage(Message message) {
| try {
| TextMessage textMessage = (TextMessage) message;
| String text = textMessage.getText();
| System.out.println(text);
| } catch (Exception jmse) {
| jmse.printStackTrace();
| }
| }
| }
|
I'm running jboss4.2.3GA and F:\jboss-messaging-1.4.5.GA on windows XP.
Thanks for any help you can give.
Mike
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4266850#4266850
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4266850
16 years, 5 months
[EJB 3.0 Users] - Set JNDI location for EJB 3.0 Bean in jboss-4.2.1.GA
by mjremijan
I'm using jboss-4.2.1.GA with EJB 3.0 session beans. I have 2 local, stateless session beans annotated with @Local. I can successfully deploy an EAR with the session beans as long as I do not have any configuration files.
However, I want to use jboss.xml to specify where in JNDI the beans should be put/bound.
When I add /META-INF/ejb-jar.xml and /META-INF/jboss.xml I get a NullPointerException when I try to deploy.
My ejb-jar.xml is:
--------------------
<ejb-jar>
| <enterprise-beans>
| <session>
| <ejb-name>AlumniLocal</ejb-name>
| <local>org.ferris.oths.domain.alumni.AlumniLocal</local>
| <ejb-class>org.ferris.oths.domain.alumni.AlumniEjb</ejb-class>
| <session-type>Stateless</session-type>
| <transaction-type>Container</transaction-type>
| </session>
| <session>
| <ejb-name>AlumniPropertiesLocal</ejb-name>
| <local>org.ferris.oths.domain.properties.AlumniPropertiesLocal</local>
| <ejb-class>org.ferris.oths.domain.properties.AlumniPropertiesEjb</ejb-class>
| <session-type>Stateless</session-type>
| <transaction-type>Container</transaction-type>
| </session>
| </enterprise-beans>
| </ejb-jar>
My jboss.xml is:
------------------
<jboss>
| <enterprise-beans>
| <session>
| <ejb-name>AlumniLocal</ejb-name>
| <jndi-name>oths-domain/AlumniLocal</jndi-name>
| </session>
| <session>
| <ejb-name>AlumniPropertiesLocal</ejb-name>
| <jndi-name>oths-domain/AlumniPropertiesLocal</jndi-name>
| </session>
| </enterprise-beans>
| </jboss>
Since the beans deploy fine without the configuration files (using only ejb3 annotations) there has to be somethign wrong with these configuration files. What am I doing wrong here?? How can I get this configuration correct??
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4266842#4266842
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4266842
16 years, 5 months