jakartaee / jakartaee/messaging

Clarify classloader used in ObjectMessage.getObject() and/or provide new method getObject(ClassLoader classLoader)

Open
#24 11 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

pd20-forreview-minor Priority: Major Type: Improvement
Dominant language
Java
Stars
49
Forks
34
PR merge metrics
No merged PRs in 30d

Description

It is specified neither in the spec nor in the API JavaDoc which ClassLoader is to be used, when the object gets deserialized in ObjectMessage.getObject().
This omission lead to different implementations (and bugs) among JMS providers, as can be seen here:
[http://www-01.ibm.com/support/docview.wss?uid=swg1IC72855](http://www-01.ibm.com/support/docview.wss?uid=swg1IC72855)
[http://www.coderanch.com/t/313402/EJB-JEE/java/Exception-receiving-ObjectMessage-JMS](http://www.coderanch.com/t/313402/EJB-JEE/java/Exception-receiving-ObjectMessage-JMS)
[http://forums.oracle.com/forums/thread.jspa?threadID=738545](http://forums.oracle.com/forums/thread.jspa?threadID=738545)
[http://community.jboss.org/message/437144#437144](http://community.jboss.org/message/437144#437144)

Alternatively, if it isn't possible to specify the class loader, add a method "Serializable getObject(ClassLoader classLoader) to ObjectMessage.
#### Affected Versions
[2.0]

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reviewing ObjectMessage.getObject() and the affected JMS 2.0 specification and API JavaDoc. Compare the linked provider reports to determine whether the existing method needs defined classloader semantics or a new ClassLoader overload; done requires an agreed API or specification change.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
api
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.