[jBPM Users] - Re: nested forks
by makam
I attach a test case for the situation described above.
Greetings and thanks for the support so far.
Sebatian
| package org.jbpm.examples.task.swimlane;
|
| import java.util.List;
|
| import org.jbpm.api.task.Task;
| import org.jbpm.test.JbpmTestCase;
|
| /**
| * @author Tom Baeyens
| */
| public class TaskSwimlaneTest extends JbpmTestCase {
|
| String deploymentId;
|
| protected void setUp() throws Exception {
| super.setUp();
|
| deploymentId = repositoryService.createDeployment()
| .addResourceFromClasspath("org/jbpm/examples/task/swimlane/process.jpdl.xml")
| .deploy();
|
| }
|
| protected void tearDown() throws Exception {
| // delete process deployment
| repositoryService.deleteDeploymentCascade(deploymentId);
|
| super.tearDown();
| }
|
| public void testTaskSwimlane() {
| executionService.startProcessInstanceByKey("TaskSwimlane");
|
| List<Task> taskList = taskService.createTaskQuery().list();
| assertEquals(3, taskService.createTaskQuery().list().size());
| assertEquals("Expected only 3 task in task list", 3, taskList.size());
| }
| }
|
|
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4266159#4266159
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4266159
16 years, 5 months
[JBoss Messaging Users] - Clustered JMS not respecting FLUSH timeout setting
by parressh
Hi, I'm not sure if this or the JGroups forum is the right place to post this message, but I'll start here. Our jgroups channel for JMS (jbm-control) is configured to have a FLUSH timeout of 20000ms (which is the JBoss 5.1.0.GA default). One of our nodes is having issues connecting to the JMS cluster and on the coordinator node, I see messages that the flush is timing out after 2000msec. Why is it timing out after 2 seconds instead of 20 seconds?
Coordinator:
| <pbcast.FLUSH timeout="20000"/>
|
| 2009-11-17 11:06:40,415 DEBUG [org.jgroups.protocols.pbcast.FLUSH] At 10.29.22.11:46312 timed out waiting for flush responses after 2000 msec. Rejecting flush to participants [10.29.22.11:46312, 10.29.22.13:44210, 10.29.22.12:57461, 10.29.22.15:56032, 10.29.22.17:54387, 10.29.22.16:56138]
|
Joiner:
| <pbcast.GMS print_local_addr="true" join_timeout="8000"
| shun="true"
| view_bundling="true"/>
|
| 2009-11-17 10:31:49,534 WARN [org.jgroups.protocols.pbcast.GMS] join(10.29.22.14:54328) sent to 10.29.22.11:46312 timed out (after 8000 ms), retrying
|
Thanks,
Matt
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4266156#4266156
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4266156
16 years, 5 months
[EJB 3.0 Users] - Re: How to load external parameters in ejb?
by mnenchev
Hi, here is the whole stateles bean class:
|
| @Stateless
| public class QueueSenderBean implements ISenderLocal {
|
| private static final Logger log = Logger.getLogger(QueueSenderBean.class);
|
| @TransactionAttribute(TransactionAttributeType.NOT_SUPPORTED)
| public void send(final Serializable obj, String queueName, String cf) {
| sendToQueue(obj, queueName, cf);
| }
|
| @TransactionAttribute(TransactionAttributeType.NOT_SUPPORTED)
| private void sendToQueue(Serializable obj, String queueName, String cf) {
| Connection queueConnection = null;
| Session queueSession = null;
| Queue queue = null;
| MessageProducer sender = null;
| try {
| final Context initCtx = new InitialContext();
| final ConnectionFactory qFactory = (ConnectionFactory) initCtx.lookup(cf);
| queueConnection = qFactory.createConnection();
| queueSession = queueConnection.createSession(false, Session.AUTO_ACKNOWLEDGE);
| queue = (Queue) initCtx.lookup(queueName);
| sender = queueSession.createProducer(queue);
| log.debug("Sending message to " + queue);
| final Message msg = queueSession.createTextMessage((String) obj);
| sender.send(msg);
| } catch (final javax.jms.JMSException e) {
| log.error("send() -> JMS Error: ", e);
| } catch (final NamingException e) {
| log.error("sendToQueue() -> JNI Error: ", e);
| } catch (final Exception e) {
| log.error("sendToQueue() -> Error: ", e);
| } finally {
| try {
| if (queueConnection != null) {
| queueConnection.close();
| }
| if (queueSession != null) {
| queueSession.close();
| }
| queue = null;
| if (sender != null) {
| sender.close();
| }
| } catch (final Exception e) {
| log.error("sendToQueue() -> Error while closing resources: ", e);
| }
| }
| }
|
| }
|
I use TransactionAttributeType.NOT_SUPPORTED because i send messages to websphere in CLIENT transportType, which throws exceptions if this is done in transaction scope, so i added this attribute.
Regards.
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4266153#4266153
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4266153
16 years, 5 months
[JBoss Web Services Users] - Re: custom fault mapping with jax-rpcâÂÂ
by newmanw10
I did finally figure out what my problem was.
Are you using wscompile to generate your jax-rpc mapping file?
If so that is your problem! I am not sure if wscompile is generating the xml incorrectly or if jboss does not parse wscompile's generated mapping file correctly.
The solution is to use wstools (which is a jboss tool). You can find some information on wstools on the web but you will have to look as jboss and the community do not support it anymore. Which also means that if you try and look for the documentation for wstools on jboss.org you will not find it. Which is stupid because they still deliver this tool with 4.2.3.GA which is used a ton in industry. So why not still have the wstools docs out there?
Enough ranting I guess. All I did was use wstools to generate my mapping file, I still used wscompile to generate all other artifacts. After that all was well I as able to deploy my service and catch a custom wsdl fault/exception on the client side. Looking at the two mapping files they are different I just don't know if this is a jboss bug or wscompile bug.
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4266151#4266151
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4266151
16 years, 5 months
[JBoss Microcontainer Users] - Struggling with jboss-classloading.xml
by ad-rocha
Hi all,
I've be struggling with jboss-classloading.xml for about one week and really don't know even if it is possible. There is my problem (JBoss 5.1):
1) I have a RAR that contains a lot of jars that must be exposed to other applications. Everything is working fine and after deploy I can access the classes, but my log configuration is not working (SLF4J)
2) To sove the problem, I need to invert RAR classloader, in order to use a specific SLF4J configurarion (because JBoss has its particular one that is loaded from lib/common). My jboss-classloading.xml is:
<classloading xmlns="urn:jboss:classloading:1.0"
| domain="IsolatedWithParentDomain"
| parent-domain="DefaultDomain"
| parent-first="false">
| </classloading>
|
Now I can't see that classes inside RAR anymore.
My question is: is there a way to invert classloader in RAR and continue seeing the classes?
I've tried a lot of jboss-classloading attributes combinations, but none seams to work (ParentDomain, DefaultDomain, etc).
Any ideas?
Thanks,
Andre
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4266144#4266144
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4266144
16 years, 5 months