-
1. Re: How does JBoss handle Local and Remote interfaces
jaikiran Oct 29, 2008 11:22 AM (in response to mrfarhankhan)For remote interfaces the params and return values are serialized/deserialized. Whereas calls through local interfaces don't involve these steps. So if you are using the beans within the same JVM, then its better to use local interfaces.
-
2. Re: How does JBoss handle Local and Remote interfaces
alrubinger Oct 29, 2008 3:21 PM (in response to mrfarhankhan)Note that if invoking upon a Remote interface within the same JVM, pass-by-value semantics apply to fit spec (as Jaikiran noted) but the network stack is bypassed (for efficiency).
S,
ALR -
3. Re: How does JBoss handle Local and Remote interfaces
mrfarhankhan Oct 30, 2008 3:32 AM (in response to mrfarhankhan)Thanks for the reply. I'm using JSF, EJB3, JBoss4.2.2.GA. I have several stateless EJB deployed on JBOSS, on the same machine.
I have updated now and using the local interfaces instead of the remote interfaces. Also, I have done JBoss tunning and slimming as mentioned in this link
http://www.jboss.org/community/docs/DOC-10181
But there is no significant gain in performance. What else can I do to achieve optimum performance ?
Thanks in advance.
Farhan! -
4. Re: How does JBoss handle Local and Remote interfaces
peterj Oct 30, 2008 10:50 AM (in response to mrfarhankhan)The first step in performance tuning is gathering performance data so that you can identify the bottleneck (that is, where things are running too slowly). With the bottleneck identified, you can fix that. Without knowing where your bottleneck is, you will not be able to get any performance improvement.
-
5. Re: How does JBoss handle Local and Remote interfaces
mrfarhankhan Oct 30, 2008 11:33 PM (in response to mrfarhankhan)Would you suggest any profiler thats best for this purpose ? Secondly, I'v noticed that the application renders slow on IE as compared to FireFox browser. Any tips ?
Farhan ! -
6. Re: How does JBoss handle Local and Remote interfaces
edek234 Nov 1, 2008 6:53 PM (in response to mrfarhankhan)Actually I'm not an expert, if there is abetter way of doing this, please let me know.
I would write a filter, recoding execution times in ThreadLocal, and dump it into logs in a Servlet fillter (unless you are trying to profile WebServices).
Browsers: there is a lot going on in the browser, like javascript. I wouldn't worry about it too much, unless you should for some reason. This does not affect the server. I would test the server with JMeter, to see how many clients it can handle. -
7. Re: How does JBoss handle Local and Remote interfaces
edek234 Nov 1, 2008 6:55 PM (in response to mrfarhankhan)I meant an interceptor, not a filter. The EJB interceptor.
-
8. Re: How does JBoss handle Local and Remote interfaces
rafaelcba Nov 4, 2008 7:29 AM (in response to mrfarhankhan)Hi All!
Is possible force Call-By-Value on local invocations made cross EARs with isolated class loaders deployed on same JBoss?
I have that scenario:
Two EARs deployed on same JBoss AS:
App1.ear
- META-INF (descriptors)
- lib/lib.jar (ClassA.class)
- EJB.jar (MyBean1)
App2.ear
- META-INF (descriptors)
- lib/lib.jar (ClassA.class)
- EJB.jar (MyBean2)
MyBean 1 make a local invocation to MyBean2 passing a intance of ClassA.class. When MyBean2 handle this invocation it throw a ClassCastException... Because ClassA passed by MyBean1 has other ClassLoader...
I read at JBossWiki [1] that is possible force CallByValue on JBoss invocatios:<!-- EAR deployer, remove if you are not using Web layers --> <mbean code="org.jboss.deployment.EARDeployer" name="jboss.j2ee:service=EARDeployer"> <!-- Isolate all ears in their own classloader space --> <attribute name="Isolated">true</attribute> <!-- Enforce call by value to all remote interfaces --> <attribute name="CallByValue">true</attribute> </mbean>
But don't work for local invocations.
When this conf (true) make cense on JBoss???
[1] https://www.jboss.org/community/docs/DOC-9288