activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Edison Melo <rok...@yahoo.com>
Subject Unable to use local transactions
Date Sun, 27 Jun 2010 05:46:27 GMT

Please forgive if this is a silly question.  I hadn't be able to configure a
MDB to use local transactions inside JBoss.  If I deploy a MDB with this
config:

@MessageDriven(
	activationConfig = { 
		@ActivationConfigProperty(
			propertyName = "destinationType", propertyValue = "javax.jms.Queue"),
		@ActivationConfigProperty(
			propertyName = "destination", propertyValue = "queue/HelloWorld"),
		@ActivationConfigProperty(
			propertyName="acknowledgeMode", propertyValue="Auto-acknowledge"),			
		@ActivationConfigProperty(
			propertyName = "maxMessagesPerSessions", propertyValue = "10"),
		@ActivationConfigProperty(
			propertyName = "maxSessions", propertyValue = "10"),
		@ActivationConfigProperty(
			propertyName = "maximumRedeliveries", propertyValue = "1")
	})
@PoolClass(value=org.jboss.ejb3.StrictMaxPool.class, maxSize=10,
timeout=10000)	
@ResourceAdapter("activemq-rar.rar")
public class HelloWorldMDB implements MessageListener {
...

I get this log:

00:26:48,810 35196 DEBUG [org.apache.activemq.ra.ServerSessionPoolImpl]
(ActiveMQ Transport: tcp://localhost/127.0.0.1:61616:) ServerSession
requested.
00:26:48,811 35197 DEBUG [org.apache.activemq.ra.ServerSessionPoolImpl]
(ActiveMQ Transport: tcp://localhost/127.0.0.1:61616:) Created a new
session: ServerSessionImpl:2
00:26:48,811 35197 DEBUG [org.apache.activemq.ra.ServerSessionImpl:2]
(ActiveMQ Transport: tcp://localhost/127.0.0.1:61616:) Starting run.
00:26:48,811 35197 DEBUG [org.apache.activemq.ra.ServerSessionImpl:2]
(ActiveMQ Transport: tcp://localhost/127.0.0.1:61616:) Work accepted:
javax.resource.spi.work.WorkEvent[source=org.jboss.resource.work.JBossWorkManager@10393e97]
00:26:48,811 35197 DEBUG [org.apache.activemq.ra.ServerSessionImpl:2]
(WorkManager(2)-9:) Work started:
javax.resource.spi.work.WorkEvent[source=org.jboss.resource.work.JBossWorkManager@10393e97]
00:26:48,811 35197 DEBUG [org.apache.activemq.ra.ServerSessionImpl:2]
(WorkManager(2)-9:) Running
00:26:48,812 35198 DEBUG [org.apache.activemq.ra.ServerSessionImpl:2]
(WorkManager(2)-9:) run loop start
00:26:48,818 35204 DEBUG [org.apache.activemq.TransactionContext]
(WorkManager(2)-9:) Start: < 131075, 26, 24,
1-7f000002:86c9:4c26e0f7:a7f000002:86c9:4c26e0f7:b                                       
                                      
>
00:26:48,820 35206 DEBUG [org.apache.activemq.TransactionContext]
(WorkManager(2)-9:) Started XA transaction:
XID:131075:312d37663030303030323a383663393a34633236653066373a61:37663030303030323a383663393a34633236653066373a62
00:26:48,825 35211 INFO  [STDOUT] (WorkManager(2)-9:) HelloWorldMDB::init
00:26:48,827 35213 DEBUG
[org.apache.activemq.transport.WireFormatNegotiator] (WorkManager(2)-9:)
Sending: WireFormatInfo { version=5, properties={CacheSize=1024,
CacheEnabled=true, SizePrefixDisabled=false,
MaxInactivityDurationInitalDelay=10000, TcpNoDelayEnabled=true,
MaxInactivityDuration=30000, TightEncodingEnabled=true,
StackTraceEnabled=true}, magic=[A,c,t,i,v,e,M,Q]}
00:26:48,828 35214 DEBUG
[org.apache.activemq.transport.WireFormatNegotiator] (ActiveMQ Transport:
tcp://localhost/127.0.0.1:61616:) Received WireFormat: WireFormatInfo {
version=5, properties={CacheSize=1024, CacheEnabled=true,
SizePrefixDisabled=false, MaxInactivityDurationInitalDelay=10000,
TcpNoDelayEnabled=true, MaxInactivityDuration=30000,
TightEncodingEnabled=true, StackTraceEnabled=true}, magic=[A,c,t,i,v,e,M,Q]}
00:26:48,828 35214 DEBUG
[org.apache.activemq.transport.WireFormatNegotiator] (ActiveMQ Transport:
tcp://localhost/127.0.0.1:61616:) tcp://localhost/127.0.0.1:61616 before
negotiation: OpenWireFormat{version=5, cacheEnabled=false,
stackTraceEnabled=false, tightEncodingEnabled=false,
sizePrefixDisabled=false}
00:26:48,828 35214 DEBUG
[org.apache.activemq.transport.WireFormatNegotiator] (ActiveMQ Transport:
tcp://localhost/127.0.0.1:61616:) tcp://localhost/127.0.0.1:61616 after
negotiation: OpenWireFormat{version=5, cacheEnabled=true,
stackTraceEnabled=true, tightEncodingEnabled=true, sizePrefixDisabled=false}
00:26:48,831 35217 DEBUG [org.apache.activemq.TransactionContext]
(WorkManager(2)-9:) Begin:TX:ID:delta-45577-1277616385764-0:5:1
00:26:48,837 35223 DEBUG [org.hibernate.impl.SessionImpl]
(WorkManager(2)-9:) opened session at timestamp: 5233116810596352
00:26:48,837 35223 DEBUG [org.hibernate.ejb.AbstractEntityManagerImpl]
(WorkManager(2)-9:) Looking for a JTA transaction to join
00:26:48,837 35223 DEBUG [org.hibernate.ejb.AbstractEntityManagerImpl]
(WorkManager(2)-9:) No JTA transaction found
00:26:48,837 35223 DEBUG [org.hibernate.loader.Loader] (WorkManager(2)-9:)
loading entity: [model.Person#0]
00:26:48,837 35223 DEBUG [org.hibernate.jdbc.AbstractBatcher]
(WorkManager(2)-9:) about to open PreparedStatement (open
PreparedStatements: 0, globally: 0)
00:26:48,837 35223 DEBUG [org.hibernate.jdbc.ConnectionManager]
(WorkManager(2)-9:) opening JDBC connection
00:26:48,837 35223 DEBUG [org.hibernate.SQL] (WorkManager(2)-9:) select
person0_.PERSON_ID as PERSON1_1_0_, person0_.FIRST_NAME as FIRST2_1_0_,
person0_.LAST_NAME as LAST3_1_0_, person0_.AGE as AGE1_0_ from test.PERSON
person0_ where person0_.PERSON_ID=?
00:26:48,838 35224 DEBUG [org.hibernate.jdbc.AbstractBatcher]
(WorkManager(2)-9:) about to open ResultSet (open ResultSets: 0, globally:
0)
00:26:48,838 35224 DEBUG [org.hibernate.jdbc.AbstractBatcher]
(WorkManager(2)-9:) about to close ResultSet (open ResultSets: 1, globally:
1)
00:26:48,838 35224 DEBUG [org.hibernate.jdbc.AbstractBatcher]
(WorkManager(2)-9:) about to close PreparedStatement (open
PreparedStatements: 1, globally: 1)
00:26:48,838 35224 DEBUG [org.hibernate.jdbc.ConnectionManager]
(WorkManager(2)-9:) aggressively releasing JDBC connection
00:26:48,838 35224 DEBUG [org.hibernate.jdbc.ConnectionManager]
(WorkManager(2)-9:) releasing JDBC connection [ (open PreparedStatements: 0,
globally: 0) (open ResultSets: 0, globally: 0)]
00:26:48,838 35224 DEBUG [org.hibernate.engine.StatefulPersistenceContext]
(WorkManager(2)-9:) initializing non-lazy collections
00:26:48,838 35224 DEBUG [org.hibernate.loader.Loader] (WorkManager(2)-9:)
done entity load
00:26:48,839 35225 DEBUG
[org.jboss.ejb3.entity.TransactionScopedEntityManagerInterceptor]
(WorkManager(2)-9:) ********************* CLOSING tx scoped nontx entity
manager
00:26:48,840 35226 DEBUG [org.apache.activemq.TransactionContext]
(WorkManager(2)-9:) End: < 131075, 26, 24,
1-7f000002:86c9:4c26e0f7:a7f000002:86c9:4c26e0f7:b                                       
                                      
>
00:26:48,840 35226 DEBUG [org.apache.activemq.TransactionContext]
(WorkManager(2)-9:) Ended XA transaction:
XID:131075:312d37663030303030323a383663393a34633236653066373a61:37663030303030323a383663393a34633236653066373a62
00:26:48,840 35226 DEBUG [org.apache.activemq.TransactionContext]
(WorkManager(2)-9:) Prepare: < 131075, 26, 24,
1-7f000002:86c9:4c26e0f7:a7f000002:86c9:4c26e0f7:b                                       
                                      
>
00:26:48,841 35227 DEBUG [org.apache.activemq.TransactionContext]
(WorkManager(2)-9:) Commit: TX:ID:delta-45577-1277616385764-0:5:1 syncCount:
0
00:26:48,850 35236 DEBUG [org.apache.activemq.TransactionContext]
(WorkManager(2)-9:) Commit: < 131075, 26, 24,
1-7f000002:86c9:4c26e0f7:a7f000002:86c9:4c26e0f7:b                                       
                                      
>
00:26:48,851 35237 DEBUG [org.apache.activemq.ra.ServerSessionImpl:2]
(WorkManager(2)-9:) run loop end
00:26:48,851 35237 DEBUG [org.apache.activemq.ra.ServerSessionPoolImpl]
(WorkManager(2)-9:) ServerSession returned to pool: ServerSessionImpl:2
00:26:48,851 35237 DEBUG [org.apache.activemq.ra.ServerSessionImpl:2]
(WorkManager(2)-9:) Run finished
00:26:48,851 35237 DEBUG [org.apache.activemq.ra.ServerSessionImpl:2]
(WorkManager(2)-9:) Work completed:
javax.resource.spi.work.WorkEvent[source=org.jboss.resource.work.JBossWorkManager@10393e97]

If I understand correctly, an XA transaction is used for the operation. I
realy don't need that,  I'm sending back read-only data (but, I do need to
redeliver the message if somethings goes wrong).  Can someone tell me how I
can configure an MDB inside JBoss to use local transactions? (jms
transactions).
-- 
View this message in context: http://old.nabble.com/Unable-to-use-local-transactions-tp29004101p29004101.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.


Mime
View raw message