[jboss-user] [Beginner's Corner] New message: "Re: How do I enable pass-by-reference for EJB3 in JBoss AS container?"

jaikiran pai do-not-reply at jboss.com
Fri Feb 26 14:37:07 EST 2010


User development,

A new message was posted in the thread "How do I enable pass-by-reference for EJB3 in JBoss AS container?":

http://community.jboss.org/message/528878#528878

Author  : jaikiran pai
Profile : http://community.jboss.org/people/jaikiran

Message:
--------------------------------------------------------------
> jlsimone wrote:
>  
> Hmmm, I am so new to JBoss that I am not in the position to question the knowledge and experience of those who have been around and involved much longer than I. Never the less, I have a couple more questions. I am hoping against hope that I can get JBoss to do what WebSphere is doing for me.
In short, it's not possible with EJB3 in JBoss AS-5
 
> jlsimone wrote:
>  
>  
>  
> I read a post at this link http://www.theserverside.com/discussions/thread.tss?thread_id=24905 that said, "JBoss automatically knows when you are accessing an EJB in the same container, even if you use Remote interfaces. Thus, it passes by reference instead of by value, offering the performance advantage of Local interfaces." Now, it is important to point out that this post was from April, 2004, a long time ago. Was this statement ever true, and if so, is it still true?
>  
>  
Yes, it was true and would still apply for EJB2.x.
 
> jlsimone wrote:
>  
> 
>  
> In addition, somehow I found my way to the org.jboss.invocation.InvokerInterceptor class. This class strongly suggests that the quote from the post, above, may be true. I have been trying to figure out if or how or when this InvokerInterceptor might be used and how it might behave in my circumstances. Is the InvokerInterceptor ever used at all in JBoss? Does JBoss need to be configured in order to use it?
It's not used in EJB3 for JBoss. It's (probably is still) used for EJB2.x. The EJB3 interceptors are all present in ejb3-interceptors-aop.xml in the deploy folder.
 
In JBoss AS-5, for EJB3 remote interfaces, the interceptors are smart enough to figure out whether the client lies in the same VM and if it does, then the call is *not* routed through any network layer. However the call for EJB3 remote interfaces, *is* still serialized/de-serialized (since the spec mandates it).  Currently there's no way to disable this.
 
I guess, you could probably add a feature request https://jira.jboss.org/jira/browse/EJBTHREE to allow something along those lines.

--------------------------------------------------------------

To reply to this message visit the message page: http://community.jboss.org/message/528878#528878




More information about the jboss-user mailing list