[Design of JBoss ESB] - Re: ServiceInvoker / deliver in new transaction
by mark.little@jboss.com
Hi Bernd. We've had a few people (not many) ask about this in the past. Yes it could be supported, but the whole philosophy behind ESB is SOA which is about loose coupling. The synchronous request-response pattern that we are used to in other areas is not the default one that we would encourage. There are quite a few papers and articles on the Web about how and why one-way interactions are more appropriate. In that situation, a single global transaction does not work and something like JMS transacted sessions, or compensation transactions (e.g., WS-BA) is better. However, there are still some cases where a single transaction that encapsulates the sending of the request and all work done by that request (including possible any other onward calls the initial receiver may make) is needed. It's just not something that we support at the moment. But I'm sure it will come eventually (e.g., through the eventually support of WS-AT or JTS).
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4193013#4193013
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4193013
16 years, 1 month
[Design of JBoss ESB] - ServiceInvoker / deliver in new transaction
by camunda
Hi.
I have an issue with the ServiceInvoker: When you want to use deliverSync in a transactional context (let's say in a EJB3-SLSB) and you use JMS as provider, this will not work correctly.
Since the JMS message will be delivered in the transaction of the SLSB the ESB cannot start work before the transaction commits. But in deliverSync we wait for an answer (which cannot come).
If I need a deliverSync within transactional context, my only possibility is to use deliverAsync in an own transaction and then wait for an answer, like this:
| try {
| // if we get an exception in the next method this transaction is rolled back as well
| callDeliverSyncInOwnTransaction();
| // now the ServiceInvoker succeeded, so the service is called correctly
| Message m = waitForAnswer();
| // do something with answer
| }
| catch (TimeoutException ex) {
| // OK, now we need some clever code to handle this situation!
| // message sent but the answer timed out and will come sometime in future
| }
|
This behavior isn't really supported by the ServiceInvoker out of the box, or did I miss something? I would need to implement that callDeliverSyncInOwnTransaction myself (maybe I could use a SLSB method with @RequiresNew, or without using EJB I could suspend the transaction, create a new one, send and commit and resume the old one via the TransactionManager directly) and the waitForAnswer.
Would be cool if the ESB supports this pattern out of the box, or what do you think?
Since the deliverSync is quite powerfull, but more or less useless in JTA/JMS environment.
Cheers
Bernd
P.S: Sorry if this is the wrong forum, wasn't sure about using User or Developer Forum, please move it accordingly if you think it is wrong...
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4193008#4193008
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4193008
16 years, 1 month
[Design of JBoss Profiler] - Re: Web app fails to start - managed beans missing no-argume
by rhills
"jesper.pedersen" wrote : A quick follow-up -- look into the CombinedFrameInfo class in the client package which maybe what you are looking for.
|
| Or create a class hierarchy like ThreadInfoManagedBean -> ThreadInfo -> FrameInfo -- where the last two are from shared and be used in the web ui since they implements Serializable. ThreadInfoManagedBean is a managed bean with a non-arg constructor and defined in faces-config.xml
|
| Hope this gives you an idea...
It does thanks. As it happens, ThreadInfo is only used in xhtml as a class to hold row data (from treeThreadBean.allThreads where treeThreadBean is a legitimate managed bean. Hence I don't believe I'll need to create a managed bean for ThreadInfo, I can simply remove it from faces-config.xml. From my brief look into the faces-config.xml file it appears that a number of classes have been defined in there as managed beans that shouldn't have been (eg ThreadInfo, Snapshot, FrameInfo, AllocationInfo and others, none of which are referenced anywhere in the .xhtml as managed beans). I'll investigate each one and remove as necessary. If a bean is needed, I'll abstract one into the .web package as discussed.
Cheers,
Rob Hills
Waikiki, Western Australia
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4193002#4193002
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4193002
16 years, 1 month