Details
-
Type:
Improvement
-
Status:
Closed
-
Priority:
Minor
-
Resolution: Won't Fix or Usage Issue
-
Affects Version/s: 2.0.0-M2
-
Fix Version/s: None
-
Component/s: Core: Configuration
-
Labels:None
-
User impact:Low
-
Similar Issues:None
Description
Now that the ObjectFactory framework is in place, we should use it! Basically any String variable with a class name (i.e., String fooClassName = "foo.default.class.Name"
should use an ObjectFactory instead which ties it into the standard config/lifecycle mechanism of Mule 2.x (usually Spring) and allows for singleton/prototype/pooled scopes to be chosen.
It's not an absolute solution. Many cases do indeed need FQN as strings to avoid compile-time dependencies. Moreover, we already faced a limitation of BDPs - they want class references, thus unnecessarily binding core to the modules (currently need to push everything out to modules and have just 1 line of config and dozen schema declarations instead).
This is only a note of caution to review each case's usage.