Skip to main content

[jsr236-spec users] Some more feedback on PR

  • From: Arun Gupta < >
  • To:
  • Subject: [jsr236-spec users] Some more feedback on PR
  • Date: Sun, 10 Feb 2013 09:59:47 -0800
  • Organization: Oracle

Title: Concurrency Utilities for Java EE
Hi Anthony,

Here is some more feedback on PR:

- In this code:

@Resource(name = "concurrent/myFactory")
ManagedThreadFactory factory;
factory.newThread(new MyTask(5));

newThread returns a Thread instead of ManageableThread. Shouldn't it return the later ?

- Shouldn't ManageableThread inherit from java.lang.Thread ?

- How are ManageableThreadFactory and ManagedExecutorService use cases different ? I can create bunch of threads from the former and create my own thread pool or executor service.

- IMHO ManagedThread is a better name than ManageableThread.

- There is a default ManagedThreadFactory. Should it be in the concurrent namespace, i.e.

java:comp/concurrent/DefaultManagedThreadFactory


instead of


java:comp/DefaultManagedThreadFactory Concurrency Utilities for Java EE

- Will the code:

@Resource
ManagedThreadFactory factory;

be equivalent to:

@Resource(lookup="DefaultManagedThreadFactory")
ManagedThreadFactory factory;

Thanks,
Arun
-- 
http://twitter.com/arungupta
http://blogs.oracle.com/arungupta


[jsr236-spec users] Some more feedback on PR

Arun Gupta 02/10/2013

[jsr236-spec users] Re: Some more feedback on PR

Anthony Lai 02/11/2013
 
 
Close
loading
Please Confirm
Close