Closed arinban closed 14 years ago
@glassfishrobot Commented Reported by alainfaure
@glassfishrobot Commented alainfaure said: forwarded to you
@glassfishrobot Commented nigeldeakin said: The bug reported here is a duplicate of issue 41 and has now been fixed.
@glassfishrobot Commented nigeldeakin said: Fixed in 2.1a
@glassfishrobot Commented Was assigned to rampsarathy
@glassfishrobot Commented This issue was imported from java.net JIRA GENERICJMSRA-34
@glassfishrobot Commented Marked as duplicate on Wednesday, September 15th 2010, 2:12:10 am
I want to use the adaptor in non XA mode to feed my MDB since in 90% of the messages processed it is the only resource. So I set-up "SupportsXA false". I got an exception because my bean is CMT (Required</trans-
attribute>).
This should not happen since it should be possible to have ONE non-XA resource
in a global transaction (all other ones being XA).
This Exception is due to a check done in AbstractConsumer:
public void validate() throws ResourceException { if (this.transacted && !this.spec.getSupportsXA())
{ String msg = sm.getString("provider_cannot_support_transaction"); throw new ResourceException(msg); }
Anyway, I changed the transaction management to <trans- attribute>NotSupported. Now the bean is initalising properly but when a message is processed I got a null pointer exception:
[#|2009-01-05T15:25:08.306+0000|WARNING|sun-appserver- ee8.1_02|javax.enterprise.system.stream.err|_ThreadID=13;| java.lang.NullPointerException at com.sun.genericra.inbound.sync.SyncDeliveryHelper.runOnceStdNoXA (SyncDeliveryHelper.java:435) at com.sun.genericra.inbound.sync.SyncDeliveryHelper.deliver (SyncDeliveryHelper.java:211) at com.sun.genericra.inbound.sync.SyncDeliveryHelper.deliver (SyncDeliveryHelper.java:194)
This is due to the following code: private void runOnceStdNoXA() throws Exception { if (msg != null) { // Optionally wrap for ack() call /*
type */ msg = mHoldUntilAck ? wrapMsg(msg, coord, -1) : msg; try { deliverMessage(msg); coord.msgDelivered(true); <---- Line 435 }
catch (ResourceException r)
{ coord.setRollbackOnly(r); }
It looks like the "coord" object is not initialised, which seems to be due to the fact now the bean is not CMT...
When I use the adapter in the outbound way as non-XA there is no problem to get it part of a global transaction...
Environment
Operating System: All Platform: All
Affected Versions
[current]