[jboss-jira] [JBoss JIRA] Closed: (EJBTHREE-653) No pooling for stateless session beans

Carlo de Wolf (JIRA) jira-events at lists.jboss.org
Wed Mar 7 02:10:28 EST 2007


     [ http://jira.jboss.com/jira/browse/EJBTHREE-653?page=all ]

Carlo de Wolf closed EJBTHREE-653.
----------------------------------


> No pooling for stateless session beans
> --------------------------------------
>
>                 Key: EJBTHREE-653
>                 URL: http://jira.jboss.com/jira/browse/EJBTHREE-653
>             Project: EJB 3.0
>          Issue Type: Bug
>          Components: EJB3 Extensions
>    Affects Versions: EJB 3.0 RC8 - FD
>         Environment: OS: Windows XP SP2
> JDK 1.5.0_06_b05
> JBoss AS 4.0.4 GA
>            Reporter: Guido Bening
>         Assigned To: Carlo de Wolf
>             Fix For: EJB 3.0 RC9 - FD
>
>
> Scenario:
> Client VM calls a method on a EJB 2 Stateful Session Bean (SFSB) via the remote interface in a loop for 1000 times.Transaction starts on the application server. The SFSB method calls a method on a EJB3 Stateless Session Bean (SLSB) - via the remote interface (local interface makes no difference).
> The print out in the PostConstruct callback method of the EJB3 SLSB shows us, that a new bean instance was created for each of the 1000 method calls. Because of ThreadLocal pooling approach, we print out the Thread id too to show, that we always have the same Thread for each method call.
> CallBack method:
>     /**
>      * EJBCreate method.
>      */
>     @PostConstruct
>     public void ejb3Create() {
>         System.out.println("New SessionBean " + this);
>         System.out.println("Thread " + Thread.currentThread().getId());
>         setupBean();
>     }
>     
> And the log for a few of the 1000 calls:
> ...
> 09:17:51,119 INFO  [STDOUT] New SessionBean com.jcoffee.components.um3.UserManagementComponent3 at 231ae2
> 09:17:51,129 INFO  [STDOUT] Thread 97
> 09:17:51,139 INFO  [STDOUT] New SessionBean com.jcoffee.components.um3.UserManagementComponent3 at 1662174
> 09:17:51,139 INFO  [STDOUT] Thread 97
> 09:17:51,219 INFO  [STDOUT] New SessionBean com.jcoffee.components.um3.UserManagementComponent3 at 189f155
> 09:17:51,219 INFO  [STDOUT] Thread 97
> 09:17:51,239 INFO  [STDOUT] New SessionBean com.jcoffee.components.um3.UserManagementComponent3 at 1a82dfb
> 09:17:51,239 INFO  [STDOUT] Thread 97
> 09:17:51,289 INFO  [STDOUT] New SessionBean com.jcoffee.components.um3.UserManagementComponent3 at 198813a
> 09:17:51,289 INFO  [STDOUT] Thread 97
> 09:17:51,309 INFO  [STDOUT] New SessionBean com.jcoffee.components.um3.UserManagementComponent3 at 59eefd
> 09:17:51,309 INFO  [STDOUT] Thread 97
> 09:17:51,359 INFO  [STDOUT] New SessionBean com.jcoffee.components.um3.UserManagementComponent3 at 2e3520
> 09:17:51,369 INFO  [STDOUT] Thread 97
> 09:17:51,379 INFO  [STDOUT] New SessionBean com.jcoffee.components.um3.UserManagementComponent3 at 1ed457
> 09:17:51,379 INFO  [STDOUT] Thread 97
> 09:17:51,439 INFO  [STDOUT] New SessionBean com.jcoffee.components.um3.UserManagementComponent3 at 1e1c7f3
> 09:17:51,439 INFO  [STDOUT] Thread 97
> 09:17:51,449 INFO  [STDOUT] New SessionBean com.jcoffee.components.um3.UserManagementComponent3 at 15cb8ed
> 09:17:51,449 INFO  [STDOUT] Thread 97
> 09:17:51,519 INFO  [STDOUT] New SessionBean com.jcoffee.components.um3.UserManagementComponent3 at 1a4a949
> 09:17:51,519 INFO  [STDOUT] Thread 97
> 09:17:51,529 INFO  [STDOUT] New SessionBean com.jcoffee.components.um3.UserManagementComponent3 at 19ae0a
> 09:17:51,529 INFO  [STDOUT] Thread 97
> 09:17:51,589 INFO  [STDOUT] New SessionBean com.jcoffee.components.um3.UserManagementComponent3 at 567fa0
> 09:17:51,599 INFO  [STDOUT] Thread 97
> 09:17:51,609 INFO  [STDOUT] New SessionBean com.jcoffee.components.um3.UserManagementComponent3 at 19956fe
> 09:17:51,609 INFO  [STDOUT] Thread 97
> 09:17:51,659 INFO  [STDOUT] New SessionBean com.jcoffee.components.um3.UserManagementComponent3 at 150e574
> 09:17:51,669 INFO  [STDOUT] Thread 97
> 09:17:51,679 INFO  [STDOUT] New SessionBean com.jcoffee.components.um3.UserManagementComponent3 at aa46ad
> 09:17:51,679 INFO  [STDOUT] Thread 97
> ...

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.jboss.com/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        



More information about the jboss-jira mailing list