beam-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ASF GitHub Bot (JIRA)" <>
Subject [jira] [Commented] (BEAM-560) In JAXBCoder, use a pair of ThreadLocals to cache Marshaller/Unmarshaller
Date Thu, 19 Jan 2017 13:20:26 GMT


ASF GitHub Bot commented on BEAM-560:

GitHub user vectorijk opened a pull request:

    [BEAM-560] Use ThreadLocal to cache Marshaller/Unmarshaller

    Be sure to do all of the following to help us incorporate your contribution
    quickly and easily:
     - [X] Make sure the PR title is formatted like:
       `[BEAM-<Jira issue #>] Description of pull request`
     - [X] Make sure tests pass via `mvn clean verify`. (Even better, enable
           Travis-CI on your fork and ensure the whole test matrix passes).
     - [X] Replace `<Jira issue #>` in the title with the actual Jira issue
           number, if there is one.
     - [ ] If this contribution is large, please file an Apache
           [Individual Contributor License Agreement](
    same as PR title

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

    $ git pull BEAM-560

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

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

    This closes #1795
commit 94b2ee8e52f39e8ced7186869a6147e716338d8d
Author: Kai Jiang <>
Date:   2017-01-19T13:06:13Z

    [BEAM-560] Use ThreadLocal to cache Marshaller/Unmarshaller


> In JAXBCoder, use a pair of ThreadLocals to cache Marshaller/Unmarshaller
> -------------------------------------------------------------------------
>                 Key: BEAM-560
>                 URL:
>             Project: Beam
>          Issue Type: Bug
>          Components: sdk-java-core
>            Reporter: Thomas Groh
>            Assignee: Davor Bonaci
>            Priority: Minor
>              Labels: easyfix, starter
> Marshallers and Unmarshallers are created per-element. Instead, they can be created per-thread
and stored within a ThreadLocal which creates a new instance on calls to initialValue(), which
allows them to be reused for all elements encoded or decoded by the coder.

This message was sent by Atlassian JIRA

View raw message