You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@activemq.apache.org by tabish121 <gi...@git.apache.org> on 2016/10/05 21:34:05 UTC

[GitHub] activemq-artemis pull request #820: ARTEMIS-770 AMQP Message Transformer ref...

GitHub user tabish121 opened a pull request:

    https://github.com/apache/activemq-artemis/pull/820

    ARTEMIS-770 AMQP Message Transformer refactor

    Refactor the AMQP Message transformers both for better performance and
    also to fix a number of issues with the transformers creating inbound
    and outbound messages with incorrectly mapped values or extra data
    appended where it should not be.

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/tabish121/activemq-artemis ARTEMIS-770

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/activemq-artemis/pull/820.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #820
    
----
commit 22eceeb6740f02631de7ae2c553505093149e6b5
Author: Timothy Bish <ta...@gmail.com>
Date:   2016-10-03T18:23:50Z

    ARTEMIS-770 AMQP Message Transformer refactor
    
    Refactor the AMQP Message transformers both for better performance and
    also to fix a number of issues with the transformers creating inbound
    and outbound messages with incorrectly mapped values or extra data
    appended where it should not be.

----


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] activemq-artemis issue #820: ARTEMIS-770 AMQP Message Transformer refactor

Posted by tabish121 <gi...@git.apache.org>.
Github user tabish121 commented on the issue:

    https://github.com/apache/activemq-artemis/pull/820
  
    Updated code fixes the test failures, at least the one's that aren't already failing on master.  


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] activemq-artemis pull request #820: ARTEMIS-770 AMQP Message Transformer ref...

Posted by clebertsuconic <gi...@git.apache.org>.
Github user clebertsuconic commented on a diff in the pull request:

    https://github.com/apache/activemq-artemis/pull/820#discussion_r82112176
  
    --- Diff: artemis-protocols/artemis-amqp-protocol/src/main/java/org/apache/activemq/artemis/protocol/amqp/converter/jms/ServerJMSObjectMessage.java ---
    @@ -16,55 +16,48 @@
      */
     package org.apache.activemq.artemis.protocol.amqp.converter.jms;
     
    +import java.io.Serializable;
    +
     import javax.jms.JMSException;
     import javax.jms.ObjectMessage;
    -import java.io.ByteArrayInputStream;
    -import java.io.ByteArrayOutputStream;
    -import java.io.ObjectOutputStream;
    -import java.io.Serializable;
     
     import org.apache.activemq.artemis.api.core.Message;
     import org.apache.activemq.artemis.core.message.impl.MessageInternal;
    -import org.apache.activemq.artemis.utils.ObjectInputStreamWithClassLoader;
    +import org.apache.qpid.proton.amqp.Binary;
     
     public class ServerJMSObjectMessage extends ServerJMSMessage implements ObjectMessage {
     
    -   private static final String DEFAULT_WHITELIST;
    -   private static final String DEFAULT_BLACKLIST;
    -
    -   static {
    -      DEFAULT_WHITELIST = System.getProperty(ObjectInputStreamWithClassLoader.WHITELIST_PROPERTY, "java.lang,java.math,javax.security,java.util,org.apache.activemq,org.apache.qpid.proton.amqp");
    -
    -      DEFAULT_BLACKLIST = System.getProperty(ObjectInputStreamWithClassLoader.BLACKLIST_PROPERTY, null);
    -   }
    +   public static final byte TYPE = Message.OBJECT_TYPE;
     
    -   public static final byte TYPE = Message.STREAM_TYPE;
    -
    -   private Serializable object;
    +   private Binary payload;
     
        public ServerJMSObjectMessage(MessageInternal message, int deliveryCount) {
           super(message, deliveryCount);
        }
     
        @Override
        public void setObject(Serializable object) throws JMSException {
    -      this.object = object;
    +      throw new UnsupportedOperationException("Cannot set Object on this internal message");
        }
     
        @Override
        public Serializable getObject() throws JMSException {
    -      return object;
    +      throw new UnsupportedOperationException("Cannot set Object on this internal message");
    +   }
    +
    +   public void setSerializedForm(Binary payload) {
    +      this.payload = payload;
    +   }
    +
    +   public Binary getSerializedForm() {
    +      return payload;
        }
     
        @Override
        public void encode() throws Exception {
           super.encode();
    -      ByteArrayOutputStream out = new ByteArrayOutputStream();
    -      ObjectOutputStream ous = new ObjectOutputStream(out);
    -      ous.writeObject(object);
    -      byte[] src = out.toByteArray();
    -      getInnerMessage().getBodyBuffer().writeInt(src.length);
    -      getInnerMessage().getBodyBuffer().writeBytes(src);
    +      getInnerMessage().getBodyBuffer().writeInt(payload.getLength());
    --- End diff --
    
    yay!!!!! @tabish121  very nice!


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

Re: [GitHub] activemq-artemis pull request #820: ARTEMIS-770 AMQP Message Transformer ref...

Posted by Justin Bertram <jb...@apache.com>.
Go to http://activemq.apache.org/mailing-lists.html and click the "Unsubscribe" link for "ActiveMQ Developer List".

BTW, this URL was already provided to you on a different thread.


Justin

----- Original Message -----
From: "Dharmesh Joshi" <jo...@gmail.com>
To: dev@activemq.apache.org, dev@activemq.apache.org
Sent: Thursday, October 6, 2016 9:30:36 AM
Subject: RE: [GitHub] activemq-artemis pull request #820: ARTEMIS-770 AMQP Message Transformer ref...

How do I unsubscribe from this mailing list?

Thanks,
Dharmesh

-----Original Message-----
From: tabish121 [mailto:git@git.apache.org] 
Sent: Wednesday, October 5, 2016 5:34 PM
To: dev@activemq.apache.org
Subject: [GitHub] activemq-artemis pull request #820: ARTEMIS-770 AMQP
Message Transformer ref...

GitHub user tabish121 opened a pull request:

    https://github.com/apache/activemq-artemis/pull/820

    ARTEMIS-770 AMQP Message Transformer refactor

    Refactor the AMQP Message transformers both for better performance and
    also to fix a number of issues with the transformers creating inbound
    and outbound messages with incorrectly mapped values or extra data
    appended where it should not be.

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/tabish121/activemq-artemis ARTEMIS-770

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/activemq-artemis/pull/820.patch

To close this pull request, make a commit to your master/trunk branch with
(at least) the following in the commit message:

    This closes #820
    
----
commit 22eceeb6740f02631de7ae2c553505093149e6b5
Author: Timothy Bish <ta...@gmail.com>
Date:   2016-10-03T18:23:50Z

    ARTEMIS-770 AMQP Message Transformer refactor
    
    Refactor the AMQP Message transformers both for better performance and
    also to fix a number of issues with the transformers creating inbound
    and outbound messages with incorrectly mapped values or extra data
    appended where it should not be.

----


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---


Re: [GitHub] activemq-artemis pull request #820: ARTEMIS-770 AMQP Message Transformer ref...

Posted by Timothy Bish <ta...@gmail.com>.
Same way you subscribed to it: http://activemq.apache.org/mailing-lists.html

On 10/06/2016 10:30 AM, Dharmesh Joshi wrote:
> How do I unsubscribe from this mailing list?
>
> Thanks,
> Dharmesh
>
> -----Original Message-----
> From: tabish121 [mailto:git@git.apache.org]
> Sent: Wednesday, October 5, 2016 5:34 PM
> To: dev@activemq.apache.org
> Subject: [GitHub] activemq-artemis pull request #820: ARTEMIS-770 AMQP
> Message Transformer ref...
>
> GitHub user tabish121 opened a pull request:
>
>      https://github.com/apache/activemq-artemis/pull/820
>
>      ARTEMIS-770 AMQP Message Transformer refactor
>
>      Refactor the AMQP Message transformers both for better performance and
>      also to fix a number of issues with the transformers creating inbound
>      and outbound messages with incorrectly mapped values or extra data
>      appended where it should not be.
>
> You can merge this pull request into a Git repository by running:
>
>      $ git pull https://github.com/tabish121/activemq-artemis ARTEMIS-770
>
> Alternatively you can review and apply these changes as the patch at:
>
>      https://github.com/apache/activemq-artemis/pull/820.patch
>
> To close this pull request, make a commit to your master/trunk branch with
> (at least) the following in the commit message:
>
>      This closes #820
>      
> ----
> commit 22eceeb6740f02631de7ae2c553505093149e6b5
> Author: Timothy Bish <ta...@gmail.com>
> Date:   2016-10-03T18:23:50Z
>
>      ARTEMIS-770 AMQP Message Transformer refactor
>      
>      Refactor the AMQP Message transformers both for better performance and
>      also to fix a number of issues with the transformers creating inbound
>      and outbound messages with incorrectly mapped values or extra data
>      appended where it should not be.
>
> ----
>
>
> ---
> If your project is set up for it, you can reply to this email and have your
> reply appear on GitHub as well. If your project does not have this feature
> enabled and wishes so, or if the feature is enabled but not working, please
> contact infrastructure at infrastructure@apache.org or file a JIRA ticket
> with INFRA.
> ---
>
>


-- 
Tim Bish
twitter: @tabish121
blog: http://timbish.blogspot.com/


RE: [GitHub] activemq-artemis pull request #820: ARTEMIS-770 AMQP Message Transformer ref...

Posted by Dharmesh Joshi <jo...@gmail.com>.
How do I unsubscribe from this mailing list?

Thanks,
Dharmesh

-----Original Message-----
From: tabish121 [mailto:git@git.apache.org] 
Sent: Wednesday, October 5, 2016 5:34 PM
To: dev@activemq.apache.org
Subject: [GitHub] activemq-artemis pull request #820: ARTEMIS-770 AMQP
Message Transformer ref...

GitHub user tabish121 opened a pull request:

    https://github.com/apache/activemq-artemis/pull/820

    ARTEMIS-770 AMQP Message Transformer refactor

    Refactor the AMQP Message transformers both for better performance and
    also to fix a number of issues with the transformers creating inbound
    and outbound messages with incorrectly mapped values or extra data
    appended where it should not be.

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/tabish121/activemq-artemis ARTEMIS-770

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/activemq-artemis/pull/820.patch

To close this pull request, make a commit to your master/trunk branch with
(at least) the following in the commit message:

    This closes #820
    
----
commit 22eceeb6740f02631de7ae2c553505093149e6b5
Author: Timothy Bish <ta...@gmail.com>
Date:   2016-10-03T18:23:50Z

    ARTEMIS-770 AMQP Message Transformer refactor
    
    Refactor the AMQP Message transformers both for better performance and
    also to fix a number of issues with the transformers creating inbound
    and outbound messages with incorrectly mapped values or extra data
    appended where it should not be.

----


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] activemq-artemis issue #820: ARTEMIS-770 AMQP Message Transformer refactor

Posted by clebertsuconic <gi...@git.apache.org>.
Github user clebertsuconic commented on the issue:

    https://github.com/apache/activemq-artemis/pull/820
  
    There are a few regressions under org.apache.activemq.artemis.tests.integration.amqp.*
    
    AmqpTransactionTest::testReceiversCommitAndRollbackWithMultipleSessionsInSingleTX
    
    and
    
    ProtonPubTest has a few failing.
    
    
    You think you could look into those and amend the commit?
    
    
    
    But overall it looks great!


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] activemq-artemis pull request #820: ARTEMIS-770 AMQP Message Transformer ref...

Posted by asfgit <gi...@git.apache.org>.
Github user asfgit closed the pull request at:

    https://github.com/apache/activemq-artemis/pull/820


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---