Skip to content

Using the object factory

marcesher edited this page Apr 13, 2012 · 1 revision

Using the ObjectFactory

CFConcurrent provides several convenience Service objects that lube the friction when using the underlying Java objects with ColdFusion.

Just as important, CFConcurrent provides an ObjectFactory that simplifies some of the more tedious aspects of working with the Java Concurrency Framework with ColdFusion.

In there, you'll find methods for:

  1. creating "proxies", which are necessary to submit your CFC instances to the JCF
  2. creating Queues
  3. creating Executors and Services
  4. easily working with TimeUnits
  5. creating rejection policies

Note that, by design, the ObjectFactory does not expose methods for creating every single object provided by the Java Concurrency Framework; rather, in adherence to its goals, it exposes methods for simplifying the tedious parts. When you need to create and work with other parts of the JCF, simply use createObject( 'java', 'java.util.concurrent.Whatever' )

Clone this wiki locally