Patches item #775486, was opened at 2003-07-21 23:42
Message generated for change (Tracker Item Submitted) made by Item Submitter
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=376687&aid=775486&group_id=22866

Category: None
Group: None
Status: Open
Resolution: None
Priority: 5
Submitted By: Atul Dedhia (dedhat)
Assigned to: Nobody/Anonymous (nobody)
Summary: JBoss bean management stratergy

Initial Comment:
Recently I came accross very interesting study on how 
EBs are managed by JBoss by 'Scott Crawford' 
(http://www.scottcrawford.com/undercover/Undercover
%20Report%20-%20JBoss%203.pdf : Page # 12).
 
According to Scott's study, total number of EBs created 
during his tests is exactly the number of distinct primary 
keys plus number of clients (home client). I was very 
curious about this, and wrote a smiple client which 
makes direct calls to EntityBean (CMP) and saw the 
same behaviour. For example, if a single client makes a 
call to EB (findByPK + get + set), total number of EB 
instances created by JBoss-3.0.4 is 2 (one instance for 
the the requested bean and one for the client). 
 
I found that "EntityInstanceInterceptor.invokeHome" 
function is responsible for creating this extra bean for 
client. If I am correct the bean instance created in 
EntityInstanceInterceptor.invokeHome is not put into 
cache, and hence never gets pooled back (even when 
there is no client activity). 
 
I tried removing the piece of code in 
EntityInstanceInterceptor.invokeHome which creates 
seperate instance for each client and ran my little 
sample program and it worked without any problem. 

I had to modify two other server side interceptor classes 
(mentioned at the bottom) in order to support the 
changes made in EntityInstanceInterceptor class.

I ran ECperf load against JBoss with/without piece of 
code that creates sperate bean instance for each client 
and here are results:
 
Without any changes to JBoss code:
-----------------------------------
BBops/min = 12
 
After removing piece of code that create seperate bean 
for client:
--------------------------------------------
BBops/min = 66

Mainly I have changed source code in following three 
files:
1) org.jboss.ejb.plugins.EntityInstanceInterceptor
2) org.jboss.ejb.plugins.EntityCreationInterceptor
3) org.jboss.ejb.plugins.EntitySynchronizationInterceptor

In all the above files, invokeHome function is modified 
(some piece of code is commented out).

If anything is not clear or you need more information, 
please feel free to contact me on 
[EMAIL PROTECTED]

Thanks,

Atul

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

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=376687&aid=775486&group_id=22866


-------------------------------------------------------
This SF.net email is sponsored by: VM Ware
With VMware you can run multiple operating systems on a single machine.
WITHOUT REBOOTING! Mix Linux / Windows / Novell virtual machines at the
same time. Free trial click here: http://www.vmware.com/wl/offer/345/0
_______________________________________________
JBoss-Development mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-development

Reply via email to