You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tomee.apache.org by "David Blevins (JIRA)" <ji...@apache.org> on 2011/02/18 16:58:40 UTC

[jira] Commented: (OPENEJB-1431) openejb.localcopy does nothing like what's described in docs

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

David Blevins commented on OPENEJB-1431:
----------------------------------------

I guess this description made more sense back when we only supported EJB 1.1.  How would something like this be:

"Affects only Remote interfaces, allowing them to be treated as Local interfaces when possible.  OpenEJB uses the same code for both Remote and Local interfaces when the references are between beans or components in the same JVM.  Historically this code was called the Local Server.  For EJB specification compliance, the Local Server must still marshal (copy) calls made on Remote interfaces even when those calls are made between two components living locally in the same JVM. When this flag is set to false it instructs the container to skip this copy step, resulting in pass by reference semantics for Remote interfaces that aren't actually being used remotely.

As of OpenEJB 3.1.1, it is possible to annotate a single interface as both @Local and @Remote.  In this situation OpenEJB will automatically give components in the same application as the bean the @Local version of the interface.  All components living external to the bean's application will get the @Remote version of the interface when requesting a reference to the bean.  The effect is essentially the same as setting localCopy to false, but with the advantage that this dual behavior is documented in application code.  This behavior is OpenEJB specific and not yet part of the EJB specification."



> openejb.localcopy does nothing like what's described in docs
> ------------------------------------------------------------
>
>                 Key: OPENEJB-1431
>                 URL: https://issues.apache.org/jira/browse/OPENEJB-1431
>             Project: OpenEJB
>          Issue Type: Bug
>          Components: documentation
>    Affects Versions: 3.1.4
>            Reporter: Ed Staub
>
> The doc on http://openejb.apache.org/3.0/startup.html says that when system property openejb.localcopy is false, it:
> "Instructs the container system to not marshal (copy) calls between beans. The container system as will pass parameters and return values without copying or marshalling as is required for EJB 2.0 Local interfaces."
> See org.apache.openejb.core.ivm.BaseEjbProxyHandler.java.  LOCAL interfaces are not affected at all - they ALWAYS pass by reference.  When localCopy is set to false, REMOTE EJB args/results are passed by reference when in the same JVM.  
> I'm guessing this works as designed - it's the doc that's wrong.  But that's just a guess!!!

-- 
This message is automatically generated by JIRA.
-
For more information on JIRA, see: http://www.atlassian.com/software/jira