[JBoss-dev] [JBoss JIRA] Updated: (JBMQ-17) Fix for Use of Non-Serializable Xid Implementations
[ http://jira.jboss.com/jira/browse/JBMQ-17?page=history ] Daniel Ramagem updated JBMQ-17: --- Attachment: JBossMQXid.java > Fix for Use of Non-Serializable Xid Implementations > --- > > Key: JBMQ-17 > URL: http://jira.jboss.com/jira/browse/JBMQ-17 > Project: JBoss MQ > Type: Patch > Components: Persistence, Transport > Versions: JBossAS-3.2.6 > Environment: WebSphere Application Server 5.0.2 > Reporter: Daniel Ramagem > Assignee: Adrian Brock > Attachments: JBossMQXid.java, TransactionRequest.java.diff > > > A java.io.NotSerializableException is thrown when using JBossMQ as a > transactional "Generic JMS Provider" under IBM WebSphere Application Server > 5.0.2. The IBM class com.ibm.ejs.jts.jta.XID is not serializable and causes > the SpyXAResourceManager.prepare(...) method to fail. The solution is to: > 1) Clone (deep copy) the non-serializable Xid to a new a new serializable Xid > wrapper: JBossMQXid.java > 2) The JBossMQXid class must now be available under both client and server. > I think the packaging jboss-3.2.6-src product needs to be modified so that > upon a build the JBossMQXid class gets made available in the "jbossmq" > distribution (created when > /jboss-3.2.6/docs/examples/jms/standalone/build.xml is run). > 3) The org.jboss.mq.TransactionRequest class' writeExternal(...) method must > be modified to perform the wrapping > Below is the code for #1 and the diff of #3 (based on the source code of > 3.2.6). > - #1: JBossMQXid.java - > package org.jboss.mq; > import javax.transaction.xa.Xid; > import java.io.Serializable; > import java.util.Arrays; > /** > * This class is a wrapper for non-serializable implementations of > * java.transaction.xa.Xid. > * > * @author Daniel Bloomfield Ramagem ([EMAIL PROTECTED]) > */ > public class JBossMQXid implements Xid, Serializable { > private int formatId; > private byte[] globalTransactionId; > private byte[] branchQualifier; > private int hashCode; > public JBossMQXid(Xid xid) { > System.out.println("JBossMQXid: " + xid); > formatId = xid.getFormatId(); > globalTransactionId = xid.getGlobalTransactionId(); > branchQualifier = xid.getBranchQualifier(); > hashCode = xid.hashCode(); > } > public int getFormatId() { > return formatId; > } > public byte[] getGlobalTransactionId() { > return globalTransactionId; > } > public byte[] getBranchQualifier() { > return branchQualifier; > } > public boolean equals(Object obj) { > if (obj == null || !(obj instanceof JBossMQXid)) > return false; > if (formatId == ((Xid) obj).getFormatId() && > Arrays.equals(globalTransactionId, ((Xid) > obj).getGlobalTransactionId()) && > Arrays.equals(branchQualifier, ((Xid) > obj).getBranchQualifier())) > return true; > return false; > } > public int hashCode() { > return hashCode; > } > } > > - #3 Diff TransactionRequest.java - > 11a12 > > import javax.transaction.xa.Xid; > 86,90c87,94 > < out.writeObject(xid); > < if (messages == null) > < out.writeInt(0); > < else > < { > --- > > if (xid != null && xid instanceof Xid) > > out.writeObject(new JBossMQXid((Xid)xid)); > > else > > out.writeObject(xid); > > if (messages == null) > > out.writeInt(0); > > else > > { > 95c99 > < if (acks == null) > --- > > if (acks == null) > 112c116 > < } > \ No newline at end of file > --- > > } -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://jira.jboss.com/jira/secure/Administrators.jspa - If you want more information on JIRA, or have a bug to report see: http://www.atlassian.com/software/jira --- SF email is sponsored by - The IT Product Guide Read honest & candid reviews on hundreds of IT Products from real users. Discover which products truly live up to the hype. Start reading now. http://productguide.itmanagersjournal.com/ ___ JBoss-Development mailing list JBoss-Development@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jboss-development
[JBoss-dev] [JBoss JIRA] Updated: (JBMQ-17) Fix for Use of Non-Serializable Xid Implementations
[ http://jira.jboss.com/jira/browse/JBMQ-17?page=history ] Daniel Ramagem updated JBMQ-17: --- Attachment: TransactionRequest.java.diff > Fix for Use of Non-Serializable Xid Implementations > --- > > Key: JBMQ-17 > URL: http://jira.jboss.com/jira/browse/JBMQ-17 > Project: JBoss MQ > Type: Patch > Components: Persistence, Transport > Versions: JBossAS-3.2.6 > Environment: WebSphere Application Server 5.0.2 > Reporter: Daniel Ramagem > Assignee: Adrian Brock > Attachments: JBossMQXid.java, TransactionRequest.java.diff > > > A java.io.NotSerializableException is thrown when using JBossMQ as a > transactional "Generic JMS Provider" under IBM WebSphere Application Server > 5.0.2. The IBM class com.ibm.ejs.jts.jta.XID is not serializable and causes > the SpyXAResourceManager.prepare(...) method to fail. The solution is to: > 1) Clone (deep copy) the non-serializable Xid to a new a new serializable Xid > wrapper: JBossMQXid.java > 2) The JBossMQXid class must now be available under both client and server. > I think the packaging jboss-3.2.6-src product needs to be modified so that > upon a build the JBossMQXid class gets made available in the "jbossmq" > distribution (created when > /jboss-3.2.6/docs/examples/jms/standalone/build.xml is run). > 3) The org.jboss.mq.TransactionRequest class' writeExternal(...) method must > be modified to perform the wrapping > Below is the code for #1 and the diff of #3 (based on the source code of > 3.2.6). > - #1: JBossMQXid.java - > package org.jboss.mq; > import javax.transaction.xa.Xid; > import java.io.Serializable; > import java.util.Arrays; > /** > * This class is a wrapper for non-serializable implementations of > * java.transaction.xa.Xid. > * > * @author Daniel Bloomfield Ramagem ([EMAIL PROTECTED]) > */ > public class JBossMQXid implements Xid, Serializable { > private int formatId; > private byte[] globalTransactionId; > private byte[] branchQualifier; > private int hashCode; > public JBossMQXid(Xid xid) { > System.out.println("JBossMQXid: " + xid); > formatId = xid.getFormatId(); > globalTransactionId = xid.getGlobalTransactionId(); > branchQualifier = xid.getBranchQualifier(); > hashCode = xid.hashCode(); > } > public int getFormatId() { > return formatId; > } > public byte[] getGlobalTransactionId() { > return globalTransactionId; > } > public byte[] getBranchQualifier() { > return branchQualifier; > } > public boolean equals(Object obj) { > if (obj == null || !(obj instanceof JBossMQXid)) > return false; > if (formatId == ((Xid) obj).getFormatId() && > Arrays.equals(globalTransactionId, ((Xid) > obj).getGlobalTransactionId()) && > Arrays.equals(branchQualifier, ((Xid) > obj).getBranchQualifier())) > return true; > return false; > } > public int hashCode() { > return hashCode; > } > } > > - #3 Diff TransactionRequest.java - > 11a12 > > import javax.transaction.xa.Xid; > 86,90c87,94 > < out.writeObject(xid); > < if (messages == null) > < out.writeInt(0); > < else > < { > --- > > if (xid != null && xid instanceof Xid) > > out.writeObject(new JBossMQXid((Xid)xid)); > > else > > out.writeObject(xid); > > if (messages == null) > > out.writeInt(0); > > else > > { > 95c99 > < if (acks == null) > --- > > if (acks == null) > 112c116 > < } > \ No newline at end of file > --- > > } -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://jira.jboss.com/jira/secure/Administrators.jspa - If you want more information on JIRA, or have a bug to report see: http://www.atlassian.com/software/jira --- SF email is sponsored by - The IT Product Guide Read honest & candid reviews on hundreds of IT Products from real users. Discover which products truly live up to the hype. Start reading now. http://productguide.itmanagersjournal.com/ ___ JBoss-Development mailing list JBoss-Development@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jboss-development
[JBoss-dev] [JBoss JIRA] Updated: (JBMQ-17) Fix for Use of Non-Serializable Xid Implementations
[ http://jira.jboss.com/jira/browse/JBMQ-17?page=history ] Daniel Ramagem updated JBMQ-17: --- Description: A java.io.NotSerializableException is thrown when using JBossMQ as a transactional "Generic JMS Provider" under IBM WebSphere Application Server 5.0.2. The IBM class com.ibm.ejs.jts.jta.XID is not serializable and causes the SpyXAResourceManager.prepare(...) method to fail. The solution is to: 1) Clone (deep copy) the non-serializable Xid to a new a new serializable Xid wrapper: JBossMQXid.java. 2) The org.jboss.mq.TransactionRequest class' writeExternal(...) method must be modified to perform the wrapping 3) The JBossMQXid class must now be available under both client and server. I think the packaging jboss-3.2.6-src product needs to be modified so that upon a build the JBossMQXid class gets made available in the "jbossmq" server (created when /jboss-3.2.6/docs/examples/jms/standalone/build.xml is run). I had to manually add the jbossmq-client.jar to servers/jbossmq/lib to make it work. was: A java.io.NotSerializableException is thrown when using JBossMQ as a transactional "Generic JMS Provider" under IBM WebSphere Application Server 5.0.2. The IBM class com.ibm.ejs.jts.jta.XID is not serializable and causes the SpyXAResourceManager.prepare(...) method to fail. The solution is to: 1) Clone (deep copy) the non-serializable Xid to a new a new serializable Xid wrapper: JBossMQXid.java 2) The JBossMQXid class must now be available under both client and server. I think the packaging jboss-3.2.6-src product needs to be modified so that upon a build the JBossMQXid class gets made available in the "jbossmq" distribution (created when /jboss-3.2.6/docs/examples/jms/standalone/build.xml is run). 3) The org.jboss.mq.TransactionRequest class' writeExternal(...) method must be modified to perform the wrapping Below is the code for #1 and the diff of #3 (based on the source code of 3.2.6). - #1: JBossMQXid.java - package org.jboss.mq; import javax.transaction.xa.Xid; import java.io.Serializable; import java.util.Arrays; /** * This class is a wrapper for non-serializable implementations of * java.transaction.xa.Xid. * * @author Daniel Bloomfield Ramagem ([EMAIL PROTECTED]) */ public class JBossMQXid implements Xid, Serializable { private int formatId; private byte[] globalTransactionId; private byte[] branchQualifier; private int hashCode; public JBossMQXid(Xid xid) { System.out.println("JBossMQXid: " + xid); formatId = xid.getFormatId(); globalTransactionId = xid.getGlobalTransactionId(); branchQualifier = xid.getBranchQualifier(); hashCode = xid.hashCode(); } public int getFormatId() { return formatId; } public byte[] getGlobalTransactionId() { return globalTransactionId; } public byte[] getBranchQualifier() { return branchQualifier; } public boolean equals(Object obj) { if (obj == null || !(obj instanceof JBossMQXid)) return false; if (formatId == ((Xid) obj).getFormatId() && Arrays.equals(globalTransactionId, ((Xid) obj).getGlobalTransactionId()) && Arrays.equals(branchQualifier, ((Xid) obj).getBranchQualifier())) return true; return false; } public int hashCode() { return hashCode; } } - #3 Diff TransactionRequest.java - 11a12 > import javax.transaction.xa.Xid; 86,90c87,94 < out.writeObject(xid); < if (messages == null) < out.writeInt(0); < else < { --- > if (xid != null && xid instanceof Xid) > out.writeObject(new JBossMQXid((Xid)xid)); > else > out.writeObject(xid); > if (messages == null) > out.writeInt(0); > else > { 95c99 < if (acks == null) --- > if (acks == null) 112c116 < } \ No newline at end of file --- > } > Fix for Use of Non-Serializable Xid Implementations > --- > > Key: JBMQ-17 > URL: http://jira.jboss.com/jira/browse/JBMQ-17 > Project: JBoss MQ > Type: Patch > Components: Persistence, Transport > Versions: JBossAS-3.2.6 > Environment: WebSphere Application Server 5.0.2 > Reporter: Daniel Ramagem > Assignee: Adrian Brock > Attachments: JBossMQXid.java, TransactionRequest.java.diff > > > A java.io.NotSerializableException is thrown when using JBossMQ as a > transactional "Generic JMS Provider" under IBM WebSphere Application Server > 5.0.2. The IBM class com.ibm.ejs.jts.jta.XID is not serializable and causes > the SpyXAResourceManager.prepare(...) method to fail. The solution is to: > 1) Clone (deep copy) the non-serializable Xid to a new a new serializable Xid > wrapper: JBossMQXid.java. > 2) The org.jboss.mq.TransactionRequest class' writeExternal(...) method m
[JBoss-dev] [JBoss JIRA] Updated: (JBMQ-17) Fix for Use of Non-Serializable Xid Implementations
[ http://jira.jboss.com/jira/browse/JBMQ-17?page=history ] Adrian Brock updated JBMQ-17: - Attachment: JBossMQXid.java > Fix for Use of Non-Serializable Xid Implementations > --- > > Key: JBMQ-17 > URL: http://jira.jboss.com/jira/browse/JBMQ-17 > Project: JBoss MQ > Type: Patch > Components: Transport, Persistence > Versions: JBossAS-3.2.6 > Environment: WebSphere Application Server 5.0.2 > Reporter: Daniel Ramagem > Assignee: Adrian Brock > Attachments: JBossMQXid.java, JBossMQXid.java, TransactionRequest.java.diff > > > A java.io.NotSerializableException is thrown when using JBossMQ as a > transactional "Generic JMS Provider" under IBM WebSphere Application Server > 5.0.2. The IBM class com.ibm.ejs.jts.jta.XID is not serializable and causes > the SpyXAResourceManager.prepare(...) method to fail. The solution is to: > 1) Clone (deep copy) the non-serializable Xid to a new a new serializable Xid > wrapper: JBossMQXid.java. > 2) The org.jboss.mq.TransactionRequest class' writeExternal(...) method must > be modified to perform the wrapping > 3) The JBossMQXid class must now be available under both client and server. > I think the packaging jboss-3.2.6-src product needs to be modified so that > upon a build the JBossMQXid class gets made available in the "jbossmq" server > (created when /jboss-3.2.6/docs/examples/jms/standalone/build.xml is run). I > had to manually add the jbossmq-client.jar to servers/jbossmq/lib to make it > work. -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://jira.jboss.com/jira/secure/Administrators.jspa - If you want more information on JIRA, or have a bug to report see: http://www.atlassian.com/software/jira --- The SF.Net email is sponsored by: Beat the post-holiday blues Get a FREE limited edition SourceForge.net t-shirt from ThinkGeek. It's fun and FREE -- well, almosthttp://www.thinkgeek.com/sfshirt ___ JBoss-Development mailing list JBoss-Development@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jboss-development
[JBoss-dev] [JBoss JIRA] Updated: (JBMQ-17) Fix for Use of Non-Serializable Xid Implementations
[ http://jira.jboss.com/jira/browse/JBMQ-17?page=history ] Adrian Brock updated JBMQ-17: - Attachment: TransactionRequest.java > Fix for Use of Non-Serializable Xid Implementations > --- > > Key: JBMQ-17 > URL: http://jira.jboss.com/jira/browse/JBMQ-17 > Project: JBoss MQ > Type: Patch > Components: Transport, Persistence > Versions: JBossAS-4.0.1 > Environment: WebSphere Application Server 5.0.2 > Reporter: Daniel Ramagem > Assignee: Adrian Brock > Attachments: JBossMQXid.java, JBossMQXid.java, TransactionRequest.java, > TransactionRequest.java.diff > > > A java.io.NotSerializableException is thrown when using JBossMQ as a > transactional "Generic JMS Provider" under IBM WebSphere Application Server > 5.0.2. The IBM class com.ibm.ejs.jts.jta.XID is not serializable and causes > the SpyXAResourceManager.prepare(...) method to fail. The solution is to: > 1) Clone (deep copy) the non-serializable Xid to a new a new serializable Xid > wrapper: JBossMQXid.java. > 2) The org.jboss.mq.TransactionRequest class' writeExternal(...) method must > be modified to perform the wrapping > 3) The JBossMQXid class must now be available under both client and server. > I think the packaging jboss-3.2.6-src product needs to be modified so that > upon a build the JBossMQXid class gets made available in the "jbossmq" server > (created when /jboss-3.2.6/docs/examples/jms/standalone/build.xml is run). I > had to manually add the jbossmq-client.jar to servers/jbossmq/lib to make it > work. -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://jira.jboss.com/jira/secure/Administrators.jspa - If you want more information on JIRA, or have a bug to report see: http://www.atlassian.com/software/jira --- The SF.Net email is sponsored by: Beat the post-holiday blues Get a FREE limited edition SourceForge.net t-shirt from ThinkGeek. It's fun and FREE -- well, almosthttp://www.thinkgeek.com/sfshirt ___ JBoss-Development mailing list JBoss-Development@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jboss-development
[JBoss-dev] [JBoss JIRA] Updated: (JBMQ-17) Fix for Use of Non-Serializable Xid Implementations
[ http://jira.jboss.com/jira/browse/JBMQ-17?page=history ] Adrian Brock updated JBMQ-17: - Description: A java.io.NotSerializableException is thrown when using JBossMQ as a transactional "Generic JMS Provider" under IBM WebSphere Application Server 5.0.2. The IBM class com.ibm.ejs.jts.jta.XID is not serializable and causes the SpyXAResourceManager.prepare(...) method to fail. The solution is to: 1) Clone (deep copy) the non-serializable Xid to a new a new serializable Xid wrapper: JBossMQXid.java. 2) The org.jboss.mq.TransactionRequest class' writeExternal(...) method must be modified to perform the wrapping 3) The JBossMQXid class must now be available under both client and server. I think the packaging jboss-3.2.6-src product needs to be modified so that upon a build the JBossMQXid class gets made available in the "jbossmq" server (created when /jboss-3.2.6/docs/examples/jms/standalone/build.xml is run). I had to manually add the jbossmq-client.jar to servers/jbossmq/lib to make it work. was: A java.io.NotSerializableException is thrown when using JBossMQ as a transactional "Generic JMS Provider" under IBM WebSphere Application Server 5.0.2. The IBM class com.ibm.ejs.jts.jta.XID is not serializable and causes the SpyXAResourceManager.prepare(...) method to fail. The solution is to: 1) Clone (deep copy) the non-serializable Xid to a new a new serializable Xid wrapper: JBossMQXid.java. 2) The org.jboss.mq.TransactionRequest class' writeExternal(...) method must be modified to perform the wrapping 3) The JBossMQXid class must now be available under both client and server. I think the packaging jboss-3.2.6-src product needs to be modified so that upon a build the JBossMQXid class gets made available in the "jbossmq" server (created when /jboss-3.2.6/docs/examples/jms/standalone/build.xml is run). I had to manually add the jbossmq-client.jar to servers/jbossmq/lib to make it work. Version: JBossAS-4.0.1 (was: JBossAS-3.2.6) > Fix for Use of Non-Serializable Xid Implementations > --- > > Key: JBMQ-17 > URL: http://jira.jboss.com/jira/browse/JBMQ-17 > Project: JBoss MQ > Type: Patch > Components: Transport, Persistence > Versions: JBossAS-4.0.1 > Environment: WebSphere Application Server 5.0.2 > Reporter: Daniel Ramagem > Assignee: Adrian Brock > Attachments: JBossMQXid.java, JBossMQXid.java, TransactionRequest.java, > TransactionRequest.java.diff > > > A java.io.NotSerializableException is thrown when using JBossMQ as a > transactional "Generic JMS Provider" under IBM WebSphere Application Server > 5.0.2. The IBM class com.ibm.ejs.jts.jta.XID is not serializable and causes > the SpyXAResourceManager.prepare(...) method to fail. The solution is to: > 1) Clone (deep copy) the non-serializable Xid to a new a new serializable Xid > wrapper: JBossMQXid.java. > 2) The org.jboss.mq.TransactionRequest class' writeExternal(...) method must > be modified to perform the wrapping > 3) The JBossMQXid class must now be available under both client and server. > I think the packaging jboss-3.2.6-src product needs to be modified so that > upon a build the JBossMQXid class gets made available in the "jbossmq" server > (created when /jboss-3.2.6/docs/examples/jms/standalone/build.xml is run). I > had to manually add the jbossmq-client.jar to servers/jbossmq/lib to make it > work. -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://jira.jboss.com/jira/secure/Administrators.jspa - If you want more information on JIRA, or have a bug to report see: http://www.atlassian.com/software/jira --- The SF.Net email is sponsored by: Beat the post-holiday blues Get a FREE limited edition SourceForge.net t-shirt from ThinkGeek. It's fun and FREE -- well, almosthttp://www.thinkgeek.com/sfshirt ___ JBoss-Development mailing list JBoss-Development@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jboss-development