1 | |
|
2 | |
|
3 | |
|
4 | |
|
5 | |
|
6 | |
|
7 | |
|
8 | |
|
9 | |
|
10 | |
|
11 | |
package org.mule.providers.jms.websphere; |
12 | |
|
13 | |
import org.mule.providers.jms.XaTransactedJmsMessageReceiver; |
14 | |
import org.mule.umo.UMOComponent; |
15 | |
import org.mule.umo.endpoint.UMOEndpoint; |
16 | |
import org.mule.umo.lifecycle.InitialisationException; |
17 | |
import org.mule.umo.provider.UMOConnector; |
18 | |
|
19 | |
import javax.jms.Session; |
20 | |
|
21 | |
public class WebsphereTransactedJmsMessageReceiver extends XaTransactedJmsMessageReceiver |
22 | |
{ |
23 | |
|
24 | |
public WebsphereTransactedJmsMessageReceiver(UMOConnector umoConnector, UMOComponent component, UMOEndpoint endpoint) throws InitialisationException |
25 | |
{ |
26 | 0 | super(umoConnector, component, endpoint); |
27 | 0 | } |
28 | |
|
29 | |
protected void doConnect() throws Exception |
30 | |
{ |
31 | 0 | if (connector.isConnected() && connector.isEagerConsumer()) |
32 | |
{ |
33 | 0 | createConsumer(); |
34 | |
} |
35 | |
|
36 | |
|
37 | 0 | if (connector.isConnected() && !this.connected.get() && connector.getSessionFromTransaction() == null) |
38 | |
{ |
39 | |
|
40 | 0 | Session s = connector.getConnection().createSession(false, 1); |
41 | 0 | s.close(); |
42 | |
} |
43 | 0 | } |
44 | |
} |