tomee-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Romain Manni-Bucau (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (TOMEE-2060) EJB component can modify its naming context
Date Mon, 12 Jun 2017 11:10:00 GMT

    [ https://issues.apache.org/jira/browse/TOMEE-2060?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16046442#comment-16046442
] 

Romain Manni-Bucau commented on TOMEE-2060:
-------------------------------------------

Hmm, I was not thinking to it but also not sure what you exactly have in mind so can probably
work :). Just to share what I had in mind: the user binding of these EJB contexts are linked
to ThreadContext (a thread local holding the EJB meta) so we can prevent any write operation
in such a context with surely some exception for our "API" usage in embedded mode (in particular
bind("inject", instance) if it is affected).

Feel free to do a PR, would likely be easier to discuss it with some code.

> EJB component can modify its naming context
> -------------------------------------------
>
>                 Key: TOMEE-2060
>                 URL: https://issues.apache.org/jira/browse/TOMEE-2060
>             Project: TomEE
>          Issue Type: Bug
>          Components: TomEE Core Server
>    Affects Versions: 7.0.3
>            Reporter: Katya Todorova
>
> According to the Java EE specification (6/7) EE.5.3.4:
> The container must ensure that the application component instances have only
> read access to their naming context. The container must throw the
> javax.naming.OperationNotSupportedException from all the methods of the
> javax.naming.Context interface that modify the environment naming context
> and its subcontexts.
> It seems that IvmContext checks if the naming context is read-only and throws the corresponding
exception but the flag is false by default and is never changed.
> Is this done on purpose or is this a todo functionality?  



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Mime
View raw message