users@glassfish.java.net

The use of use-thread-pool-id element in sun-ejb-jar.xml

From: <glassfish_at_javadesktop.org>
Date: Wed, 08 Aug 2007 02:55:36 PDT

Hi
I tried to use use-thread-pool-id element in sun-ejb-jar.xml,
but this element did not take effect.

From SJAS9.0 guide, I got that this element is used to specifies
the thread pool that processes the requests for the bean.

My application server is GlassFish V2 b54.
First I created a threadpool named 'threadpool3':
  asadmin create-threadpool threadpool3

Then I wrote a EJB2.1 application, defined above threadpool
in sun-ejb-jar.xml:
<ejb>
   <ejb-name>CartEJB</ejb-name>
      <jndi-name>SimpleCart</jndi-name>
      <use-thread-pool-id>threadpool3</use-thread-pool-id>
</ejb>
When the ejb bean's bussiness method is invoked, a test message
would be outputed to server.log.

But when I accessed above ejb from a java client, I found the thread pool
was NOT threadpool3, it was default thread pool: thread-pool-1!
the message in server.log:
[#|2007-08-08T18:27:41.437+0800|INFO|sun-appserver9.1|javax.enterprise.
system.stream.out|_ThreadID=42;_ThreadName=p:thread-pool-1;w:17;|
thismessage is for test|#]

I want to know what's wrong in my operations,
and how to use use-thread-pool-id element.

Thanks,
henrry_china
[Message sent by forum member 'henrry_china' (henrry_china)]

http://forums.java.net/jive/thread.jspa?messageID=229982