[JBoss jBPM] - How to stop the SchedulerThread
by john.rojas
I have been running a java based process that uses the ScheduLerThread to execute timers.
new SchedulerThread().start()
When the process completed, the SchedulerThread would continue running indefinitely, until I read a couple of posts and came up with this solution.
I think it gets around an existing issue that prevents the SchedulerThread from being stopped by the outside application.
CODE TO START THE SchedulerThread:
| StoppableSchedulerThread schedulerThread = new StoppableSchedulerThread();
| schedulerThread.start();
|
CODE TO STOP THE SchedulerThread:
| // Stop the scheduler thread
| // the SchedulerThread will stop after a few seconds
| schedulerThread.stopRunning();
|
CODE FOR StoppableSchedulerThread.java:
| package org.jbpm.scheduler.impl;
|
| public class StoppableSchedulerThread extends SchedulerThread
| {
| public void stopRunning()
| {
| super.keepRunning = false;
| }
| }
|
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3978679#3978679
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3978679
19 years, 8 months
[Messaging, JMS & JBossMQ] - Re: Message Driven Beans reading messages before Application
by hannwei
"genman" wrote :
| You can add to your MDB so they don't start too soon. Check out the DTD.
Thanks. Found the DeliveryActive tag in jboss_4_0.dtd.
I added it with the value "false" to server/default/conf/standardjboss.xml:
| <invoker-proxy-binding>
| <name>message-driven-bean</name>
| <invoker-mbean>default</invoker-mbean>
| <proxy-factory>org.jboss.ejb.plugins.jms.JMSContainerInvoker</proxy-factory>
| <proxy-factory-config>
| <JMSProviderAdapterJNDI>DefaultJMSProvider</JMSProviderAdapterJNDI>
| <ServerSessionPoolFactoryJNDI>StdJMSPool</ServerSessionPoolFactoryJNDI>
| <CreateJBossMQDestination>true</CreateJBossMQDestination>
| <!-- WARN: Don't set this to zero until a bug in the pooled executor is fixed -->
| <MinimumSize>1</MinimumSize>
| <MaximumSize>15</MaximumSize>
| <KeepAliveMillis>30000</KeepAliveMillis>
| <MaxMessages>1</MaxMessages>
| <MDBConfig>
| <ReconnectIntervalSec>10</ReconnectIntervalSec>
| <DeliveryActive>false</DeliveryActive>
| <DLQConfig>
| <DestinationQueue>queue/DLQ</DestinationQueue>
| <MaxTimesRedelivered>10</MaxTimesRedelivered>
| <TimeToLive>0</TimeToLive>
| </DLQConfig>
| </MDBConfig>
| </proxy-factory-config>
| </invoker-proxy-binding>
|
| <invoker-proxy-binding>
| <name>singleton-message-driven-bean</name>
| <invoker-mbean>default</invoker-mbean>
| <proxy-factory>org.jboss.ejb.plugins.jms.JMSContainerInvoker</proxy-factory>
| <proxy-factory-config>
| <JMSProviderAdapterJNDI>DefaultJMSProvider</JMSProviderAdapterJNDI>
| <ServerSessionPoolFactoryJNDI>StdJMSPool</ServerSessionPoolFactoryJNDI>
| <CreateJBossMQDestination>true</CreateJBossMQDestination>
| <!-- WARN: Don't set this to zero until a bug in the pooled executor is fixed -->
| <MinimumSize>1</MinimumSize>
| <MaximumSize>1</MaximumSize>
| <KeepAliveMillis>30000</KeepAliveMillis>
| <MaxMessages>1</MaxMessages>
| <MDBConfig>
| <ReconnectIntervalSec>10</ReconnectIntervalSec>
| <DeliveryActive>false</DeliveryActive>
| <DLQConfig>
| <DestinationQueue>queue/DLQ</DestinationQueue>
| <MaxTimesRedelivered>10</MaxTimesRedelivered>
| <TimeToLive>0</TimeToLive>
| </DLQConfig>
| </MDBConfig>
| </proxy-factory-config>
| </invoker-proxy-binding>
|
However, after a restart of JBoss, when I looked at the JMX console through a browser, the StateString of MDBs is still "Started". The State value shown by the console is 3. I thought the "Started" value should appear only after I have pressed the Start() button on the browser.
They are ejb3 MDBs. Did I configure the DeliveryActive value at the right place?
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3978676#3978676
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3978676
19 years, 8 months
[JBossWS] - Problem using a .NET client with JBOSSWS 1.0.3
by king_country2000
We have exposed a web service in JBOSS AS 4.0.4 GA using DOC/LITERAL/WRAPPED.
We have a .NET client that accesses this web service. In JBOSSWS
1.0-GA this worked fine. We then upgraded to JBOSSWS 1.0.3-GA and now
the same setup produces error messages:
anonymous wrote :
|
| Caused by: org.jboss.ws.jaxb.UnmarshalException: Failed to parse source: The prefix "xsi" for attribute "xsi:nil" associated with an element type "userId" is not bound. @ *unknown*[1,579]
|
| at org.jboss.ws.jaxb.JBossXBUnmarshallerImpl.unmarshal(JBossXBUnmarshallerImpl.java:67)
|
| at org.jboss.ws.jaxrpc.encoding.JAXBDeserializer.deserialize(JAXBDeserializer.java:92)
|
| ... 30 more
|
| Caused by: org.jboss.xb.binding.JBossXBException: Failed to parse source: The prefix "xsi" for attribute "xsi:nil" associated with an element type "userId" is not bound. @ *unknown*[1,579]
|
| at org.jboss.xb.binding.parser.sax.SaxJBossXBParser.parse(SaxJBossXBParser.java:156)
|
| at org.jboss.xb.binding.UnmarshallerImpl.unmarshal(UnmarshallerImpl.java:126)
|
| at org.jboss.ws.jaxb.JBossXBUnmarshallerImpl.unmarshal(JBossXBUnmarshallerImpl.java:63)
|
| ... 31 more
|
| Caused by: org.xml.sax.SAXException: The prefix "xsi" for attribute "xsi:nil" associated with an element type "userId" is not bound. @ *unknown*[1,579]
|
| at org.jboss.xb.binding.parser.sax.SaxJBossXBParser$MetaDataErrorHandler.fatalError(SaxJBossXBParser.java:332)
|
| at org.apache.xerces.util.ErrorHandlerWrapper.fatalError(Unknown Source)
|
| at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown Source)
|
| at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown Source)
|
| at org.apache.xerces.impl.XMLNSDocumentScannerImpl.scanStartElement(Unknown Source)
|
| at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown Source)
|
| at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source)
|
| at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
|
|
|
It looks like the XML Schema Instance namespace is not being provided
to the deserializer.
Is this a bug. If so could it be fixed in the next release.
Thanks.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3978673#3978673
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3978673
19 years, 8 months