[Design of Messaging on JBoss (Messaging/JBoss)] - Re: Bounding the number of threads created by the MDB contai
by ovidiu.feodorov@jboss.com
I've checked in a tentative implementation on https://svn.jboss.org/repos/messaging/branches/Branch_Experimental_JBMESS...
The essence of change is that I introduces a new type, SerialExecutor, whose contract guarantees tasks execution in the order in which they were submitted, regardless of how many threads execute those threads in background. The new type comes with several implementations: QueuedSerialExecutor which is essentially your QueueExecutor, a new PooledSerialExecutor, whose instances can share a common pool of threads and some other stubs (DirectSerialExecutor, etc.). Plus a whole bunch of tests.
Everything that previously was a concrete QueuedExecutor now is a generic SerialExecutor, whose implementation is interchangeable, depending on configuration. Your NamedThreadQueueExecutor is now a SerialExecutor too, so it can be used as a possible implementation.
I tried to run the tests (ant clean; ant jar; cd tests; ant) and they hang, so I don't have a "before" snapshot:
[junit] TEST org.jboss.test.messaging.jms.selector.SelectorTest(Remote-bisocket) FAILED
... and it gets stuck here.
Things still that need to be done:
- Currently, the shared PooledExecutor is hardcoded into ServerPeer. I need to add a configuration interface that specifies at least the maximum number of threads.
- I only modified the server-side session endpoints to use it. I see no reason not to share the thread pools with the client-side delegates, if they live in the same VM.
- If you decide to merge this branch into the stable on and go with this extension in production, I need to really stress the implementation of PooledSerialExecutor to make sure it will hold in production.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4157572#4157572
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4157572
16 years, 3 months
[Design of Messaging on JBoss (Messaging/JBoss)] - WARN [SimpleConnectionManager] A problem has been detected
by guportus
I have encounter this problem anyone can how we can solve this? or anyone can explain how this happen?
Thanks in advance!
WARN [SimpleConnectionManager] A problem has been detected with th
e connection to remote client a6rg50-hb8djj-fhcmw1vj-1-fhcmxfu7-8. It is possibl
e the client has exited without closing its connection(s) or there is a network
problem. All connection resources corresponding to that client process will now
be removed.
09:00:40,085 WARN [BisocketClientInvoker] Unable to send ping: shutting down ngTimerTask
java.net.SocketException: Broken pipe
at java.net.SocketOutputStream.socketWrite0(Native Method)
at java.net.SocketOutputStream.socketWrite(SocketOutputStream.java:92)
at java.net.SocketOutputStream.write(SocketOutputStream.java:115)
at org.jboss.remoting.transport.bisocket.BisocketClientInvoker$PingTim Task.run(BisocketClientInvoker.java:497)
at java.util.TimerThread.mainLoop(Timer.java:512)
at java.util.TimerThread.run(Timer.java:462)
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4157564#4157564
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4157564
16 years, 3 months
[Design of JBoss ESB] - Initial code for publishing web service as web service
by jim.ma
Hi all ,
I wrote the initial code for publishing esb service as web service and committed into my branch(https://svn.labs.jboss.org/labs/jbossesb/workspace/jimma/) for your review. There is also a sample named helloworld_pub_service in quickstarts directory for it .
When execute "ant deploy" under quickstarts/helloworld_pub_service , jboss will spit up these deployment message :
17:43:33,000 INFO [JBoss4ESBDeployer] create esb service, Quickstart_helloworld_pub_service.esb
|
| 17:43:33,035 INFO [QueueService] Queue[/queue/quickstart_helloworld_Request_esb] started, fullSize=200000, pageSize=2000, downCacheSize=2000
|
| 17:43:33,041 INFO [QueueService] Queue[/queue/quickstart_helloworld_Request_gw] started, fullSize=200000, pageSize=2000, downCacheSize=2000
|
| 17:43:33,362 INFO [JDBCDataStore] Generated token 'authToken:DB3B49D0-379A-11DD-BD9B-D7235840313A' for user: 'jbossesb/JBoss ESB User'
|
| 17:43:33,383 INFO [JDBCDataStore] Generated token 'authToken:DB3E5710-379A-11DD-BD9B-9B9F5C506F1D' for user: 'jbossesb/JBoss ESB User'
|
| 17:43:33,477 INFO [QuartzScheduler] Scheduler DefaultQuartzScheduler_$_NON_CLUSTERED started.
|
| 17:43:38,606 INFO [DefaultEndpointRegistry] register: jboss.ws:context=firstserviceesb-simplelistener,endpoint=SimpleListener
|
| 17:43:38,625 INFO [TomcatDeployer] deploy, ctxPath=/firstserviceesb-simplelistener, warUrl=.../tmp/deploy/tmp33655firstserviceesb-simplelistener-exp.war/
|
| 17:43:39,206 INFO [WSDLFilePublisher] WSDL published to: file:/project/jbossesb/workspace/jimma/product/build/jbossesb-server-4.3.GA/server/default/data/wsdl/firstserviceesb-simplelistener.war/firstserviceesb_simplelistener.wsdl
|
when run "ant runtest" , the SOAP message will be passed into ESB service and be printed by SystemPrintln action :
17:46:39,815 INFO [STDOUT] &&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&
|
| 17:46:39,815 INFO [STDOUT] Body: org.jboss.ws.core.soap.SOAPBodyImpl@1b50891[[soapenv:Body: null]]
|
| 17:46:39,815 INFO [STDOUT] &&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&
|
| context: [ ]
|
| body: [ objects: {org.jboss.soa.esb.message.defaultEntry=org.jboss.ws.core.soap.SOAPBodyImpl@1b50891[[soapenv:Body: null]]} ]
|
| fault: [ ]
|
| attachments: [ Named:{}, Unnamed:[] ]
|
| properties: [ {org.jboss.soa.esb.message.time.dod=Wed Jun 11 17:46:39 CST 2008, org.jboss.soa.esb.message.time.dob=Deferred serialized value: 1b6847a, org.jboss.soa.esb.message.source=Deferred serialized value: 1b36a91, org.jboss.soa.esb.message.transport.type=Deferred serialized value: 196d07, javax.jms.message.redelivered=false} ] ]
When this sample is deployed , the ESB server will firstly generate wsdl , jaxws dispatch provider class and web.xml used to deploy it as a web service , then packaged the generated artifacts into a war file and deploy it as a web service in ESB server .
This is the generated jaxws dispatch provider class :
package org.jboss.soa;
| @javax.xml.ws.WebServiceProvider(wsdlLocation="/WEB-INF/wsdl/firstserviceesb_simplelistener.wsdl", serviceName="SimpleListener Service", portName="SimpleListener Port", targetNamespace="http://soa.jboss.org/FirstServiceESB")
| @javax.xml.ws.ServiceMode(value = javax.xml.ws.Service.Mode.MESSAGE)
| public class SimpleListener implements javax.xml.ws.Provider {
| public Object invoke(Object obj) {
| javax.xml.soap.SOAPMessage request = (javax.xml.soap.SOAPMessage)obj;
| try {
| org.jboss.soa.esb.client.ServiceInvoker serviceInvoker = new org.jboss.soa.esb.client.ServiceInvoker("FirstServiceESB", "SimpleListener");
| org.jboss.soa.esb.message.Message msg = org.jboss.soa.esb.message.format.MessageFactory.getInstance().getMessage();
| msg.getBody().add(request.getSOAPBody().toString());
| org.jboss.soa.esb.message.Message resMsg = serviceInvoker.deliverSync(msg, (long)20000);
| } catch (Exception e) {
| e.printStackTrace();
| }
| return request;
| }
| }
So far the dispatch provider simply pass the soap message into the esb service using ServiceInvoker and return this soap request as response. I will polish it later . and also make it support two way message and fault message . These are my initial codes and thoughts for publishing esb service as web service. Your thoughts and comments for it would be appreciated.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4157561#4157561
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4157561
16 years, 3 months